From report at bugs.python.org Fri Oct 1 00:17:18 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 30 Sep 2010 22:17:18 +0000 Subject: [issue10002] Installer doesn't install on Windows Server 2008 DataCenter R2 In-Reply-To: <1285882629.62.0.145594356076.issue10002@psf.upfronthosting.co.za> Message-ID: <1285885038.5.0.631481574752.issue10002@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Please run "msiexec /i python-2.7.msi /l*v python.log", and compress and attach the resulting log file. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 00:26:03 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 30 Sep 2010 22:26:03 +0000 Subject: [issue9962] GzipFile doesn't have peek() In-Reply-To: <1285623515.75.0.317234760361.issue9962@psf.upfronthosting.co.za> Message-ID: <1285885563.17.0.331688436565.issue9962@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 00:37:03 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 30 Sep 2010 22:37:03 +0000 Subject: [issue9962] GzipFile doesn't have peek() In-Reply-To: <1285623515.75.0.317234760361.issue9962@psf.upfronthosting.co.za> Message-ID: <1285886223.75.0.765817890428.issue9962@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch fixing these issues. ---------- Added file: http://bugs.python.org/file19074/gzipfixup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 00:43:06 2010 From: report at bugs.python.org (joblack) Date: Thu, 30 Sep 2010 22:43:06 +0000 Subject: [issue10002] requested log file In-Reply-To: <1285882629.62.0.145594356076.issue10002@psf.upfronthosting.co.za> Message-ID: <1285886586.48.0.885855327901.issue10002@psf.upfronthosting.co.za> joblack added the comment: requested log file ---------- title: Installer doesn't install on Windows Server 2008 DataCenter R2 -> requested log file Added file: http://bugs.python.org/file19075/python.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 01:33:29 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 30 Sep 2010 23:33:29 +0000 Subject: [issue10002] requested log file In-Reply-To: <1285882629.62.0.145594356076.issue10002@psf.upfronthosting.co.za> Message-ID: <1285889609.02.0.947938580602.issue10002@psf.upfronthosting.co.za> Martin v. L?wis added the comment: In this specific run, the critical error was this: MSI (s) (38:74) [00:36:38:068]: Assembly Error:Der angeforderte Vorgang war nicht erfolgreich. Es ist ein Systemneustart erforderlich, um die durchgef?hrten ?nderungen r?ckg?ngig zu machen. So please do reboot the system, and try again (generating a new log file). It also says Assembly Error (sxs): Please look into Component Based Servicing Log located at -89201544ndir\logs\cbs\cbs.log to get more diagnostic information. So on the chance that this contains additional information, please also put this log file into the next zip file (you might want to screen it for any security-relevant information that you don't want to release). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 01:34:02 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 30 Sep 2010 23:34:02 +0000 Subject: [issue10002] Installer doesn't install on Windows Server 2008 DataCenter R2 In-Reply-To: <1285882629.62.0.145594356076.issue10002@psf.upfronthosting.co.za> Message-ID: <1285889642.01.0.594342512157.issue10002@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- title: requested log file -> Installer doesn't install on Windows Server 2008 DataCenter R2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 03:07:58 2010 From: report at bugs.python.org (Martin) Date: Fri, 01 Oct 2010 01:07:58 +0000 Subject: [issue10003] signal.SIGBREAK regression on windows In-Reply-To: <1285895278.8.0.672270997961.issue10003@psf.upfronthosting.co.za> Message-ID: <1285895278.8.0.672270997961.issue10003@psf.upfronthosting.co.za> New submission from Martin : The change in response to bug 9324 breaks bzr on windows as we use signal.SIGBREAK to listen for a ctrl+break keyboard press. Although SIGBREAK is not documented as valid on: It does in fact work and corresponds to CTRL_BREAK_EVENT in native windows terms. ---------- components: Extension Modules, Windows messages: 117769 nosy: brian.curtin, gz priority: normal severity: normal status: open title: signal.SIGBREAK regression on windows versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 03:10:24 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Oct 2010 01:10:24 +0000 Subject: [issue10001] ~Py_buffer.obj field is undocumented, though not hidden In-Reply-To: <1285868807.58.0.617972550499.issue10001@psf.upfronthosting.co.za> Message-ID: <1285895424.84.0.760711862577.issue10001@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The recommended way is to use PyBuffer_FillInfo() (and then fill in any additional data if necessary), which will set the pointer and incref it itself. I agree all this is a bit poorly documented. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python, pitrou stage: -> needs patch versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 03:11:06 2010 From: report at bugs.python.org (Martin) Date: Fri, 01 Oct 2010 01:11:06 +0000 Subject: [issue10003] signal.SIGBREAK regression on windows In-Reply-To: <1285895278.8.0.672270997961.issue10003@psf.upfronthosting.co.za> Message-ID: <1285895466.66.0.321204160614.issue10003@psf.upfronthosting.co.za> Martin added the comment: Also, the test seems to set signal handlers and never unset them, which I've also corrected. ---------- keywords: +patch Added file: http://bugs.python.org/file19076/sigbreak_windows_10003.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 03:36:25 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 01 Oct 2010 01:36:25 +0000 Subject: [issue10003] signal.SIGBREAK regression on windows In-Reply-To: <1285895278.8.0.672270997961.issue10003@psf.upfronthosting.co.za> Message-ID: <1285896985.06.0.157137970432.issue10003@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- assignee: -> brian.curtin resolution: -> accepted stage: -> patch review type: -> behavior versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 03:45:48 2010 From: report at bugs.python.org (joblack) Date: Fri, 01 Oct 2010 01:45:48 +0000 Subject: [issue10002] cbs.log In-Reply-To: <1285882629.62.0.145594356076.issue10002@psf.upfronthosting.co.za> Message-ID: <1285897548.13.0.358763160454.issue10002@psf.upfronthosting.co.za> joblack added the comment: cbs.log ---------- title: Installer doesn't install on Windows Server 2008 DataCenter R2 -> cbs.log Added file: http://bugs.python.org/file19077/CBS.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 03:53:17 2010 From: report at bugs.python.org (Steve Holden) Date: Fri, 01 Oct 2010 01:53:17 +0000 Subject: [issue10000] mark more tests as CPython specific In-Reply-To: <1285861695.5.0.301447830736.issue10000@psf.upfronthosting.co.za> Message-ID: <1285897997.25.0.225463846242.issue10000@psf.upfronthosting.co.za> Steve Holden added the comment: Of course, but better some record than none due to the overwhelming nature of the task. At least someone else can carry the torch from here. ---------- nosy: +holdenweb _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 04:36:24 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Oct 2010 02:36:24 +0000 Subject: [issue4661] email.parser: impossible to read messages encoded in a different encoding In-Reply-To: <1229273746.12.0.577914878535.issue4661@psf.upfronthosting.co.za> Message-ID: <1285900584.94.0.420123837791.issue4661@psf.upfronthosting.co.za> R. David Murray added the comment: New version of the patch that adds many more tests, and handles non-ASCII bytes in header values by changing them to '?'s when the header value is retrieved as a string. I think I'm half done. Still to do: generate_bytes, and the doc updates. By the way, another important reason to use surrogateescape rather than latin1 is that if I miss something and the byte-containing-strings escape, it will be obvious that that is what happened. Otherwise we're back in Python2 bytes/string conflation land. I of course make no promises about performance. And there is an issue there in that every header value access is now wrapped in an additional function call and a regex test, at a minimum, whether there are bytes present in the input or not :( ---------- Added file: http://bugs.python.org/file19078/email_parse_bytes2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 04:41:49 2010 From: report at bugs.python.org (Alexis Metaireau) Date: Fri, 01 Oct 2010 02:41:49 +0000 Subject: [issue8190] Add a PyPI XML-RPC client module In-Reply-To: <1269141957.53.0.288648605609.issue8190@psf.upfronthosting.co.za> Message-ID: <1285900909.24.0.793367864662.issue8190@psf.upfronthosting.co.za> Alexis Metaireau added the comment: Please, can you be a bit more precise about the missing features ? I'll be glad to cover them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 04:48:36 2010 From: report at bugs.python.org (MunSic JEONG) Date: Fri, 01 Oct 2010 02:48:36 +0000 Subject: [issue6608] asctime does not check its input In-Reply-To: <1248998208.56.0.3155599029.issue6608@psf.upfronthosting.co.za> Message-ID: <1285901316.51.0.44688788498.issue6608@psf.upfronthosting.co.za> MunSic JEONG added the comment: belopolsky I am little worried about my words. I made patch against 2.7-maint branch. But I recognized that patch is not following rules, because of your guidance. Then I uploaded another patch against py3k branch again. and issue6608-p3k.patch could be applied to py3k branch cleanly. If there were any boldness in my words, I'm sorry. and I'm ready to address any thing left in this issue. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 04:50:06 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Oct 2010 02:50:06 +0000 Subject: [issue10002] Installer doesn't install on Windows Server 2008 DataCenter R2 In-Reply-To: <1285882629.62.0.145594356076.issue10002@psf.upfronthosting.co.za> Message-ID: <1285901406.51.0.811186597241.issue10002@psf.upfronthosting.co.za> R. David Murray added the comment: Please don't change the subject, it changes the bug title, which makes the bug report less useful :) ---------- nosy: +r.david.murray title: cbs.log -> Installer doesn't install on Windows Server 2008 DataCenter R2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 07:41:33 2010 From: report at bugs.python.org (Jeffrey Finkelstein) Date: Fri, 01 Oct 2010 05:41:33 +0000 Subject: [issue1050268] rfc822.parseaddr is broken, breaks sendmail call in smtplib Message-ID: <1285911693.79.0.53726392251.issue1050268@psf.upfronthosting.co.za> Jeffrey Finkelstein added the comment: I can confirm this bug. Attached is the test case. ---------- keywords: +patch nosy: +jfinkels Added file: http://bugs.python.org/file19079/issue1050268.testcase.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 07:49:07 2010 From: report at bugs.python.org (Jeffrey Finkelstein) Date: Fri, 01 Oct 2010 05:49:07 +0000 Subject: [issue1481347] parse_makefile doesn't handle $$ correctly Message-ID: <1285912147.04.0.198272941582.issue1481347@psf.upfronthosting.co.za> Jeffrey Finkelstein added the comment: There seems to be a test case for this: http://svn.python.org/view/python/trunk/Lib/distutils/tests/test_sysconfig.py?view=diff&r1=73340&r2=73341 ---------- nosy: +jfinkels _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 09:26:14 2010 From: report at bugs.python.org (Lenard Lindstrom) Date: Fri, 01 Oct 2010 07:26:14 +0000 Subject: [issue10001] ~Py_buffer.obj field is undocumented, though not hidden In-Reply-To: <1285895424.84.0.760711862577.issue10001@psf.upfronthosting.co.za> Message-ID: <4CA58D10.1070008@telus.net> Lenard Lindstrom added the comment: This will work for bf_getbuffer, though having PyObject_GetBuffer set the obj field before passing it to the callback might be safer. Also, this does not address the case with wrapper types like memoryview. What happens if ~Py_buffer.obj is not visited in tp_traverse? Should this be documented? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 10:59:06 2010 From: report at bugs.python.org (Nick Craig-Wood) Date: Fri, 01 Oct 2010 08:59:06 +0000 Subject: [issue5131] pprint doesn't know how to print a defaultdict In-Reply-To: <1233592442.21.0.0563262599933.issue5131@psf.upfronthosting.co.za> Message-ID: <1285923546.22.0.250220088773.issue5131@psf.upfronthosting.co.za> Nick Craig-Wood added the comment: Terry J. Reedy (terry.reedy) wrote: > > IMHO pprint should be able to make a decent job of all the built in types > > Agreed, already true as far as I know, and irrelevant. This issue is not about built-in types in the builtins module, as documented Lib Ref chapter 5 *Built-in Types*. Collections is an Python-coded stdlib module that happens to import a couple of its classes from _collections, written in C for speed. My bad - not precise enough! I meant all the stdlib types rather than the builtin types. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 12:01:55 2010 From: report at bugs.python.org (Nir Aides) Date: Fri, 01 Oct 2010 10:01:55 +0000 Subject: [issue9962] GzipFile doesn't have peek() In-Reply-To: <1285623515.75.0.317234760361.issue9962@psf.upfronthosting.co.za> Message-ID: <1285927315.72.0.131138059316.issue9962@psf.upfronthosting.co.za> Nir Aides added the comment: Should be min(n, 1024) instead of max(...) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 12:52:33 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 01 Oct 2010 10:52:33 +0000 Subject: [issue10000] mark more tests as CPython specific In-Reply-To: <1285861695.5.0.301447830736.issue10000@psf.upfronthosting.co.za> Message-ID: <1285930353.05.0.456016711101.issue10000@psf.upfronthosting.co.za> Georg Brandl added the comment: Do you want to volunteer, Steve? ;) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 13:05:55 2010 From: report at bugs.python.org (Thomas Guettler) Date: Fri, 01 Oct 2010 11:05:55 +0000 Subject: [issue10004] email/quoprimime.py Exception (with patch) In-Reply-To: <1285931148.27.0.357018449582.issue10004@psf.upfronthosting.co.za> Message-ID: <1285931148.27.0.357018449582.issue10004@psf.upfronthosting.co.za> New submission from Thomas Guettler : I get the following traceback. I created a patch against email/quoprimime.py from SVN branch python2.7 File "/usr/lib64/python2.6/email/header.py", line 93, in decode_header dec = email.quoprimime.header_decode(encoded) File "/usr/lib64/python2.6/email/quoprimime.py", line 336, in header_decode return re.sub(r'=\w{2}', _unquote_match, s) File "/usr/lib64/python2.6/re.py", line 150, in sub return _compile(pattern, 0).sub(repl, string, count) File "/usr/lib64/python2.6/email/quoprimime.py", line 324, in _unquote_match return unquote(s) File "/usr/lib64/python2.6/email/quoprimime.py", line 106, in unquote return chr(int(s[1:3], 16)) ValueError: invalid literal for int() with base 16: 'ih' ---------- components: Library (Lib) files: quoprimime.py.diff keywords: patch messages: 117784 nosy: guettli priority: normal severity: normal status: open title: email/quoprimime.py Exception (with patch) versions: Python 2.7 Added file: http://bugs.python.org/file19080/quoprimime.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 13:10:26 2010 From: report at bugs.python.org (Thomas Guettler) Date: Fri, 01 Oct 2010 11:10:26 +0000 Subject: [issue10004] email/quoprimime.py Exception (with patch) In-Reply-To: <1285931148.27.0.357018449582.issue10004@psf.upfronthosting.co.za> Message-ID: <1285931426.66.0.417087803254.issue10004@psf.upfronthosting.co.za> Changes by Thomas Guettler : Added file: http://bugs.python.org/file19081/broken-subject.msg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 13:16:00 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Oct 2010 11:16:00 +0000 Subject: [issue9962] GzipFile doesn't have peek() In-Reply-To: <1285927315.72.0.131138059316.issue9962@psf.upfronthosting.co.za> Message-ID: <1285931755.3188.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > Should be min(n, 1024) instead of max(...) Well, no, because we want to buffer a non-trivial amount of bytes for the next accesses. So, if n < 1024, buffer at least 1024 bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 13:39:27 2010 From: report at bugs.python.org (Nir Aides) Date: Fri, 01 Oct 2010 11:39:27 +0000 Subject: [issue9962] GzipFile doesn't have peek() In-Reply-To: <1285623515.75.0.317234760361.issue9962@psf.upfronthosting.co.za> Message-ID: <1285933167.12.0.802819268956.issue9962@psf.upfronthosting.co.za> Nir Aides added the comment: Right, I missed the change from self.max_read_chunk to 1024 (read_size). Should not peek() limit to self.max_read_chunk as read() does? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 13:53:27 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Oct 2010 11:53:27 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1285934007.16.0.95659102718.issue8670@psf.upfronthosting.co.za> STINNER Victor added the comment: Update the patch for the new PyUnicode_AsWideCharString() function: - use Py_UNICODE_SIZE and SIZEOF_WCHAR_T in the preprocessor tests - faster loop: don't use a counter + pointer, but only use pointers (for the stop condition) The patch is not finished: I have to implement "#elif Py_UNICODE_SIZE == 4 && SIZEOF_WCHAR_T == 2" case. ---------- Added file: http://bugs.python.org/file19082/aswidechar_nonbmp-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 13:53:40 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Oct 2010 11:53:40 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1285934020.14.0.825569009553.issue8670@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file17322/pyunicode_aswidechar_surrogates-py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 13:58:02 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Oct 2010 11:58:02 +0000 Subject: [issue9962] GzipFile doesn't have peek() In-Reply-To: <1285933167.12.0.802819268956.issue9962@psf.upfronthosting.co.za> Message-ID: <1285934278.3188.3.camel@localhost.localdomain> Antoine Pitrou added the comment: > Right, I missed the change from self.max_read_chunk to 1024 > (read_size). Should not peek() limit to self.max_read_chunk as read() > does? This is used for the chunking of huge reads, but for peek(): 1) there is no chunking (peek() should do at most one raw read) 2) huge reads are not really the use case peek() is intended for ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 14:24:59 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Oct 2010 12:24:59 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1285935899.53.0.00828992111431.issue8670@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch version 3: - fix unicode_aswidechar if Py_UNICODE_SIZE == SIZEOF_WCHAR_T and w == NULL (return the number of characters, don't write into w!) - improve unicode_aswidechar() comment ---------- Added file: http://bugs.python.org/file19083/aswidechar_nonbmp-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 14:28:36 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Oct 2010 12:28:36 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1285936116.56.0.618887322547.issue8670@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't know how to test "if Py_UNICODE_SIZE == 4 && SIZEOF_WCHAR_T == 2". On Windows, sizeof(wchar_t) is 2, but it looks like Python is not prepared to have Py_UNICODE != wchar_t for is Windows implementation. wchar_t is 32 bits long on Linux and Mac OS X. So how can I test it? Or should we just drop support of "Py_UNICODE_SIZE == 4 && SIZEOF_WCHAR_T == 2"? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 14:45:01 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 01 Oct 2010 12:45:01 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1285937101.38.0.698684643544.issue8670@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: I, too, can't think of any platforms where Py_UNICODE_SIZE == 4 && SIZEOF_WCHAR_T == 2 and I'm not sure what the previous policy has been. Have you noticed any other code that would set a precedent? If no one else chimes in, perhaps ask on IRC or python-dev? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 14:46:54 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 01 Oct 2010 12:46:54 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1285936116.56.0.618887322547.issue8670@psf.upfronthosting.co.za> Message-ID: <4CA5D83B.1020707@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > > I don't know how to test "if Py_UNICODE_SIZE == 4 && SIZEOF_WCHAR_T == 2". On Windows, sizeof(wchar_t) is 2, but it looks like Python is not prepared to have Py_UNICODE != wchar_t for is Windows implementation. > > wchar_t is 32 bits long on Linux and Mac OS X. So how can I test it? Or should we just drop support of "Py_UNICODE_SIZE == 4 && SIZEOF_WCHAR_T == 2"? You can tweak the Windows pyconfig.h to use UCS4, AFAIK, if you want to test drive this case. But it's probably easier to configure with "gcc -fshort-wchar" on Linux :-) Dropping support for this is not a good idea. ---------- title: c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) -> c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 14:58:41 2010 From: report at bugs.python.org (Popa Claudiu) Date: Fri, 01 Oct 2010 12:58:41 +0000 Subject: [issue10005] Postgresql calls undefined method in __str__ In-Reply-To: <1285937921.5.0.29820555696.issue10005@psf.upfronthosting.co.za> Message-ID: <1285937921.5.0.29820555696.issue10005@psf.upfronthosting.co.za> New submission from Popa Claudiu : In postgresql library, client3.py, the "__str__" method defined in Connection close calls the undefined method self.exception_string as in the following line of code: excstr = ''.join(self.exception_string(type(self.exception), self.exception)) ---------- components: Library (Lib) messages: 117793 nosy: Popa.Claudiu priority: normal severity: normal status: open title: Postgresql calls undefined method in __str__ type: behavior versions: 3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 14:59:57 2010 From: report at bugs.python.org (Popa Claudiu) Date: Fri, 01 Oct 2010 12:59:57 +0000 Subject: [issue10005] Postgresql calls undefined method in __str__ In-Reply-To: <1285937921.5.0.29820555696.issue10005@psf.upfronthosting.co.za> Message-ID: <1285937997.96.0.812490458605.issue10005@psf.upfronthosting.co.za> Popa Claudiu added the comment: I meant "Connection class calls the.." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 15:01:42 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 01 Oct 2010 13:01:42 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1285938102.22.0.237782334505.issue8670@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: > You can tweak the Windows pyconfig.h to use UCS4, AFAIK, if you want to > test drive this case. I seem to recall seeing some other code that assumed Windows implied UCS2. Proceed with caution. ;-) > But it's probably easier to configure with "gcc -fshort-wchar" on > Linux :-) libc will still be using sizeof(wchar_t) == 4, though. Won't that cause Bad Things to happen when calling libc wide-character functions? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 15:06:05 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 01 Oct 2010 13:06:05 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1285938102.22.0.237782334505.issue8670@psf.upfronthosting.co.za> Message-ID: <4CA5DCB5.1080407@egenix.com> Marc-Andre Lemburg added the comment: Daniel Stutzbach wrote: > > Daniel Stutzbach added the comment: > >> You can tweak the Windows pyconfig.h to use UCS4, AFAIK, if you want to >> test drive this case. > > I seem to recall seeing some other code that assumed Windows implied UCS2. Proceed with caution. ;-) Probably, yes. I've never tried it myself. >> But it's probably easier to configure with "gcc -fshort-wchar" on >> Linux :-) > > libc will still be using sizeof(wchar_t) == 4, though. Won't that cause Bad Things to happen when calling libc wide-character functions? Sure, but this is just about testing an interface, not running applications :-) Here's what the GCC man-page has to say: -fshort-wchar Override the underlying type for wchar_t to be short unsigned int instead of the default for the target. This option is useful for building programs to run under WINE. Warning: the -fshort-wchar switch causes GCC to generate code that is not binary compatible with code generated without that switch. Use it to conform to a non-default application binary interface. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 15:23:54 2010 From: report at bugs.python.org (Anand B Pillai) Date: Fri, 01 Oct 2010 13:23:54 +0000 Subject: [issue3488] Provide compress/uncompress functions on the gzip module In-Reply-To: <1217613416.28.0.352724086622.issue3488@psf.upfronthosting.co.za> Message-ID: <1285939434.03.0.0371351424732.issue3488@psf.upfronthosting.co.za> Anand B Pillai added the comment: Okay. Verified as working. Thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 15:47:33 2010 From: report at bugs.python.org (Yaroslav Halchenko) Date: Fri, 01 Oct 2010 13:47:33 +0000 Subject: [issue10006] non-Pythonic fate of __abstractmethods__ In-Reply-To: <1285940853.14.0.546762707016.issue10006@psf.upfronthosting.co.za> Message-ID: <1285940853.14.0.546762707016.issue10006@psf.upfronthosting.co.za> New submission from Yaroslav Halchenko : We ran into this while generating documentation for our project (PyMVPA) with recent sphinx and python2.6 (fine with 2.5, failed for 2.6, 2.7, 3.1), which relies on traversing all attributes given by "dir(obj)", BUT apparently __abstractmethods__ becomes very special -- it is given by "dir(obj)" since it is present in obj.__class__, but getattr(obj, "__abstractmethods__") fails for classes derived from type. E.g. following sample demonstrates it: print("in type's dir" , '__abstractmethods__' in dir(type)) print(type.__abstractmethods__) class type3(type): pass print("in type3's dir" , '__abstractmethods__' in dir(type3)) print(type3.__abstractmethods__) results in output: $> python2.6 trash/type_subclass.py ("in type's dir", True) ("in type3's dir", True) Traceback (most recent call last): File "trash/type_subclass.py", line 9, in print(type3.__abstractmethods__) AttributeError: __abstractmethods__ $> python3.1 trash/type_subclass.py in type's dir True in type3's dir True Traceback (most recent call last): File "trash/type_subclass.py", line 9, in print(type3.__abstractmethods__) AttributeError: __abstractmethods__ And that seems to be the only attribute behaving like that (others are fine and accessible). Some people even seems to provide workarounds already, e.g.: http://bitbucket.org/DasIch/bpython-colorful/src/19bb4cb0a65d/bpython/repl.py when __abstractmethods__ is accessed only for the subclasses of ABCmeta ... so, is it a bug or a feature (so we have to take care about it in all traversals of attributes given by dir())? ;) ---------- messages: 117798 nosy: Yaroslav.Halchenko priority: normal severity: normal status: open title: non-Pythonic fate of __abstractmethods__ versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 15:48:25 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Oct 2010 13:48:25 +0000 Subject: [issue10005] Postgresql calls undefined method in __str__ In-Reply-To: <1285937921.5.0.29820555696.issue10005@psf.upfronthosting.co.za> Message-ID: <1285940905.34.0.928582124219.issue10005@psf.upfronthosting.co.za> R. David Murray added the comment: There is no postgresql client in the Python standard library, you'll need to report this bug on the appropriate project's tracker. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 16:06:43 2010 From: report at bugs.python.org (Christoph Burgmer) Date: Fri, 01 Oct 2010 14:06:43 +0000 Subject: [issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior In-Reply-To: <1285770739.15.0.805040100323.issue9985@psf.upfronthosting.co.za> Message-ID: <1285942003.01.0.00602073400419.issue9985@psf.upfronthosting.co.za> Christoph Burgmer added the comment: Here's a test case and a fix for get_matching_blocks() to return the same content on subsequent calls. ---------- keywords: +patch nosy: +christoph Added file: http://bugs.python.org/file19084/get_matching_blocks.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 16:07:45 2010 From: report at bugs.python.org (Christoph Burgmer) Date: Fri, 01 Oct 2010 14:07:45 +0000 Subject: [issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior In-Reply-To: <1285770739.15.0.805040100323.issue9985@psf.upfronthosting.co.za> Message-ID: <1285942065.84.0.518967331039.issue9985@psf.upfronthosting.co.za> Christoph Burgmer added the comment: BTW, here's the commit that broke the behavior in the first place: http://svn.python.org/view/python/trunk/Lib/difflib.py?r1=54230&r2=59907 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 16:09:58 2010 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Fri, 01 Oct 2010 14:09:58 +0000 Subject: [issue10006] non-Pythonic fate of __abstractmethods__ In-Reply-To: <1285940853.14.0.546762707016.issue10006@psf.upfronthosting.co.za> Message-ID: <1285942198.44.0.174664482512.issue10006@psf.upfronthosting.co.za> Changes by Andreas St?hrk : ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 16:10:06 2010 From: report at bugs.python.org (Daniel Urban) Date: Fri, 01 Oct 2010 14:10:06 +0000 Subject: [issue9533] metaclass can't derive from ABC In-Reply-To: <1281090819.15.0.255356922996.issue9533@psf.upfronthosting.co.za> Message-ID: <1285942206.67.0.494564639664.issue9533@psf.upfronthosting.co.za> Daniel Urban added the comment: If we create a new class, which is a metaclass, and also inherits an ABC, we create a new instance of ABCMeta. When ABCMeta.__new__ creates the __abstractmethods__ attribute of the new class, it iterates over the __abstractmethods__ attribute of every base class (and checks every name in it, if it's abstract in the new class). One of the base classes of a metaclass is of course type. The type.__abstractmethods__ object is a getset descriptor (its __set__ switches some flags in tp_flags), which isn't iterable, so it raises the exception. Ideas for possible solutions: 1. In ABCMeta.__new__ special case type (do not check its __abstractmethods__attribute). 2. In ABCMeta.__new__ check if the __abstractmethods__ attribute is in fact an iterable, before we try to iterate over it. (I don't think this would be a very good solution, because if a base class' __abstractmethods__ isn't iterable, it should be an error, except if the base class is type itself. So we should special case type anyway.) I can't come up with a use case for this right now, but I don't see why it shouldn't work. ---------- components: +Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 16:13:10 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 01 Oct 2010 14:13:10 +0000 Subject: [issue10002] Installer doesn't install on Windows Server 2008 DataCenter R2 In-Reply-To: <1285882629.62.0.145594356076.issue10002@psf.upfronthosting.co.za> Message-ID: <1285942390.23.0.839471743764.issue10002@psf.upfronthosting.co.za> Brian Curtin added the comment: > Have you tried your Python 2.7 on a Windows Server 2008 R2? It works on my 2008 R2 Enterprise Edition. ---------- components: +Windows nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 16:23:57 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 01 Oct 2010 14:23:57 +0000 Subject: [issue6608] asctime does not check its input In-Reply-To: <1248998208.56.0.3155599029.issue6608@psf.upfronthosting.co.za> Message-ID: <1285943037.27.0.186476843583.issue6608@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed with minor changes in r85137. Thanks for the patch! ---------- resolution: -> accepted stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 16:47:11 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 01 Oct 2010 14:47:11 +0000 Subject: [issue10007] Visual C++ cannot build _ssl and _hashlib if newer OpenSSL is placed in $(dist) directory (PCBuild) In-Reply-To: <1285944430.56.0.132893198817.issue10007@psf.upfronthosting.co.za> Message-ID: <1285944430.56.0.132893198817.issue10007@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : Visual C++ cannot build _ssl and _hashlib if newer OpenSSL is placed in $(dist) directory. This happens on PCbuild. Python3.2 uses openssl-1.0.0a Python3.1 and 2.7 uses openssl-0.9.8l If the directory layout is like this, Python3.1 cannot build _ssl and _hashlib. python-dev +- openssl-0.9.8l +- openssl-1.0.0a +- py3k +- release31-maint +- release27-maint Because build_ssl.py in release31-maint thinks newer is better, and select openssl-1.0.0a, but pyproject.vsprops hard-corded $(openssldir) as openssl-0.9.8l. So Modules/ssl.c cannot import ssl.h and so on. ---------- components: Build messages: 117805 nosy: ocean-city priority: normal severity: normal status: open title: Visual C++ cannot build _ssl and _hashlib if newer OpenSSL is placed in $(dist) directory (PCBuild) versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 16:48:30 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 01 Oct 2010 14:48:30 +0000 Subject: [issue10007] Visual C++ cannot build _ssl and _hashlib if newer OpenSSL is placed in $(dist) directory (PCBuild) In-Reply-To: <1285944430.56.0.132893198817.issue10007@psf.upfronthosting.co.za> Message-ID: <1285944510.87.0.732668984495.issue10007@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: > Python3.1 cannot build _ssl and _hashlib. And Python2.7 cannot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 16:54:02 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Oct 2010 14:54:02 +0000 Subject: [issue10006] non-Pythonic fate of __abstractmethods__ In-Reply-To: <1285940853.14.0.546762707016.issue10006@psf.upfronthosting.co.za> Message-ID: <1285944842.08.0.217424515615.issue10006@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 17:03:34 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Oct 2010 15:03:34 +0000 Subject: [issue10004] irhe In-Reply-To: <1285931148.27.0.357018449582.issue10004@psf.upfronthosting.co.za> Message-ID: <1285945414.72.0.733268695253.issue10004@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: email/quoprimime.py Exception (with patch) -> irhe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 17:04:04 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Oct 2010 15:04:04 +0000 Subject: [issue10004] email/quoprimime.py Exception (with patch) In-Reply-To: <1285931148.27.0.357018449582.issue10004@psf.upfronthosting.co.za> Message-ID: <1285945444.06.0.707859806959.issue10004@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: irhe -> email/quoprimime.py Exception (with patch) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 17:04:48 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Oct 2010 15:04:48 +0000 Subject: [issue10004] email/quoprimime.py Exception (with patch) In-Reply-To: <1285931148.27.0.357018449582.issue10004@psf.upfronthosting.co.za> Message-ID: <1285945488.82.0.0197407286684.issue10004@psf.upfronthosting.co.za> R. David Murray added the comment: Heh, cut and paste gone mad, sorry about that title change/change back. I can reproduce this in 3.2, so adding 3.1 and 3.2 to versions. ---------- nosy: +r.david.murray versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 17:05:26 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Oct 2010 15:05:26 +0000 Subject: [issue10004] email/quoprimime.py Exception (with patch) In-Reply-To: <1285931148.27.0.357018449582.issue10004@psf.upfronthosting.co.za> Message-ID: <1285945526.8.0.196143166713.issue10004@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: -> unit test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 17:09:44 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Oct 2010 15:09:44 +0000 Subject: [issue10004] email/quoprimime.py Exception (with patch) In-Reply-To: <1285931148.27.0.357018449582.issue10004@psf.upfronthosting.co.za> Message-ID: <1285945784.85.0.00384093747692.issue10004@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: -> r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 17:28:01 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Oct 2010 15:28:01 +0000 Subject: [issue10004] email/quoprimime.py Exception (with patch) In-Reply-To: <1285931148.27.0.357018449582.issue10004@psf.upfronthosting.co.za> Message-ID: <1285946881.96.0.995428227603.issue10004@psf.upfronthosting.co.za> R. David Murray added the comment: Here is Thomas's patch with a (simpler) unit test included. ---------- Added file: http://bugs.python.org/file19085/quoprime_chars.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 17:49:43 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Oct 2010 15:49:43 +0000 Subject: [issue10004] email/quoprimime.py Exception (with patch) In-Reply-To: <1285931148.27.0.357018449582.issue10004@psf.upfronthosting.co.za> Message-ID: <1285948183.18.0.374956105641.issue10004@psf.upfronthosting.co.za> R. David Murray added the comment: Committed in r85142 for 3.2, r85143 for 3.1, and r85144 for 2.7. Thanks, Thomas. ---------- resolution: -> fixed stage: unit test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 17:53:27 2010 From: report at bugs.python.org (Radu Grigore) Date: Fri, 01 Oct 2010 15:53:27 +0000 Subject: [issue9921] os.path.join('x','') behavior In-Reply-To: <1285168977.46.0.728141650864.issue9921@psf.upfronthosting.co.za> Message-ID: <1285948407.25.0.673369734917.issue9921@psf.upfronthosting.co.za> Radu Grigore added the comment: I would say something like the following. The function join(path1, path2) is almost like os.sep.join(path1, path2), but (1) trailing path separators in path1 are ignored and (2) the result is simply path2 when path2 is an absolute path. The call join(path1, path2, path3) is equivalent to join(join(path1, path2), path3), and similarly for more than three paths. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 18:09:23 2010 From: report at bugs.python.org (=?utf-8?q?Brian_Boss=C3=A9?=) Date: Fri, 01 Oct 2010 16:09:23 +0000 Subject: [issue9974] tokenizer.untokenize not invariant with line continuations In-Reply-To: <1285695065.99.0.439423855227.issue9974@psf.upfronthosting.co.za> Message-ID: <1285949363.72.0.308652516013.issue9974@psf.upfronthosting.co.za> Brian Boss? added the comment: No idea if I'm getting the patch format right here, but tally ho! This is keyed from release27-maint Index: Lib/tokenize.py =================================================================== --- Lib/tokenize.py (revision 85136) +++ Lib/tokenize.py (working copy) @@ -184,8 +184,13 @@ def add_whitespace(self, start): row, col = start - assert row <= self.prev_row col_offset = col - self.prev_col + # Nearly all newlines are handled by the NL and NEWLINE tokens, + # but explicit line continuations are not, so they're handled here. + if row > self.prev_row: + row_offset = row - self.prev_row + self.tokens.append("\\\n" * row_offset) + col_offset = col # Recalculate the column offset from the start of our new line if col_offset: self.tokens.append(" " * col_offset) Two issues remain with this fix, both of which replace the assert with something functional but not exactly what the original text is: 1) Whitespace leading up to a line continuation is not recreated. The information required to do this is not present in the tokenized data. 2) If EOF happens at the end of a line, the untokenized version will have a line continuation on the end, as the ENDMARKER token is represented on a line which does not exist in the original. I spent some time trying to get a unit test written that demonstrates the original bug, but it would seem that doctest (which test_tokenize uses) cannot represent a '\' character properly. The existing unit tests involving line continuations pass due to the '\' characters being interpreted as ERRORTOKEN, which is not as they're done when read from file or interactive prompt. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 18:20:58 2010 From: report at bugs.python.org (Jeffrey Finkelstein) Date: Fri, 01 Oct 2010 16:20:58 +0000 Subject: [issue6664] readlines should understand Line Separator and Paragraph Separator characters In-Reply-To: <1249636455.06.0.336549280075.issue6664@psf.upfronthosting.co.za> Message-ID: <1285950058.75.0.118512183578.issue6664@psf.upfronthosting.co.za> Jeffrey Finkelstein added the comment: This seems to be because codecs.StreamReader.readlines() function does this: def readlines(self, sizehint=None, keepends=True): data = self.read() return data.splitlines(keepends) But the io readlines() functions make multiple calls to readline() instead. Here is the test case which passes on the codecs readlines() but fails on the io readlines(). ---------- keywords: +patch nosy: +jfinkels Added file: http://bugs.python.org/file19086/issue6664.testcase.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 18:21:02 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Oct 2010 16:21:02 +0000 Subject: [issue9286] email.utils.parseaddr returns garbage for invalid input In-Reply-To: <1279377359.55.0.199569408455.issue9286@psf.upfronthosting.co.za> Message-ID: <1285950062.54.0.619656019604.issue9286@psf.upfronthosting.co.za> R. David Murray added the comment: In the first of your examples, parseaddr is correct (a lone token is considered a 'local' address per RFC). The second one is prossibly wrong, but if so the correct way to interpret it is not clear. If you read the RFC carefully (http://tools.ietf.org/html/rfc5322#section-4.4), spaces are allowed between the 'local part' and the domain in obsolete syntax (which must be accepted). However, the space being elided here is between pieces of the local part. Note that because the address is not in '<>', the whole string is the address, there's no name field. The "correct" parse could be: ('', '"merwok wok"@rusty') That is, we apply a 'be generous in what you accept' rule and assume the "s were forgotten. However, perhaps a more sensible 'generous' rule would be to assume the '<>' were forgotten and return ('merwok', 'wok at rusty') However, it is quite possible that the reason the space is being elided here has to do with handling the obsolete 'route' syntax. If that is the case then parseaddr is probably correct. It may be a while before I get around to understanding that part of the spec well enough to render a judgement, so in the meantime I'll assume parseaddr is correct. Feel free to read the spec and render your own opinion :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 18:24:00 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 01 Oct 2010 16:24:00 +0000 Subject: [issue10006] non-Pythonic fate of __abstractmethods__ In-Reply-To: <1285940853.14.0.546762707016.issue10006@psf.upfronthosting.co.za> Message-ID: <1285950238.79.0.285691120988.issue10006@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I see the problem; will consider/fix later today hopefully. ---------- assignee: -> benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 18:31:18 2010 From: report at bugs.python.org (Amber Jain) Date: Fri, 01 Oct 2010 16:31:18 +0000 Subject: [issue9986] PDF files of python docs have text missing In-Reply-To: <1285772054.59.0.857308007062.issue9986@psf.upfronthosting.co.za> Message-ID: <1285950678.27.0.781339899194.issue9986@psf.upfronthosting.co.za> Amber Jain added the comment: Reported to sphinx tracker at bitbucket: http://bitbucket.org/birkenfeld/sphinx/issue/531/pdf-files-of-python-docs-have-text-missing ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 18:45:08 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 01 Oct 2010 16:45:08 +0000 Subject: [issue10003] signal.SIGBREAK regression on windows In-Reply-To: <1285895278.8.0.672270997961.issue10003@psf.upfronthosting.co.za> Message-ID: <1285951508.94.0.213764519625.issue10003@psf.upfronthosting.co.za> Brian Curtin added the comment: Fixed in r85140 (py3k), r85141 (release31-maint), and r85145 (release27-maint). Thanks for the report! ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 19:00:38 2010 From: report at bugs.python.org (Daniel Urban) Date: Fri, 01 Oct 2010 17:00:38 +0000 Subject: [issue10006] non-Pythonic fate of __abstractmethods__ In-Reply-To: <1285940853.14.0.546762707016.issue10006@psf.upfronthosting.co.za> Message-ID: <1285952438.92.0.907054045912.issue10006@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +durban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 19:17:12 2010 From: report at bugs.python.org (Martin) Date: Fri, 01 Oct 2010 17:17:12 +0000 Subject: [issue10003] signal.SIGBREAK regression on windows In-Reply-To: <1285895278.8.0.672270997961.issue10003@psf.upfronthosting.co.za> Message-ID: <1285953432.36.0.0851291102874.issue10003@psf.upfronthosting.co.za> Martin added the comment: Thanks for the quick resolution Brian, head now works as expected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 19:31:56 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Oct 2010 17:31:56 +0000 Subject: [issue1050268] rfc822.parseaddr is broken, breaks sendmail call in smtplib Message-ID: <1285954316.74.0.728181005549.issue1050268@psf.upfronthosting.co.za> R. David Murray added the comment: It does appear as though parseaddr is dropping quoting information from the returned parsed address. Fixing this is likely to create backward compatibility issues, and I'm very curious to know why parseaddr drops the quoting info. Note that I do not observe the change from test\com to test.com, so I'm assuming that was a typo and ignoring that part (or it represents a bug that is already fixed). The "weird" example is actually consistent with the rest of parseaddr's behavior, if you understand that behavior as turning quoted pairs inside quoted strings into their literal value, but leaving the quotes around the quoted string(s) in place. Consider the example: parseaddr('"\\\\"test\\\\" test"@test.com') If we remove the Python quoting from this input string we have: "\\"test\\" test"@test.com Interpreting this according to RFC rules we have a quoted string "\\" containing a quoted pair (\\). The quoted pair resolves to a single \. Then we have the unquoted text test\\ This parseaddr copies literally (I'm not sure if that is strictly RFC compliant, but given that we are supposed to be liberal in what we except it is as reasonable a thing to do as any.) Finally we have another quoted string " test" So putting those pieces together according to the rules above, we end up with: "\"test\\" test"@test.com which is the observed output once you remove the Python quoting. So, parseaddr is working as designed. The question is, what is the design decision behind resolving the quoted pairs but leaving the quotes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 19:41:27 2010 From: report at bugs.python.org (Marien Zwart) Date: Fri, 01 Oct 2010 17:41:27 +0000 Subject: [issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior In-Reply-To: <1285770739.15.0.805040100323.issue9985@psf.upfronthosting.co.za> Message-ID: <1285954887.97.0.0656059691652.issue9985@psf.upfronthosting.co.za> Marien Zwart added the comment: That fixes the first problem in python 2. It should do: self.matching_blocks = [Match._make(t) for t in non_adjacent] in python 3 though, or it will return an already-exhausted map object if it is called again. This leaves the problem of other code mutating the cached list (not realizing it is cached). I think it would make sense for these functions to just return a shallow copy of their cached list, but I have not thought that through much. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 20:09:33 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Oct 2010 18:09:33 +0000 Subject: [issue9943] TypeError message became less helpful in Python 2.7 In-Reply-To: <1285357459.53.0.518722150406.issue9943@psf.upfronthosting.co.za> Message-ID: <1285956573.11.0.786084030874.issue9943@psf.upfronthosting.co.za> Terry J. Reedy added the comment: FWIW 3.1 gives same message as 2.6. I have not installed 3.2a yet to check that. Reporting of argument count mismatch has always been problematical, especially for methods. I almost think the message should be simplified to "Arguments passed do not match function signature." Programmers who do not immediately immediately see the problem (because they know the signature but made an inadvertent mistake) will have to check the signature anyway. The alternative should be a clearer and more complete report than currently, which will take more than one line. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 20:18:37 2010 From: report at bugs.python.org (Sandro Tosi) Date: Fri, 01 Oct 2010 18:18:37 +0000 Subject: [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1285957117.68.0.174473368599.issue5088@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hello, attached a patch to add documentation about action=append and a default value. Regards, Sandro ---------- keywords: +patch nosy: +sandro.tosi Added file: http://bugs.python.org/file19087/issue5088-py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 20:24:06 2010 From: report at bugs.python.org (Jeremy Thurgood) Date: Fri, 01 Oct 2010 18:24:06 +0000 Subject: [issue9997] function named 'top' gets unexpected namespace/scope behaviour In-Reply-To: <1285849061.79.0.383989167237.issue9997@psf.upfronthosting.co.za> Message-ID: <1285957446.47.0.133064463473.issue9997@psf.upfronthosting.co.za> Changes by Jeremy Thurgood : ---------- nosy: +jerith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 20:39:29 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 01 Oct 2010 18:39:29 +0000 Subject: [issue9977] TestCase.assertItemsEqual's description of differences In-Reply-To: <1285704922.32.0.659854668668.issue9977@psf.upfronthosting.co.za> Message-ID: <1285958369.6.0.776611869699.issue9977@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If I understand correctly, you are requesting that .assertItemsEqual only use the 2nd (multiset comparison) method, so that if one want the first method, one should directly call .assertSequenceEqual(sorted(a), sorted(b)). This seems reasonable to me, but I do not use the unittest module, and I suspect others want the implicit call. ---------- nosy: +terry.reedy stage: -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 20:44:34 2010 From: report at bugs.python.org (Sandro Tosi) Date: Fri, 01 Oct 2010 18:44:34 +0000 Subject: [issue5501] Update multiprocessing docs re: freeze_support In-Reply-To: <1237312904.73.0.910184118935.issue5501@psf.upfronthosting.co.za> Message-ID: <1285958674.81.0.989959778375.issue5501@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hello, well it's just 3 words that can clarify the situation, so maybe just add them would be nice Regards, Sandro ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 20:45:09 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 01 Oct 2010 18:45:09 +0000 Subject: [issue10008] Two links point to same place In-Reply-To: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> Message-ID: <1285958709.04.0.778307485723.issue10008@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : Please see http://docs.python.org/genindex-T.html Thread (class in threading), [1] This two links point to same place. I think latter should point http://docs.python.org/library/threading.html#thread-objects or class threading.Thread(group=None, target=None, name=None, args=(), kwargs={}) bellow. # Latter doesn't have perma link. ---------- assignee: docs at python components: Documentation messages: 117824 nosy: docs at python, ocean-city priority: normal severity: normal status: open title: Two links point to same place versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 20:46:50 2010 From: report at bugs.python.org (Matthew Woodcraft) Date: Fri, 01 Oct 2010 18:46:50 +0000 Subject: [issue9977] TestCase.assertItemsEqual's description of differences In-Reply-To: <1285958369.6.0.776611869699.issue9977@psf.upfronthosting.co.za> Message-ID: <20101001184645.GA10972@golux.woodcraft.me.uk> Matthew Woodcraft added the comment: Terry J. Reedy wrote: > If I understand correctly, you are requesting that .assertItemsEqual > only use the 2nd (multiset comparison) method, so that if one want the > first method, one should directly call .assertSequenceEqual(sorted(a), > sorted(b)). Yes, that would make me happy. So would a new assertXXXEqual method that always did the multiset comparison. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 20:53:43 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Oct 2010 18:53:43 +0000 Subject: [issue9990] PyMemoryView_FromObject alters the Py_buffer after calling PyObject_GetBuffer when ndim 1 In-Reply-To: <1285787018.03.0.476755592717.issue9990@psf.upfronthosting.co.za> Message-ID: <1285959223.2.0.126242848304.issue9990@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch that fixes the issue. Can you try it? Unfortunately, more advanced uses such a slicing the memoryview are still crashing. That's because the new buffer protocol doesn't define ownership of Py_buffer structs. As a result, nothing can be assumed at to which piece of code is responsible for allocation and deallocation of related memory areas (such as shapes and strides arrays). ---------- keywords: +patch nosy: +ncoghlan, teoliphant stage: needs patch -> patch review Added file: http://bugs.python.org/file19088/memview.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 20:57:21 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Oct 2010 18:57:21 +0000 Subject: [issue9990] PyMemoryView_FromObject alters the Py_buffer after calling PyObject_GetBuffer when ndim 1 In-Reply-To: <1285787018.03.0.476755592717.issue9990@psf.upfronthosting.co.za> Message-ID: <1285959441.24.0.913012087855.issue9990@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Of course, a patch is always better without the debugging prints :) ---------- Added file: http://bugs.python.org/file19089/memview.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 20:57:26 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Oct 2010 18:57:26 +0000 Subject: [issue9990] PyMemoryView_FromObject alters the Py_buffer after calling PyObject_GetBuffer when ndim 1 In-Reply-To: <1285787018.03.0.476755592717.issue9990@psf.upfronthosting.co.za> Message-ID: <1285959446.23.0.773987151711.issue9990@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file19088/memview.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 20:58:40 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 01 Oct 2010 18:58:40 +0000 Subject: [issue8879] Implement os.link on Windows In-Reply-To: <1275504458.06.0.136411734773.issue8879@psf.upfronthosting.co.za> Message-ID: <1285959520.77.0.210631483216.issue8879@psf.upfronthosting.co.za> Brian Curtin added the comment: test_tarfile fails with this patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 21:02:35 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 01 Oct 2010 19:02:35 +0000 Subject: [issue9996] binascii should convert unicode strings In-Reply-To: <1285848203.41.0.985893389249.issue9996@psf.upfronthosting.co.za> Message-ID: <1285959755.69.0.0879146362655.issue9996@psf.upfronthosting.co.za> R. David Murray added the comment: Since the issue/patch is about binascii, and I agree with Martin that binascii should continue to do bytes-to-bytes transforms (especially since that is its most common use case, IMO), I'm going to close this issue. Please open the discussion on python-dev or python-ideas if you wish to proceed with some sort of feature request. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 22:09:31 2010 From: report at bugs.python.org (Ned Deily) Date: Fri, 01 Oct 2010 20:09:31 +0000 Subject: [issue9985] difflib.SequenceMatcher has slightly buggy and undocumented caching behavior In-Reply-To: <1285770739.15.0.805040100323.issue9985@psf.upfronthosting.co.za> Message-ID: <1285963771.44.0.523784595081.issue9985@psf.upfronthosting.co.za> Ned Deily added the comment: (+nosy Raymond as committer of r59907 and removing python2.6 since this is not a security issue) ---------- nosy: +ned.deily, rhettinger stage: -> needs patch versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 22:11:49 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 01 Oct 2010 20:11:49 +0000 Subject: [issue10009] Automated MSI installation does not work In-Reply-To: <1285963909.15.0.466947839123.issue10009@psf.upfronthosting.co.za> Message-ID: <1285963909.15.0.466947839123.issue10009@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : >From an old post on python-dev: 2010/08/04 Paul Kippes: > For the most part, the information at > http://www.python.org/download/releases/2.4/msi/ assisted me with > automating a 2.7 installation on Windows XP. ?The following initial > attempt, however, failed to provide a working python installation. > (Messages are either "The system cannot execute the specified > program." or "This application has failed to start because the > application configuration is incorrect. ?Reinstalling the application > may fix this problem.") > > msiexec /qb /i python-2.7.msi ALLUSERS=1 ADDLOCAL=Extensions > > After looking through Tools/msi/msi.py, I was able to automate a > minimal and working Python installation with this adjustment: > > ADDLOCAL=Extensions,SharedCRT > > Since the only reference I could find to the above web page was when > the MSI installer was first announced > (http://www.python.org/download/releases/2.4.2), the installer options > may have changed since then. > > Would you check if my change is what you intended and perhaps migrate > the web page of the 2.4 release note to 2.7? > > Thanks! ---------- components: Installation messages: 117831 nosy: amaury.forgeotdarc, loewis priority: normal severity: normal status: open title: Automated MSI installation does not work _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 22:26:11 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 01 Oct 2010 20:26:11 +0000 Subject: [issue9974] tokenizer.untokenize not invariant with line continuations In-Reply-To: <1285695065.99.0.439423855227.issue9974@psf.upfronthosting.co.za> Message-ID: <1285964771.15.0.759616350909.issue9974@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 22:48:56 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 01 Oct 2010 20:48:56 +0000 Subject: [issue8190] Add a PyPI XML-RPC client module In-Reply-To: <1269141957.53.0.288648605609.issue8190@psf.upfronthosting.co.za> Message-ID: <1285966136.03.0.834958716344.issue8190@psf.upfronthosting.co.za> ?ric Araujo added the comment: My bad, I took Tarek?s line about ?implementing all functions? literally. Your client classes don?t have methods with the same exact names and signatures, but what matters is that they provide the functionality. If you can review the functions listed on the XML-RPC wiki page and confirm they have an equivalent in d2.index, this bug will be closed :) Bonus points if you create a wiki page explaining how to do operations listed on the XML-RPC page in distutils2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 22:55:04 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 01 Oct 2010 20:55:04 +0000 Subject: [issue10010] ".. index::" position In-Reply-To: <1285966504.08.0.573086754525.issue10010@psf.upfronthosting.co.za> Message-ID: <1285966504.08.0.573086754525.issue10010@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : Hello. While I was reading HTML help, I felt some links were not pointing to *before* what I wanted to read. When I selected "sort (list method)" in keyword pane, it jumped to *Note* section, but I was not sure where I was. Table above was actually what I wanted to read. With attached patch, I am happy. ---------- assignee: docs at python components: Documentation files: py27_doc_index.patch keywords: patch messages: 117833 nosy: docs at python, ocean-city priority: normal severity: normal status: open title: ".. index::" position versions: Python 2.7 Added file: http://bugs.python.org/file19090/py27_doc_index.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 23:00:38 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 01 Oct 2010 21:00:38 +0000 Subject: [issue8879] Implement os.link on Windows In-Reply-To: <1275504458.06.0.136411734773.issue8879@psf.upfronthosting.co.za> Message-ID: <1285966838.04.0.332618700017.issue8879@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I think this is because os.stat and os.lstat doesn't set st_nlink. It is only set via os.fstat. I'll attach quick hack patch. (Again, this is just quick hack patch) I confirmed this passes test_os and test_tarfile. ---------- Added file: http://bugs.python.org/file19091/py3k_quick_hack_for_issue8879.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 23:04:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 01 Oct 2010 21:04:36 +0000 Subject: [issue10010] ".. index::" position In-Reply-To: <1285966504.08.0.573086754525.issue10010@psf.upfronthosting.co.za> Message-ID: <1285967076.25.0.302901639904.issue10010@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 on the patch. I suspect there is the same problem for other links. ---------- nosy: +eric.araujo versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 23:14:37 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 01 Oct 2010 21:14:37 +0000 Subject: [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1285967677.34.0.756996376336.issue5088@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the patch. Some remarks: > :attr:`~Option.dest` variable, that already contains the default value I would have used ?which? here, but I?m not a native speaker. > not replaced (contrary to what one can think) I?d have used a comma, not parens. > This behaviour is clear ?makes sense? sounds better to me. > think that with a default value :attr:`~Option.dest` is a list I suggest a comma after ?value?. > any additional option is appended to that list s/option/value/ Let me use this reply to welcome you in the bug tracker. I hope you get warn fuzzy feelings when your patches are accepted or your comments acted upon. I?m also looking forward for a better Python-Debian relationship. (Cultural note: It?s not usual to say hello and regards in messages on this tracker. I did it too at first but was told it was unnecessary.) :) ---------- assignee: georg.brandl -> docs at python nosy: +docs at python, eric.araujo stage: -> patch review versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 23:16:26 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 01 Oct 2010 21:16:26 +0000 Subject: [issue5501] Update multiprocessing docs re: freeze_support In-Reply-To: <1237312904.73.0.910184118935.issue5501@psf.upfronthosting.co.za> Message-ID: <1285967786.56.0.637346055162.issue5501@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m assuming this is a feature new in 2.7 and 3.2, please add 3.1 if this is wrong. ---------- nosy: +docs at python, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 23:37:16 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 01 Oct 2010 21:37:16 +0000 Subject: [issue9841] sysconfig and distutils.sysconfig differ in subtle ways In-Reply-To: <1284333988.17.0.109581594915.issue9841@psf.upfronthosting.co.za> Message-ID: <1285969036.78.0.190779482469.issue9841@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 23:42:21 2010 From: report at bugs.python.org (Alexis Metaireau) Date: Fri, 01 Oct 2010 21:42:21 +0000 Subject: [issue8190] Add a PyPI XML-RPC client module In-Reply-To: <1269141957.53.0.288648605609.issue8190@psf.upfronthosting.co.za> Message-ID: <1285969341.22.0.6490560196.issue8190@psf.upfronthosting.co.za> Alexis Metaireau added the comment: Yes, all the functions are covered. By the way, I've covered all the functions based on the pypi source code, not on the wiki. I'll update the wiki page with some examples soon :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 1 23:44:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 01 Oct 2010 21:44:35 +0000 Subject: [issue8190] Add a PyPI XML-RPC client module In-Reply-To: <1269141957.53.0.288648605609.issue8190@psf.upfronthosting.co.za> Message-ID: <1285969475.27.0.0883828851537.issue8190@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 00:00:41 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 01 Oct 2010 22:00:41 +0000 Subject: [issue1195571] simple callback system for Py_FatalError Message-ID: <1285970441.7.0.0556028511011.issue1195571@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Here is a new patch; I lifted the pre-Py_Initialize() restriction, because it seems to me that a wxPython application, for example, could use it. A wxPython application is not embedded, but it already often redirects stdout and even installs a segfault handler. I also made Py_SetFatalHook() return the previous hook; it could be useful to set a function temporarily, even if this is not thread safe. ---------- stage: unit test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 00:08:13 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 01 Oct 2010 22:08:13 +0000 Subject: [issue1195571] simple callback system for Py_FatalError Message-ID: <1285970893.45.0.361227483496.issue1195571@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : Added file: http://bugs.python.org/file19096/fatalhook-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 00:09:33 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 01 Oct 2010 22:09:33 +0000 Subject: [issue2771] test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1285970973.27.0.755188398621.issue2771@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Attach some file ---------- keywords: +patch Added file: http://bugs.python.org/file19097/README.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 00:16:35 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 01 Oct 2010 22:16:35 +0000 Subject: [issue1195571] simple callback system for Py_FatalError Message-ID: <1285971395.09.0.988189825769.issue1195571@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : Removed file: http://bugs.python.org/file19096/fatalhook-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 00:17:12 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 01 Oct 2010 22:17:12 +0000 Subject: [issue1195571] simple callback system for Py_FatalError Message-ID: <1285971432.57.0.758163923768.issue1195571@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : Added file: http://bugs.python.org/file19098/fatalhook-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 00:33:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 01 Oct 2010 22:33:36 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1285972416.06.0.120640826037.issue9807@psf.upfronthosting.co.za> ?ric Araujo added the comment: I see nothing obviously wrong in the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 00:41:35 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 01 Oct 2010 22:41:35 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1285972895.43.0.398951713898.issue9807@psf.upfronthosting.co.za> Martin v. L?wis added the comment: ?ric: which patch: file18807, or http://codereview.appspot.com/2340041/? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 00:45:33 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 01 Oct 2010 22:45:33 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1285973133.85.0.22416886068.issue9807@psf.upfronthosting.co.za> ?ric Araujo added the comment: Sorry, I was replying to this: ?I'm still investigating that, but in the meantime, please go to codereview and let me know what you think so far.? I meant that for the distutils part, I?ve seen nothing bad. I have no idea about the import bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 00:51:10 2010 From: report at bugs.python.org (Ram Rachum) Date: Fri, 01 Oct 2010 22:51:10 +0000 Subject: [issue10011] `except` doesn't use `isinstance` In-Reply-To: <1285973470.62.0.723186105709.issue10011@psf.upfronthosting.co.za> Message-ID: <1285973470.62.0.723186105709.issue10011@psf.upfronthosting.co.za> New submission from Ram Rachum : Is there a reason why `execpt` compares base classes instead of using `isinstance`? This prevents using `__instancecheck__` to override the instance check. ---------- components: Interpreter Core messages: 117844 nosy: cool-RR priority: normal severity: normal status: open title: `except` doesn't use `isinstance` versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 00:56:18 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Oct 2010 22:56:18 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1285973778.51.0.298783207562.issue8670@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch version 4: - implement unicode_aswidechar() for 16 bits wchar_t and 32 bits Py_UNICODE - PyUnicode_AsWideWcharString() returns the number of wide characters excluding the nul character as does PyUnicode_AsWideChar() For 16 bits wchar_t and 32 bits Py_UNICODE, I extracted the "as wide char" unicode functions into a small C file and compiled it with -fshort-wchar on Linux. ---------- Added file: http://bugs.python.org/file19099/aswidechar_nonbmp-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 00:56:25 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Oct 2010 22:56:25 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1285973785.37.0.905529942087.issue8670@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file19082/aswidechar_nonbmp-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 00:56:28 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Oct 2010 22:56:28 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1285973788.01.0.591141852366.issue8670@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file19083/aswidechar_nonbmp-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 01:00:51 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 01 Oct 2010 23:00:51 +0000 Subject: [issue10011] `except` doesn't use `isinstance` In-Reply-To: <1285973470.62.0.723186105709.issue10011@psf.upfronthosting.co.za> Message-ID: <1285974051.05.0.846922021131.issue10011@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Mainly to protect against potential infinite recursion with isinstance checks. Also, performance is probably better. Here are the relevant code and comments in PyErr_GivenExceptionMatches() (in Python/errors.c): /* PyObject_IsSubclass() can recurse and therefore is not safe (see test_bad_getattr in test.pickletester). */ res = PyType_IsSubtype((PyTypeObject *)err, (PyTypeObject *)exc); ---------- nosy: +pitrou versions: -Python 2.5, Python 2.6, Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 01:02:02 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 01 Oct 2010 23:02:02 +0000 Subject: [issue6691] Support for nested classes and function for pyclbr In-Reply-To: <1250117262.14.0.353515413158.issue6691@psf.upfronthosting.co.za> Message-ID: <1285974122.61.0.800565543364.issue6691@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Too late for version 2. I updated patch for 3.2, and tried to improve the documentation a little bit. ---------- nosy: +amaury.forgeotdarc versions: -Python 2.7, Python 3.1 Added file: http://bugs.python.org/file19100/pyclbr_nested_objects-py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 01:02:43 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Oct 2010 23:02:43 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1285974161.44.0.76876041716.issue8670@psf.upfronthosting.co.za> STINNER Victor added the comment: Ooops, I lost my patch to fix the initial (ctypes) issue. Here is an updated patch: ctypes_nonbmp.patch (which needs aswidechar_nonbmp-4.patch). ---------- Added file: http://bugs.python.org/file19101/ctypes_nonbmp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 01:04:26 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 01 Oct 2010 23:04:26 +0000 Subject: [issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally In-Reply-To: <1284643512.64.0.708677047597.issue9873@psf.upfronthosting.co.za> Message-ID: <1285974266.59.0.987489631735.issue9873@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Allow bytes in some APIs that use string literals internally -> urllib.parse: Allow bytes in some APIs that use string literals internally _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 01:19:28 2010 From: report at bugs.python.org (Ram Rachum) Date: Fri, 01 Oct 2010 23:19:28 +0000 Subject: [issue10011] `except` doesn't use `isinstance` In-Reply-To: <1285973470.62.0.723186105709.issue10011@psf.upfronthosting.co.za> Message-ID: <1285975168.35.0.930289318133.issue10011@psf.upfronthosting.co.za> Ram Rachum added the comment: I don't understand the infinite recursion argument. If there's such an infinite recursion, wouldn't it be due to a bug in the user's implementation of __instancecheck__? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 01:28:07 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 01 Oct 2010 23:28:07 +0000 Subject: [issue9841] sysconfig and distutils.sysconfig differ in subtle ways In-Reply-To: <1284333988.17.0.109581594915.issue9841@psf.upfronthosting.co.za> Message-ID: <1285975687.49.0.665497072651.issue9841@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Not in distutils2 because we want to get rid of it, thats the whole point. distutils2 will use the sysconfig module I've extracted from distutils. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 01:33:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 01 Oct 2010 23:33:52 +0000 Subject: [issue9841] sysconfig and distutils.sysconfig differ in subtle ways In-Reply-To: <1284333988.17.0.109581594915.issue9841@psf.upfronthosting.co.za> Message-ID: <1285976032.35.0.0861468617388.issue9841@psf.upfronthosting.co.za> ?ric Araujo added the comment: By ?d2/sysconfig? I meant d2._backport.sysconfig. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 01:44:08 2010 From: report at bugs.python.org (Cliff Wells) Date: Fri, 01 Oct 2010 23:44:08 +0000 Subject: [issue10012] httplib shadows builtin, assumes strings In-Reply-To: <1285976648.58.0.0752019030242.issue10012@psf.upfronthosting.co.za> Message-ID: <1285976648.58.0.0752019030242.issue10012@psf.upfronthosting.co.za> New submission from Cliff Wells : httplib.py ~Line 924 def putheader(self, header, *values): str = '%s: %s' % (header, '\r\n\t'.join(values)) self._output(str) should be changed to something like: def putheader(self, header, *values): ... s = '%s: %s' % (header, '\r\n\t'.join([str(v) for v in values])) self._output(s) The current version shadows str builtin with a local variable. join method assumes strings so they should probably be explicitly cast (at least one 3rd party library appears to pass Content-length as an integer, causing this to fail. Of course, this can't be done unless the str builtin is no longer shadowed. ---------- components: Library (Lib) messages: 117852 nosy: cwells priority: normal severity: normal status: open title: httplib shadows builtin, assumes strings versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 02:05:25 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 02 Oct 2010 00:05:25 +0000 Subject: [issue10006] non-Pythonic fate of __abstractmethods__ In-Reply-To: <1285940853.14.0.546762707016.issue10006@psf.upfronthosting.co.za> Message-ID: <1285977925.1.0.530829516046.issue10006@psf.upfronthosting.co.za> Benjamin Peterson added the comment: As of r85154, type.__abstractmethods__ now raises an AttributeError, too. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 02:06:40 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 02 Oct 2010 00:06:40 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1285978000.28.0.977442332105.issue9807@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: bzr branch lp:~barry/python/issue9807 https://code.edge.launchpad.net/~barry/python/issue9807 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 02:12:21 2010 From: report at bugs.python.org (Lenard Lindstrom) Date: Sat, 02 Oct 2010 00:12:21 +0000 Subject: [issue9990] PyMemoryView_FromObject alters the Py_buffer after calling PyObject_GetBuffer when ndim 1 In-Reply-To: <1285787018.03.0.476755592717.issue9990@psf.upfronthosting.co.za> Message-ID: <1285978341.11.0.379332534222.issue9990@psf.upfronthosting.co.za> Lenard Lindstrom added the comment: Applied patch to: Python 3.2a2+ (py3k:85150M, Oct 1 2010, 14:40:33) [GCC 4.4.5 20100728 (prerelease)] on linux2 Python unit test test_capi.py crashes: internal test_broken_memoryview * ob object : type : str refcount: 0 address : 0xb7171178 * op->_ob_prev->_ob_next object : type : str refcount: 0 address : 0xb7171178 * op->_ob_next->_ob_prev object : Segmentation fault Pygame unit tests pass (segfaults without the patch). bufrel.c test passes. numpy 1.5.0 unit tests not run since they rely on a package that needs porting to Python 3.x. A memory view is used to manage an object whose buffer a numpy array exposes. This was where the Pygame unit test seqfault occurred. The patch fixes the problem with Pygame. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 04:25:05 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Oct 2010 02:25:05 +0000 Subject: [issue4661] email.parser: impossible to read messages encoded in a different encoding In-Reply-To: <1229273746.12.0.577914878535.issue4661@psf.upfronthosting.co.za> Message-ID: <1285986305.27.0.967456934773.issue4661@psf.upfronthosting.co.za> R. David Murray added the comment: New version of patch including a BytesGenerator. ---------- Added file: http://bugs.python.org/file19102/email_parse_bytes3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 04:37:31 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Oct 2010 02:37:31 +0000 Subject: [issue4661] email.parser: impossible to read messages encoded in a different encoding In-Reply-To: <1229273746.12.0.577914878535.issue4661@psf.upfronthosting.co.za> Message-ID: <1285987051.38.0.71481025789.issue4661@psf.upfronthosting.co.za> R. David Murray added the comment: In case it isn't clear, the code patch is now complete, so anyone who wants to give it a review, please do. I'll add the docs soon, but the basic idea is you can put bytes in by either using message_from_bytes or by using the 'ascii' codec and the 'surrogateescape' error handler on a file passed to msg_from_file, and you can get bytes out by using BytesGenerator and passing it a file-like object that accepts bytes. As a side benefit, Generator will correctly render (as unicode) the content of a section with a ContentTransferEncoding of '8bit'. ---------- stage: unit test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 04:57:47 2010 From: report at bugs.python.org (Alex Quinn) Date: Sat, 02 Oct 2010 02:57:47 +0000 Subject: [issue4661] email.parser: impossible to read messages encoded in a different encoding In-Reply-To: <1229273746.12.0.577914878535.issue4661@psf.upfronthosting.co.za> Message-ID: <1285988267.97.0.794030683487.issue4661@psf.upfronthosting.co.za> Changes by Alex Quinn : ---------- nosy: -Alex Quinn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 04:59:40 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 02 Oct 2010 02:59:40 +0000 Subject: [issue10012] httplib shadows builtin, assumes strings In-Reply-To: <1285976648.58.0.0752019030242.issue10012@psf.upfronthosting.co.za> Message-ID: <1285988380.25.0.428596191905.issue10012@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 05:31:02 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 02 Oct 2010 03:31:02 +0000 Subject: [issue10010] ".. index::" position In-Reply-To: <1285966504.08.0.573086754525.issue10010@psf.upfronthosting.co.za> Message-ID: <1285990262.73.0.63696127669.issue10010@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in py3k(r85156), release31-maint(r85157) and release27-maint(r85158). ---------- nosy: +orsenthil resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 06:00:10 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sat, 02 Oct 2010 04:00:10 +0000 Subject: [issue9974] tokenizer.untokenize not invariant with line continuations In-Reply-To: <1285695065.99.0.439423855227.issue9974@psf.upfronthosting.co.za> Message-ID: <1285992010.13.0.199731769347.issue9974@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Interesting, is that a separate defect of doctest? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 06:06:35 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Oct 2010 04:06:35 +0000 Subject: [issue1050268] rfc822.parseaddr is broken, breaks sendmail call in smtplib Message-ID: <1285992395.58.0.607747098769.issue1050268@psf.upfronthosting.co.za> R. David Murray added the comment: After working my way through the code I no longer think that parseaddr is working as designed. I think that this is a bug, and that there is a missing call to quote in getaddrspec. Attached is a revised set of unit tests and a fix. The full python test suite passes with this fix in place, but note that initially I made a mistake in the patch and running test_email passed...that is, before the attached tests there were no tests of parseaddr in the email test suite. I don't know if this patch is safe for backport, but I'm inclined that way. It is hard to see how 3rd party code could be compensating for this bug, since it looses quoting information that doesn't appear to be algorithmically recoverable. ---------- Added file: http://bugs.python.org/file19103/parseaddr_quote.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 06:45:24 2010 From: report at bugs.python.org (Yaroslav Halchenko) Date: Sat, 02 Oct 2010 04:45:24 +0000 Subject: [issue10006] non-Pythonic fate of __abstractmethods__ In-Reply-To: <1285940853.14.0.546762707016.issue10006@psf.upfronthosting.co.za> Message-ID: <1285994724.21.0.1084942895.issue10006@psf.upfronthosting.co.za> Yaroslav Halchenko added the comment: yikes... surprising resolution -- I expected that fix would either makes __abstractmethods__ accessible in derived "type"s or becomes absent from output of dir() -- but none of those has happened. Now we ended up with a consistent non-Pythonic fate of __abstractmethods__ listed in output of dir() but not accessible. is that a feature? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 08:14:53 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 02 Oct 2010 06:14:53 +0000 Subject: [issue9951] introduce bytes.hex method In-Reply-To: <1285457928.18.0.422778723123.issue9951@psf.upfronthosting.co.za> Message-ID: <1286000093.8.0.744666343391.issue9951@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 08:35:10 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 02 Oct 2010 06:35:10 +0000 Subject: [issue9951] introduce bytes.hex method In-Reply-To: <1285457928.18.0.422778723123.issue9951@psf.upfronthosting.co.za> Message-ID: <1286001310.29.0.589967761158.issue9951@psf.upfronthosting.co.za> Nick Coghlan added the comment: Patch generally looks good, but the type of retbuf is incorrect (should be Py_UNICODE* rather than wchar_t*). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 10:36:20 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 02 Oct 2010 08:36:20 +0000 Subject: [issue6612] 'import site' fails when called from an unlinked directory In-Reply-To: <1249034007.06.0.695800326888.issue6612@psf.upfronthosting.co.za> Message-ID: <1286008580.39.0.936097964442.issue6612@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: A unit test is needed. Not to check the code, but to ensure that we don't break it in the future. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 11:56:31 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 02 Oct 2010 09:56:31 +0000 Subject: [issue1767933] Badly formed XML using etree and utf-16 Message-ID: <1286013391.41.0.658493601343.issue1767933@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Python 3.1 improves the situation, the file looks more like utf-16, except that the BOM ("\xff\xfe") is repeated all the time, probably on every internal call to file.write(). Here is a test script that should work on both 2.7 and 3.1. from io import BytesIO from xml.etree.ElementTree import ElementTree content = "" input = BytesIO(content.encode('utf-16')) tree = ElementTree() tree.parse(input) # Write content output = BytesIO() tree.write(output, encoding="utf-16") assert output.getvalue().decode('utf-16') == content ---------- stage: unit test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 13:13:43 2010 From: report at bugs.python.org (Paul Menzel) Date: Sat, 02 Oct 2010 11:13:43 +0000 Subject: =?utf-8?q?=5Bissue10013=5D_fix_=60=2E/libpython2=2E6=2Eso=3A_undefined_re?= =?utf-8?q?ference_to_=60=5FPyParser=5FGrammar=C2=B4=60_in_parallel_builds?= In-Reply-To: <1286018023.44.0.511102577172.issue10013@psf.upfronthosting.co.za> Message-ID: <1286018023.44.0.511102577172.issue10013@psf.upfronthosting.co.za> New submission from Paul Menzel : Compiling Python in parallel sometimes fails as reported in [1] and [2]. ./libpython2.6.so: undefined reference to `_PyParser_Grammar? Fedora applies a patch by dmalcolm which fixes this issue [3]. diff -up Python-2.7/Makefile.pre.in.fix-parallel-make Python-2.7/Makefile.pre.in --- Python-2.7/Makefile.pre.in.fix-parallel-make 2010-07-22 15:01:39.567996932 -0400 +++ Python-2.7/Makefile.pre.in 2010-07-22 15:47:02.437998509 -0400 @@ -207,6 +207,7 @@ SIGNAL_OBJS= @SIGNAL_OBJS@ ########################################################################## # Grammar +GRAMMAR_STAMP= $(srcdir)/grammar-stamp GRAMMAR_H= $(srcdir)/Include/graminit.h GRAMMAR_C= $(srcdir)/Python/graminit.c GRAMMAR_INPUT= $(srcdir)/Grammar/Grammar @@ -530,10 +531,24 @@ Modules/getpath.o: $(srcdir)/Modules/get Modules/python.o: $(srcdir)/Modules/python.c $(MAINCC) -c $(PY_CFLAGS) -o $@ $(srcdir)/Modules/python.c +# GNU "make" interprets rules with two dependents as two copies of the rule. +# +# In a parallel build this can lead to pgen being run twice, once for each of +# GRAMMAR_H and GRAMMAR_C, leading to race conditions in which the compiler +# reads a partially-overwritten copy of one of these files, leading to syntax +# errors (or linker errors if the fragment happens to be syntactically valid C) +# +# See http://www.gnu.org/software/hello/manual/automake/Multiple-Outputs.html +# for more information +# +# Introduce ".grammar-stamp" as a contrived single output from PGEN to avoid +# this: +$(GRAMMAR_H) $(GRAMMAR_C): $(GRAMMAR_STAMP) -$(GRAMMAR_H) $(GRAMMAR_C): $(PGEN) $(GRAMMAR_INPUT) +$(GRAMMAR_STAMP): $(PGEN) $(GRAMMAR_INPUT) -@$(INSTALL) -d Include -$(PGEN) $(GRAMMAR_INPUT) $(GRAMMAR_H) $(GRAMMAR_C) + touch $(GRAMMAR_STAMP) $(PGEN): $(PGENOBJS) $(CC) $(OPT) $(LDFLAGS) $(PGENOBJS) $(LIBS) -o $(PGEN) Could you please apply it. Could this also be applied to 2.6.x? [1] http://doc.services.openoffice.org/wiki/RedTinderboxStatusInEIS [2] http://www.openoffice.org/issues/show_bug.cgi?id=114866 [3] http://pkgs.fedoraproject.org/gitweb/?p=python.git;a=commit;h=b95f6cc2ca6a009f97436c6aa16cfd70547353d9 ---------- components: Build messages: 117865 nosy: PaulePanter priority: normal severity: normal status: open title: fix `./libpython2.6.so: undefined reference to `_PyParser_Grammar?` in parallel builds type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 13:17:34 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 02 Oct 2010 11:17:34 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1286018254.24.0.588979019791.issue8670@psf.upfronthosting.co.za> STINNER Victor added the comment: r85172 changes PyUnicode_AsWideCharString() (don't count the trailing nul character in the output size) and add unit tests. r85173 patches unicode_aswidechar() to supports non-BMP characters for all known wchar_t/Py_UNICODE size combinaisons (2/2, 2/4 and 4/2). I noticed that PyUnicode_AsWideChar() and PyUnicode_AsWideCharString() accept embeded nul characters. I don't know if it is a bug or an expected behaviour. Anyway, there is now a test for this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 13:54:31 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 02 Oct 2010 11:54:31 +0000 Subject: =?utf-8?q?=5Bissue10013=5D_fix_=60=2E/libpython2=2E6=2Eso=3A_undefined_re?= =?utf-8?q?ference_to_=60=5FPyParser=5FGrammar=C2=B4=60_in_parallel_builds?= In-Reply-To: <1286018023.44.0.511102577172.issue10013@psf.upfronthosting.co.za> Message-ID: <1286020471.57.0.81705362047.issue10013@psf.upfronthosting.co.za> Martin v. L?wis added the comment: 2.6 is closed for bug fixes, so this cannot be applied anymore. Notice that py3k has this fixed in r84068; I'll backport the fix to 2.7. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 13:55:59 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 02 Oct 2010 11:55:59 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1286020559.37.0.182942023015.issue8670@psf.upfronthosting.co.za> STINNER Victor added the comment: r85174+r85177: ctypes.c_wchar supports non-BMP characters with 32 bits wchar_t => fix this issue (I commited also an unwanted change on _testcapi to fix r85172 in r85174: r85175 reverts this change, and r85176 fixes the _testcapi bug again) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 13:59:29 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 02 Oct 2010 11:59:29 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1286020769.59.0.232464689034.issue8670@psf.upfronthosting.co.za> STINNER Victor added the comment: > r85173 patches unicode_aswidechar() to supports non-BMP characters > for all known wchar_t/Py_UNICODE size combinaisons (2/2, 2/4 and 4/2). Oh, and 4/4 ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 14:11:07 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Oct 2010 12:11:07 +0000 Subject: =?utf-8?q?=5Bissue10013=5D_fix_=60=2E/libpython2=2E6=2Eso=3A_undefined_re?= =?utf-8?q?ference_to_=60=5FPyParser=5FGrammar=C2=B4=60_in_parallel_builds?= In-Reply-To: <1286018023.44.0.511102577172.issue10013@psf.upfronthosting.co.za> Message-ID: <1286021467.7.0.486018927147.issue10013@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 14:14:23 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 02 Oct 2010 12:14:23 +0000 Subject: [issue10014] sys.path[0] is incorrect if PYTHONFSENCODING is used In-Reply-To: <1286021663.34.0.689026258035.issue10014@psf.upfronthosting.co.za> Message-ID: <1286021663.34.0.689026258035.issue10014@psf.upfronthosting.co.za> New submission from STINNER Victor : In the following example, sys.path[0] should be '/home/SHARE/SVN/py3k\udcc3\udca9' (my locale and filesystem encodings are utf-8): $ cd /home/SHARE/SVN/py3k? $ echo "import sys; print(sys.path[0])" > x.py $ ./python x.py /home/SHARE/SVN/py3k? $ PYTHONFSENCODING=ascii ./python x.py /home/SHARE/SVN/py3k? The problem is that PySys_SetArgvEx() inserts argv[0] at sys.path[0], but argv[0] is decoded using the locale encoding (by _Py_char2wchar() in main()), whereas paths of sys.path are supposed to be encodable (and decoded) by sys.getfilesystemencoding(). argv array should be decoded using the filesystem encoding (see issue #9992) or argv[0] should be redecoded (encode to the locale encoding, and decode from the filesystem encoding, see issue #9630). ---------- components: Unicode messages: 117870 nosy: haypo priority: normal severity: normal status: open title: sys.path[0] is incorrect if PYTHONFSENCODING is used versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 14:14:57 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 02 Oct 2010 12:14:57 +0000 Subject: [issue9992] Command line arguments are not correctly decodedif locale and fileystem encodings aredifferent In-Reply-To: <1285799783.26.0.120724027895.issue9992@psf.upfronthosting.co.za> Message-ID: <1286021697.75.0.37449699574.issue9992@psf.upfronthosting.co.za> STINNER Victor added the comment: See also #10014: sys.path[0] is decoded from the locale encoding instead of the fileystem encoding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 14:23:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 02 Oct 2010 12:23:01 +0000 Subject: [issue9533] metaclass can't derive from ABC In-Reply-To: <1281090819.15.0.255356922996.issue9533@psf.upfronthosting.co.za> Message-ID: <1286022181.62.0.49181962777.issue9533@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 15:15:33 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Sat, 02 Oct 2010 13:15:33 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1286025333.32.0.61029729696.issue8670@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: Thanks for working on this! Since this was a bugfix, it should be merged back into 2.7, yes? ---------- stage: unit test needed -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 15:18:24 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 02 Oct 2010 13:18:24 +0000 Subject: [issue6706] asyncore's accept() is broken In-Reply-To: <1250291017.2.0.719693187742.issue6706@psf.upfronthosting.co.za> Message-ID: <1286025504.86.0.346197238478.issue6706@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Patch in attachment adds a handled_accepted() method to dispatcher class as recommended by Antoine. ---------- Added file: http://bugs.python.org/file19104/accept.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 15:53:01 2010 From: report at bugs.python.org (Ram Rachum) Date: Sat, 02 Oct 2010 13:53:01 +0000 Subject: [issue10011] `except` doesn't use `isinstance` In-Reply-To: <1285973470.62.0.723186105709.issue10011@psf.upfronthosting.co.za> Message-ID: <1286027581.48.0.113677211125.issue10011@psf.upfronthosting.co.za> Ram Rachum added the comment: Also, how important is the performance of exception checking *after* an exception was raised? I mean, wouldn't it matter only for programs that raise and catch hundreds of exceptions a second? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 16:00:29 2010 From: report at bugs.python.org (Michael Olson) Date: Sat, 02 Oct 2010 14:00:29 +0000 Subject: [issue10015] Creating a multiproccess.pool.ThreadPool from a child thread blows up. In-Reply-To: <1286028029.62.0.429525925265.issue10015@psf.upfronthosting.co.za> Message-ID: <1286028029.62.0.429525925265.issue10015@psf.upfronthosting.co.za> New submission from Michael Olson : Using Python 2.7 x32 on Windows XP Attempting to create a multiprocessing.pool.ThreadPool in a child thread created using threading.Thread, an AttributeError is thrown. A ThreadPool created in the main thread can be passed to the child thread and used. Exact text of exception ------------------- File "D:\Dev\Python27\lib\multiprocessing\dummy\__init__.py", line 47, in star t self._parent._children[self] = None AttributeError: 'Thread' object has no attribute '_children' Demonstration Code ------------------- import unittest from threading import Thread from multiprocessing.pool import ThreadPool def f(x): return x*x def create_and_run(cb, pool = None): if not pool: pool = ThreadPool(2) r = pool.map_async(f, range(10)) cb(r.get()) class TestThreadPool(unittest.TestCase): def setUp(self): self.expected = [f(x) for x in range(10)] def callback(self, data): self.data = data def test_creating_pool_in_mainthread(self): """Test multiprocessing.pool.ThreadPool from main thread""" self.data = None create_and_run(self.callback) self.assertEqual(self.data, self.expected) def test_creating_pool_in_subthread(self): """Test multiprocessing.pool.ThreadPool from a child thread.""" self.data = None t = Thread(target=create_and_run, args=[self.callback]) t.start() t.join() self.assertEqual(self.data, self.expected) def test_creating_pool_in_subthread_workaround(self): """Test running a ThreadPool created in main thread, used in child.""" self.data = None pool = ThreadPool(2) t = Thread(target=create_and_run, args=[self.callback, pool]) t.start() t.join() self.assertEqual(self.data, self.expected) if __name__ =='__main__': suite = unittest.TestLoader().loadTestsFromTestCase(TestThreadPool) unittest.TextTestRunner(verbosity=2).run(suite) ---------- components: Library (Lib) files: potential_issue_demo.py messages: 117875 nosy: Michael.Olson priority: normal severity: normal status: open title: Creating a multiproccess.pool.ThreadPool from a child thread blows up. type: crash versions: Python 2.7 Added file: http://bugs.python.org/file19105/potential_issue_demo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 16:10:28 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 02 Oct 2010 14:10:28 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1286028628.59.0.590256067864.issue9807@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 16:10:42 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 02 Oct 2010 14:10:42 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1286028642.63.0.203388944291.issue5117@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: In py3k, ntpath is almost fixed. but posixpath is not fixed yet. ntpath has another problem about case sensitivity. I'll attach the patch to fix ntpath's case issue and posixpath. In Py27, ntpath has whole issue still there. ---------- Added file: http://bugs.python.org/file19106/py3k_fix_relpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 16:11:51 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 02 Oct 2010 14:11:51 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1286028711.68.0.00960583969389.issue5117@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I'll create the patch for it. ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 16:16:55 2010 From: report at bugs.python.org (Tom Potts) Date: Sat, 02 Oct 2010 14:16:55 +0000 Subject: [issue10016] shutil.copyfile -- allow sparse copying In-Reply-To: <1286029015.57.0.815158740908.issue10016@psf.upfronthosting.co.za> Message-ID: <1286029015.57.0.815158740908.issue10016@psf.upfronthosting.co.za> New submission from Tom Potts : Copying a sparse file under Linux using shutil.copyfile will not result in a sparse file at the end of the process. I'm submitting a patch that will remedy this. Note that I am only concerned with Linux at the moment -- as far as I know this patch will not mess things up on other platforms, but this will need to be tested. It depends on the behaviour of os.truncate() when the pointer is past the end of the file, which according to the docs is platform dependant. Tom P.S. This is my first time submitting an issue -- if there's anything I need to do and haven't, please let me know. ---------- components: Library (Lib) files: shutil-2.6.patch keywords: patch messages: 117878 nosy: karaken12 priority: normal severity: normal status: open title: shutil.copyfile -- allow sparse copying type: feature request versions: Python 2.6, Python 2.7, Python 3.2 Added file: http://bugs.python.org/file19107/shutil-2.6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 16:17:37 2010 From: report at bugs.python.org (Tom Potts) Date: Sat, 02 Oct 2010 14:17:37 +0000 Subject: [issue10016] shutil.copyfile -- allow sparse copying In-Reply-To: <1286029015.57.0.815158740908.issue10016@psf.upfronthosting.co.za> Message-ID: <1286029057.82.0.716815500429.issue10016@psf.upfronthosting.co.za> Tom Potts added the comment: (see opening message) ---------- Added file: http://bugs.python.org/file19108/shutil-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 16:18:07 2010 From: report at bugs.python.org (Tom Potts) Date: Sat, 02 Oct 2010 14:18:07 +0000 Subject: [issue10016] shutil.copyfile -- allow sparse copying In-Reply-To: <1286029015.57.0.815158740908.issue10016@psf.upfronthosting.co.za> Message-ID: <1286029087.64.0.62152581283.issue10016@psf.upfronthosting.co.za> Changes by Tom Potts : Added file: http://bugs.python.org/file19109/shutil-3.2.1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 16:18:11 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Oct 2010 14:18:11 +0000 Subject: [issue9533] metaclass can't derive from ABC In-Reply-To: <1281090819.15.0.255356922996.issue9533@psf.upfronthosting.co.za> Message-ID: <1286029091.01.0.252796374677.issue9533@psf.upfronthosting.co.za> R. David Murray added the comment: Does the "fix" for issue 10006 affect this? (I imagine that question is why Antoine made Benjamin nosy on this issue). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 16:49:08 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Oct 2010 14:49:08 +0000 Subject: [issue10015] Creating a multiproccess.pool.ThreadPool from a child thread blows up. In-Reply-To: <1286028029.62.0.429525925265.issue10015@psf.upfronthosting.co.za> Message-ID: <1286030948.8.0.786122977484.issue10015@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +asksol, jnoller type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 17:21:10 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Oct 2010 15:21:10 +0000 Subject: [issue10016] shutil.copyfile -- allow sparse copying In-Reply-To: <1286029015.57.0.815158740908.issue10016@psf.upfronthosting.co.za> Message-ID: <1286032870.35.0.83985001568.issue10016@psf.upfronthosting.co.za> R. David Murray added the comment: You are right that this needs to be tested on other platforms. In order to so test it (and in any case!), the patch will need unit tests. It also needs doc updates. In general patch itself looks good to me, modulo the concern you raise about truncate. You could move the '\0'*buflen constant outside the loop. Also, the py3k IO module doesn't define constants for 'seek', the docs just refer to the integers, so it might be best not to use the os constants even though they are equivalent (the new io module is not a wrapper around os functions the way the old file implementation was). FYI, patches should (currently, pending the hg migration) be against the py3k trunk, and whoever commits it would backport it if appropriate. In this case, however, it is a new feature and so can only go into py3k trunk. ---------- nosy: +r.david.murray, tarek versions: -Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 17:29:11 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 02 Oct 2010 15:29:11 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1286033351.28.0.899090291534.issue8670@psf.upfronthosting.co.za> STINNER Victor added the comment: > Since this was a bugfix, it should be merged back into 2.7, yes? Mmmh, the fix requires to change PyUnicode_AsWideChar() function (support non-BMP characters and surrogate pairs) (and maybe also to create PyUnicode_AsWideCharString()). I don't really want to change such important function in a stable branch (Python2). Is it really important to support non-BMP characters for ctypes.c_wchar in Python2? I would like to say: if you want better unicode support, use Python 3. And Python 3.2 if it's possible :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 17:33:49 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Sat, 02 Oct 2010 15:33:49 +0000 Subject: [issue8670] c_types.c_wchar should not assume that sizeof(wchar_t) == sizeof(Py_UNICODE) In-Reply-To: <1273387114.89.0.416578803449.issue8670@psf.upfronthosting.co.za> Message-ID: <1286033629.77.0.455753941594.issue8670@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: Since I noticed the bug through source code inspection and no one has reported it occurring in practice, that sounds reasonable to me. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 18:28:28 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Oct 2010 16:28:28 +0000 Subject: [issue1050268] rfc822.parseaddr is broken, breaks sendmail call in smtplib Message-ID: <1286036908.14.0.883479624532.issue1050268@psf.upfronthosting.co.za> R. David Murray added the comment: Fix committed to py3k in r85179, 3.1 in r85170, and 2.7 in r85181. I modified the unit tests, deleting the ones that were redundant because they were just two different python spellings of the same input string, and adding a comment about the third test case's quoting pattern. ---------- resolution: -> fixed stage: unit test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 18:53:42 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 02 Oct 2010 16:53:42 +0000 Subject: [issue7511] msvc9compiler.py: ValueError: [u'path'] In-Reply-To: <1260858478.84.0.495655867168.issue7511@psf.upfronthosting.co.za> Message-ID: <1286038422.56.0.0999029136119.issue7511@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 18:56:25 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 02 Oct 2010 16:56:25 +0000 Subject: [issue10006] non-Pythonic fate of __abstractmethods__ In-Reply-To: <1285994724.21.0.1084942895.issue10006@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: 2010/10/1 Yaroslav Halchenko : > > Yaroslav Halchenko added the comment: > > yikes... surprising resolution -- I expected that fix would either makes __abstractmethods__ accessible in derived "type"s or becomes absent from output of dir() -- but none of those has happened. ?Now we ended up with a consistent non-Pythonic fate of __abstractmethods__ listed in output of dir() but not accessible. ?is that a feature? type has no __abstractmethods__, so it should raise an AttributeError. Note descriptors are allowed to raise AttributeError even if they're in dir(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 18:58:16 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 02 Oct 2010 16:58:16 +0000 Subject: [issue8792] Support Apache extensions to XML-RPC in xmlrpclib In-Reply-To: <1274558114.05.0.260300491762.issue8792@psf.upfronthosting.co.za> Message-ID: <1286038696.96.0.282287891723.issue8792@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: It's easy enough to subclass the Transport type and add custom types to the dispatcher object, see the script below. Attila, Bhargav, is this solution acceptable to you? from xmlrpclib import Transport, ServerProxy class MyTransport(Transport): def getparser(self): parser, unmarshaller = Transport.getparser(self) # Get the class attribute, clone it dispatch = unmarshaller.dispatch.copy() # and store it on the instance unmarshaller.dispatch = dispatch # Now we can add custom types dispatch["ex:i8"] = dispatch["int"] return parser, unmarshaller uri = "http://time.xmlrpc.com/RPC2" server = ServerProxy(uri, transport=MyTransport(use_datetime=True)) print server.currentTime.getCurrentTime() ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 19:05:08 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 02 Oct 2010 17:05:08 +0000 Subject: [issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction In-Reply-To: <1279965202.04.0.507207277215.issue9369@psf.upfronthosting.co.za> Message-ID: <1286039108.44.0.688003845615.issue9369@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Martin, what do you think about this kind of changes? Are there possible regressions or incompatibilities? ---------- nosy: +amaury.forgeotdarc, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 19:09:36 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 02 Oct 2010 17:09:36 +0000 Subject: [issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction In-Reply-To: <1279965202.04.0.507207277215.issue9369@psf.upfronthosting.co.za> Message-ID: <1286039376.97.0.849075034324.issue9369@psf.upfronthosting.co.za> Martin v. L?wis added the comment: AFAICT, they are compatible, so +1. The typical proposition of an incompatible change either proposes to use const char* as the return type, or has multi-level pointers that are proposed to be constified. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 19:14:37 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 02 Oct 2010 17:14:37 +0000 Subject: [issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction In-Reply-To: <1279965202.04.0.507207277215.issue9369@psf.upfronthosting.co.za> Message-ID: <1286039677.6.0.947847735674.issue9369@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Thanks for the confirmation! ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 19:15:16 2010 From: report at bugs.python.org (Jesse Noller) Date: Sat, 02 Oct 2010 17:15:16 +0000 Subject: [issue10015] Creating a multiproccess.pool.ThreadPool from a child thread blows up. In-Reply-To: <1286028029.62.0.429525925265.issue10015@psf.upfronthosting.co.za> Message-ID: <1286039716.61.0.675620160897.issue10015@psf.upfronthosting.co.za> Jesse Noller added the comment: I can not, for the life of me, remember why ThreadPool is there, except as a fallback. It's also not part of the documented interface as well. Additionally, in Python 3 we now have futures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 19:53:47 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 02 Oct 2010 17:53:47 +0000 Subject: [issue9533] metaclass can't derive from ABC In-Reply-To: <1281090819.15.0.255356922996.issue9533@psf.upfronthosting.co.za> Message-ID: <1286042027.78.0.950052186389.issue9533@psf.upfronthosting.co.za> Benjamin Peterson added the comment: You can now create metaclass abcs. However, having __abstractmethods__ does not prevent instance creation. This is a problem with a builtins, though. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 20:03:47 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 02 Oct 2010 18:03:47 +0000 Subject: [issue10011] `except` doesn't use `isinstance` In-Reply-To: <1285973470.62.0.723186105709.issue10011@psf.upfronthosting.co.za> Message-ID: <1286042627.85.0.260095771295.issue10011@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It matters when exceptions are expected or are a normal part of control flow. For example StopIteration. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 20:49:54 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Oct 2010 18:49:54 +0000 Subject: [issue4661] email.parser: impossible to read messages encoded in a different encoding In-Reply-To: <1229273746.12.0.577914878535.issue4661@psf.upfronthosting.co.za> Message-ID: <1286045394.93.0.38733691249.issue4661@psf.upfronthosting.co.za> R. David Murray added the comment: Version 4 of patch, now including doc updates. The patch set is now complete. ---------- Added file: http://bugs.python.org/file19110/email_parse_bytes4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 21:55:34 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 02 Oct 2010 19:55:34 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1286049334.54.0.405318827585.issue5117@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Well, I said msg80877 past, and I think so too, but os.path module of python2.x seems not to support UNC correctly, and I'm not sure if the behavior change is allowed here. Probably UNC support is new feature, so I'll attach the patch to solve only this problem as is. ---------- Added file: http://bugs.python.org/file19111/py27_fix_relpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 22:10:06 2010 From: report at bugs.python.org (Alan McIntyre) Date: Sat, 02 Oct 2010 20:10:06 +0000 Subject: [issue1710703] zipfile.ZipFile behavior inconsistent. Message-ID: <1286050206.72.0.299852381344.issue1710703@psf.upfronthosting.co.za> Changes by Alan McIntyre : Removed file: http://bugs.python.org/file9144/empty-zipfile.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 22:35:20 2010 From: report at bugs.python.org (Arnaud Delobelle) Date: Sat, 02 Oct 2010 20:35:20 +0000 Subject: [issue10017] pprint.pprint raises TypeError on dictionaries with user-defined types as keys In-Reply-To: <1286051720.0.0.33399911329.issue10017@psf.upfronthosting.co.za> Message-ID: <1286051720.0.0.33399911329.issue10017@psf.upfronthosting.co.za> New submission from Arnaud Delobelle : The pprint function in the python 3.1 pprint module fails when printing a dictionary containing more than one item and with one item being a user-defined type. It seems pprint tries to sort the keys but fails, (maybe because calling __lt__ on a user-defined type doesn't bind its first argument to 'self'? Looking into pprint.py would probably yield the answer). This seems related to issue 3976 but it was fixed in r76389 and r76390. My example below fails in r79147. I'm not in a position to check more recent revisions right now. In Python 2.6, the following works fine: Python 2.6.5 (r265:79063, Apr 16 2010, 13:09:56) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pprint import pprint >>> class A(object): pass ... >>> pprint({A:1, 1:2}) {1: 2, : 1} But in Python 3.1, it fails with the error below: Python 3.1.2 (r312:79147, Apr 15 2010, 12:35:07) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from pprint import pprint >>> class A: pass ... >>> pprint({A:1, 1:2}) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.1/pprint.py", line 55, in pprint printer.pprint(object) File "/usr/lib/python3.1/pprint.py", line 132, in pprint self._format(object, self._stream, 0, 0, {}, 0) File "/usr/lib/python3.1/pprint.py", line 155, in _format rep = self._repr(object, context, level - 1) File "/usr/lib/python3.1/pprint.py", line 242, in _repr self._depth, level) File "/usr/lib/python3.1/pprint.py", line 254, in format return _safe_repr(object, context, maxlevels, level) File "/usr/lib/python3.1/pprint.py", line 296, in _safe_repr items = sorted(object.items(), key=_safe_tuple) File "/usr/lib/python3.1/pprint.py", line 89, in __lt__ rv = self.obj.__lt__(other.obj) TypeError: expected 1 arguments, got 0 ---------- components: Library (Lib) messages: 117895 nosy: arno priority: normal severity: normal status: open title: pprint.pprint raises TypeError on dictionaries with user-defined types as keys versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 22:49:11 2010 From: report at bugs.python.org (Alan McIntyre) Date: Sat, 02 Oct 2010 20:49:11 +0000 Subject: [issue1710703] zipfile.ZipFile behavior inconsistent. Message-ID: <1286052551.15.0.173673686625.issue1710703@psf.upfronthosting.co.za> Alan McIntyre added the comment: My apologies if Georg was waiting on me to say, "Yes." :-) I've attached an updated patch that has the NEWS/doc changes Antoine mentioned. I also just checked that the tests still pass on Linux against the current trunk, and that the docs still build properly. ---------- Added file: http://bugs.python.org/file19112/zipfile_empty3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 22:49:49 2010 From: report at bugs.python.org (Alan McIntyre) Date: Sat, 02 Oct 2010 20:49:49 +0000 Subject: [issue1710703] zipfile.ZipFile behavior inconsistent. Message-ID: <1286052589.45.0.596334946986.issue1710703@psf.upfronthosting.co.za> Changes by Alan McIntyre : Removed file: http://bugs.python.org/file18534/zipfile_empty2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 23:17:00 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Oct 2010 21:17:00 +0000 Subject: [issue4661] email.parser: impossible to read messages encoded in a different encoding In-Reply-To: <1229273746.12.0.577914878535.issue4661@psf.upfronthosting.co.za> Message-ID: <1286054220.22.0.0120410467542.issue4661@psf.upfronthosting.co.za> R. David Murray added the comment: Rietveld issue, with a small doc addition compared to pach4: http://codereview.appspot.com/2362041 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 23:25:46 2010 From: report at bugs.python.org (David Watson) Date: Sat, 02 Oct 2010 21:25:46 +0000 Subject: [issue9647] os.confstr() does not handle value changing length between calls In-Reply-To: <1285781559.72.0.62593560462.issue9647@psf.upfronthosting.co.za> Message-ID: <20101002212537.GA29167@dbwatson.ukfsn.org> David Watson added the comment: > If I understood correctly, you don't want the value to be truncated if the variable grows between the two calls to confstr(). Which behaviour would you expect? A Python exception? A return size larger than the buffer is *supposed* to indicate that the current value is larger than the supplied buffer, so I would just expect it to reallocate the buffer, call confstr() again and return the new value, unless it was known that such a situation indicated an actual problem. In other words, I would not expect it to do anything special. I didn't write the original patch the way I did in order to fix this (potential) bug - it just seemed like the most natural way to write the code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 23:33:39 2010 From: report at bugs.python.org (dontbugme) Date: Sat, 02 Oct 2010 21:33:39 +0000 Subject: [issue6792] Distutils-based installer does not detect 64bit versions of Python In-Reply-To: <1251449540.11.0.0670330819334.issue6792@psf.upfronthosting.co.za> Message-ID: <1286055219.73.0.964980673028.issue6792@psf.upfronthosting.co.za> dontbugme added the comment: you can add InstallPath key with the corresponding value at [HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Python\PythonCore\2.6\] if you want disutils installer to detect your python That makes him detect and install the librarys or scripts to the right directory, but doens't make your library 64bit compatible if it isn't (means if the library doesn't work on 64 bit i neither will whith this work around) Only possibility of fixing that problem is installing 32bit python ---------- nosy: +dontbugme versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 23:35:49 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Oct 2010 21:35:49 +0000 Subject: [issue4661] email.parser: impossible to read messages encoded in a different encoding In-Reply-To: <1229273746.12.0.577914878535.issue4661@psf.upfronthosting.co.za> Message-ID: <1286055349.8.0.334956140879.issue4661@psf.upfronthosting.co.za> R. David Murray added the comment: Upload svn patch, so that Martin's new rietveld support will (hopefully) create an automatic review link. ---------- Added file: http://bugs.python.org/file19113/email_parse_bytes5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 2 23:36:53 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 02 Oct 2010 21:36:53 +0000 Subject: [issue6792] Distutils-based installer does not detect 64bit versions of Python In-Reply-To: <1251449540.11.0.0670330819334.issue6792@psf.upfronthosting.co.za> Message-ID: <1286055413.13.0.0552185433838.issue6792@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 01:04:46 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Oct 2010 23:04:46 +0000 Subject: [issue10017] pprint.pprint raises TypeError on dictionaries with user-defined types as keys In-Reply-To: <1286051720.0.0.33399911329.issue10017@psf.upfronthosting.co.za> Message-ID: <1286060686.15.0.766718245857.issue10017@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 01:25:19 2010 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Sat, 02 Oct 2010 23:25:19 +0000 Subject: [issue9369] const char* for PyObject_CallMethod and PyObject_CallFunction In-Reply-To: <1279965202.04.0.507207277215.issue9369@psf.upfronthosting.co.za> Message-ID: <1286061919.24.0.914890304278.issue9369@psf.upfronthosting.co.za> Changes by Andreas St?hrk : ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 01:48:50 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 02 Oct 2010 23:48:50 +0000 Subject: [issue1210680] Split email headers near a space Message-ID: <1286063330.93.0.374250428028.issue1210680@psf.upfronthosting.co.za> R. David Murray added the comment: Since no test case has been provided I am closing this issue. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 02:04:00 2010 From: report at bugs.python.org (Jeremy Kloth) Date: Sun, 03 Oct 2010 00:04:00 +0000 Subject: [issue6792] Distutils-based installer does not detect 64bit versions of Python In-Reply-To: <1251449540.11.0.0670330819334.issue6792@psf.upfronthosting.co.za> Message-ID: <1286064240.14.0.123315002371.issue6792@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 04:12:53 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Sun, 03 Oct 2010 02:12:53 +0000 Subject: [issue9800] Fast path for small int-indexing of lists and tuples In-Reply-To: <1283969230.58.0.425189432441.issue9800@psf.upfronthosting.co.za> Message-ID: <1286071973.46.0.270767704263.issue9800@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: For what it's worth, a similar fast path existed in Python 2 for lists (but not tuples). It was removed for Python 3. I'm not sure why it was removed, but it may have been part of removing the PyInt type. ---------- nosy: +stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 04:16:11 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 03 Oct 2010 02:16:11 +0000 Subject: [issue1078919] email.Header (via add_header) encodes non-ASCII content incorrectly Message-ID: <1286072171.81.0.277014602652.issue1078919@psf.upfronthosting.co.za> R. David Murray added the comment: I don't believe either the example that other mailers reject or the one that they accept are in fact RFC compliant. Encoded words are not supposed to occur in (structured) MIME headers. The behavior observed is a consequence of all headers, whether structured or unstructured, being treated as if they were unstructured by Header. (There's a different problem in Python3 with this example, but I'll deal with that in a separate issue.) What we have here is primarily a documentation bug. The way to generate the correct (RFC compliant) header is as follows: >>> m.add_header('Content-Disposition', 'attachment', ... filename=('iso-8859-1', '', 'Fu?baller_sind_klug.ppt')) >>> str(m) 'Content-Disposition: attachment; filename*="iso-8859-1\'\'Fu%DFballer_sind_klug.ppt"\n\n' I will add the explanation and this example to the docs. In addition, in 3.2 I will disallow non-ASCII parameter values unless they are specified in a three element tuple as in the example above. That will still leave some other places where structured headers are inappropriately encoded by Header (eg: addresses with non-ASCII names), but dealing with that is a somewhat deeper problem. ---------- title: Email.Header encodes non-ASCII content incorrectly -> email.Header (via add_header) encodes non-ASCII content incorrectly type: feature request -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 04:36:10 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 03 Oct 2010 02:36:10 +0000 Subject: [issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally In-Reply-To: <1284643512.64.0.708677047597.issue9873@psf.upfronthosting.co.za> Message-ID: <1286073370.52.0.72639407618.issue9873@psf.upfronthosting.co.za> Nick Coghlan added the comment: As per RDM's email to python-dev, a better way to create the pseudo_str values would be by decoding as ascii with a surrogate escape error handler rather than by decoding as latin-1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 05:37:50 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 03 Oct 2010 03:37:50 +0000 Subject: [issue1078919] email.Header (via add_header) encodes non-ASCII content incorrectly Message-ID: <1286077070.84.0.639277873448.issue1078919@psf.upfronthosting.co.za> R. David Murray added the comment: Here is a patch. ---------- keywords: +patch stage: unit test needed -> patch review Added file: http://bugs.python.org/file19114/add_header.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 06:18:13 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 03 Oct 2010 04:18:13 +0000 Subject: [issue6302] email.header.decode_header data types are inconsistent and incorrectly documented In-Reply-To: <1245288976.09.0.298419063758.issue6302@psf.upfronthosting.co.za> Message-ID: <1286079493.41.0.00710763891787.issue6302@psf.upfronthosting.co.za> R. David Murray added the comment: Here is a patch that makes the output consistently (bytes, string) pairs. This is definitely a potential backward compatibility issue, but in general code which compensates for the old behavior should work fine with the new behavior, since it was always possible to get a (bytes, None) tuple back as a result, so most code should be handling that case correctly already. IMO this change is nevertheless worthwhile; especially since if the patch in issue 4661 is accepted decode_header can be enhanced so that it will provide a way to obtain the bytes version of a header containing (RFC invalid) non-ASCII bytes. Note that this breaks one of the tests in nttplib, so backward compatibility really is an issue, unfortunately. I think nttplib's use case can be satisfied via the issue 4661 patch coupled with the decode_header bytes-recovery enhancement. ---------- dependencies: +email.parser: impossible to read messages encoded in a different encoding keywords: +patch nosy: +pitrou Added file: http://bugs.python.org/file19115/decode_header.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 06:18:33 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 03 Oct 2010 04:18:33 +0000 Subject: [issue6302] email.header.decode_header data types are inconsistent and incorrectly documented In-Reply-To: <1245288976.09.0.298419063758.issue6302@psf.upfronthosting.co.za> Message-ID: <1286079513.11.0.0773093254699.issue6302@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 06:19:22 2010 From: report at bugs.python.org (Grant Andrew) Date: Sun, 03 Oct 2010 04:19:22 +0000 Subject: [issue10018] IDLE not loading in xp pro due to tcl issue In-Reply-To: <1286079562.42.0.239403513139.issue10018@psf.upfronthosting.co.za> Message-ID: <1286079562.42.0.239403513139.issue10018@psf.upfronthosting.co.za> New submission from Grant Andrew : I'm attempting to use Python for the first time and am running into issues before I'm out the door. I started with 3.2 and have worked backward installing older versions in hopes that IDLE would load on my xp pro laptop. After reading several threads here, I ran C:\>C:\python27\python C:\python27\Lib\idlelib\idle.py at a command prompt and received the following output: C:\>C:\python27\python C:\python27\Lib\idlelib\idle.py Traceback (most recent call last): File "C:\python27\Lib\idlelib\idle.py", line 11, in idlelib.PyShell.main() File "C:\python27\Lib\idlelib\PyShell.py", line 1389, in main root = Tk(className="Idle") File "C:\python27\lib\lib-tk\Tkinter.py", line 1685, in __init__ self.tk = _tkinter.create(screenName, baseName, className, interactive, want objects, useTk, sync, use) _tkinter.TclError: Can't find a usable init.tcl in the following directories: {C:\IBMTOOLS\Python22\tcl\tcl8.4} C:/IBMTOOLS/Python22/tcl/tcl8.5 C:/python2 7/lib/tcl8.5 C:/lib/tcl8.5 C:/lib/tcl8.5 C:/library C:/library C:/tcl8.5.2/libra ry C:/tcl8.5.2/library C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl: version conflict for package "Tcl": ha ve 8.5.2, need exactly 8.4 version conflict for package "Tcl": have 8.5.2, need exactly 8.4 while executing "package require -exact Tcl 8.4" (file "C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl" line 19) invoked from within "source C:/IBMTOOLS/Python22/tcl/tcl8.4/init.tcl" ("uplevel" body line 1) invoked from within "uplevel #0 [list source $tclfile]" This probably means that Tcl wasn't installed properly. After searching threads here and a general google search on TCL I couldn't turn up a link that helped with this issue. The closest tcl version available is 8.4.19 which isn't exact, so I'm hesitant to install this and blow something else up. Help is appreciated! Grant ---------- components: IDLE messages: 117907 nosy: Grant.Andrew priority: normal severity: normal status: open title: IDLE not loading in xp pro due to tcl issue type: crash versions: Python 2.5, Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 08:34:13 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 03 Oct 2010 06:34:13 +0000 Subject: [issue10012] httplib shadows builtin, assumes strings In-Reply-To: <1285976648.58.0.0752019030242.issue10012@psf.upfronthosting.co.za> Message-ID: <1286087653.52.0.363108573867.issue10012@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Here are patches with tests for py3k and release27-maint, for explicit conversion of header values to bytes/str. If someone likes to review the patch, please provide your comments. ---------- keywords: +patch resolution: -> accepted stage: -> patch review type: -> behavior versions: +Python 3.1, Python 3.2 Added file: http://bugs.python.org/file19116/issue10012-release27-maint.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 08:34:40 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 03 Oct 2010 06:34:40 +0000 Subject: [issue10012] httplib shadows builtin, assumes strings In-Reply-To: <1285976648.58.0.0752019030242.issue10012@psf.upfronthosting.co.za> Message-ID: <1286087680.17.0.753688423944.issue10012@psf.upfronthosting.co.za> Changes by Senthil Kumaran : Added file: http://bugs.python.org/file19117/issue10012-py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 14:44:53 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 03 Oct 2010 12:44:53 +0000 Subject: [issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally In-Reply-To: <1286073370.52.0.72639407618.issue9873@psf.upfronthosting.co.za> Message-ID: <1286109884.3111.16.camel@localhost.localdomain> Antoine Pitrou added the comment: > As per RDM's email to python-dev, a better way to create the > pseudo_str values would be by decoding as ascii with a surrogate > escape error handler rather than by decoding as latin-1. If you were worried about performance, then surrogateescape is certainly much slower than latin1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 15:04:30 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 03 Oct 2010 13:04:30 +0000 Subject: [issue6302] email.header.decode_header data types are inconsistent and incorrectly documented In-Reply-To: <1245288976.09.0.298419063758.issue6302@psf.upfronthosting.co.za> Message-ID: <1286111070.01.0.517010440861.issue6302@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I think nttplib's use case can be satisfied via the issue 4661 patch > coupled with the decode_header bytes-recovery enhancement. I don't really understand how that could. nntplib needs to "decode" (in the decode_header sense) headers containing unescaped as well as escaped non-ASCII chars. Encoding with "ascii" clearly breaks the first use case. Since the decode_header() API is so silly to begin with, I'd suggest providing another higher-level API instead. One which takes an str and returns another str (not bytes!) instead of that list of tuples. If you really want to "fix" the current decode_header(), I'd recommend adding an optional "encoding" parameter so that nntplib can give utf-8 instead of ascii. nntplib and other consumers will still have to decode back in order to get an str, which makes the whole encoding thing a bit useless. Oh, and instead of None, it would be nicer to give the actual encoding (e.g. "ascii"). It's no fun trying to guess. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 16:34:03 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 03 Oct 2010 14:34:03 +0000 Subject: [issue8980] distutils.tests.test_register.RegisterTestCase.test_strict fails In-Reply-To: <1276313488.44.0.388606421429.issue8980@psf.upfronthosting.co.za> Message-ID: <1286116443.4.0.698242917327.issue8980@psf.upfronthosting.co.za> Tarek Ziad? added the comment: done in r85197 / r85198 Thanks ! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 16:38:23 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 03 Oct 2010 14:38:23 +0000 Subject: [issue6302] email.header.decode_header data types are inconsistent and incorrectly documented In-Reply-To: <1245288976.09.0.298419063758.issue6302@psf.upfronthosting.co.za> Message-ID: <1286116703.16.0.349977841908.issue6302@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a proposal for decode_header_as_string(). ---------- Added file: http://bugs.python.org/file19118/decode_header.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 16:58:09 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 03 Oct 2010 14:58:09 +0000 Subject: [issue6302] email.header.decode_header data types are inconsistent and incorrectly documented In-Reply-To: <1245288976.09.0.298419063758.issue6302@psf.upfronthosting.co.za> Message-ID: <1286117889.33.0.307128574541.issue6302@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, that was a late night post and as I was falling asleep I realized that I was wrong. Certainly decode_header_as_string is a function most people using the email package will want and will re-implement in one form or another, so I think it is a good idea to add it. I will take a look at the patch later. And with such a function added we can leave decode_header alone for backward compatibility. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 17:31:39 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 03 Oct 2010 15:31:39 +0000 Subject: [issue9989] ctypes bitfield problem In-Reply-To: <1285785294.07.0.231109223206.issue9989@psf.upfronthosting.co.za> Message-ID: <1286119899.4.0.614099630457.issue9989@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I think this issue is duplicate of #6493. ---------- nosy: +ocean-city resolution: -> duplicate status: open -> closed superseder: -> Can not set value for structure members larger than 32 bits _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 17:44:42 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 03 Oct 2010 15:44:42 +0000 Subject: [issue6493] Can not set value for structure members larger than 32 bits In-Reply-To: <1247706719.26.0.735618414968.issue6493@psf.upfronthosting.co.za> Message-ID: <1286120682.11.0.600424759015.issue6493@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I glanced at my patch again, and I noticed it has a problem. SET() cannot handle type larger than unsigned int on windows. I'll recreate the patch... ---------- nosy: +ned.deily, stutzbach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 17:47:05 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 03 Oct 2010 15:47:05 +0000 Subject: [issue9281] Race condition in distutils.dir_util.mkpath() In-Reply-To: <1279342839.57.0.133468665449.issue9281@psf.upfronthosting.co.za> Message-ID: <1286120825.5.0.956773317054.issue9281@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: I'm attaching the patch for some mkpath functions in distutils2. ---------- components: +Distutils2 versions: +3rd party -Python 2.6 Added file: http://bugs.python.org/file19119/distutils2-mkpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 18:22:37 2010 From: report at bugs.python.org (David Janes) Date: Sun, 03 Oct 2010 16:22:37 +0000 Subject: [issue10019] json.dumps with indent = 0 not adding newlines In-Reply-To: <1286122957.24.0.240376565719.issue10019@psf.upfronthosting.co.za> Message-ID: <1286122957.24.0.240376565719.issue10019@psf.upfronthosting.co.za> New submission from David Janes : In Python 2.6.4, json.dumps(...,indent=0) produced newlines as documented here: http://docs.python.org/library/json.html#json.dump In Python 2.7, it no longer adds newlines. $ python Python 2.6.4 (r264:75706, Jan 13 2010, 19:41:08) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import json >>> json.dumps({3:1,4:2},indent=0) '{\n"3": 1, \n"4": 2\n}' >>> print json.dumps({3:1,4:2},indent=0) { "3": 1, "4": 2 } $ python Python 2.7 (r27:82500, Oct 3 2010, 06:00:45) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import json >>> json.dumps({3:1,4:2}) '{"3": 1, "4": 2}' >>> print json.dumps({3:1,4:2},indent=0) {"3": 1, "4": 2} ---------- components: Library (Lib) messages: 117917 nosy: dpjanes priority: normal severity: normal status: open title: json.dumps with indent = 0 not adding newlines versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 18:34:31 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 03 Oct 2010 16:34:31 +0000 Subject: [issue6493] Can not set value for structure members larger than 32 bits In-Reply-To: <1247706719.26.0.735618414968.issue6493@psf.upfronthosting.co.za> Message-ID: <1286123671.7.0.877925324078.issue6493@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Here is at least better, simple patch. But ideally, mask should be created from variable type. "short" mask should be created for "short" variable, "long long" mask for "long long" variable, vise verse. I'll create such patch next. I hope it's final solution. //////////////////////////////////////// // This works on attached patch. from __future__ import print_function import ctypes class Blah(ctypes.Structure): _fields_ = [("a", ctypes.c_uint64, 64), ("b", ctypes.c_uint16, 16), ("c", ctypes.c_uint8, 8), ("d", ctypes.c_uint8, 8)] x = Blah(0xFEDCBA9876543210,0xBEEF,0x44,0x12) print(Blah.a, hex(x.a)) print(Blah.b, hex(x.b)) print(Blah.c, hex(x.c)) print(Blah.d, hex(x.d)) ---------- versions: -Python 2.6 Added file: http://bugs.python.org/file19120/py3k_fix_ctypes_cfields.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 18:36:00 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 03 Oct 2010 16:36:00 +0000 Subject: [issue6493] Can not set value for structure members larger than 32 bits In-Reply-To: <1247706719.26.0.735618414968.issue6493@psf.upfronthosting.co.za> Message-ID: <1286123760.24.0.659951832419.issue6493@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file14506/ctypes_workaround.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 18:36:13 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 03 Oct 2010 16:36:13 +0000 Subject: [issue6493] Can not set value for structure members larger than 32 bits In-Reply-To: <1247706719.26.0.735618414968.issue6493@psf.upfronthosting.co.za> Message-ID: <1286123773.68.0.0504983826868.issue6493@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file14507/ctypes_workaround_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 18:52:33 2010 From: report at bugs.python.org (Doug Hellmann) Date: Sun, 03 Oct 2010 16:52:33 +0000 Subject: [issue10020] docs for sqlite3 describe functions not available without recompiling In-Reply-To: <1286124753.24.0.309036392806.issue10020@psf.upfronthosting.co.za> Message-ID: <1286124753.24.0.309036392806.issue10020@psf.upfronthosting.co.za> New submission from Doug Hellmann : The documentation for the sqlite3 module describes enable_load_extension() and load_extension() methods of the Connection object, but those functions are only available if the user has compiled from source *after* modifying the setup.py to turn off SQLITE_OMIT_LOAD_EXTENSION. I'd like to see the functions enabled by default (by changing setup.py) but at the very least the documentation should be updated. ---------- components: Extension Modules messages: 117919 nosy: doughellmann priority: normal severity: normal status: open title: docs for sqlite3 describe functions not available without recompiling versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 18:52:40 2010 From: report at bugs.python.org (Doug Hellmann) Date: Sun, 03 Oct 2010 16:52:40 +0000 Subject: [issue10020] docs for sqlite3 describe functions not available without recompiling In-Reply-To: <1286124753.24.0.309036392806.issue10020@psf.upfronthosting.co.za> Message-ID: <1286124760.49.0.919216681859.issue10020@psf.upfronthosting.co.za> Changes by Doug Hellmann : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 20:03:00 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 03 Oct 2010 18:03:00 +0000 Subject: [issue6493] Can not set value for structure members larger than 32 bits In-Reply-To: <1247706719.26.0.735618414968.issue6493@psf.upfronthosting.co.za> Message-ID: <1286128980.78.0.636402909366.issue6493@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Sorry?my patch didn't work again... Because of this compiler behavior. Is this ANSI standard? #include typedef unsigned __int32 uint32; static void print_bits(uint32 n) { int i; for (i = 31; i >= 0; --i) { printf("%c", (n & (1 << i)) ? '1' : '0'); } printf(" : %X\n", n); } int main() { uint32 n; n = 1; print_bits(n << 30); print_bits(n << 31); print_bits(n << 32); print_bits((n << 31) << 1); } R:\test\bitshift>a 01000000000000000000000000000000 : 40000000 10000000000000000000000000000000 : 80000000 00000000000000000000000000000001 : 1 00000000000000000000000000000000 : 0 I thought n << 32 should be 0. I hope new patch is somehow better. ---------- Added file: http://bugs.python.org/file19121/py3k_fix_ctypes_cfields_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 20:19:04 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 03 Oct 2010 18:19:04 +0000 Subject: [issue9272] CGIHTTPServer poisons os.environ In-Reply-To: <1279270191.51.0.568678636745.issue9272@psf.upfronthosting.co.za> Message-ID: <1286129944.15.0.0400647080597.issue9272@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fix committed in revision 85202 (py3k), r85203 (release31-maint), r85204(release27-maint). I had change the patch to use copy.deepcopy instead of os.environ.copy() because for the purposes of test os.environ was masked with EnvironmentGuard which does not have copy method. Thanks for the patch. ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 20:26:35 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 03 Oct 2010 18:26:35 +0000 Subject: [issue10012] httplib shadows builtin, assumes strings In-Reply-To: <1285976648.58.0.0752019030242.issue10012@psf.upfronthosting.co.za> Message-ID: <1286130395.0.0.0672001457923.issue10012@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in r85205 (py3k), r85206 (release31-maint) and r85207 (release27-maint). ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 20:51:48 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 03 Oct 2010 18:51:48 +0000 Subject: [issue6493] Can not set value for structure members larger than 32 bits In-Reply-To: <1247706719.26.0.735618414968.issue6493@psf.upfronthosting.co.za> Message-ID: <1286131908.75.0.702481955366.issue6493@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file19122/py3k_fix_ctypes_cfields_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 20:52:07 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 03 Oct 2010 18:52:07 +0000 Subject: [issue6493] Can not set value for structure members larger than 32 bits In-Reply-To: <1247706719.26.0.735618414968.issue6493@psf.upfronthosting.co.za> Message-ID: <1286131927.44.0.846401603546.issue6493@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file19121/py3k_fix_ctypes_cfields_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 21:14:49 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 03 Oct 2010 19:14:49 +0000 Subject: [issue6493] Can not set value for structure members larger than 32 bits In-Reply-To: <1247706719.26.0.735618414968.issue6493@psf.upfronthosting.co.za> Message-ID: <1286133289.3.0.0305343347133.issue6493@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: This patch removes MAX_SIZE_INT limitation. I hope this is final patch. I confirmed all ctypes test passed on my environment. (Windows, VS8.0) ---------- Added file: http://bugs.python.org/file19123/py3k_fix_ctypes_cfields_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 21:20:36 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 03 Oct 2010 19:20:36 +0000 Subject: [issue10020] docs for sqlite3 describe functions not available without recompiling In-Reply-To: <1286124753.24.0.309036392806.issue10020@psf.upfronthosting.co.za> Message-ID: <1286133636.99.0.660062470229.issue10020@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: docs at python -> ghaering nosy: +ghaering versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 21:21:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 03 Oct 2010 19:21:01 +0000 Subject: [issue10019] json.dumps with indent = 0 not adding newlines In-Reply-To: <1286122957.24.0.240376565719.issue10019@psf.upfronthosting.co.za> Message-ID: <1286133661.79.0.97644058179.issue10019@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> bob.ippolito nosy: +bob.ippolito _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 21:25:34 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 03 Oct 2010 19:25:34 +0000 Subject: [issue1078919] email.Header (via add_header) encodes non-ASCII content incorrectly Message-ID: <1286133934.56.0.300395995007.issue1078919@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > In addition, in 3.2 I will disallow non-ASCII parameter values unless > they are specified in a three element tuple as in the example above. Why would the caller be required to choose an encoding while you could simply default to utf-8? There doesn't seem to be much value in forcing the use of e.g. iso-8859-15. Also, I'm not sure I understand what the goal of email6 is if you're breaking compatibility in email5 anyway :) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 21:29:02 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 03 Oct 2010 19:29:02 +0000 Subject: [issue6706] asyncore's accept() is broken In-Reply-To: <1250291017.2.0.719693187742.issue6706@psf.upfronthosting.co.za> Message-ID: <1286134142.91.0.603390783814.issue6706@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'm not an asyncore expert, but I can't see anything wrong with the patch. ---------- stage: needs patch -> patch review versions: -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 21:31:27 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 03 Oct 2010 19:31:27 +0000 Subject: [issue8017] c_char_p.value does not return a bytes object in Windows. In-Reply-To: <1267074701.8.0.562765238894.issue8017@psf.upfronthosting.co.za> Message-ID: <1286134287.72.0.936690250857.issue8017@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: You need to change test_string = ctypes.c_char_p("This Is a test string, that should be of type bytes") to test_string = ctypes.c_char_p(b"This Is a test string, that should be of type bytes") but this issue itself seems to be already fixed. ---------- nosy: +ocean-city resolution: -> fixed stage: needs patch -> status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 21:34:04 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 03 Oct 2010 19:34:04 +0000 Subject: [issue9884] The 4th parameter of method always None or 0 on x64 Windows. In-Reply-To: <1284714742.48.0.856656538994.issue9884@psf.upfronthosting.co.za> Message-ID: <1286134444.66.0.493728227891.issue9884@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Probably this issue is duplicate of #9266. ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 21:34:45 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sun, 03 Oct 2010 19:34:45 +0000 Subject: [issue9266] ctypes "ValueError: NULL pointer access" on Win7 x64 In-Reply-To: <1279198550.56.0.12735266712.issue9266@psf.upfronthosting.co.za> Message-ID: <1286134485.77.0.798007018213.issue9266@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Probably this issue is duplicate of #9884. ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 21:36:41 2010 From: report at bugs.python.org (Greg Hazel) Date: Sun, 03 Oct 2010 19:36:41 +0000 Subject: [issue9884] The 4th parameter of method always None or 0 on x64 Windows. In-Reply-To: <1284714742.48.0.856656538994.issue9884@psf.upfronthosting.co.za> Message-ID: <1286134601.91.0.978070849095.issue9884@psf.upfronthosting.co.za> Changes by Greg Hazel : ---------- nosy: +ghazel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 21:50:47 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sun, 03 Oct 2010 19:50:47 +0000 Subject: [issue10019] json.dumps with indent = 0 not adding newlines In-Reply-To: <1286122957.24.0.240376565719.issue10019@psf.upfronthosting.co.za> Message-ID: <1286135447.67.0.790072872586.issue10019@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The C encoder should not be used when indent=0. Here is a patch+test for 2.7. Note that json.dump (into a file object) already correctly emit newlines. ---------- keywords: +patch nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file19124/json_indent0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 22:24:22 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 03 Oct 2010 20:24:22 +0000 Subject: [issue10016] shutil.copyfile -- allow sparse copying In-Reply-To: <1286029015.57.0.815158740908.issue10016@psf.upfronthosting.co.za> Message-ID: <1286137462.96.0.013824900872.issue10016@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The use of fdst.truncate() is indeed wrong, since truncate() in 3.x is defined as truncating up to the current file position (which has been moved forward by the latest seek()). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 23:31:25 2010 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Sun, 03 Oct 2010 21:31:25 +0000 Subject: [issue10020] docs for sqlite3 describe functions not available without recompiling In-Reply-To: <1286124753.24.0.309036392806.issue10020@psf.upfronthosting.co.za> Message-ID: <1286141485.28.0.836283606545.issue10020@psf.upfronthosting.co.za> Gerhard H?ring added the comment: Without SQLITE_OMIT_LOAD_EXTENSION, builds will break on Mac OS X 10.5 and 10.6 and maybe other platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 3 23:48:33 2010 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Sun, 03 Oct 2010 21:48:33 +0000 Subject: [issue10020] docs for sqlite3 describe functions not available without recompiling In-Reply-To: <1286124753.24.0.309036392806.issue10020@psf.upfronthosting.co.za> Message-ID: <1286142513.75.0.302662564073.issue10020@psf.upfronthosting.co.za> Gerhard H?ring added the comment: Fixed in r85208 by adding a note to the docs. ---------- resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 00:21:57 2010 From: report at bugs.python.org (phep) Date: Sun, 03 Oct 2010 22:21:57 +0000 Subject: [issue9968] Let cgi.FieldStorage have named uploaded file In-Reply-To: <1285675096.14.0.24974141754.issue9968@psf.upfronthosting.co.za> Message-ID: <1286144517.81.0.105204989352.issue9968@psf.upfronthosting.co.za> phep added the comment: Well, this is actually somewhat more complicated than what my first tests showed due to the way multipart/form-data is dealt with in FieldStorage.read_multi(). The solution I proposed last time only works if the uploaded file is passed as the first form field. I have to further study how things work in order to find some coherent solution. I may not have time to go back to this issue before next week unfortunately. phep ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 00:45:45 2010 From: report at bugs.python.org (Doug Hellmann) Date: Sun, 03 Oct 2010 22:45:45 +0000 Subject: [issue10020] docs for sqlite3 describe functions not available without recompiling In-Reply-To: <1286124753.24.0.309036392806.issue10020@psf.upfronthosting.co.za> Message-ID: <1286145945.14.0.0723976619296.issue10020@psf.upfronthosting.co.za> Doug Hellmann added the comment: Thanks, Gerhard! ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 02:07:47 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 04 Oct 2010 00:07:47 +0000 Subject: [issue1078919] email.Header (via add_header) encodes non-ASCII content incorrectly Message-ID: <1286150867.86.0.326703689946.issue1078919@psf.upfronthosting.co.za> R. David Murray added the comment: The compatibility argument is a fair point, and yes we could default to utf8 and no language. So that is probably a better solution than raising the error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 02:52:51 2010 From: report at bugs.python.org (Mads Kiilerich) Date: Mon, 04 Oct 2010 00:52:51 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: <1197387663.32.0.0598513497038.issue1589@psf.upfronthosting.co.za> Message-ID: <1286153571.56.0.333502733747.issue1589@psf.upfronthosting.co.za> Mads Kiilerich added the comment: I added some extra verification to Mercurial (http://www.selenic.com/hg/rev/f2937d6492c5). Feel free to use the following under the Python license in Python or elsewhere. It could be a separate method/function or it could integrated in wrap_socket and controlled by a keyword. I would appreciate if you find the implementation insufficient or incorrect. The purpose with this function is to verify if the received and validated certificate matches the host we intended to connect to. I try to keep it simple and to fail to the safe side. "Correct" subjectAltName handling seems not to be feasible. Are CRLs checked by the SSL module? Otherwise it deserves a big fat warning. (I now assume that notBefore is handled by the SSL module and shouldn't be checked here.) def _verifycert(cert, hostname): '''Verify that cert (in socket.getpeercert() format) matches hostname and is valid at this time. CRLs and subjectAltName are not handled. Returns error message if any problems are found and None on success. ''' if not cert: return _('no certificate received') notafter = cert.get('notAfter') if notafter and time.time() > ssl.cert_time_to_seconds(notafter): return _('certificate expired %s') % notafter dnsname = hostname.lower() for s in cert.get('subject', []): key, value = s[0] if key == 'commonName': certname = value.lower() if (certname == dnsname or '.' in dnsname and certname == '*.' + dnsname.split('.', 1)[1]): return None return _('certificate is for %s') % certname return _('no commonName found in certificate') def check(a, b): if a != b: print (a, b) # Test non-wildcard certificates check(_verifycert({'subject': ((('commonName', 'example.com'),),)}, 'example.com'), None) check(_verifycert({'subject': ((('commonName', 'example.com'),),)}, 'www.example.com'), 'certificate is for example.com') check(_verifycert({'subject': ((('commonName', 'www.example.com'),),)}, 'example.com'), 'certificate is for www.example.com') # Test wildcard certificates check(_verifycert({'subject': ((('commonName', '*.example.com'),),)}, 'www.example.com'), None) check(_verifycert({'subject': ((('commonName', '*.example.com'),),)}, 'example.com'), 'certificate is for *.example.com') check(_verifycert({'subject': ((('commonName', '*.example.com'),),)}, 'w.w.example.com'), 'certificate is for *.example.com') # Avoid some pitfalls check(_verifycert({'subject': ((('commonName', '*.foo'),),)}, 'foo'), 'certificate is for *.foo') check(_verifycert({'subject': ((('commonName', '*o'),),)}, 'foo'), 'certificate is for *o') import time lastyear = time.gmtime().tm_year - 1 nextyear = time.gmtime().tm_year + 1 check(_verifycert({'notAfter': 'May 9 00:00:00 %s GMT' % lastyear}, 'example.com'), 'certificate expired May 9 00:00:00 %s GMT' % lastyear) check(_verifycert({'notAfter': 'Sep 29 15:29:48 %s GMT' % nextyear, 'subject': ()}, 'example.com'), 'no commonName found in certificate') check(_verifycert(None, 'example.com'), 'no certificate received') ---------- nosy: +kiilerix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 03:19:32 2010 From: report at bugs.python.org (Gregory Nofi) Date: Mon, 04 Oct 2010 01:19:32 +0000 Subject: [issue6484] No unit test for mailcap module In-Reply-To: <1247596747.53.0.161658367753.issue6484@psf.upfronthosting.co.za> Message-ID: <1286155172.36.0.443175129531.issue6484@psf.upfronthosting.co.za> Changes by Gregory Nofi : Removed file: http://bugs.python.org/file15753/.mailcap _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 03:27:15 2010 From: report at bugs.python.org (Gregory Nofi) Date: Mon, 04 Oct 2010 01:27:15 +0000 Subject: [issue6484] No unit test for mailcap module In-Reply-To: <1247596747.53.0.161658367753.issue6484@psf.upfronthosting.co.za> Message-ID: <1286155635.71.0.868916315239.issue6484@psf.upfronthosting.co.za> Gregory Nofi added the comment: Replacing .mailcap with mailcap.txt. Same content, but with more conventional file name. ---------- Added file: http://bugs.python.org/file19125/mailcap.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 03:29:55 2010 From: report at bugs.python.org (Gregory Nofi) Date: Mon, 04 Oct 2010 01:29:55 +0000 Subject: [issue6484] No unit test for mailcap module In-Reply-To: <1247596747.53.0.161658367753.issue6484@psf.upfronthosting.co.za> Message-ID: <1286155795.76.0.892534719048.issue6484@psf.upfronthosting.co.za> Changes by Gregory Nofi : Removed file: http://bugs.python.org/file15752/test_mailcap.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 03:30:02 2010 From: report at bugs.python.org (Gregory Nofi) Date: Mon, 04 Oct 2010 01:30:02 +0000 Subject: [issue6484] No unit test for mailcap module In-Reply-To: <1247596747.53.0.161658367753.issue6484@psf.upfronthosting.co.za> Message-ID: <1286155802.39.0.42312073352.issue6484@psf.upfronthosting.co.za> Changes by Gregory Nofi : Removed file: http://bugs.python.org/file17042/test_mailcap.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 03:39:24 2010 From: report at bugs.python.org (Gregory Nofi) Date: Mon, 04 Oct 2010 01:39:24 +0000 Subject: [issue6484] No unit test for mailcap module In-Reply-To: <1247596747.53.0.161658367753.issue6484@psf.upfronthosting.co.za> Message-ID: <1286156364.93.0.21945715625.issue6484@psf.upfronthosting.co.za> Gregory Nofi added the comment: r.david.murray: Thanks a lot for your feedback! I've implemented those suggestions and they helped located a bug. (See case 9923.) ---------- Added file: http://bugs.python.org/file19126/test_mailcap.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 03:40:23 2010 From: report at bugs.python.org (Gregory Nofi) Date: Mon, 04 Oct 2010 01:40:23 +0000 Subject: [issue6484] No unit test for mailcap module In-Reply-To: <1247596747.53.0.161658367753.issue6484@psf.upfronthosting.co.za> Message-ID: <1286156423.37.0.10456094656.issue6484@psf.upfronthosting.co.za> Changes by Gregory Nofi : Added file: http://bugs.python.org/file19127/test_mailcap.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 03:44:59 2010 From: report at bugs.python.org (Gregory Nofi) Date: Mon, 04 Oct 2010 01:44:59 +0000 Subject: [issue9923] mailcap module may not work on non-POSIX platforms if MAILCAPS env variable is set In-Reply-To: <1285211036.93.0.380980799093.issue9923@psf.upfronthosting.co.za> Message-ID: <1286156699.81.0.403671204227.issue9923@psf.upfronthosting.co.za> Gregory Nofi added the comment: I just submitted new versions of test_mailcap.py in case 6484. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 09:17:11 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 04 Oct 2010 07:17:11 +0000 Subject: [issue9884] The 4th parameter of method always None or 0 on x64 Windows. In-Reply-To: <1284714742.48.0.856656538994.issue9884@psf.upfronthosting.co.za> Message-ID: <1286176631.23.0.0489292050024.issue9884@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I don't have x64 machine, so I cannot test this. So this is just an idea. It seems Modules/_ctypes/libffi_msvc is a bit old. Modules/_ctypes/libffi/src/x86 is newer. Maybe this issue can be fixed by using newer one? Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 09:26:47 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 04 Oct 2010 07:26:47 +0000 Subject: [issue9800] Fast path for small int-indexing of lists and tuples In-Reply-To: <1283969230.58.0.425189432441.issue9800@psf.upfronthosting.co.za> Message-ID: <1286177207.0.0.34562514967.issue9800@psf.upfronthosting.co.za> Mark Dickinson added the comment: A disadvantage of the patch is that ceval.c needs to know about the internal implementation of a PyLong. At the moment, this information is encapsulated only in Objects/longobject.c and a couple of other places (I think marshal.c). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 10:57:33 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 04 Oct 2010 08:57:33 +0000 Subject: [issue10016] shutil.copyfile -- allow sparse copying In-Reply-To: <1286029015.57.0.815158740908.issue10016@psf.upfronthosting.co.za> Message-ID: <1286182653.05.0.126379115496.issue10016@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- assignee: -> tarek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 12:37:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Oct 2010 10:37:11 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: <1286153571.56.0.333502733747.issue1589@psf.upfronthosting.co.za> Message-ID: <1286188623.3178.9.camel@localhost.localdomain> Antoine Pitrou added the comment: Hello, > I added some extra verification to Mercurial > (http://www.selenic.com/hg/rev/f2937d6492c5). Feel free to use the > following under the Python license in Python or elsewhere. It could be > a separate method/function or it could integrated in wrap_socket and > controlled by a keyword. I would appreciate if you find the > implementation insufficient or incorrect. Thank you, I'll take a look! > Are CRLs checked by the SSL module? Otherwise it deserves a big fat > warning. They are not, but AFAIK most browsers don't check CRLs either... (or, rather they don't download updated CRLs) > (I now assume that notBefore is handled by the SSL module and > shouldn't be checked here.) I can't say for sure, but OpenSSL seems to handle both notBefore and notAfter as part of its cert verification routine (see interval_verify() and cert_check_time() in crypto/x509/x509_vfy.c). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 13:12:49 2010 From: report at bugs.python.org (Tom Potts) Date: Mon, 04 Oct 2010 11:12:49 +0000 Subject: [issue10016] shutil.copyfile -- allow sparse copying In-Reply-To: <1286029015.57.0.815158740908.issue10016@psf.upfronthosting.co.za> Message-ID: <1286190769.52.0.201647397651.issue10016@psf.upfronthosting.co.za> Tom Potts added the comment: @pitrou Hmm... the online docs and the contents of the doc directory on the trunk branch say differently: """ Resize the stream to the given *size* in bytes (or the current position if *size* is not specified). The current stream position isn't changed. This resizing can extend or reduce the current file size. In case of extension, the contents of the new file area depend on the platform (on most systems, additional bytes are zero-filled, on Windows they're undetermined). The new file size is returned. """ Unless you know something else about this, I'm going to assume it's still okay to use. @r.david.murray Thanks for your comments -- I'm trying to put together some unit tests and documentation, against the Subversion trunk. Tom ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 13:57:44 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Oct 2010 11:57:44 +0000 Subject: [issue10016] shutil.copyfile -- allow sparse copying In-Reply-To: <1286029015.57.0.815158740908.issue10016@psf.upfronthosting.co.za> Message-ID: <1286193464.95.0.149547410668.issue10016@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, after experimenting, I now understand what the truncate() call is for. However, your heuristic for detecting sparse files is wrong. The unit for st_blocks is undefined as per the POSIX standard, although it gives recommendations: ?The unit for the st_blocks member of the stat structure is not defined within IEEE Std 1003.1-2001. In some implementations it is 512 bytes. It may differ on a file system basis. There is no correlation between values of the st_blocks and st_blksize, and the f_bsize (from ) structure members. Traditionally, some implementations defined the multiplier for st_blocks in as the symbol DEV_BSIZE.? (http://www.opengroup.org/onlinepubs/000095399/basedefs/sys/stat.h.html) Under Linux, 512 turns out to be the right multiplier (and not st_blksize): >>> f = open("foo", "wb") >>> f.write(b"x" * 4096) 4096 >>> f.truncate(16384) 16384 >>> f.close() >>> st = os.stat("foo") >>> st.st_size 16384 >>> st.st_blocks 8 >>> st.st_blocks * st.st_blksize 32768 >>> st.st_blocks * 512 4096 Also, GNU `cp` uses S_BLKSIZE rather than DEV_BSIZE when trying to detect the st_blocks unit size (both are 512 under Linux). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 14:01:50 2010 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 04 Oct 2010 12:01:50 +0000 Subject: [issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally In-Reply-To: <1284643512.64.0.708677047597.issue9873@psf.upfronthosting.co.za> Message-ID: <1286193710.81.0.33976198863.issue9873@psf.upfronthosting.co.za> Nick Coghlan added the comment: Yeah, I'll have to time it to see how much difference latin-1 vs surrogateescape makes when the MSB is set in any bytes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 14:03:55 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Oct 2010 12:03:55 +0000 Subject: [issue10016] shutil.copyfile -- allow sparse copying In-Reply-To: <1286029015.57.0.815158740908.issue10016@psf.upfronthosting.co.za> Message-ID: <1286193835.66.0.435975871584.issue10016@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way: > Thanks for your comments -- I'm trying to put together some unit tests > and documentation, against the Subversion trunk. Please ignore trunk; all development (new features) should be done against branches/py3k. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 14:50:39 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 04 Oct 2010 12:50:39 +0000 Subject: [issue9725] urllib.request.FancyURLopener won't connect to pages requiring username and password In-Reply-To: <1283274337.79.0.0864543833676.issue9725@psf.upfronthosting.co.za> Message-ID: <1286196639.18.0.759024334912.issue9725@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 15:56:52 2010 From: report at bugs.python.org (Florent Xicluna) Date: Mon, 04 Oct 2010 13:56:52 +0000 Subject: [issue7768] raw_input should encode unicode prompt with std.stdout.encoding. In-Reply-To: <1264309924.17.0.144254143298.issue7768@psf.upfronthosting.co.za> Message-ID: <1286200612.06.0.508401862722.issue7768@psf.upfronthosting.co.za> Florent Xicluna added the comment: annoying stuff, indeed... $ python -c 'print u"La cl\xe9: "' La cl?: $ python -c 'raw_input(u"La cl\xe9: ")' Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\xe9' in position 5: ordinal not in range(128) ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 16:08:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 04 Oct 2010 14:08:14 +0000 Subject: [issue4775] Incorrect documentation - UTC time In-Reply-To: <1230603442.34.0.985593856271.issue4775@psf.upfronthosting.co.za> Message-ID: <1286201294.03.0.737138617735.issue4775@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Based on the discussion so far, I am going to close this as "invalid". ---------- assignee: georg.brandl -> belopolsky resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 16:15:02 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 04 Oct 2010 14:15:02 +0000 Subject: [issue7789] Issue using datetime with format() In-Reply-To: <1264533717.66.0.926018869233.issue7789@psf.upfronthosting.co.za> Message-ID: <1286201702.2.0.288887102617.issue7789@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The original bug report is invalid and the documentation issue is a duplicate of #8913. ---------- nosy: +belopolsky resolution: -> duplicate superseder: -> Document that datetime.__format__ is datetime.strftime _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 16:15:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 04 Oct 2010 14:15:09 +0000 Subject: [issue7789] Issue using datetime with format() In-Reply-To: <1264533717.66.0.926018869233.issue7789@psf.upfronthosting.co.za> Message-ID: <1286201709.69.0.18768592984.issue7789@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 16:26:01 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 04 Oct 2010 14:26:01 +0000 Subject: [issue9800] Fast path for small int-indexing of lists and tuples In-Reply-To: <1283969230.58.0.425189432441.issue9800@psf.upfronthosting.co.za> Message-ID: <1286202361.47.0.23585740655.issue9800@psf.upfronthosting.co.za> Raymond Hettinger added the comment: In the past, we've allow ceval.c to peer through encapsulation in order to have fast paths. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 16:37:40 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Oct 2010 14:37:40 +0000 Subject: [issue9960] test_structmembers fails on s390x (bigendian 64-bit): int/Py_ssize_t issue In-Reply-To: <1285600296.08.0.731959847047.issue9960@psf.upfronthosting.co.za> Message-ID: <1286203060.25.0.0403909069786.issue9960@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Is this 2.7-specific? Otherwise, it would be better to provide a patch for 3.2 first, and then svnmerge to other branches. > My reading of Python/getargs.c is that this macro does affect "u#" in a > manner analogous to "s#"; does this documentation need clarifying? Probably. Same for "es#", "et#" and "t#" perhaps? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 16:39:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Oct 2010 14:39:57 +0000 Subject: [issue9800] Fast path for small int-indexing of lists and tuples In-Reply-To: <1283969230.58.0.425189432441.issue9800@psf.upfronthosting.co.za> Message-ID: <1286203197.78.0.199114695953.issue9800@psf.upfronthosting.co.za> Antoine Pitrou added the comment: As I mentioned, the speedup is invisible anyway, so it's not really a "fast path" ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 16:49:48 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 04 Oct 2010 14:49:48 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1286203788.23.0.351977738526.issue8913@psf.upfronthosting.co.za> R. David Murray added the comment: Alexander closed issue 7789 in favor of this one, which is fine, but I want to respond to Eric's rejection there of including info about datetime in the 'format mini language' section of the docs. His point was that only the builtin types were documented there, but if the goal is to get people to actually use this facility, it would be helpful if some mention were made there of other stdlib types that support __format__. Some set of 'see also' links, perhaps in a footnote? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 16:57:18 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 04 Oct 2010 14:57:18 +0000 Subject: [issue8913] Document that datetime.__format__ is datetime.strftime In-Reply-To: <1275794779.99.0.00462382173098.issue8913@psf.upfronthosting.co.za> Message-ID: <1286204238.56.0.976943296627.issue8913@psf.upfronthosting.co.za> Eric Smith added the comment: I'm okay with that. Grepping Lib shows that date/datetime/time and Decimal are the only types that implement __format__. Decimal largely implements the same language as float. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 17:01:20 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 04 Oct 2010 15:01:20 +0000 Subject: [issue1078919] email.Header (via add_header) encodes non-ASCII content incorrectly Message-ID: <1286204480.98.0.1212283021.issue1078919@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: RDM, I wonder if it wouldn't be better (in email6) to use an instance to represent the 3-tuple instead? It might make for clearer client code, and would allow you to default things you might generally not care about. E.g. class NonASCIIParameter: # XXX come up with better name def __init__(self, text, charset='utf-8', language=''): It's unfortunate that you have to reorder the arguments from the 3-tuple form of (charset, language, text) but I think you could play games with keyword arguments to make them consistent. In general the patch looks fine to me, though I suggest splitting test_add_header() into separate tests for each of the three conditions you're testing there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 17:10:42 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 04 Oct 2010 15:10:42 +0000 Subject: [issue6302] email.header.decode_header data types are inconsistent and incorrectly documented In-Reply-To: <1245288976.09.0.298419063758.issue6302@psf.upfronthosting.co.za> Message-ID: <1286205042.36.0.365725674256.issue6302@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: In email6, can we at least make tuple returning methods return namedtuples instead? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 17:18:41 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 04 Oct 2010 15:18:41 +0000 Subject: [issue6302] email.header.decode_header data types are inconsistent and incorrectly documented In-Reply-To: <1245288976.09.0.298419063758.issue6302@psf.upfronthosting.co.za> Message-ID: <1286205521.06.0.950416103352.issue6302@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I agree that it makes sense to have consistent types in the output. As for whether to add a new method or fix the existing one, I'm a bit torn, but I'd probably opt for fixing the existing function rather than adding a new one, just because I think there are few Python 3 applications out there that are counting on the old behavior. (I could be wrong though ;). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 17:24:51 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Oct 2010 15:24:51 +0000 Subject: [issue6302] email.header.decode_header data types are inconsistent and incorrectly documented In-Reply-To: <1286205521.06.0.950416103352.issue6302@psf.upfronthosting.co.za> Message-ID: <1286205884.3178.45.camel@localhost.localdomain> Antoine Pitrou added the comment: > I agree that it makes sense to have consistent types in the output. > As for whether to add a new method or fix the existing one, I'm a bit > torn, but I'd probably opt for fixing the existing function rather > than adding a new one, just because I think there are few Python 3 > applications out there that are counting on the old behavior. (I > could be wrong though ;). The point of a new method is to return the header as a human-readable string, rather than a list of tuples. It has added value besides leaving the old method alone ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 17:27:38 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 04 Oct 2010 15:27:38 +0000 Subject: [issue6302] email.header.decode_header data types are inconsistent and incorrectly documented In-Reply-To: <1286205884.3178.45.camel@localhost.localdomain> Message-ID: <20101004112733.5861318b@mission> Barry A. Warsaw added the comment: >The point of a new method is to return the header as a human-readable >string, rather than a list of tuples. It has added value besides >leaving the old method alone ;) +1 then! :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 17:39:31 2010 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Mon, 04 Oct 2010 15:39:31 +0000 Subject: [issue9065] tarfile: default root:root ownership is incorrect. In-Reply-To: <1277332057.13.0.313961006951.issue9065@psf.upfronthosting.co.za> Message-ID: <1286206771.1.0.97023418429.issue9065@psf.upfronthosting.co.za> Lars Gust?bel added the comment: Fixed in r85211 (py3k), r85212 (release31-maint), r85213 (release27-maint). Thank you for the report. ---------- resolution: -> accepted stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 18:24:06 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 04 Oct 2010 16:24:06 +0000 Subject: [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : According to the Format String Syntax section [1], attribute_name must be an identifier. However, the parser does not catch a violation of this rule and happily passes non-indentifier strings to getattribute: >>> class X: ... def __getattribute__(self, a): return 'foo' ... >>> '{.$#@}'.format(X()) 'foo' If this is a desirable feature, I think it should be clearly documented because in some cases, for example when formatted objects are proxies to database entries, passing arbitrary strings to __getattribute__ may be wasteful at best and a security hole at worst. [1] http://docs.python.org/dev/py3k/library/string.html#format-string-syntax ---------- components: Interpreter Core messages: 117961 nosy: belopolsky priority: normal severity: normal status: open title: Format parser is too permissive type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 18:29:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 04 Oct 2010 16:29:00 +0000 Subject: [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286209740.59.0.608980630816.issue10021@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 18:32:15 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Oct 2010 16:32:15 +0000 Subject: [issue10022] Emit more information in decoded SSL certificates In-Reply-To: <1286209935.64.0.606028166295.issue10022@psf.upfronthosting.co.za> Message-ID: <1286209935.64.0.606028166295.issue10022@psf.upfronthosting.co.za> New submission from Antoine Pitrou : There's some code in _ssl.c which exports more information in decoded SSL certificates (such as notBefore or issuer), but it is only enabled when the hidden function _ssl._test_decode_cert is used. It would be nice to export all this information by default; I can't think of any inconvenience caused by it. ---------- components: Library (Lib) messages: 117962 nosy: pitrou priority: normal severity: normal stage: needs patch status: open title: Emit more information in decoded SSL certificates type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 18:37:12 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Oct 2010 16:37:12 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: <1197387663.32.0.0598513497038.issue1589@psf.upfronthosting.co.za> Message-ID: <1286210232.91.0.247554212978.issue1589@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch against py3k. It adds a single ssl.match_hostname method, with rules from RFC 2818 (that is, tailored for HTTPS). Review welcome. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file19128/sslcheck.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 18:38:12 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 04 Oct 2010 16:38:12 +0000 Subject: [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286210292.32.0.724986750508.issue10021@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: PEP 3101 has the following """ Implementation note: The implementation of this proposal is not required to enforce the rule about a simple or dotted name being a valid Python identifier. Instead, it will rely on the getattr function of the underlying object to throw an exception if the identifier is not legal. The str.format() function will have a minimalist parser which only attempts to figure out when it is "done" with an identifier (by finding a '.' or a ']', or '}', etc.). """ Apparently CPython takes advantage of this note in its implementation. Thus this is not a bug, but I think this implementation note should be added to CPython documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 18:39:21 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 04 Oct 2010 16:39:21 +0000 Subject: [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286210361.96.0.889025673282.issue10021@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 18:46:10 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 04 Oct 2010 16:46:10 +0000 Subject: [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286210770.7.0.983187163333.issue10021@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +eric.smith, mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 18:54:42 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 04 Oct 2010 16:54:42 +0000 Subject: [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286211282.49.0.727238009224.issue10021@psf.upfronthosting.co.za> Eric Smith added the comment: Right. It seemed like a hassle to have the str.format parser try to figure out what a valid identifier is, so it just passes it through. I don't see this as any different from: >>> class X: ... def __getattribute__(self, a): return 'foo' ... >>> getattr(X(), '$#@') 'foo' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 18:58:47 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 04 Oct 2010 16:58:47 +0000 Subject: [issue10021] Format parser is too permissive In-Reply-To: <1286211282.49.0.727238009224.issue10021@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: 2010/10/4 Eric Smith : > > Eric Smith added the comment: > > Right. It seemed like a hassle to have the str.format parser try to figure out what a valid identifier is, so it just passes it through. You can always use "str.isidentifier()" (I don't remember if there's a capi). ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 19:02:58 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 04 Oct 2010 17:02:58 +0000 Subject: [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286211778.53.0.0157490166428.issue10021@psf.upfronthosting.co.za> Eric Smith added the comment: Ah, but I don't need to in order to comply with the PEP! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 19:08:46 2010 From: report at bugs.python.org (Devin Cook) Date: Mon, 04 Oct 2010 17:08:46 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: <1197387663.32.0.0598513497038.issue1589@psf.upfronthosting.co.za> Message-ID: <1286212126.76.0.64007303154.issue1589@psf.upfronthosting.co.za> Devin Cook added the comment: I think it looks good except for the wildcard checking. According to the latest draft of that TLS id-checking RFC, you aren't supposed to allow the wildcard as part of a fragment. Of course this contradicts RFC 2818. http://tools.ietf.org/html/draft-saintandre-tls-server-id-check-09#section-4.4.3 If this gets accepted, I'll submit a patch to http.client and urllib that makes use of it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 19:10:35 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 04 Oct 2010 17:10:35 +0000 Subject: [issue10021] Format parser is too permissive In-Reply-To: <1286211778.53.0.0157490166428.issue10021@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Oct 4, 2010 at 1:02 PM, Eric Smith wrote: .. > Ah, but I don't need to in order to comply with the PEP! This is true and this is the reason I changed this issue from bug to doc. I seem to remember this having been discussed before, but I cannot find the right thread. There are at least two reasons cpython docs should mention this: 1. From current documentation, users are likely to expect a value error from format(".$#@", ..) rather than an attribute error. 2. Naive proxy objects may implement __getattribute__ that blindly inserts attribute name into database queries leading to all kinds of undesired behaviors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 19:19:59 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Oct 2010 17:19:59 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: <1286212126.76.0.64007303154.issue1589@psf.upfronthosting.co.za> Message-ID: <1286212791.3178.51.camel@localhost.localdomain> Antoine Pitrou added the comment: > I think it looks good except for the wildcard checking. According to > the latest draft of that TLS id-checking RFC, you aren't supposed to > allow the wildcard as part of a fragment. Of course this contradicts > RFC 2818. Well, since it is then an "error" (according to the id-checking draft) in the certificate itself rather than the hostname we are trying to match, it seems there would be no real issue in accepting the match anyway. It's up to CAs to make sure that certificates conform to whatever standard is currently in effect. I'm also assuming RFC 2818 is in wider use than the id-checking draft; am I wrong? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 19:37:28 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 04 Oct 2010 17:37:28 +0000 Subject: [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286213848.48.0.64883231003.issue10021@psf.upfronthosting.co.za> Eric Smith added the comment: I agree it should be documented as a CPython specific behavior. I should also add a CPython specific test for it, modeled on your code (if one doesn't already exist). I'll look into it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 19:39:44 2010 From: report at bugs.python.org (Devin Cook) Date: Mon, 04 Oct 2010 17:39:44 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: <1197387663.32.0.0598513497038.issue1589@psf.upfronthosting.co.za> Message-ID: <1286213984.46.0.127613201159.issue1589@psf.upfronthosting.co.za> Devin Cook added the comment: > I'm also assuming RFC 2818 is in wider use than the id-checking draft; > am I wrong? Yeah, since RFC 2818 has been accepted since 2000 and the id-checking draft was started in 2009, I'd say it's a safe bet. I'm in no way authoritative though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 19:45:59 2010 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 04 Oct 2010 17:45:59 +0000 Subject: [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1286214359.01.0.480284435115.issue5088@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hi ?ric, thanks a lot for your review. Your comments are just fine, so I'm attaching a new patch that contains them. Yes, it's really nice to see one's work being accepted, and I do recognize I have a lot to learn about python procedures (either written or not :) so be sure I won't be demotivated by some initial "problems". About the Debian-Python relationship, I have absolutely no control over interpreters packages in Debian, but I do care so much about Python that I thought giving my hand here would be quite right (and who knows, maybe one day, I'll be a core developer too :) . Cheers, Sandro ---------- Added file: http://bugs.python.org/file19129/issue5088-py3k-v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 19:47:53 2010 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 04 Oct 2010 17:47:53 +0000 Subject: [issue5501] Update multiprocessing docs re: freeze_support In-Reply-To: <1237312904.73.0.910184118935.issue5501@psf.upfronthosting.co.za> Message-ID: <1286214473.23.0.326211617882.issue5501@psf.upfronthosting.co.za> Sandro Tosi added the comment: Sorry ?ric, I don't get it: do you mean that the fact that "freeze_support() can be called without issues on Unix or OS X" is a new feature? or I misread it completely? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 20:13:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 04 Oct 2010 18:13:47 +0000 Subject: [issue5501] Update multiprocessing docs re: freeze_support In-Reply-To: <1237312904.73.0.910184118935.issue5501@psf.upfronthosting.co.za> Message-ID: <1286216027.85.0.985536933467.issue5501@psf.upfronthosting.co.za> ?ric Araujo added the comment: Rephrased: Is this relevant for 3.1? (Bug and doc fixes go into 3.2, 3.1 and 2.7, but here only 3.2 and 2.7 are selected, so I asked if the bugfix/new feature/behavior in question was something new in 3.2 and thus not in 3.1.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 20:15:23 2010 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 04 Oct 2010 18:15:23 +0000 Subject: [issue9093] Tools/README is out of date In-Reply-To: <1277658495.23.0.15994230675.issue9093@psf.upfronthosting.co.za> Message-ID: <1286216123.63.0.99540236541.issue9093@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hello Georg, is this bug been fixed with r83608-10 ? from the commit diffs it seems so, but maybe there's something else you want to do. Regards, Sandro ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 20:18:46 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 04 Oct 2010 18:18:46 +0000 Subject: [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1286216326.97.0.601251057396.issue5088@psf.upfronthosting.co.za> ?ric Araujo added the comment: Forgot this one: > `appended` I don?t remember the default reST role being used in the Python docs; I don?t even remember what it is. Your example makes me suspect emphasis, so using *appended* would do the same thing and be explicit. > contrary to what one can think Still not a native speaker, but wouldn?t ?may think? be more suited here? Apart from that, +1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 20:26:41 2010 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 04 Oct 2010 18:26:41 +0000 Subject: [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1286216326.97.0.601251057396.issue5088@psf.upfronthosting.co.za> Message-ID: Sandro Tosi added the comment: On Mon, Oct 4, 2010 at 20:18, ?ric Araujo wrote: > ?ric Araujo added the comment: > > Forgot this one: > >> `appended` > I don?t remember the default reST role being used in the Python docs; I don?t even remember what it is. ?Your example makes me suspect emphasis, so using *appended* would do the same thing and be explicit. I think I looked in other part of the optparse.rst file how it's done and used that, but I'm fine either ways. >> contrary to what one can think > Still not a native speaker, but wouldn?t ?may think? be more suited here? ah ok, it might me more correct, dunno (not native too) > Apart from that, +1. Thanks! but what should I do: prepare a new patch with this 2 quite little changes or leave that to the committer? Regards, Sandro ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 20:37:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 04 Oct 2010 18:37:57 +0000 Subject: [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1286217477.65.0.664276720255.issue5088@psf.upfronthosting.co.za> ?ric Araujo added the comment: > I think I looked in other part of the optparse.rst file how it's done and used that Alright, let?s leave it alone then. >>> contrary to what one can think >> Still not a native speaker, but wouldn?t ?may think? be more suited here? >ah ok, it might me more correct, dunno (not native too) It has to do with the degree of probability you assign to the thought. Unless someone adds something, I?ll commit your patch in some days. I?ll change ?can?, don?t bother doing another patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 20:38:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 04 Oct 2010 18:38:10 +0000 Subject: [issue5088] optparse: inconsistent default value for append actions In-Reply-To: <1233140307.53.0.685208172708.issue5088@psf.upfronthosting.co.za> Message-ID: <1286217490.98.0.204205045305.issue5088@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> accepted status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 22:10:48 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 04 Oct 2010 20:10:48 +0000 Subject: [issue9800] Fast path for small int-indexing of lists and tuples In-Reply-To: <1283969230.58.0.425189432441.issue9800@psf.upfronthosting.co.za> Message-ID: <1286223048.44.0.980829696705.issue9800@psf.upfronthosting.co.za> Raymond Hettinger added the comment: At any rate, I believe this used to be a fast-path. IIRC, Aahz put it in after demonstrating a considerable speed boost for common cases. Aahz, do you have any institutional memory around this one? ---------- nosy: +aahz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 23:09:59 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 04 Oct 2010 21:09:59 +0000 Subject: [issue6706] asyncore's accept() is broken In-Reply-To: <1250291017.2.0.719693187742.issue6706@psf.upfronthosting.co.za> Message-ID: <1286226599.23.0.456790647435.issue6706@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Python 3.2 changes committed in r85220. Still have to commit EWOULDBLOCK/ECONNABORTED changes for 3.1 and 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 23:22:05 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Oct 2010 21:22:05 +0000 Subject: [issue9935] Faster pickling of instances In-Reply-To: <1285290424.33.0.0824621979691.issue9935@psf.upfronthosting.co.za> Message-ID: <1286227325.25.0.110700469933.issue9935@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Alexandre, do you have opinion on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 23:33:02 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Oct 2010 21:33:02 +0000 Subject: [issue10023] test_lib2to3 leaks under 3.1 In-Reply-To: <1286227982.74.0.164487876735.issue10023@psf.upfronthosting.co.za> Message-ID: <1286227982.74.0.164487876735.issue10023@psf.upfronthosting.co.za> New submission from Antoine Pitrou : test_lib2to3 beginning 5 repetitions 12345 No handlers could be found for logger "RefactoringTool" ..... test_lib2to3 leaked [32, 32] references, sum=64 ---------- components: Library (Lib), Tests messages: 117983 nosy: benjamin.peterson, pitrou priority: normal severity: normal status: open title: test_lib2to3 leaks under 3.1 type: resource usage versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 23:45:52 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Oct 2010 21:45:52 +0000 Subject: [issue10024] Outdated advice in C-API tutorial? In-Reply-To: <1286228751.32.0.127029935422.issue10024@psf.upfronthosting.co.za> Message-ID: <1286228751.32.0.127029935422.issue10024@psf.upfronthosting.co.za> New submission from Antoine Pitrou : In http://docs.python.org/dev/extending/newtypes.html, you can read: ?To enable object creation, we have to provide a tp_new implementation. In this case, we can just use the default implementation provided by the API function PyType_GenericNew(). We?d like to just assign this to the tp_new slot, but we can?t, for portability sake, On some platforms or compilers, we can?t statically initialize a structure member with a function defined in another C module, so, instead, we?ll assign the tp_new slot in the module initialization function just before calling PyType_Ready()? But the thing is, we ourselves (CPython) do exactly what is discouraged here, both in built-in types and dynamically loaded extensions. So is this piece of advice still necessary? ---------- assignee: docs at python components: Documentation messages: 117984 nosy: docs at python, loewis, pitrou priority: normal severity: normal status: open title: Outdated advice in C-API tutorial? type: resource usage versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 23:50:31 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Mon, 04 Oct 2010 21:50:31 +0000 Subject: [issue1731717] race condition in subprocess module Message-ID: <1286229031.65.0.527072643951.issue1731717@psf.upfronthosting.co.za> Gregory P. Smith added the comment: A workaround for those still having problems with this: stub out subprocess._cleanup with a no-op method. It it only useful if your app is ever using subprocess and forgetting to call wait() on Popen objects before they are deleted. If you are, you can keep a reference to the old _cleanup() method and periodically call it on your own. http://bugs.python.org/issue1236 effectively demonstrates this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 4 23:55:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 04 Oct 2010 21:55:57 +0000 Subject: [issue9962] GzipFile doesn't have peek() In-Reply-To: <1285623515.75.0.317234760361.issue9962@psf.upfronthosting.co.za> Message-ID: <1286229357.26.0.550316563769.issue9962@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed the improvements in r85221. Thank you! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 00:47:23 2010 From: report at bugs.python.org (Alexandre Vassalotti) Date: Mon, 04 Oct 2010 22:47:23 +0000 Subject: [issue9935] Faster pickling of instances In-Reply-To: <1285290424.33.0.0824621979691.issue9935@psf.upfronthosting.co.za> Message-ID: <1286232443.49.0.950820732208.issue9935@psf.upfronthosting.co.za> Alexandre Vassalotti added the comment: Sorry Antoine, I have been busy with school work lately. I like the general idea and I will try to look at your patch ASAP. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 01:33:06 2010 From: report at bugs.python.org (Tom Goddard) Date: Mon, 04 Oct 2010 23:33:06 +0000 Subject: [issue10025] random.seed not initialized as advertised In-Reply-To: <1286235186.65.0.07824350342.issue10025@psf.upfronthosting.co.za> Message-ID: <1286235186.65.0.07824350342.issue10025@psf.upfronthosting.co.za> New submission from Tom Goddard : In Python 2.7, random.seed() with a string argument is documented as being equivalent to random.seed() with argument equal to the hash of the string argument. This is not the actual behavior. Reading the _random C code reveals it in fact casts the signed hash value to unsigned long. This also appears to be the situation with Python 2.5.2. Rather than fix this in 2.7.1 it seems preferable to just correct the documentation in 2.7.1 to preserve backward compatibility. Bug #7889 has already addressed this problem in Python 3.2 by eliminating the use of hash() for non-integer random.seed() arguments. I encountered this problem while trying to produce identical sequences of random numbers on 64-bit architectures as on 32-bit architectures. Here is a demonstration of the bug in Python 2.7, 32-bit. random.seed('1pov') random.uniform(0,1) 0.713827305919223 random.seed(hash('1pov')) random.uniform(0,1) 0.40934677883730686 hash('1pov') -747753952 random.seed(hash('1pov') + 2**32) # unsigned long cast random.uniform(0,1) 0.713827305919223 ---------- components: Library (Lib) messages: 117988 nosy: goddard priority: normal severity: normal status: open title: random.seed not initialized as advertised type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 02:01:28 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 05 Oct 2010 00:01:28 +0000 Subject: [issue9042] Gettext cache and classes In-Reply-To: <1277126619.45.0.50898561177.issue9042@psf.upfronthosting.co.za> Message-ID: <1286236888.8.0.711329373004.issue9042@psf.upfronthosting.co.za> ?ric Araujo added the comment: Committed in r85223, r85224, r85225 (resp. 3.2, 3.1, 2.7). Thanks again! ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 02:01:39 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 05 Oct 2010 00:01:39 +0000 Subject: [issue10025] random.seed not initialized as advertised In-Reply-To: <1286235186.65.0.07824350342.issue10025@psf.upfronthosting.co.za> Message-ID: <1286236899.0.0.703853542271.issue10025@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 04:32:40 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 05 Oct 2010 02:32:40 +0000 Subject: [issue10025] random.seed not initialized as advertised In-Reply-To: <1286235186.65.0.07824350342.issue10025@psf.upfronthosting.co.za> Message-ID: <1286245960.38.0.678683515459.issue10025@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 05:00:41 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 05 Oct 2010 03:00:41 +0000 Subject: [issue1104021] wishlist: os.feed_urandom(input) Message-ID: <1286247641.98.0.532153944604.issue1104021@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: -BreamoreBoy resolution: out of date -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 05:15:52 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 05 Oct 2010 03:15:52 +0000 Subject: [issue1104021] wishlist: os.feed_urandom(input) Message-ID: <1286248552.9.0.0661297416099.issue1104021@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 05:32:44 2010 From: report at bugs.python.org (Tony Meyer) Date: Tue, 05 Oct 2010 03:32:44 +0000 Subject: [issue4661] email.parser: impossible to read messages encoded in a different encoding In-Reply-To: <1229273746.12.0.577914878535.issue4661@psf.upfronthosting.co.za> Message-ID: <1286249564.74.0.840466418087.issue4661@psf.upfronthosting.co.za> Changes by Tony Meyer : ---------- nosy: +anadelonbrin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 06:50:25 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 05 Oct 2010 04:50:25 +0000 Subject: [issue9978] Better wait for slow machine in test_os (_kill_with_event) In-Reply-To: <1285715640.05.0.77400346639.issue9978@psf.upfronthosting.co.za> Message-ID: <1286254225.36.0.430537900937.issue9978@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : ---------- title: test_os failures on XP-4 buildbot -> Better wait for slow machine in test_os (_kill_with_event) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 07:04:43 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 05 Oct 2010 05:04:43 +0000 Subject: [issue9899] tkinter test_font fails on OS X with Aqua Tk In-Reply-To: <1284928979.9.0.717353739827.issue9899@psf.upfronthosting.co.za> Message-ID: <1286255083.91.0.987586470982.issue9899@psf.upfronthosting.co.za> Ned Deily added the comment: After further investigation, on OS X at least, there is a difference in behavior between Tk 8.4 (the system default on OS X 10.4 and 10.5) and Tk 8.5 (the default on 10.6). Lib/tkinter/font.py calls the Tk "font names" commands to check whether a font is already defined. At the point where test_font.py is initially run, there has not been any real Tk activity yet. For some reason, with 8.5 the system font names are returned; with 8.4 they are not: $ /usr/bin/wish8.4 % font names $ /usr/bin/wish8.5 % font names systemPushButtonFont systemMenuItemFont systemApplicationFont systemSystemFont systemMenuItemMarkFont TkMenuFont TkDefaultFont systemSmallEmphasizedSystemFont systemDetailEmphasizedSystemFont systemMiniSystemFont TkHeadingFont TkTooltipFont systemUtilityWindowTitleFont systemViewsFont systemSmallSystemFont systemMenuTitleFont systemEmphasizedSystemFont TkTextFont systemDetailSystemFont TkCaptionFont systemLabelFont systemAlertHeaderFont systemMenuItemCmdKeyFont TkSmallCaptionFont TkFixedFont systemWindowTitleFont systemToolbarFont TkIconFont So, a solution for that is to add a try block in test_font.py to create a font definition for TkDefaultFont if it does not already exist. (Presumably, after the test failed and before it was re-run, other tests ran which caused the fonts to be defined so it passes.) This time I have tested it with both Tk 8.4 and 8.5 on OS X 10.5 and 10.6. Additional patch file attached (to be applied on top of the already applied first patch). ---------- assignee: ned.deily -> resolution: fixed -> accepted stage: committed/rejected -> patch review Added file: http://bugs.python.org/file19130/issue9899-fix1-py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 08:42:17 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 05 Oct 2010 06:42:17 +0000 Subject: [issue9907] interactive mode TAB does not insert on OS X built with editline instead of GNU readline In-Reply-To: <1285018607.7.0.0427821796342.issue9907@psf.upfronthosting.co.za> Message-ID: <1286260937.49.0.808426581911.issue9907@psf.upfronthosting.co.za> Ned Deily added the comment: The modified patch looks OK to me and tests OK. The rl_read_init_file call seems like a reasonable thing for users who are used to using libedit's .editrc. As a practical matter, though, I think the only thing that would be affected is an .editrc TAB binding. Some of the initializations done in Modules/readline.c, like rl_bind_key_in_map (for sure) and rl_completer_word_break_characters are silently ignored by the libedit readline-compatibility layer; it does not implement features like the emacs_meta_keymap. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 09:21:55 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 05 Oct 2010 07:21:55 +0000 Subject: [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286263315.71.0.650569429119.issue10021@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I seem to remember this having been discussed before, but I cannot find the right thread. It came up in the issue 7951 discussion, I think. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 09:23:25 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 05 Oct 2010 07:23:25 +0000 Subject: [issue9980] str(float) failure In-Reply-To: <1285729892.65.0.25912191442.issue9980@psf.upfronthosting.co.za> Message-ID: <1286263405.02.0.337888652189.issue9980@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 09:32:05 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 05 Oct 2010 07:32:05 +0000 Subject: [issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally In-Reply-To: <1286109884.3111.16.camel@localhost.localdomain> Message-ID: <201010050931.54349.victor.stinner@haypocalc.com> STINNER Victor added the comment: > If you were worried about performance, then surrogateescape is certainly > much slower than latin1. If you were really worried about performance, the bytes type is maybe faster than: decode bytes to str using latin-1, process str strings, encode str to bytes using latin-1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 09:45:12 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 05 Oct 2010 07:45:12 +0000 Subject: [issue8445] buildbot: test_ttk_guionly failures (test_traversal, test_tab_identifiers, test_identify, test_heading_callback) In-Reply-To: <1271626152.34.0.828330480725.issue8445@psf.upfronthosting.co.za> Message-ID: <1286264712.0.0.729385569597.issue8445@psf.upfronthosting.co.za> Ned Deily added the comment: The test_heading_callback failure appears to be another Tk 8.4 vs Tk 8.5 problem. Datapoints: the test fails using the Apple-supplied Tk 8.4 in OS X 10.6 and with a recent ActiveState Aqua Tk 8.4 on OS X 10.5; the test succeeds with the Apple-supplied Tk 8.5 in OS X 10.6. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 10:24:07 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 05 Oct 2010 08:24:07 +0000 Subject: [issue7330] PyUnicode_FromFormat segfault In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1286267047.79.0.914220362337.issue7330@psf.upfronthosting.co.za> Ray.Allen added the comment: I update the patch. Hope somebody could do a review. ---------- Added file: http://bugs.python.org/file19131/issue_7330.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 10:24:58 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 05 Oct 2010 08:24:58 +0000 Subject: [issue7330] PyUnicode_FromFormat segfault In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1286267098.16.0.13973626015.issue7330@psf.upfronthosting.co.za> Ray.Allen added the comment: I update the patch. Hope somebody could do a review. ---------- Added file: http://bugs.python.org/file19132/issue_7330.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 10:26:16 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 05 Oct 2010 08:26:16 +0000 Subject: [issue7330] PyUnicode_FromFormat segfault In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1286267176.31.0.631761328855.issue7330@psf.upfronthosting.co.za> Ray.Allen added the comment: Oooops! Sorry for re-submit the request... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 10:33:54 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 05 Oct 2010 08:33:54 +0000 Subject: [issue10024] Outdated advice in C-API tutorial? In-Reply-To: <1286228751.32.0.127029935422.issue10024@psf.upfronthosting.co.za> Message-ID: <1286267634.34.0.605380449998.issue10024@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The advice is still necessary, AFAIK. The issue is Windows, in particular producing function pointers across DLL boundaries. In Python core, this is not an issue, since the references will all be inside pythonXY.dll. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 12:17:34 2010 From: report at bugs.python.org (=?utf-8?q?Vojt=C4=9Bch_Rylko?=) Date: Tue, 05 Oct 2010 10:17:34 +0000 Subject: [issue10026] xml.dom.pulldom strange behavior In-Reply-To: <1286273854.3.0.24375174829.issue10026@psf.upfronthosting.co.za> Message-ID: <1286273854.3.0.24375174829.issue10026@psf.upfronthosting.co.za> New submission from Vojt?ch Rylko : Hi, I have file with 10 000 records of same element item (always same): $ head test.xml
Twitter
Twitter
Twitter
Twitter
Twitter
Twitter
Twitter
Twitter
Twitter
And run simply program for printing content of element section: $ python pulldom.py test.xml | head Twitter Twitter Twitter Twitter Twitter Twitter Twitter Twitter Twitter Twitter Seems work fine: $ python pulldom.py test.xml | wc -l 10000 But (in two cases of 10 000) gives me just "Twi" not Twitter: $ python pulldom.py test.xml | grep -v Twitter Twi Twi Why? This example program demonstrate big problems in my real application - xml.dom.pulldom is cutting content of some elements. Thanks for any advice Vojta Rylko --------------------------- Python 2.5.4 (r254:67916, Feb 10 2009, 14:58:09) [GCC 4.2.4] on linux2 --------------------------- pulldom.py: --------------------------- file=open(sys.argv[1]) events = pulldom.parse(file) for event, node in events: if event == pulldom.START_ELEMENT: if node.tagName == 'item': events.expandNode(node) print node.getElementsByTagName('section').item(0).firstChild.data ---------- components: XML messages: 117999 nosy: vojta.rylko priority: normal severity: normal status: open title: xml.dom.pulldom strange behavior type: behavior versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 12:32:20 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 05 Oct 2010 10:32:20 +0000 Subject: [issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally In-Reply-To: <201010050931.54349.victor.stinner@haypocalc.com> Message-ID: Nick Coghlan added the comment: On Tue, Oct 5, 2010 at 5:32 PM, STINNER Victor wrote: > > STINNER Victor added the comment: > >> If you were worried about performance, then surrogateescape is certainly >> much slower than latin1. > > If you were really worried about performance, the bytes type is maybe faster > than: decode bytes to str using latin-1, process str strings, encode str to > bytes using latin-1. I'm fairly resigned to the fact that I'm going to need some kind of micro-benchmark to compare the different approaches. For example, the bytes based approach has a lot of extra assignments to local variables that the str based approach doesn't need. The first step is to actually have a str-based patch to compare to the existing bytes based patch. If the code ends up significantly clearer (as I expect it will), we can probably sacrifice a certain amount of speed for that benefit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 13:01:11 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 05 Oct 2010 11:01:11 +0000 Subject: [issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally In-Reply-To: Message-ID: <20101005110057.GA15396@remy> Senthil Kumaran added the comment: I wonder if Option2 (ascii+surrogateescape vs latin1) is only about performance. How about escapes that might occur if the Option2 is adopted. That might take higher priority than performance. Do we know 'how tight' that approach is? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 13:08:39 2010 From: report at bugs.python.org (Nils Philippsen) Date: Tue, 05 Oct 2010 11:08:39 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1286276919.16.0.389403636227.issue6011@psf.upfronthosting.co.za> Changes by Nils Philippsen : ---------- nosy: +nils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 13:16:19 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 05 Oct 2010 11:16:19 +0000 Subject: [issue10026] xml.dom.pulldom strange behavior In-Reply-To: <1286273854.3.0.24375174829.issue10026@psf.upfronthosting.co.za> Message-ID: <1286277379.34.0.859500575236.issue10026@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Please read http://docs.python.org/library/xml.etree.elementtree.html?highlight=elementtree#xml.etree.ElementTree.iterparse At START_ELEMENT, the element is not guaranteed to be fully populated; you should handle the END_ELEMENT event instead. This should be documented for the pulldom module as well, though. ---------- assignee: -> docs at python nosy: +amaury.forgeotdarc, docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 13:25:27 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 05 Oct 2010 11:25:27 +0000 Subject: [issue9899] tkinter test_font fails on OS X with Aqua Tk In-Reply-To: <1284928979.9.0.717353739827.issue9899@psf.upfronthosting.co.za> Message-ID: <1286277927.13.0.311706716388.issue9899@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed the patch in r85229. Let's see if this makes the buildbots happy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 13:38:17 2010 From: report at bugs.python.org (=?utf-8?q?Vojt=C4=9Bch_Rylko?=) Date: Tue, 05 Oct 2010 11:38:17 +0000 Subject: [issue10026] xml.dom.pulldom strange behavior In-Reply-To: <1286273854.3.0.24375174829.issue10026@psf.upfronthosting.co.za> Message-ID: <1286278697.14.0.224791721873.issue10026@psf.upfronthosting.co.za> Vojt?ch Rylko added the comment: Program below also splits two of 10 000 elements into two rows. Is it acceptable behavior? OUTPUT (ill part) ============= PROGRAM ============= for event, node in events: if event == pulldom.CHARACTERS: print node.data ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 14:16:22 2010 From: report at bugs.python.org (MunSic JEONG) Date: Tue, 05 Oct 2010 12:16:22 +0000 Subject: [issue7980] time.strptime not thread safe In-Reply-To: <1266835598.13.0.361031999331.issue7980@psf.upfronthosting.co.za> Message-ID: <1286280982.86.0.165069384498.issue7980@psf.upfronthosting.co.za> MunSic JEONG added the comment: Attribute error confirmed on OSX, and py3k. http://codereview.appspot.com/2371041 ---------- keywords: +patch Added file: http://bugs.python.org/file19133/issue7980.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 14:23:34 2010 From: report at bugs.python.org (MunSic JEONG) Date: Tue, 05 Oct 2010 12:23:34 +0000 Subject: [issue9012] Separate compilation of time and datetime modules In-Reply-To: <1276703214.18.0.763658156575.issue9012@psf.upfronthosting.co.za> Message-ID: <1286281414.3.0.996114637385.issue9012@psf.upfronthosting.co.za> Changes by MunSic JEONG : ---------- nosy: +ruseel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 14:41:08 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 05 Oct 2010 12:41:08 +0000 Subject: [issue10026] xml.dom.pulldom strange behavior In-Reply-To: <1286273854.3.0.24375174829.issue10026@psf.upfronthosting.co.za> Message-ID: <1286282468.37.0.322079216796.issue10026@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Yes, sax parsers may split CHARACTER events. See also the discussion: http://www.mail-archive.com/xml-sig at python.org/msg00234.html Again, the END_ELEMENT event is guaranteed to return the complete node. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 14:43:17 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 05 Oct 2010 12:43:17 +0000 Subject: [issue9899] tkinter test_font fails on OS X with Aqua Tk In-Reply-To: <1284928979.9.0.717353739827.issue9899@psf.upfronthosting.co.za> Message-ID: <1286282597.63.0.700849648687.issue9899@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Looks alright, thank you! ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 15:23:16 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 05 Oct 2010 13:23:16 +0000 Subject: [issue9978] Better wait for slow machine in test_os (_kill_with_event) In-Reply-To: <1285715640.05.0.77400346639.issue9978@psf.upfronthosting.co.za> Message-ID: <1286284996.03.0.329344904413.issue9978@psf.upfronthosting.co.za> Brian Curtin added the comment: In that case, the patch seems alright to me. ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 15:57:48 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 05 Oct 2010 13:57:48 +0000 Subject: [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286287068.37.0.181484689621.issue10021@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This should not be classified as an "implementation detail". Either we should document it and cause other implementations to support it or check it ourselves. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 16:32:02 2010 From: report at bugs.python.org (Aahz) Date: Tue, 05 Oct 2010 14:32:02 +0000 Subject: [issue9800] Fast path for small int-indexing of lists and tuples In-Reply-To: <1283969230.58.0.425189432441.issue9800@psf.upfronthosting.co.za> Message-ID: <1286289122.56.0.112547679124.issue9800@psf.upfronthosting.co.za> Aahz added the comment: Wasn't me! And I've spent too little time on python-dev lately to remember stuff like this. :-( ---------- nosy: +Aahz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 16:32:47 2010 From: report at bugs.python.org (Eric Smith) Date: Tue, 05 Oct 2010 14:32:47 +0000 Subject: [issue10021] Format parser is too permissive In-Reply-To: <1286209446.65.0.698670214161.issue10021@psf.upfronthosting.co.za> Message-ID: <1286289167.85.0.640694408537.issue10021@psf.upfronthosting.co.za> Eric Smith added the comment: I agree that it being an implementation detail is not a good thing. I think we should just document the current CPython behavior as the language standard: once parsed, any string after a dot is passed to getattr. I can't see why we should pay the penalty of validating it as an identifier when the behavior is well defined and matches my getattr example in msg 117965. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 16:35:27 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 05 Oct 2010 14:35:27 +0000 Subject: [issue10027] os.lstat/os.stat don't set st_nlink on Windows In-Reply-To: <1286289327.29.0.159315245099.issue10027@psf.upfronthosting.co.za> Message-ID: <1286289327.29.0.159315245099.issue10027@psf.upfronthosting.co.za> New submission from Brian Curtin : In msg117834 on #8879 it was noticed that os.lstat and os.stat don't set st_nlink on Windows, which is causing the patch on that issue to fail test_tarfile. Attached is a stripped down version of the patch Hirokazu Yamamoto proposed on #8879, containing just the os.*stat changes. As stated in that message, the patch is a quick hack to get test_os and test_tarfile working, so it could use review. ---------- components: Extension Modules, Windows files: st_nlink.diff keywords: needs review, patch messages: 118012 nosy: brian.curtin, ocean-city priority: normal severity: normal stage: patch review status: open title: os.lstat/os.stat don't set st_nlink on Windows type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19134/st_nlink.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 16:39:46 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 05 Oct 2010 14:39:46 +0000 Subject: [issue8879] Implement os.link on Windows In-Reply-To: <1275504458.06.0.136411734773.issue8879@psf.upfronthosting.co.za> Message-ID: <1286289586.53.0.188530617528.issue8879@psf.upfronthosting.co.za> Brian Curtin added the comment: I created #10027 for the st_nlink issue to handle it separately. ---------- dependencies: +os.lstat/os.stat don't set st_nlink on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 16:51:09 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Tue, 05 Oct 2010 14:51:09 +0000 Subject: [issue9800] Fast path for small int-indexing of lists and tuples In-Reply-To: <1283969230.58.0.425189432441.issue9800@psf.upfronthosting.co.za> Message-ID: <1286290269.83.0.245940939312.issue9800@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: I did some spelunking. Guido committed the similar optimization in r8306. The diff is at: http://svn.python.org/view/python/trunk/Python/ceval.c?r1=8087&r2=8306 His commit message was: Huge speedup by inlining some common integer operations: int+int, int-int, int int, and list[int]. (Unfortunately, int*int is way too much code to inline.) Also corrected a NULL that should have been a zero. It's possible that these kinds of optimizations were worthwhile with PyInt but aren't worthwhile with PyLong. They were taken out by MvL in r59334, with a commit message of: Remove special-casing of integer operations, to stop using PyInt_CheckExact. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 17:03:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 05 Oct 2010 15:03:11 +0000 Subject: [issue9800] Fast path for small int-indexing of lists and tuples In-Reply-To: <1286290269.83.0.245940939312.issue9800@psf.upfronthosting.co.za> Message-ID: <1286290985.3399.2.camel@localhost.localdomain> Antoine Pitrou added the comment: > I did some spelunking. Guido committed the similar optimization in r8306. The diff is at: > http://svn.python.org/view/python/trunk/Python/ceval.c?r1=8087&r2=8306 > > His commit message was: > > Huge speedup by inlining some common integer operations: > int+int, int-int, int int, and list[int]. > (Unfortunately, int*int is way too much code to inline.) > > Also corrected a NULL that should have been a zero. > > It's possible that these kinds of optimizations were worthwhile with > PyInt but aren't worthwhile with PyLong. It also doesn't say the individual contribution of each optimization, and it also doesn't say on which kind of workloads the "huge speedup" was witnessed (I would say that pystone is a possibility, or perhaps even some timeit micro-benchmark). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 17:09:42 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 05 Oct 2010 15:09:42 +0000 Subject: [issue7980] time.strptime not thread safe In-Reply-To: <1266835598.13.0.361031999331.issue7980@psf.upfronthosting.co.za> Message-ID: <1286291382.78.0.939302923308.issue7980@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +belopolsky stage: unit test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 17:09:52 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 05 Oct 2010 15:09:52 +0000 Subject: [issue8028] self.terminate() from a multiprocessing.Process raises AttributeError exception In-Reply-To: <1267300713.42.0.457825051385.issue8028@psf.upfronthosting.co.za> Message-ID: <1286291392.36.0.474845378736.issue8028@psf.upfronthosting.co.za> Ask Solem added the comment: Could you please reduce this to the shorted possible example that reproduces the problem? ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 17:11:50 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 05 Oct 2010 15:11:50 +0000 Subject: [issue8094] Multiprocessing infinite loop In-Reply-To: <1268125314.35.0.202558750367.issue8094@psf.upfronthosting.co.za> Message-ID: <1286291510.33.0.978852622032.issue8094@psf.upfronthosting.co.za> Changes by Ask Solem : ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 17:13:24 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 05 Oct 2010 15:13:24 +0000 Subject: [issue8144] muliprocessing shutdown infinite loop In-Reply-To: <1268617866.73.0.54561408378.issue8144@psf.upfronthosting.co.za> Message-ID: <1286291604.57.0.699092580686.issue8144@psf.upfronthosting.co.za> Ask Solem added the comment: Did you finish the code to reproduce the problem? ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 17:22:28 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 05 Oct 2010 15:22:28 +0000 Subject: [issue5672] Implement a way to change the python process name In-Reply-To: <1238701084.1.0.0781987214897.issue5672@psf.upfronthosting.co.za> Message-ID: <1286292148.31.0.33200971862.issue5672@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'd rather not reopen this issue. It was too far-ranging, and has failed to get a specific solution. Please stop posting to this closed issue; if you want to contribute, please open a new one. I think the inclusion of the module should see a discussion on python-dev first. It then also needs to be code-reviewed, which in turn needs a committer who either volunteers to do all this work, or who is willing to take the recommendation of some other reviewer. My shallow review of the module is I would prefer to see the code structure revised. For example, c.h should go, spt_config.h should be integrated with autoconf, strlpcpy.c should go, spt_setup.c should go (IIUC) - IOW, this would need to be reformulated as a patch to the Python source tree. Of course, I can understand if Daniele would only start doing so if there was a chance that the functionality and approach is actually acceptable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 18:34:52 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 05 Oct 2010 16:34:52 +0000 Subject: [issue845560] imaplib: traceback from _checkquote with empty string Message-ID: <1286296492.95.0.602951852398.issue845560@psf.upfronthosting.co.za> R. David Murray added the comment: The example works fine for me (server returns mailbox does not exist) in both 2.7 and py3k trunk, so I'm closing this as out of date. ---------- nosy: +r.david.murray -BreamoreBoy resolution: -> out of date stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 18:51:11 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 16:51:11 +0000 Subject: [issue9936] trace misreports "missing" lines In-Reply-To: <1285296955.25.0.310844622187.issue9936@psf.upfronthosting.co.za> Message-ID: <1286297471.3.0.376024004404.issue9936@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 18:59:19 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 16:59:19 +0000 Subject: [issue9325] Add an option to pdb/trace/profile to run library module as a script In-Reply-To: <1279743902.96.0.66207849175.issue9325@psf.upfronthosting.co.za> Message-ID: <1286297959.57.0.773916544612.issue9325@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am afraid, for ordinary scripts these modules effectively use option 3. I think these modules should remove its own scaffolding from "real" __main__ before loading any traced code. I am not sure how this can be achieved, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 19:10:29 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 17:10:29 +0000 Subject: [issue7980] time.strptime not thread safe In-Reply-To: <1266835598.13.0.361031999331.issue7980@psf.upfronthosting.co.za> Message-ID: <1286298629.54.0.243614538367.issue7980@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: MunSic, It looks like issue7980.patch is just a unit test. Do you have a patch to fix the issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 19:16:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 17:16:08 +0000 Subject: [issue7980] time.strptime not thread safe In-Reply-To: <1266835598.13.0.361031999331.issue7980@psf.upfronthosting.co.za> Message-ID: <1286298968.45.0.281585813208.issue7980@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: RDM> FYI there's been a proposal to create a time.py module anyway RDM> in order to add some pure python functions not worth writing in c. RDM> For reference, it's issue 7989. Issue #7989 was retargeted to deal with datetime module. The time.py issue is #9528. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 19:32:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 17:32:20 +0000 Subject: [issue9079] Make gettimeofday available in time module In-Reply-To: <1277427154.32.0.0996770896527.issue9079@psf.upfronthosting.co.za> Message-ID: <1286299940.81.0.923922381813.issue9079@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 19:35:34 2010 From: report at bugs.python.org (Jonathan Niehof) Date: Tue, 05 Oct 2010 17:35:34 +0000 Subject: [issue9991] xmlrpc client ssl check faulty In-Reply-To: <1285798534.22.0.74771320533.issue9991@psf.upfronthosting.co.za> Message-ID: <1286300134.26.0.428702498637.issue9991@psf.upfronthosting.co.za> Changes by Jonathan Niehof : ---------- nosy: +Jelly.Chen, lister171254 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 19:52:26 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 17:52:26 +0000 Subject: [issue9528] Add pure Python implementation of time module to CPython In-Reply-To: <1281666364.27.0.384776817221.issue9528@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Aug 12, 2010 at 10:26 PM, STINNER Victor wrote: .. >> 1. Datetime.py time source (time.time()) represents time as >> a floating point number which leads to system dependent behavior >> and introduces floating point operations where they are not needed. > > Why not introducing a new function in time module? Other people may benefit from this. > I agree. See issue 9079. We can do that. I'll experiment with this approach within issue 9527. >> 4. No changes will be done to timemodule.c other than renaming > > What about time_strftime()? It is 170 lines long: will it be moved to _basictime.c? You have to keep > the code filling the "struct tm" structure in (_)timemodule.c. No, I don't want time_strftime in _basictime. I want datetime_strftime to be independently implemented and freed of legacy restrictions on the year range. The _basictime module should include a very simple wrapper around system strftime if we want to keep using it in datetime.py, but it would be best to have complete pure python implementation of both strftime and strptime. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 20:02:52 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 18:02:52 +0000 Subject: [issue7582] Use ISO timestamp in diff.py In-Reply-To: <1261929478.18.0.289329990174.issue7582@psf.upfronthosting.co.za> Message-ID: <1286301772.94.0.208745396677.issue7582@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- dependencies: +Add aware local time support to datetime module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 20:25:39 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 05 Oct 2010 18:25:39 +0000 Subject: [issue10028] test_concurrent_futures fails on Windows Server 2003 In-Reply-To: <1286303139.16.0.442132720104.issue10028@psf.upfronthosting.co.za> Message-ID: <1286303139.16.0.442132720104.issue10028@psf.upfronthosting.co.za> New submission from Brian Curtin : I haven't seen this on any of my machines except for Windows Server 2003 x64. For whatever reason, SetEvent is failing. ====================================================================== FAIL: test_zero_timeout (test.test_concurrent_futures.ProcessPoolAsCompletedTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\python-dev\py3k\lib\test\test_concurrent_futures.py", line 515, in test_zero_timeout call1.close() File "C:\python-dev\py3k\lib\test\test_concurrent_futures.py", line 109, in close self.set_can() File "C:\python-dev\py3k\lib\test\test_concurrent_futures.py", line 100, in set_can self._signal_event(self._can_finish) File "C:\python-dev\py3k\lib\test\test_concurrent_futures.py", line 83, in _signal_event assert r != 0 AssertionError ====================================================================== FAIL: test_zero_timeout (test.test_concurrent_futures.ThreadPoolAsCompletedTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\python-dev\py3k\lib\test\test_concurrent_futures.py", line 515, in test_zero_timeout call1.close() File "C:\python-dev\py3k\lib\test\test_concurrent_futures.py", line 109, in close self.set_can() File "C:\python-dev\py3k\lib\test\test_concurrent_futures.py", line 100, in set_can self._signal_event(self._can_finish) File "C:\python-dev\py3k\lib\test\test_concurrent_futures.py", line 83, in _signal_event assert r != 0 AssertionError ---------- components: Library (Lib), Tests, Windows messages: 118024 nosy: bquinlan, brian.curtin priority: normal severity: normal stage: needs patch status: open title: test_concurrent_futures fails on Windows Server 2003 type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 20:26:46 2010 From: report at bugs.python.org (Max) Date: Tue, 05 Oct 2010 18:26:46 +0000 Subject: [issue10029] bug in sample code in documentation In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> New submission from Max : The sample code explaining zip function is incorrect at http://docs.python.org/py3k/library/functions.html?highlight=zip#zip: def zip(*iterables): # zip('ABCD', 'xy') --> Ax By iterables = map(iter, iterables) while iterables: yield tuple(map(next, iterables)) See http://stackoverflow.com/questions/3865640/understanding-zip-function for discussion. ---------- assignee: docs at python components: Documentation messages: 118025 nosy: docs at python, max priority: normal severity: normal status: open title: bug in sample code in documentation type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 20:37:12 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 18:37:12 +0000 Subject: [issue10029] bug in sample code in documentation In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286303832.08.0.14190314011.issue10029@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The relevant comment at Stack Overflow is: """ It looks like it's a bug in the documentation. The 'equivalent' code working in python2, but not in python3, where it has an infinite loop. And the latest version of the documentation has the same problem: http://docs.python.org/release/3.1.2/library/functions.html Look like change r61361 was the problem, as it merged changes from python 2.6 without verifying that they were correct for python 3. """ ---------- nosy: +belopolsky, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 20:38:02 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 18:38:02 +0000 Subject: [issue10029] bug in sample code in documentation In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286303882.24.0.63200259978.issue10029@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 20:43:10 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 05 Oct 2010 18:43:10 +0000 Subject: [issue10029] bug in sample code in documentation In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286304190.52.0.978183544965.issue10029@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: docs at python -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 20:51:58 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Tue, 05 Oct 2010 18:51:58 +0000 Subject: [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286304718.38.0.0553177581032.issue10029@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: The code was taken from the itertools.izip documentation for Python 2, where it did work. In Python 2, next() raises StopIteration which is propagated up and causes the izip() to stop. In Python 3, map is itself a generator and the StopIteration terminates the map operation instead of terminating the zip operation. ---------- nosy: +stutzbach resolution: -> accepted stage: -> needs patch title: bug in sample code in documentation -> "Equivalent to" code for zip is wrong in Python 3 versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 20:57:39 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 18:57:39 +0000 Subject: [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286305059.73.0.576255335527.issue10029@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Note that the following variant where maps are replaced with list comprehensions seems to work: def zip(*iterables): # zip('ABCD', 'xy') --> Ax By iterables = [iter(i) for i in iterables] while iterables: yield tuple([next(j) for j in iterables]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 21:23:38 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 05 Oct 2010 19:23:38 +0000 Subject: [issue10027] os.lstat/os.stat don't set st_nlink on Windows In-Reply-To: <1286289327.29.0.159315245099.issue10027@psf.upfronthosting.co.za> Message-ID: <1286306618.7.0.101196195528.issue10027@psf.upfronthosting.co.za> Brian Curtin added the comment: Overall I think this looks like a reasonable restructuring, and it works in a few manual tests of existing hardlinks on my system. Until #8879 goes in, we can't really add tests for this. Hirokazu, do you want to commit this since you came up with it? ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 22:08:51 2010 From: report at bugs.python.org (Shashank) Date: Tue, 05 Oct 2010 20:08:51 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> New submission from Shashank : As promised in this thread http://mail.python.org/pipermail/python-dev/2009-August/091450.html (a year ago!), attached is a patch that replaces simple zip decryption logic written in pure python with that in C. As reported in the link above, this can result in speedups up to couple of orders of magnitude. There doesn't seem to be any need to add any new tests as this patch doesn't change any public API ---------- components: Library (Lib) files: zipdecrypt.patch keywords: patch messages: 118030 nosy: shashank priority: normal severity: normal status: open title: Patch for zip decryption speedup type: performance versions: Python 2.7 Added file: http://bugs.python.org/file19135/zipdecrypt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 22:18:11 2010 From: report at bugs.python.org (Darren Dale) Date: Tue, 05 Oct 2010 20:18:11 +0000 Subject: [issue10031] Withdraw anti-recommendation of relative imports from documentation In-Reply-To: <1286309891.2.0.339569302596.issue10031@psf.upfronthosting.co.za> Message-ID: <1286309891.2.0.339569302596.issue10031@psf.upfronthosting.co.za> New submission from Darren Dale : Old-style relative imports have been strongly discouraged in some sections of the python documentation. This was discussed on the python-dev mailing list. Executive summary: "The issue is implementing a PEP with nice support for relative imports, and then documenting that it should never be used." To which Guido responded: --- "Isn't this mostly historical? Until the new relative-import syntax was implemented there were various problems with relative imports. The short-term solution was to recommend not using them. The long-term solution was to implement an unambiguous syntax. Now it is time to withdraw the anti-recommendation. Of course, without going overboard -- I still find them an acquired taste; but they have their place." --- It was suggested I open a ticket and suggest specific changes. They are listed below: The faq at http://docs.python.org/py3k/faq/programming.html#what-are-the-best-practices-for-using-import-in-a-module could go from: "Never use relative package imports. If you?re writing code that?s in the package.sub.m1 module and want to import package.sub.m2, do not just write from . import m2, even though it?s legal. Write from package.sub import m2 instead. See PEP 328 for details." to: "Although the python community generally prefers absolute imports, relative imports may be useful in certain circumstances. See PEP 328 for details." The programming faq for python-2.7 at http://docs.python.org/faq/programming.html#what-are-the-best-practices-for-using-import-in-a-module could go from: "Never use relative package imports. If you?re writing code that?s in the package.sub.m1 module and want to import package.sub.m2, do not just write import m2, even though it?s legal. Write from package.sub import m2 instead. Relative imports can lead to a module being initialized twice, leading to confusing bugs. See PEP 328 for details." to: "Although the python community generally prefers absolute imports, relative imports may be useful in certain circumstances. Support for relative imports has recently been improved, and the use of the old-style relative imports is strongly discouraged. See PEP 328 for details." There is also this warning against relative imports in PEP 8, that could go from: - Relative imports for intra-package imports are highly discouraged. Always use the absolute package path for all imports. Even now that PEP 328 [7] is fully implemented in Python 2.5, its style of explicit relative imports is actively discouraged; absolute imports are more portable and usually more readable. to: - While the python community generally prefers absolute imports, relative imports may be useful in certain circumstances. Now that PEP 328 [7] is fully implemented in Python 2.5 and later, the older style of implicit relative imports is strongly discouraged. ---------- assignee: docs at python components: Documentation messages: 118031 nosy: docs at python, dsdale24 priority: normal severity: normal status: open title: Withdraw anti-recommendation of relative imports from documentation versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 22:45:30 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 05 Oct 2010 20:45:30 +0000 Subject: [issue9325] Add an option to pdb/trace/profile to run library module as a script In-Reply-To: <1286297959.57.0.773916544612.issue9325@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: On Wed, Oct 6, 2010 at 2:59 AM, Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > I am afraid, for ordinary scripts these modules effectively use option 3. ?I think these modules should remove its own scaffolding from "real" __main__ before loading any traced code. ?I am not sure how this can be achieved, though. If you use runpy.run_module or runpy.run_path, they will switch the existing __main__ out of sys.modules, replacing it with a temporary module. However, that approach is currently slightly broken, in that it leaves the temporary module namespace inaccessible if the module execution fails with an exception (hence the existence of run_module_as_main). I've thought of a few ways to fix that, but never explored any of them: - allow the module to be used for execution to be passed in to run_module and run_path as a new optional parameter - allow a list (or other mutable container) to be passed in as an output parameter, and stick the temporary module in there - define a thread-local variable for the runpy module that stores the last module namespace executed via runpy in the current thread (and a convenience API for retrieving it) Option 2 strikes me as rather clumsy, so we can probably skip that. I find option 3 to be quite elegant in a sys.exc_info() kind of way, but option 1 is probably simpler. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 22:48:04 2010 From: report at bugs.python.org (Tjeerd Pinkert) Date: Tue, 05 Oct 2010 20:48:04 +0000 Subject: [issue10032] os.setuid and os.setgid have unexpected influence on serial module In-Reply-To: <1286311684.44.0.770931367073.issue10032@psf.upfronthosting.co.za> Message-ID: <1286311684.44.0.770931367073.issue10032@psf.upfronthosting.co.za> New submission from Tjeerd Pinkert : If I use os.setgid and os.setuid to switch to an other user in some daemon code, I cannot open the serial port anymore. If I run the same code directly from the user I can open the serial port. Since the serial module is using the open() call to open the serial device I wonder if the mistake is in the serial module or in the os module. see also: https://sourceforge.net/tracker/?func=detail&aid=3081643&group_id=46487&atid=446302 Sample code showing the behaviour using the daemon module from: http://hathawaymix.org/Software/Sketches/daemon.py (and no it's not this module, also my own crappy code did the same thing and gives the same erroneous behaviour) ------------------------ #!/usr/bin/python """Test daemon""" import daemon import logging import time import serial import os class HelloDaemon(daemon.Daemon): default_conf = 'test.conf' section = 'test' def setup_user(self): print os.getuid(), os.getgid() ser=serial.Serial(0) print ser.portstr ser.close() def run(self): while True: logging.info('The daemon says hello') time.sleep(1) if __name__ == '__main__': HelloDaemon().main() ----------------------------------------- now make the config file: -------------------------------- [test] uid = gid = pidfile = ./hellodaemon.pid logfile = ./hellodaemon.log loglevel = info ---------------------- when I run it as my own user it works fine, e.g.: tjp at machine$ ./test.py 1000 1000 /dev/ttyS0 it nicely opens the port. if I fill in tjp for uid and gid in the configfile and run it as: tjp at machine$ sudo ./test.py 1000 1000 Traceback (most recent call last): File "./test.py", line 26, in HelloDaemon().main() File "/home/tjp/tmp/pydaemon/daemon.py", line 121, in main self.start() File "/home/tjp/tmp/pydaemon/daemon.py", line 196, in start self.setup_user() File "./test.py", line 17, in setup_user ser=serial.Serial(0) File "/usr/lib/python2.6/dist-packages/serial/serialutil.py", line 166, in __init__ self.open() File "/usr/lib/python2.6/dist-packages/serial/serialposix.py", line 175, in open raise SerialException("could not open port %s: %s" % (self._port, msg)) serial.serialutil.SerialException: could not open port 0: [Errno 13] Permission denied: '/dev/ttyS0' I hope someone with more experience can either help me out, or confirm if this should be regarded a bug, and then in which module, os or serial Yours, Tjeerd ---------- components: Extension Modules messages: 118033 nosy: Tjeerd.Pinkert priority: normal severity: normal status: open title: os.setuid and os.setgid have unexpected influence on serial module versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 22:50:10 2010 From: report at bugs.python.org (Tjeerd Pinkert) Date: Tue, 05 Oct 2010 20:50:10 +0000 Subject: [issue10032] os.setuid and os.setgid have unexpected influence on serial module In-Reply-To: <1286311684.44.0.770931367073.issue10032@psf.upfronthosting.co.za> Message-ID: <1286311810.9.0.925512487975.issue10032@psf.upfronthosting.co.za> Changes by Tjeerd Pinkert : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 23:32:11 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 05 Oct 2010 21:32:11 +0000 Subject: [issue4872] Python will not co-exist with MFC (memory leak) In-Reply-To: <1231365332.46.0.804752973069.issue4872@psf.upfronthosting.co.za> Message-ID: <1286314331.09.0.973000000347.issue4872@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: - The "memory leaks" are reported in the IDE output window when the process exits; this lists all non deallocated blocks of memory. This feature is not enabled by default. Creating a CString probably initializes this feature. - Py_Finalize() doesn't free all memory used by Py_Initialize(); this is not a problem, as long as a second call to Py_Initialize() reuses the same memory. Closing as "won't fix": there is no need to free everything when the process exits. ---------- nosy: +amaury.forgeotdarc resolution: invalid -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 5 23:38:05 2010 From: report at bugs.python.org (danosaure) Date: Tue, 05 Oct 2010 21:38:05 +0000 Subject: [issue10033] can't run unittest because of issubclass In-Reply-To: <1286314685.42.0.495645038827.issue10033@psf.upfronthosting.co.za> Message-ID: <1286314685.42.0.495645038827.issue10033@psf.upfronthosting.co.za> New submission from danosaure : I cannot run the simpliest test because issubclass() is always returning False in unittest.py If i follow the documentation, the following should work. python -m unittest simple_test It finds 0 tests because in unittest.py, in the following line: if (isinstance(obj, (type, types.ClassType)) and issubclass(obj, TestCase)): tests.append(self.loadTestsFromTestCase(obj)) and "issubclass()" always return False. The cause is "unittest" module is loaded twice. If I modify "unittest.py" to add "print", it pass in my test module and check my "class A(unittest.TestCase)". Obviously, if I do the check interactively, it will return True. Is there a problem with the "python -m unittest module" syntax? It seems to have two namespaces. ---------- components: Tests files: simple_test.py messages: 118035 nosy: Danosaure priority: normal severity: normal status: open title: can't run unittest because of issubclass type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file19136/simple_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 00:21:54 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 05 Oct 2010 22:21:54 +0000 Subject: [issue9060] Python/dup2.c doesn't compile on (at least) newlib In-Reply-To: <1277286692.98.0.844862215955.issue9060@psf.upfronthosting.co.za> Message-ID: <1286317314.99.0.573832058362.issue9060@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > but Python 2.x doesn't appear to actually bother > to compile dup2.c even if the system lacks dup2 Is it sure? The file configure.in has the same command in both versions: AC_REPLACE_FUNCS(dup2 getcwd strdup) Added the #include anyway in r85236, r85237, 85238. ---------- nosy: +amaury.forgeotdarc resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 00:28:21 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 05 Oct 2010 22:28:21 +0000 Subject: [issue9017] doctest option flag to enable/disable some chunk of doctests? In-Reply-To: <1276778533.38.0.325280903618.issue9017@psf.upfronthosting.co.za> Message-ID: <1286317701.87.0.30892818622.issue9017@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: There is already doctest.SKIP. Isn't it already what you want? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 00:30:20 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 05 Oct 2010 22:30:20 +0000 Subject: [issue10031] Withdraw anti-recommendation of relative imports from documentation In-Reply-To: <1286309891.2.0.339569302596.issue10031@psf.upfronthosting.co.za> Message-ID: <1286317820.19.0.419972522579.issue10031@psf.upfronthosting.co.za> R. David Murray added the comment: Note that of the versions still getting doc updates, only 2.7 still supports the old style relative imports. ---------- nosy: +r.david.murray type: -> behavior versions: -Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 00:35:57 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 05 Oct 2010 22:35:57 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1286318157.25.0.316566668186.issue10030@psf.upfronthosting.co.za> R. David Murray added the comment: It would be nice to retain the pure python version as a fallback for non CPython implementations, that will require tweaking the tests to make sure both are tested. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 00:47:52 2010 From: report at bugs.python.org (Jason Baker) Date: Tue, 05 Oct 2010 22:47:52 +0000 Subject: [issue10034] Readline doc issue In-Reply-To: <1286318872.8.0.983307601226.issue10034@psf.upfronthosting.co.za> Message-ID: <1286318872.8.0.983307601226.issue10034@psf.upfronthosting.co.za> New submission from Jason Baker : There's an error in the documentation for readline here: http://docs.python.org/library/readline.html#example The first example doesn't import readline. ---------- assignee: docs at python components: Documentation messages: 118040 nosy: Jason.Baker, docs at python priority: normal severity: normal status: open title: Readline doc issue versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 00:51:34 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 05 Oct 2010 22:51:34 +0000 Subject: [issue2892] improve cElementTree iterparse error handling In-Reply-To: <1210940435.5.0.243679200602.issue2892@psf.upfronthosting.co.za> Message-ID: <1286319094.79.0.288548454455.issue2892@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: If it's a regression, it should be fixed in some 2.7.x release Is there a patch somewhere? ---------- nosy: +amaury.forgeotdarc stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 00:53:42 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 05 Oct 2010 22:53:42 +0000 Subject: [issue4487] Add utf8 alias for email charsets In-Reply-To: <1228223832.43.0.0399583143577.issue4487@psf.upfronthosting.co.za> Message-ID: <1286319222.99.0.748944052208.issue4487@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: David, can this issue be closed? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 01:16:01 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 05 Oct 2010 23:16:01 +0000 Subject: [issue2982] more tests for pyexpat In-Reply-To: <1211905628.44.0.670797216201.issue2982@psf.upfronthosting.co.za> Message-ID: <1286320561.65.0.742100853371.issue2982@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Adapted patch for py3k and applied in r85239. Maciek, if you have another tests for error handling, please open a new issue. ---------- nosy: +amaury.forgeotdarc resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 01:17:12 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 05 Oct 2010 23:17:12 +0000 Subject: [issue4487] Add utf8 alias for email charsets In-Reply-To: <1228223832.43.0.0399583143577.issue4487@psf.upfronthosting.co.za> Message-ID: <1286320632.02.0.856750866242.issue4487@psf.upfronthosting.co.za> R. David Murray added the comment: Yes. Benjamin merged this to py3k in r82292. If someone wants to explain to me how to cherry pick the changeset into 3.1 I'd be happy to do it, otherwise I think I'm done with this one :) ---------- stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 01:44:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 05 Oct 2010 23:44:23 +0000 Subject: [issue10029] "Equivalent to" code for zip is wrong in Python 3 In-Reply-To: <1286303206.24.0.0440700795071.issue10029@psf.upfronthosting.co.za> Message-ID: <1286322263.87.0.530517573449.issue10029@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: -loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 03:42:05 2010 From: report at bugs.python.org (Ned Deily) Date: Wed, 06 Oct 2010 01:42:05 +0000 Subject: [issue10032] os.setuid and os.setgid have unexpected influence on serial module In-Reply-To: <1286311684.44.0.770931367073.issue10032@psf.upfronthosting.co.za> Message-ID: <1286329325.57.0.197855182424.issue10032@psf.upfronthosting.co.za> Ned Deily added the comment: While you did not specify what platform you are running this on, the issue here is almost certainly a misunderstanding of how permissions work. On UNIX-y systems, access to device files is normally governed by permissions like any other file or directory. On many systems, groups are set up to allow users to access devices without requiring root permission. User "tjp" is very likely a member of a supplementary group that has group permission to the device in question. When run under sudo, the program initially can access the device because of the superuser (root) permission. After it is daemonizied, though, it no longer has root but it does not have the supplementary group permissions it would have had running normally; it only has uid 1000 and gid 1000. The following example illustrates: # in this example, /dev/mixer has a gid of 29 (group=audio) # and the user (uid=501,gid=501) is a member of group 29 $ id -u 501 $ id -g 501 $ id -G 501 6 22 24 25 27 29 44 46 107 112 114 1001 40100 40200 $ ls -ln /dev/mixer crw-rw---- 1 0 29 14, 0 Oct 5 14:06 /dev/mixer $ python -c "open('/dev/mixer','r')" $ sudo python -c "open('/dev/mixer','r') $ sudo python -c "import os; os.setgid(501); os.setuid(501); open('/dev/mixer','r')" Traceback (most recent call last): File "", line 1, in IOError: [Errno 13] Permission denied: '/dev/mixer' $ python -c "import os; print(os.getgroups())" [6, 22, 24, 25, 27, 29, 44, 46, 107, 112, 114, 501, 1001, 40100, 40200] $ sudo python -c "import os; print(os.getgroups())" [0] If this does not explain the results you are seeing, please re-open with additional supporting information. ---------- nosy: +ned.deily resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 04:08:42 2010 From: report at bugs.python.org (Ned Deily) Date: Wed, 06 Oct 2010 02:08:42 +0000 Subject: [issue10033] can't run unittest because of issubclass In-Reply-To: <1286314685.42.0.495645038827.issue10033@psf.upfronthosting.co.za> Message-ID: <1286330922.57.0.251423009448.issue10033@psf.upfronthosting.co.za> Ned Deily added the comment: The unittest module was substantially revised and enhanced for Python 2.7 and the upcoming 3.2. Your test case now works properly under both. $ python2.6 -m unittest -v simple_test ---------------------------------------------------------------------- Ran 0 tests in 0.000s OK $ python2.7 -m unittest -v simple_test test_1 (simple_test.A) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.000s OK $ python3.2 -m unittest -v simple_test test_1 (simple_test.A) ... ok ---------------------------------------------------------------------- Ran 1 test in 0.000s OK Since only security issues are still being accepted for Python 2.6, this problem will not be fixed there. ---------- nosy: +ned.deily resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 04:37:15 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 06 Oct 2010 02:37:15 +0000 Subject: [issue10032] os.setuid and os.setgid have unexpected influence on serial module In-Reply-To: <1286311684.44.0.770931367073.issue10032@psf.upfronthosting.co.za> Message-ID: <1286332635.04.0.712782415491.issue10032@psf.upfronthosting.co.za> R. David Murray added the comment: If you do want to pursue this further note that "[your] own crappy code" is a better reproducer to post than something that depends on a third party module. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 06:28:04 2010 From: report at bugs.python.org (halfjuice) Date: Wed, 06 Oct 2010 04:28:04 +0000 Subject: [issue10035] sgmllib fail to parse html containing In-Reply-To: <1286339282.85.0.467383816638.issue10035@psf.upfronthosting.co.za> Message-ID: <1286339282.85.0.467383816638.issue10035@psf.upfronthosting.co.za> New submission from halfjuice : When parsing html containing the following tag: ... ... SGMLParser will stop parse following content without any warning. When such tag is removed everything works fine. When looking into sgmllib.py, statement below found: if rawdata.startswith(""). I think that's why something goes wrong here. ---------- components: Library (Lib) messages: 118048 nosy: halfjuice priority: normal severity: normal status: open title: sgmllib fail to parse html containing type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 07:07:10 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 06 Oct 2010 05:07:10 +0000 Subject: [issue10035] sgmllib fail to parse html containing In-Reply-To: <1286339282.85.0.467383816638.issue10035@psf.upfronthosting.co.za> Message-ID: <1286341630.15.0.921974577164.issue10035@psf.upfronthosting.co.za> Georg Brandl added the comment: Are you sure you got the comment syntax right? e.g. SGMLParser should handle that. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 07:09:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 06 Oct 2010 05:09:02 +0000 Subject: [issue10034] Readline doc issue In-Reply-To: <1286318872.8.0.983307601226.issue10034@psf.upfronthosting.co.za> Message-ID: <1286341742.33.0.335847581011.issue10034@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r85240. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 07:11:54 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 06 Oct 2010 05:11:54 +0000 Subject: [issue10026] xml.dom.pulldom strange behavior In-Reply-To: <1286273854.3.0.24375174829.issue10026@psf.upfronthosting.co.za> Message-ID: <1286341914.67.0.633044449588.issue10026@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 07:51:25 2010 From: report at bugs.python.org (Jeffrey Finkelstein) Date: Wed, 06 Oct 2010 05:51:25 +0000 Subject: [issue10036] compiler warnings for various modules on Ubuntu x86 In-Reply-To: <1286344285.28.0.174737248843.issue10036@psf.upfronthosting.co.za> Message-ID: <1286344285.28.0.174737248843.issue10036@psf.upfronthosting.co.za> New submission from Jeffrey Finkelstein : On Ubuntu 10.04.1, with "uname -a" outputting "Linux hostname 2.6.32-25-generic #44-Ubuntu SMP Fri Sep 17 20:26:08 UTC 2010 i686 GNU/Linux" "gcc --version" outputting "gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3" On hg revision 7965 of the py3k branch, I get the following compile-time warnings: /mnt/data/src/py3k/Modules/_posixsubprocess.c: In function ?child_exec?: /mnt/data/src/py3k/Modules/_posixsubprocess.c:152: warning: ignoring return value of ?write?, declared with attribute warn_unused_result /mnt/data/src/py3k/Modules/_posixsubprocess.c:158: warning: ignoring return value of ?write?, declared with attribute warn_unused_result /mnt/data/src/py3k/Modules/_posixsubprocess.c:159: warning: ignoring return value of ?write?, declared with attribute warn_unused_result /mnt/data/src/py3k/Modules/_posixsubprocess.c:163: warning: ignoring return value of ?write?, declared with attribute warn_unused_result /mnt/data/src/py3k/Modules/_posixsubprocess.c:164: warning: ignoring return value of ?write?, declared with attribute warn_unused_result /mnt/data/src/py3k/Modules/socketmodule.c: In function ?socket_gethostbyname_ex?: /mnt/data/src/py3k/Modules/socketmodule.c:3282: warning: dereferencing pointer ?sa? does break strict-aliasing rules /mnt/data/src/py3k/Modules/socketmodule.c:3280: note: initialized from here /mnt/data/src/py3k/Modules/socketmodule.c: In function ?socket_gethostbyaddr?: /mnt/data/src/py3k/Modules/socketmodule.c:3339: warning: dereferencing pointer ?sa? does break strict-aliasing rules /mnt/data/src/py3k/Modules/socketmodule.c:3309: note: initialized from here /mnt/data/src/py3k/Modules/_multiprocessing/multiprocessing.c: In function ?multiprocessing_sendfd?: /mnt/data/src/py3k/Modules/_multiprocessing/multiprocessing.c:125: warning: dereferencing type-punned pointer will break strict-aliasing rules /mnt/data/src/py3k/Modules/_multiprocessing/multiprocessing.c: In function ?multiprocessing_recvfd?: /mnt/data/src/py3k/Modules/_multiprocessing/multiprocessing.c:168: warning: dereferencing type-punned pointer will break strict-aliasing rules /mnt/data/src/py3k/Modules/_ctypes/libffi/src/closures.c: In function ?dlmmap_locked?: /mnt/data/src/py3k/Modules/_ctypes/libffi/src/closures.c:416: warning: ignoring return value of ?ftruncate?, declared with attribute warn_unused_result /mnt/data/src/py3k/Modules/_ctypes/libffi/src/closures.c:428: warning: ignoring return value of ?ftruncate?, declared with attribute warn_unused_result /mnt/data/src/py3k/Modules/_ctypes/libffi/src/dlmalloc.c: In function ?mmap_resize?: /mnt/data/src/py3k/Modules/_ctypes/libffi/src/dlmalloc.c:3193: warning: implicit declaration of function ?mremap? /mnt/data/src/py3k/Modules/_ctypes/libffi/src/dlmalloc.c: In function ?sys_trim?: /mnt/data/src/py3k/Modules/_ctypes/libffi/src/dlmalloc.c:3612: warning: comparison between pointer and integer ---------- components: Build messages: 118051 nosy: jfinkels priority: normal severity: normal status: open title: compiler warnings for various modules on Ubuntu x86 type: compile error versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 6 08:08:03 2010 From: report at bugs.python.org (halfjuice) Date: Wed, 06 Oct 2010 06:08:03 +0000 Subject: [issue10035] sgmllib fail to parse html containing In-Reply-To: <1286339282.85.0.467383816638.issue10035@psf.upfronthosting.co.za> Message-ID: <1286345283.09.0.919694480958.issue10035@psf.upfronthosting.co.za> halfjuice added the comment: well, 604 self._parser.Parse("", 1) # end of data 605 del self._target, self._parser # get rid of circular references 606 ExpatError: no element found: line 1, column 0 Please let me know if I'm misinterpreting the docs or if you need any other information to repro this bug. ---------- components: XML messages: 118721 nosy: leos priority: normal severity: normal status: open title: ExpatError not property wrapped type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 00:08:43 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 14 Oct 2010 22:08:43 +0000 Subject: [issue10108] ExpatError not property wrapped In-Reply-To: <1287093270.3.0.510777453712.issue10108@psf.upfronthosting.co.za> Message-ID: <4CB77F68.6070802@v.loewis.de> Martin v. L?wis added the comment: > From my understanding of the documentation, the expected behavior > is for xmlrpclib to raise an xmlrpclib.Fault [...] What specific wording in the documentation makes you thinks so? If anything, I'd expect a ResponseError (which appears undocumented). ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 00:09:47 2010 From: report at bugs.python.org (Ned Deily) Date: Thu, 14 Oct 2010 22:09:47 +0000 Subject: [issue815646] thread unsafe file objects cause crash Message-ID: <1287094187.85.0.435933199257.issue815646@psf.upfronthosting.co.za> Ned Deily added the comment: Paul, please open a new issue and attach your patch(s) there; it should address issues in 2.7 and 3.2 only. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 00:11:33 2010 From: report at bugs.python.org (Ned Deily) Date: Thu, 14 Oct 2010 22:11:33 +0000 Subject: [issue10107] Quitting IDLE on Mac doesn't save unsaved code In-Reply-To: <1287076967.07.0.270311596559.issue10107@psf.upfronthosting.co.za> Message-ID: <1287094293.96.0.708205149208.issue10107@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +ned.deily stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 00:11:57 2010 From: report at bugs.python.org (Ned Deily) Date: Thu, 14 Oct 2010 22:11:57 +0000 Subject: [issue10107] Quitting IDLE on Mac doesn't save unsaved code In-Reply-To: <1287076967.07.0.270311596559.issue10107@psf.upfronthosting.co.za> Message-ID: <1287094317.64.0.544929058527.issue10107@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 00:15:37 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 14 Oct 2010 22:15:37 +0000 Subject: [issue10027] os.lstat/os.stat don't set st_nlink on Windows In-Reply-To: <1286289327.29.0.159315245099.issue10027@psf.upfronthosting.co.za> Message-ID: <1287094537.29.0.686712655495.issue10027@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I'm unsure. I think when I addressed the issue, I was only concerned with symlinks. The Vista behavior sounds correct to me, so it may be that XP was left with the legacy behavior as it doesn't have native symlink support. It sounds as if the behavior on XP should be modified to follow the same technique as in Vista. I don't know when I'll have a moment to look at it in depth, but I'll try to in the next week or two. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 00:23:11 2010 From: report at bugs.python.org (Leo Shklovskii) Date: Thu, 14 Oct 2010 22:23:11 +0000 Subject: [issue10108] ExpatError not property wrapped In-Reply-To: <1287093270.3.0.510777453712.issue10108@psf.upfronthosting.co.za> Message-ID: <1287094991.78.0.493262215499.issue10108@psf.upfronthosting.co.za> Leo Shklovskii added the comment: Looking at the docs more closely, you're right, I'm not entirely sure what error should come out in that case but my main point with the bug is that the error should be an xmlrpclib error rather than one from the specific parser that its choosing to use. Should it be a separate bug that ReponseError is undocumented then? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 00:24:06 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 14 Oct 2010 22:24:06 +0000 Subject: [issue10107] Quitting IDLE on Mac doesn't save unsaved code In-Reply-To: <1287076967.07.0.270311596559.issue10107@psf.upfronthosting.co.za> Message-ID: <1287095046.23.0.467771448329.issue10107@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 00:24:47 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 14 Oct 2010 22:24:47 +0000 Subject: [issue10079] idlelib for Python 3 with Guilherme Polo GSoC enhancements In-Reply-To: <1286939996.87.0.346411752414.issue10079@psf.upfronthosting.co.za> Message-ID: <1287095087.53.0.358276088454.issue10079@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 00:32:14 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 14 Oct 2010 22:32:14 +0000 Subject: [issue10108] ExpatError not property wrapped In-Reply-To: <1287093270.3.0.510777453712.issue10108@psf.upfronthosting.co.za> Message-ID: <1287095534.06.0.571656942108.issue10108@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Not necessarily a separate report. Would you be interested in writing a patch that clears that all up (for 2.7 and/or 3.2)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 00:40:32 2010 From: report at bugs.python.org (Tom O'Connor) Date: Thu, 14 Oct 2010 22:40:32 +0000 Subject: [issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4) In-Reply-To: <1286609205.46.0.0704666326351.issue10052@psf.upfronthosting.co.za> Message-ID: <1287096032.39.0.592707968306.issue10052@psf.upfronthosting.co.za> Tom O'Connor added the comment: Same problem on SGI IRIX 6.5.28 GCC 3.3. Adding the following to pyport.h got me through as well. #define UINT32_MAX 0xffffffff #define INT32_MAX 0x7fffffff ---------- nosy: +Tom.OConnor _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 00:43:10 2010 From: report at bugs.python.org (Leo Shklovskii) Date: Thu, 14 Oct 2010 22:43:10 +0000 Subject: [issue10108] ExpatError not property wrapped In-Reply-To: <1287093270.3.0.510777453712.issue10108@psf.upfronthosting.co.za> Message-ID: <1287096190.81.0.257565924533.issue10108@psf.upfronthosting.co.za> Leo Shklovskii added the comment: I'm sorry, I would like to but I don't have the time in the near future. I'm running into this as a secondary symptom of a bigger issue (in our own setup, not in Python) that I'm troubleshooting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 00:46:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 14 Oct 2010 22:46:13 +0000 Subject: [issue10079] idlelib for Python 3 with Guilherme Polo GSoC enhancements In-Reply-To: <1286939996.87.0.346411752414.issue10079@psf.upfronthosting.co.za> Message-ID: <1287096373.62.0.376710683578.issue10079@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 00:53:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 14 Oct 2010 22:53:10 +0000 Subject: [issue10089] Add support for arbitrary -X options In-Reply-To: <1286996500.23.0.0250789164181.issue10089@psf.upfronthosting.co.za> Message-ID: <1287096790.44.0.870076204408.issue10089@psf.upfronthosting.co.za> ?ric Araujo added the comment: Seems like a good idea to me. Would other VMs have to implement sys.xoptions too? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 00:55:03 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 14 Oct 2010 22:55:03 +0000 Subject: [issue10089] Add support for arbitrary -X options In-Reply-To: <1287096790.44.0.870076204408.issue10089@psf.upfronthosting.co.za> Message-ID: <1287096898.3343.8.camel@localhost.localdomain> Antoine Pitrou added the comment: > Seems like a good idea to me. Would other VMs have to implement sys.xoptions too? I don't think we should mandate that, no. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 01:08:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 14 Oct 2010 23:08:07 +0000 Subject: [issue10106] missing packages In-Reply-To: <1287074140.25.0.416505470052.issue10106@psf.upfronthosting.co.za> Message-ID: <1287097687.2.0.172764151107.issue10106@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 01:12:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 14 Oct 2010 23:12:31 +0000 Subject: [issue2919] Merge profile/cProfile in 3.0 In-Reply-To: <1211227334.77.0.551300594218.issue2919@psf.upfronthosting.co.za> Message-ID: <1287097951.58.0.0879745758246.issue2919@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 01:24:33 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 14 Oct 2010 23:24:33 +0000 Subject: [issue7425] [PATCH] Improve the robustness of "pydoc -k" in the face of broken modules In-Reply-To: <1259786972.24.0.35920903506.issue7425@psf.upfronthosting.co.za> Message-ID: <1287098673.69.0.672929499999.issue7425@psf.upfronthosting.co.za> Dave Malcolm added the comment: I notice this issue is in stage "unit test needed". It's not clear to me how to add a unit test for this: one idea I had is to create a broken module in some subdir somewhere, and invoke "pydoc -k" as a subprocess with PYTHONPATH containing the extra subdir (and assert no traceback seen in stderr of the child). Does that sound sane? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 01:28:31 2010 From: report at bugs.python.org (karl) Date: Thu, 14 Oct 2010 23:28:31 +0000 Subject: [issue5762] AttributeError: 'NoneType' object has no attribute 'replace' In-Reply-To: <1239798874.6.0.325655580097.issue5762@psf.upfronthosting.co.za> Message-ID: <1287098911.44.0.0149945785957.issue5762@psf.upfronthosting.co.za> karl added the comment: This following markup creates the mistake as described earlier in the comments This markup doesn't It returns When using this markup It outputs the right markup, So the mistake occurs really when xmlns="". I have checked and the following markup is a conformant markup according to the XML specification so xmlns="" or bar="" are conformant on the root element. XML Namespaces are defined in another specification. http://www.w3.org/TR/REC-xml-names/. In the section of Namespaces default http://www.w3.org/TR/REC-xml-names/#defaulting, The specification is clear. "The attribute value in a default namespace declaration MAY be empty. This has the same effect, within the scope of the declaration, of there being no default namespace." the proposed "if data:" earlier in the comment solves the issue. I have attached a unit testcase as required by Mark Lawrence (BreamoreBoy) ---------- keywords: +patch nosy: +karlcow Added file: http://bugs.python.org/file19239/test-minidom-xmlns.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 01:30:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 14 Oct 2010 23:30:12 +0000 Subject: [issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6 In-Reply-To: <1281222795.64.0.211558756173.issue9539@psf.upfronthosting.co.za> Message-ID: <1287099012.57.0.371300072264.issue9539@psf.upfronthosting.co.za> ?ric Araujo added the comment: If it still exists in 2.6, I don?t think it could be fixed, that version being in security mode now. (Barry is the release manager, he?ll chime in if I?m wrong.) Valeo, can you reproduces the bug on 2.7? Distutils code has been reverted to a prior version recently, which may be the explanation for the apparent fix, but the bug could still exist with distutils2. Can you clone http://hg.python.org/distutils2/ and run the test suite on your machine? ---------- assignee: tarek -> eric.araujo components: +Distutils, Distutils2 -Tests versions: +3rd party, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 01:32:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 14 Oct 2010 23:32:35 +0000 Subject: [issue8335] distutils test_build_ext's test_get_outputs fails in bootstrap environment In-Reply-To: <1270662842.61.0.49246293202.issue8335@psf.upfronthosting.co.za> Message-ID: <1287099155.77.0.52438439458.issue8335@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 01:35:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 14 Oct 2010 23:35:25 +0000 Subject: [issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6 In-Reply-To: <1281222795.64.0.211558756173.issue9539@psf.upfronthosting.co.za> Message-ID: <1287099325.05.0.652686161547.issue9539@psf.upfronthosting.co.za> ?ric Araujo added the comment: Jan, do you think we should close this as a duplicate of #8335? I?ve just read that one and it looks like the same bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 02:31:52 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 15 Oct 2010 00:31:52 +0000 Subject: [issue10106] missing packages In-Reply-To: <1287074140.25.0.416505470052.issue10106@psf.upfronthosting.co.za> Message-ID: <1287102712.94.0.371939853484.issue10106@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 02:45:02 2010 From: report at bugs.python.org (Jeong-Min Lee) Date: Fri, 15 Oct 2010 00:45:02 +0000 Subject: [issue10109] itertools.product with infinite iterator cause MemoryError. In-Reply-To: <1287103502.64.0.571191585998.issue10109@psf.upfronthosting.co.za> Message-ID: <1287103502.64.0.571191585998.issue10109@psf.upfronthosting.co.za> New submission from Jeong-Min Lee : According to the documentation, itertools.product is equivalent to nested for-loops in a generator expression. But, itertools.product(itertools.count(2010)) is not. >>> import itertools >>> (year for year in itertools.count(2010)) at 0x026367D8> >>> itertools.product(itertools.count(2010)) Traceback (most recent call last): File "", line 1, in MemoryError ---------- components: Library (Lib) messages: 118735 nosy: falsetru priority: normal severity: normal status: open title: itertools.product with infinite iterator cause MemoryError. type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 03:25:05 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 15 Oct 2010 01:25:05 +0000 Subject: [issue10110] Queue doesn't recognize it is full after shrinking maxsize In-Reply-To: <1287105905.32.0.568830983004.issue10110@psf.upfronthosting.co.za> Message-ID: <1287105905.32.0.568830983004.issue10110@psf.upfronthosting.co.za> New submission from Jason R. Coombs : The Queue object has a maxsize parameter and attribute, but due to the test for a full queue, shrinking the maxsize could result in the Queue not recognizing that it is full. The attached patch (against the Python 3 trunk) demonstrates this limitation with a unit test and fixes the failing test case. ---------- files: shrinking_queue_not_full.patch keywords: patch messages: 118736 nosy: jaraco priority: normal severity: normal status: open title: Queue doesn't recognize it is full after shrinking maxsize versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file19240/shrinking_queue_not_full.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 03:25:41 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 15 Oct 2010 01:25:41 +0000 Subject: [issue10109] itertools.product with infinite iterator cause MemoryError. In-Reply-To: <1287103502.64.0.571191585998.issue10109@psf.upfronthosting.co.za> Message-ID: <1287105941.25.0.560001689723.issue10109@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 04:00:57 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 15 Oct 2010 02:00:57 +0000 Subject: [issue7425] [PATCH] Improve the robustness of "pydoc -k" in the face of broken modules In-Reply-To: <1259786972.24.0.35920903506.issue7425@psf.upfronthosting.co.za> Message-ID: <1287108057.73.0.260971801249.issue7425@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, and I can't think of any other way to approach it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 05:27:05 2010 From: report at bugs.python.org (Muhammad Alkarouri) Date: Fri, 15 Oct 2010 03:27:05 +0000 Subject: [issue9980] str(float) failure In-Reply-To: <1285729892.65.0.25912191442.issue9980@psf.upfronthosting.co.za> Message-ID: <1287113225.65.0.478794069673.issue9980@psf.upfronthosting.co.za> Muhammad Alkarouri added the comment: I cam across another issue that was triggered by the same problem. I am explaining it here though I am not sure if it is going to affect the solution one way or the other. The issue is explained in the post http://stackoverflow.com/questions/3933851/nan-giving-an-error-depending-on-python-startup Namely, running the command float('nan') on a Python (tested with version 2.6.4) embedded in a Delphi 2009 application gives a EInvalidOp Delphi exception. The solution as given in the link is to change the FPY control word (and revert it back when done). The issue is important because it may break unexpected Python code. In my case, it broke the command import json because of the line NaN, PosInf, NegInf = float('nan'), float('inf'), float('-inf') in json.decoder. I have no idea what else may break in the standard library. The reason I bring this up here is because the problem with the mismatch in FPU control world expectations between Delphi and Python is not localised. Given that the behaviour of float('nan') is assumed to be guaranteed by library developers (see PEP 754), this may come up anywhere. ---------- nosy: +Muhammad.Alkarouri _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 07:36:25 2010 From: report at bugs.python.org (Ned Deily) Date: Fri, 15 Oct 2010 05:36:25 +0000 Subject: [issue10107] Quitting IDLE on Mac doesn't save unsaved code In-Reply-To: <1287076967.07.0.270311596559.issue10107@psf.upfronthosting.co.za> Message-ID: <1287120985.75.0.77448594097.issue10107@psf.upfronthosting.co.za> Ned Deily added the comment: The problem is that, by default on OS X, Tkinter uses Tk/Aqua which is itself a bona-fide OS X application and it creates the default menu options including a standard application quit. Looks like IDLE needs to register a hook provided by Tk/Aqua for a "quit" callback. (See http://permalink.gmane.org/gmane.comp.python.tkinter/1857). I'm working on a patch for it. ---------- assignee: -> ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 07:52:06 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 15 Oct 2010 05:52:06 +0000 Subject: [issue9980] str(float) failure In-Reply-To: <1285729892.65.0.25912191442.issue9980@psf.upfronthosting.co.za> Message-ID: <1287121926.33.0.377767099778.issue9980@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Interesting. I'd like to propose than that this is resolved as "won't fix", i.e. embedding Python into Delphi is declared as just not supported (or using floating-point operations in such an environment is not supported). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 08:28:15 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 15 Oct 2010 06:28:15 +0000 Subject: [issue10076] Regex objects became uncopyable in 2.5 In-Reply-To: <1286916324.24.0.772801528988.issue10076@psf.upfronthosting.co.za> Message-ID: <1287124095.29.0.567749023168.issue10076@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The patch looks reasonable to me. I was trying to find out why they got disabled after 2.5, but I don't see any reason. (There was an issue open and it was closed for no reason). So, I think, this should move forward, unless there is any technical objection to the patch. ---------- nosy: +orsenthil, pitrou stage: -> patch review superseder: -> MatchObjects not deepcopy()able versions: +Python 3.1 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 08:50:08 2010 From: report at bugs.python.org (Paul Bolle) Date: Fri, 15 Oct 2010 06:50:08 +0000 Subject: [issue10111] Minor problems with PyFileObject documentation (Doc/c-api/file.rst) In-Reply-To: <1287125408.14.0.853619758536.issue10111@psf.upfronthosting.co.za> Message-ID: <1287125408.14.0.853619758536.issue10111@psf.upfronthosting.co.za> New submission from Paul Bolle : 0) I ran into some (small) problems with the documentation added by revision 62195 (see issue 815646 for background). 1) A small patch that addresses two problems with the Python 2.7 documentation should be attached: - link three occurrences of "GIL" to the GIL entry in the glossary; and - add some example code to clarify the usage of PyFile_IncUseCount() andPyFile_DecUseCount(). 2) That patch also adds a link to the "Thread State and the Global Interpreter Lock" section to the GIL entry in the Documentation index. That is a separate problem. But fixing that minor problem could also be of help to people (like me) that need to better understand the GIL aspects of those two functions. ---------- assignee: docs at python components: Documentation files: python-2.7-Doc-gil.patch keywords: patch messages: 118742 nosy: docs at python, pebolle priority: normal severity: normal status: open title: Minor problems with PyFileObject documentation (Doc/c-api/file.rst) versions: Python 2.7 Added file: http://bugs.python.org/file19241/python-2.7-Doc-gil.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 08:52:42 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 15 Oct 2010 06:52:42 +0000 Subject: [issue10100] fromfd is now available on all platforms In-Reply-To: <1287053589.11.0.994213576919.issue10100@psf.upfronthosting.co.za> Message-ID: <1287125562.29.0.936168350795.issue10100@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: You already changed the test in r84449! The doc still needs updating. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 08:54:53 2010 From: report at bugs.python.org (Paul Bolle) Date: Fri, 15 Oct 2010 06:54:53 +0000 Subject: [issue815646] thread unsafe file objects cause crash Message-ID: <1287125693.49.0.794301111899.issue815646@psf.upfronthosting.co.za> Paul Bolle added the comment: > please open a new issue and attach your patch(s) there Issue 10111 now tracks the documentation problems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 09:11:51 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 15 Oct 2010 07:11:51 +0000 Subject: [issue10089] Add support for arbitrary -X options In-Reply-To: <1286996500.23.0.0250789164181.issue10089@psf.upfronthosting.co.za> Message-ID: <1287126711.97.0.387403352296.issue10089@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Why wouldn't they? A standard way to extend the command line options seems useful in all environments. Now the interpretation of these options are subject to variations of course... ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From orsenthil at gmail.com Fri Oct 15 09:18:11 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Fri, 15 Oct 2010 12:48:11 +0530 Subject: [issue10089] Add support for arbitrary -X options In-Reply-To: <1286996500.23.0.0250789164181.issue10089@psf.upfronthosting.co.za> References: <1286996500.23.0.0250789164181.issue10089@psf.upfronthosting.co.za> <1286996500.23.0.0250789164181.issue10089@psf.upfronthosting.co.za> Message-ID: <20101015071811.GC14818@remy> On Wed, Oct 13, 2010 at 07:01:40PM +0000, Antoine Pitrou wrote: > $ ./python -Xa,b=c,d -Xe,f=g=h -c "import sys; print(sys.xoptions)" > {'a': True, 'b': 'c', 'e': True, 'd': True, 'f': 'g=h'} Docs should be updated too. I see that the values could either be True or a string? Would this be perceived as a limitation? From report at bugs.python.org Fri Oct 15 09:18:21 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 15 Oct 2010 07:18:21 +0000 Subject: [issue10089] Add support for arbitrary -X options In-Reply-To: <1286996500.23.0.0250789164181.issue10089@psf.upfronthosting.co.za> Message-ID: <20101015071811.GC14818@remy> Senthil Kumaran added the comment: On Wed, Oct 13, 2010 at 07:01:40PM +0000, Antoine Pitrou wrote: > $ ./python -Xa,b=c,d -Xe,f=g=h -c "import sys; print(sys.xoptions)" > {'a': True, 'b': 'c', 'e': True, 'd': True, 'f': 'g=h'} Docs should be updated too. I see that the values could either be True or a string? Would this be perceived as a limitation? ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 09:22:29 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 15 Oct 2010 07:22:29 +0000 Subject: [issue10098] intermittent failure in test_os In-Reply-To: <1287045270.71.0.765573711319.issue10098@psf.upfronthosting.co.za> Message-ID: <1287127349.8.0.413710583378.issue10098@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: _kill_with_event() does not wait for the subprocess to be ready. It seems to me that the following test is wrong: if m[0] == 0: It should be "if m[0] == 1", since we want to check that the subprocess updated the shared memory. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 09:29:29 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 15 Oct 2010 07:29:29 +0000 Subject: [issue10089] Add support for arbitrary -X options In-Reply-To: <1286996500.23.0.0250789164181.issue10089@psf.upfronthosting.co.za> Message-ID: <1287127769.7.0.475880877325.issue10089@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Well, the syntax allows to pass either a string value (because it's a substring of the command line), or nothing. When no value is passed, True seems better than None, because this allows the usage of the get() method:: x = sys.xoptions.get('a') or:: if sys.xoptions.get('a'): this returns None if the option was not set, True if set to a empty value, and a non-empty string if set to an actual value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 09:43:53 2010 From: report at bugs.python.org (Ned Deily) Date: Fri, 15 Oct 2010 07:43:53 +0000 Subject: [issue10110] Queue doesn't recognize it is full after shrinking maxsize In-Reply-To: <1287105905.32.0.568830983004.issue10110@psf.upfronthosting.co.za> Message-ID: <1287128633.94.0.868531659464.issue10110@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +rhettinger stage: -> patch review versions: -Python 2.5, Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 10:42:40 2010 From: report at bugs.python.org (Florent Xicluna) Date: Fri, 15 Oct 2010 08:42:40 +0000 Subject: [issue10019] json.dumps with indent = 0 not adding newlines In-Reply-To: <1286122957.24.0.240376565719.issue10019@psf.upfronthosting.co.za> Message-ID: <1287132160.48.0.588726781101.issue10019@psf.upfronthosting.co.za> Florent Xicluna added the comment: +1 to merge simplejson 2.1+ before 3.2 beta 1 (mid-november) ---------- nosy: +flox resolution: -> accepted stage: -> patch review type: -> behavior versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 10:59:49 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 15 Oct 2010 08:59:49 +0000 Subject: [issue10099] socket.fromfd() documentation problem In-Reply-To: <1287045765.45.0.437204596645.issue10099@psf.upfronthosting.co.za> Message-ID: <1287133189.07.0.631257704063.issue10099@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I think, the original docs *is* pretty intuitive. It says "Duplicate the file descriptor fd and build a socket object". No one will think that the this method will close the original fd. Person using this method might of course, explicitly close the original fd in some other part of the code (as he may use it after creating the socket object too). If at all anything is required, a line may be "The original file descriptor is unaffected", but again that seems redundant to me. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 11:02:52 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 15 Oct 2010 09:02:52 +0000 Subject: [issue10100] fromfd is now available on all platforms In-Reply-To: <1287053589.11.0.994213576919.issue10100@psf.upfronthosting.co.za> Message-ID: <1287133372.07.0.589189996487.issue10100@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Docs changed committed in revision 85514. ---------- nosy: +orsenthil resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 11:04:30 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 15 Oct 2010 09:04:30 +0000 Subject: [issue10089] Add support for arbitrary -X options In-Reply-To: <1286996500.23.0.0250789164181.issue10089@psf.upfronthosting.co.za> Message-ID: <1287133470.53.0.494495638585.issue10089@psf.upfronthosting.co.za> Nick Coghlan added the comment: I suggest using sys._xoptions to make it clearer that this is for CPython specific internal implementation runtime tweaks. We're putting it in sys so *we* can get at it, not applications. (It also makes it clear that other implementations aren't obliged to implement *any* particular interface to the -X options. Requiring that would go against the whole spirit of -X) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 11:14:25 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 15 Oct 2010 09:14:25 +0000 Subject: [issue10106] missing packages In-Reply-To: <1287074140.25.0.416505470052.issue10106@psf.upfronthosting.co.za> Message-ID: <1287134065.19.0.154441752638.issue10106@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I would suggest to OP, to take it with python-help for the problem to be fixed. It's raised on python26 as well. Highly unlikely that anything is wrong with Python installation here. Marking it invalid and closing it. ---------- nosy: +orsenthil resolution: -> invalid stage: -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 11:17:29 2010 From: report at bugs.python.org (=?utf-8?q?Gergely_K=C3=A1lm=C3=A1n?=) Date: Fri, 15 Oct 2010 09:17:29 +0000 Subject: [issue10099] socket.fromfd() documentation problem In-Reply-To: <1287045765.45.0.437204596645.issue10099@psf.upfronthosting.co.za> Message-ID: <1287134249.94.0.837599769533.issue10099@psf.upfronthosting.co.za> Gergely K?lm?n added the comment: You are perfectly right, the docs are pretty clear. Although fromfd means (or at least to me) to "attach object to fd" and not "duplicate then attach to the duplicate". If someone forgets this particular behaviour and thinks that the function works as the name implies they're in trouble. Gergely Kalman ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 11:43:47 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 15 Oct 2010 09:43:47 +0000 Subject: [issue10099] socket.fromfd() documentation problem In-Reply-To: <1287045765.45.0.437204596645.issue10099@psf.upfronthosting.co.za> Message-ID: <1287135827.68.0.753412957838.issue10099@psf.upfronthosting.co.za> Senthil Kumaran added the comment: So, I assume that we just leave it as such and close the issue. I was thinking if anything needs to be updated for function __doc__ but even there 'the duplicate' word is explained. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 12:11:32 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 15 Oct 2010 10:11:32 +0000 Subject: [issue10107] Quitting IDLE on Mac doesn't save unsaved code In-Reply-To: <1287076967.07.0.270311596559.issue10107@psf.upfronthosting.co.za> Message-ID: <1287137492.92.0.602556435045.issue10107@psf.upfronthosting.co.za> Changes by Ronald Oussoren : ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 12:13:50 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Oct 2010 10:13:50 +0000 Subject: [issue10079] idlelib for Python 3 with Guilherme Polo GSoC enhancements In-Reply-To: <1286939996.87.0.346411752414.issue10079@psf.upfronthosting.co.za> Message-ID: <1287137630.99.0.191255614883.issue10079@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +kbk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 12:16:25 2010 From: report at bugs.python.org (Jan Kratochvil) Date: Fri, 15 Oct 2010 10:16:25 +0000 Subject: [issue10112] Use -Wl, --dynamic-list=x.list, not -Xlinker -export-dynamic In-Reply-To: <1287137785.61.0.962664170792.issue10112@psf.upfronthosting.co.za> Message-ID: <1287137785.61.0.962664170792.issue10112@psf.upfronthosting.co.za> New submission from Jan Kratochvil : FSF GDB (and future Fedora GDBs) became 250KB smaller than before. Python recently disabled this GDB build optimization so GDB is 250KB larger again. -rwxr-xr-x 1 4524488 gdb-7.1-19.fc13.x86_64/usr/bin/gdb -rwxr-xr-x 1 4266728 gdb-7.1-19dynamiclist.fc13.x86_64/usr/bin/gdb -rw-r--r-- 1 2364656 gdb-7.1-19.fc13.x86_64.rpm -rw-r--r-- 1 2274300 gdb-7.1-19dynamiclist.fc13.x86_64.rpm Some Python binaries/libraries could probably also benefit from smaller pageable code image. GDB regressed due to /usr/lib*/python*/config/Makefile contains: LINKFORSHARED=-Xlinker -export-dynamic and GDB thus has to use it even for its own link, effectively disabling its: -Wl,--dynamic-list=./proc-service.list AFAIK Python already contains the required exports list but it is used only on MS-Windows. It should be utilized even for GNU/Linux builds. ---------- components: Library (Lib) messages: 118756 nosy: dmalcolm, jankratochvil priority: normal severity: normal status: open title: Use -Wl,--dynamic-list=x.list, not -Xlinker -export-dynamic type: resource usage versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 12:22:03 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Oct 2010 10:22:03 +0000 Subject: [issue10089] Add support for arbitrary -X options In-Reply-To: <1286996500.23.0.0250789164181.issue10089@psf.upfronthosting.co.za> Message-ID: <1287138123.98.0.156570806097.issue10089@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > (It also makes it clear that other implementations aren't obliged to > implement *any* particular interface to the -X options. Requiring that > would go against the whole spirit of -X) Agreed. I'll update the patch to use sys._xoptions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 12:57:52 2010 From: report at bugs.python.org (Vladimir Dmitriev) Date: Fri, 15 Oct 2010 10:57:52 +0000 Subject: [issue10113] UnicodeDecodeError in mimetypes.guess_type on Windows Message-ID: <1287140272.47.0.635588224312.issue10113@psf.upfronthosting.co.za> Changes by Vladimir Dmitriev : ---------- components: Library (Lib), Windows files: mime content types.reg nosy: vldmit priority: normal severity: normal status: open title: UnicodeDecodeError in mimetypes.guess_type on Windows type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file19242/mime content types.reg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 13:05:05 2010 From: report at bugs.python.org (Vladimir Dmitriev) Date: Fri, 15 Oct 2010 11:05:05 +0000 Subject: [issue10113] UnicodeDecodeError in mimetypes.guess_type on Windows In-Reply-To: <1287140705.94.0.131601408046.issue10113@psf.upfronthosting.co.za> Message-ID: <1287140705.94.0.131601408046.issue10113@psf.upfronthosting.co.za> New submission from Vladimir Dmitriev : Windows 7, Python 2.7 Some windows applications (QuickTime) add content-types to Windows registry with non-ascii names. mimetypes in unaware of that and fails with UnicodeDecodeError: >>> mimetypes.guess_type('test.js') Traceback (most recent call last): File "", line 1, in File "c:\Python27\lib\mimetypes.py", line 294, in guess_type init() File "c:\Python27\lib\mimetypes.py", line 355, in init db.read_windows_registry() File "c:\Python27\lib\mimetypes.py", line 260, in read_windows_registry for ctype in enum_types(mimedb): File "c:\Python27\lib\mimetypes.py", line 250, in enum_types ctype = ctype.encode(default_encoding) # omit in 3.x! UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128) Example registry leaf is attached to previous message. I believe the correct behavior would be either to wrap UnicodeDecodeError exception and skip those content-typer or use .decode() method for registry keys and get encoding using locale.getdefaultlocale() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 13:10:10 2010 From: report at bugs.python.org (Paul Bolle) Date: Fri, 15 Oct 2010 11:10:10 +0000 Subject: [issue8340] bytearray undocumented on trunk In-Reply-To: <1270682579.64.0.491172746908.issue8340@psf.upfronthosting.co.za> Message-ID: <1287141010.82.0.967120384005.issue8340@psf.upfronthosting.co.za> Changes by Paul Bolle : ---------- nosy: +pebolle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 13:49:47 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 15 Oct 2010 11:49:47 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287000989.52.0.725529628819.issue10093@psf.upfronthosting.co.za> Message-ID: <1287143387.43.0.196401102846.issue10093@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Please add a similar warning in PC/_subprocess.c::sp_handle_dealloc() I just got caught by this in PyPy because some pipe handle relies on reference counting to be closed. This ad-hoc fix would suppress the warning: http://codespeak.net/pipermail/pypy-svn/2010-October/043746.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 14:04:45 2010 From: report at bugs.python.org (Kiriakos Vlahos) Date: Fri, 15 Oct 2010 12:04:45 +0000 Subject: [issue9980] str(float) failure In-Reply-To: <1285729892.65.0.25912191442.issue9980@psf.upfronthosting.co.za> Message-ID: <1287144285.58.0.401049498708.issue9980@psf.upfronthosting.co.za> Kiriakos Vlahos added the comment: I would like to say that these are two separate issues. One is about the precision flag and the second about the exception masking flags of the FPU control words. Both issues affect a wider number of users than Python embedders using Delphi. For example C# uses 80 bit precision if I understand http://blogs.msdn.com/b/davidnotario/archive/2005/08/08/449092.aspx well. Also both issues are primarily documentation issues. If Python libraries make certain assumptions about the state of the FPU control word, these assumptions should be documented and users can then accommodate them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 14:25:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Oct 2010 12:25:47 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287143387.43.0.196401102846.issue10093@psf.upfronthosting.co.za> Message-ID: <1287145543.3347.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > Please add a similar warning in PC/_subprocess.c::sp_handle_dealloc() > I just got caught by this in PyPy because some pipe handle relies on reference counting to be closed. Do you want to provide a patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 14:34:51 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Oct 2010 12:34:51 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> New submission from STINNER Victor : Example: $ ./python Python 3.2a3+ (py3k, Oct 15 2010, 14:31:59) >>> compile('', 'abc\uDC80', 'exec') ... UnicodeEncodeError: 'utf-8' codec can't encode character '\udc80' in position 3: surrogates not allowed Attached patch encodes manually the filename to utf-8 with surrogateescape. I found this problem while testing Python with an ASCII locale encoding (LANG=C ./python Lib/test/regrtest.py). Example: $ LANG=C ./python -m base64 -e setup.py ... UnicodeEncodeError: 'utf-8' codec can't encode character '\udcc3' ... ---------- components: Interpreter Core, Unicode files: compile_surrogates.patch keywords: patch messages: 118762 nosy: haypo priority: normal severity: normal status: open title: compile() doesn't support the PEP 383 (surrogates) versions: Python 3.2 Added file: http://bugs.python.org/file19243/compile_surrogates.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 14:43:32 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 15 Oct 2010 12:43:32 +0000 Subject: [issue8293] HTTPSConnection.close() does not immediately close the connection. In-Reply-To: <1270234708.91.0.197021276581.issue8293@psf.upfronthosting.co.za> Message-ID: <1287146612.08.0.425277552334.issue8293@psf.upfronthosting.co.za> R. David Murray added the comment: If I'm reading this thread correctly, this bug should be closed and a new one opened about SSL socket close. Antoine, does that sound correct? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 14:47:47 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 15 Oct 2010 12:47:47 +0000 Subject: [issue8293] HTTPSConnection.close() does not immediately close the connection. In-Reply-To: <1270234708.91.0.197021276581.issue8293@psf.upfronthosting.co.za> Message-ID: <1287146867.48.0.728386276262.issue8293@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 14:52:39 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 15 Oct 2010 12:52:39 +0000 Subject: [issue10113] UnicodeDecodeError in mimetypes.guess_type on Windows In-Reply-To: <1287140705.94.0.131601408046.issue10113@psf.upfronthosting.co.za> Message-ID: <1287147159.97.0.108775018023.issue10113@psf.upfronthosting.co.za> R. David Murray added the comment: This is a duplicate of #9291. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> mimetypes initialization fails on Windows because of non-Latin characters in registry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 14:53:03 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 15 Oct 2010 12:53:03 +0000 Subject: [issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry In-Reply-To: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> Message-ID: <1287147183.17.0.432066446918.issue9291@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +vldmit _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:03:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Oct 2010 13:03:41 +0000 Subject: [issue8293] HTTPSConnection.close() does not immediately close the connection. In-Reply-To: <1270234708.91.0.197021276581.issue8293@psf.upfronthosting.co.za> Message-ID: <1287147821.15.0.904136050072.issue8293@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Probably, yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:07:56 2010 From: report at bugs.python.org (Muhammad Alkarouri) Date: Fri, 15 Oct 2010 13:07:56 +0000 Subject: [issue9980] str(float) failure In-Reply-To: <1287121926.33.0.377767099778.issue9980@psf.upfronthosting.co.za> Message-ID: Muhammad Alkarouri added the comment: On 15 October 2010 06:52, Martin v. L?wis wrote: > > Martin v. L?wis added the comment: > > Interesting. I'd like to propose than that this is resolved as "won't fix", i.e. embedding Python into Delphi is declared as just not supported (or using floating-point operations in such an environment is not supported). The problem is defining what does "such an environment" mean. It is not necessarily Delphi, as this can happen whenever the FPU control word is changed by an embedding application. Kiriakos makes a good point. The underlying issue is that Python make certain assumptions about the FPU control words, and there are probably other global assumptions lurking elsewhere. As I see it, the easiest solution is to document these assumptions as and when they are found. Then it becomes the responsibility of the hosting application to satisfy them. Delphi already has to accomodate Python C heritage, for example by defining functions used from Python with the C calling convention. This would be just one more thing to remember, and in fact can be done inside the Python4Delphi libraries once the Python behaviour is defined and documented. Also, banning floating-point operations is not a solution in my opinion because Python libraries (standard and external) do not have such a distinction. So an unknown of unexpected libraries (like json) would break. And large parts of Python functionality wouldn't be available. On 15 October 2010 13:04, Kiriakos Vlahos??wrote: > > Kiriakos Vlahos added the comment: > > I would like to say that these are two separate issues. ?One is about the precision flag and the second about the exception masking flags of the FPU control words. Both issues affect a wider number of users than Python embedders using Delphi. For example C# uses 80 bit precision if I understand?http://blogs.msdn.com/b/davidnotario/archive/2005/08/08/449092.aspx?well. Technically they are, yes. But they are both affected by any solution that would incorporate preserving or documenting the FPU control word for embedding applications. May be I should have opened a new issue. ---------- nosy: +malkarouri _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:23:24 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Oct 2010 13:23:24 +0000 Subject: [issue10115] accept4 can fail with errno 90 In-Reply-To: <1287149004.76.0.643231504051.issue10115@psf.upfronthosting.co.za> Message-ID: <1287149004.76.0.643231504051.issue10115@psf.upfronthosting.co.za> New submission from Antoine Pitrou : When a machine has a newer glibc and an old kernel, accept4 can fail and then Python accept() is unusable. For example: Traceback (most recent call last): File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/threading.py", line 525, in _bootstrap_inner self.run() File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/test/test_asynchat.py", line 37, in run conn, client = self.sock.accept() File "/home/pybot/buildarea-sid/3.x.klose-debian-sparc/build/Lib/socket.py", line 132, in accept fd, addr = self._accept() socket.error: [Errno 90] Function not implemented (from http://www.python.org/dev/buildbot/builders/sparc%20Debian%203.x/builds/147/steps/test/logs/stdio ) Improving our configure check wouldn't do a lot of good, since people can reuse Python binaries with different kernels. Perhaps we have to use some kind of runtime fallback. (Strangely, errno 90 is EMSGSIZE here, and ENOSYS is 38) ---------- components: Extension Modules messages: 118767 nosy: doko, lekma, nvetoshkin, pitrou priority: critical severity: normal stage: needs patch status: open title: accept4 can fail with errno 90 type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:29:45 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Oct 2010 13:29:45 +0000 Subject: [issue10115] accept4 can fail with errno 90 In-Reply-To: <1287149004.76.0.643231504051.issue10115@psf.upfronthosting.co.za> Message-ID: <1287149385.1.0.988808172419.issue10115@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Or perhaps we should back out the accept4 change and live with the fact that SOCK_CLOEXEC and SOCK_NONBLOCK can't be inherited by calling accept(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:30:50 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Fri, 15 Oct 2010 13:30:50 +0000 Subject: [issue10115] accept4 can fail with errno 90 In-Reply-To: <1287149004.76.0.643231504051.issue10115@psf.upfronthosting.co.za> Message-ID: <1287149450.83.0.292805054985.issue10115@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: Falling back on result 90 is not that difficult, I think I can submit a patch today. What should be checked ENOSYS or 90? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:33:57 2010 From: report at bugs.python.org (Kevin Walzer) Date: Fri, 15 Oct 2010 13:33:57 +0000 Subject: [issue10107] Quitting IDLE on Mac doesn't save unsaved code In-Reply-To: <1287076967.07.0.270311596559.issue10107@psf.upfronthosting.co.za> Message-ID: <1287149637.03.0.983029816576.issue10107@psf.upfronthosting.co.za> Kevin Walzer added the comment: Try something like this: root.createcommand('::tk::mac::Quit', ) This will map whatever function IDLE calls to prompt the user to save data before closing, to the Apple quit event. ---------- nosy: +wordtech _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:39:32 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Oct 2010 13:39:32 +0000 Subject: [issue10115] accept4 can fail with errno 90 In-Reply-To: <1287149450.83.0.292805054985.issue10115@psf.upfronthosting.co.za> Message-ID: <1287149968.3347.7.camel@localhost.localdomain> Antoine Pitrou added the comment: > Falling back on result 90 is not that difficult, I think I can submit > a patch today. What should be checked ENOSYS or 90? That's a rather good question. I will enable some debug printout on the buildbot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:41:07 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Oct 2010 13:41:07 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287150067.06.0.715662342192.issue10114@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:44:42 2010 From: report at bugs.python.org (Stephen Hansen) Date: Fri, 15 Oct 2010 13:44:42 +0000 Subject: [issue10116] Sporadic failures in test_urllibnet In-Reply-To: <1287150282.16.0.127032822399.issue10116@psf.upfronthosting.co.za> Message-ID: <1287150282.16.0.127032822399.issue10116@psf.upfronthosting.co.za> New submission from Stephen Hansen : Ever since running the snow leopard buildslave, I've had sporadic failures in test_urllibnet. At first I thought it was just a net glitch on my machine or something, as immediately re-running the tests made it go away: but this most recent one: http://www.python.org/dev//buildbot/builders/x86%20Snow%20Leopard%203.1/builds/20/steps/test/logs/stdio happened while I was very much monitoring and using the network on the machine for other purposes, and everything was fine in general. So, I went and looked into test_urllibnet to try to figure out why, and I notice that some of the tests use code to retry on IOErrors, and some don't-- and this test that failed in particular is one that doesn't. So: anyone have a better idea of what's going wrong, or is it just that hey, the active network tests are a bit flaky and all should use _open_with_retry instead of just some as is the case now? [If the latter, I can do a patch] FWIW, I've only seen this on the 3.1 and 3.x buildslaves, but have seen it on both of those more then once. But I don't know that its a 3.x specific issue: those builds get run more often then the 2.7 one, so have more chances to run into a sporadic issue. ---------- components: Tests messages: 118772 nosy: ixokai priority: normal severity: normal status: open title: Sporadic failures in test_urllibnet versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:45:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 15 Oct 2010 13:45:40 +0000 Subject: [issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry In-Reply-To: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> Message-ID: <1287150340.96.0.239057506166.issue9291@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:50:59 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 15 Oct 2010 13:50:59 +0000 Subject: [issue9980] str(float) failure In-Reply-To: <1285729892.65.0.25912191442.issue9980@psf.upfronthosting.co.za> Message-ID: <1287150658.99.0.234896634953.issue9980@psf.upfronthosting.co.za> Mark Dickinson added the comment: > For example C# uses 80 bit precision No, I don't think that's true. It uses the x87, with its 64-bit internal precision, but I'm fairly sure that (as is almost always true in a Windows environment, except if you're using Delphi, apparently) the FPU precision is still set to 53-bit precision. > if I understand http://blogs.msdn.com/b/davidnotario/archive/2005/08/08/449092.aspx well. And that article explicitly confirms the use of 53-bit precision: "Precision is set by default in VC++ and CLR apps to ?double precision?, which means that if you are operating with operands of type float, results of operations done with floats actually exist in the x87 stack as if there were of type double. In fact, it?s even weirder than that. They will have the mantissa of a double, but the range (exponent) of an extended double (80 bit)." i.e., it's using the x87 FPU with precision set to 53 bits. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:51:27 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Oct 2010 13:51:27 +0000 Subject: [issue10116] Sporadic failures in test_urllibnet In-Reply-To: <1287150282.16.0.127032822399.issue10116@psf.upfronthosting.co.za> Message-ID: <1287150687.04.0.232728521756.issue10116@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Rather than the hand-made _open_with_retry, I think it would be better to use support.transient_internet() (it's already used in other tests). Retrying is not very helpful if the other end is down. Also, EBADF (bad file descriptor) looks like a bug. httplib should not use closed/non-existent file descriptors. ---------- nosy: +orsenthil, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:52:35 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Oct 2010 13:52:35 +0000 Subject: [issue10115] accept4 can fail with errno 90 In-Reply-To: <1287149004.76.0.643231504051.issue10115@psf.upfronthosting.co.za> Message-ID: <1287150755.41.0.244838028905.issue10115@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, 90 is ENOSYS on that buildbot :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 15:53:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 15 Oct 2010 13:53:12 +0000 Subject: [issue10108] ExpatError not property wrapped In-Reply-To: <1287093270.3.0.510777453712.issue10108@psf.upfronthosting.co.za> Message-ID: <1287150792.23.0.0973373119122.issue10108@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +docs at python versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 16:00:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 15 Oct 2010 14:00:05 +0000 Subject: [issue10099] socket.fromfd() documentation problem In-Reply-To: <1287045765.45.0.437204596645.issue10099@psf.upfronthosting.co.za> Message-ID: <1287151205.86.0.764132667943.issue10099@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: invalid -> works for me _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 16:04:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 15 Oct 2010 14:04:57 +0000 Subject: [issue10111] Minor problems with PyFileObject documentation (Doc/c-api/file.rst) In-Reply-To: <1287125408.14.0.853619758536.issue10111@psf.upfronthosting.co.za> Message-ID: <1287151497.79.0.553732756059.issue10111@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 16:09:02 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 15 Oct 2010 14:09:02 +0000 Subject: [issue10107] Quitting IDLE on Mac doesn't save unsaved code In-Reply-To: <1287076967.07.0.270311596559.issue10107@psf.upfronthosting.co.za> Message-ID: <1287151742.26.0.848254693156.issue10107@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Kevin, which versions of Tk does this work with? IDLE should at least work with the versions of Tk 8.4 and 8.5 that Apple ships with OSX 10.4, 10.5 and 10.6 (the last one being the only one with built-in support for Tk 8.5) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 16:12:13 2010 From: report at bugs.python.org (Kevin Walzer) Date: Fri, 15 Oct 2010 14:12:13 +0000 Subject: [issue10107] Quitting IDLE on Mac doesn't save unsaved code In-Reply-To: <1287076967.07.0.270311596559.issue10107@psf.upfronthosting.co.za> Message-ID: <1287151933.87.0.078073480794.issue10107@psf.upfronthosting.co.za> Kevin Walzer added the comment: Ronald--I think it works with both 8.4 and 8.5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 16:19:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 15 Oct 2010 14:19:44 +0000 Subject: [issue10109] itertools.product with infinite iterator cause MemoryError. In-Reply-To: <1287103502.64.0.571191585998.issue10109@psf.upfronthosting.co.za> Message-ID: <1287152384.45.0.936605203448.issue10109@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 16:20:46 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 15 Oct 2010 14:20:46 +0000 Subject: [issue10110] Queue doesn't recognize it is full after shrinking maxsize In-Reply-To: <1287105905.32.0.568830983004.issue10110@psf.upfronthosting.co.za> Message-ID: <1287152446.73.0.247241406255.issue10110@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 16:23:05 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 15 Oct 2010 14:23:05 +0000 Subject: [issue10098] intermittent failure in test_os In-Reply-To: <1287045270.71.0.765573711319.issue10098@psf.upfronthosting.co.za> Message-ID: <1287152585.63.0.327094084433.issue10098@psf.upfronthosting.co.za> Brian Curtin added the comment: That works for me locally. Checked in that 0 to 1 change in r85525 - waiting to see if it works on the slower buildbots. ---------- stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 16:26:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 15 Oct 2010 14:26:51 +0000 Subject: [issue10112] Use -Wl, --dynamic-list=x.list, not -Xlinker -export-dynamic In-Reply-To: <1287137785.61.0.962664170792.issue10112@psf.upfronthosting.co.za> Message-ID: <1287152811.77.0.2295492181.issue10112@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 16:46:57 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 14:46:57 +0000 Subject: [issue5355] Expat parser error constants are string descriptions In-Reply-To: <1235432445.32.0.505326147132.issue5355@psf.upfronthosting.co.za> Message-ID: <1287154017.41.0.512650273815.issue5355@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r85526. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 17:15:08 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 15 Oct 2010 15:15:08 +0000 Subject: [issue5355] Expat parser error constants are string descriptions In-Reply-To: <1235432445.32.0.505326147132.issue5355@psf.upfronthosting.co.za> Message-ID: <1287155708.25.0.206523585539.issue5355@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Please, add a tiny unit test for the presence of this feature. This is the only way for vm implementers to follow CPython development. ---------- nosy: +amaury.forgeotdarc stage: -> unit test needed status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 17:23:06 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Fri, 15 Oct 2010 15:23:06 +0000 Subject: [issue10115] accept4 can fail with errno 90 In-Reply-To: <1287149004.76.0.643231504051.issue10115@psf.upfronthosting.co.za> Message-ID: <1287156186.98.0.266059993304.issue10115@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: What about exposing accept4() to python level? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 17:25:45 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 15:25:45 +0000 Subject: [issue5355] Expat parser error constants are string descriptions In-Reply-To: <1235432445.32.0.505326147132.issue5355@psf.upfronthosting.co.za> Message-ID: <1287156345.61.0.0666671901589.issue5355@psf.upfronthosting.co.za> Georg Brandl added the comment: You're completely correct, added one in r85528. Thanks! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 17:26:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 15:26:25 +0000 Subject: [issue8340] bytearray undocumented on trunk In-Reply-To: <1270682579.64.0.491172746908.issue8340@psf.upfronthosting.co.za> Message-ID: <1287156385.76.0.169967538025.issue8340@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: docs at python -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 17:31:17 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 15:31:17 +0000 Subject: [issue8267] Tutorial section on dictionary keys recommends sort instead of sorted In-Reply-To: <1269976733.25.0.679757604507.issue8267@psf.upfronthosting.co.za> Message-ID: <1287156677.49.0.662325772558.issue8267@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r85529. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 17:34:17 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Oct 2010 15:34:17 +0000 Subject: [issue10115] accept4 can fail with errno 90 In-Reply-To: <1287149004.76.0.643231504051.issue10115@psf.upfronthosting.co.za> Message-ID: <1287156857.53.0.171830407591.issue10115@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > What about exposing accept4() to python level? That's another possibility, in which case we would first remove the current accept4-calling code in order to fix the buildbot failure. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 17:41:01 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 15 Oct 2010 15:41:01 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1287157261.95.0.161905903937.issue9308@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching an updated patch, issue9308b.diff. Compared to the "a" patch, I added test/encoded_modules to the makefile so that it gets installed and removed cookies from some more test and Tools files. ---------- Added file: http://bugs.python.org/file19244/issue9308b.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 17:49:57 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 15 Oct 2010 15:49:57 +0000 Subject: [issue10110] Queue doesn't recognize it is full after shrinking maxsize In-Reply-To: <1287105905.32.0.568830983004.issue10110@psf.upfronthosting.co.za> Message-ID: <1287157797.3.0.735228637196.issue10110@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 17:58:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 15:58:02 +0000 Subject: [issue2830] Copy cgi.escape() to html In-Reply-To: <1210563693.47.0.635782576194.issue2830@psf.upfronthosting.co.za> Message-ID: <1287158282.19.0.601563043376.issue2830@psf.upfronthosting.co.za> Georg Brandl added the comment: Refined and applied the patch in r85531. Thanks all! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:02:52 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Fri, 15 Oct 2010 16:02:52 +0000 Subject: [issue10115] accept4 can fail with errno 90 In-Reply-To: <1287149004.76.0.643231504051.issue10115@psf.upfronthosting.co.za> Message-ID: <1287158572.75.0.802130262576.issue10115@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: Weekend is coming, so I can lend a hand in implementing whatever you choose. Summary: * remove accept4() as default and expose it as separate method * add runtime fallback if accept4() returns ENOSYS ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:03:22 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 16:03:22 +0000 Subject: [issue7771] dict view comparison methods are not documented In-Reply-To: <1264353566.74.0.804981752433.issue7771@psf.upfronthosting.co.za> Message-ID: <1287158602.67.0.341778664555.issue7771@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r85532. Thanks! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:04:21 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 16:04:21 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287158661.52.0.538683053291.issue9778@psf.upfronthosting.co.za> Georg Brandl added the comment: Ping? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:07:38 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Oct 2010 16:07:38 +0000 Subject: [issue10115] accept4 can fail with errno 90 In-Reply-To: <1287149004.76.0.643231504051.issue10115@psf.upfronthosting.co.za> Message-ID: <1287158858.71.0.63838345454.issue10115@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:07:53 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 16:07:53 +0000 Subject: [issue9683] Dead code in py3k inspect module In-Reply-To: <1282763623.07.0.68649497821.issue9683@psf.upfronthosting.co.za> Message-ID: <1287158872.99.0.0897544316431.issue9683@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed both in r85533. Thanks! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:08:39 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Fri, 15 Oct 2010 16:08:39 +0000 Subject: [issue9344] please add posix.getgrouplist() In-Reply-To: <1279890657.77.0.804697326433.issue9344@psf.upfronthosting.co.za> Message-ID: <1287158919.66.0.732026978978.issue9344@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: Did a bit of digging and found that getgrouplist signature differs on (at least) Linux and Mac OS: - http://www.kernel.org/doc/man-pages/online/pages/man3/getgrouplist.3.html -http://developer.apple.com/library/mac/#documentation/Darwin/Reference/ManPages/man3/getgrouplist.3.html ---------- nosy: +nvetoshkin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:09:01 2010 From: report at bugs.python.org (Tal Einat) Date: Fri, 15 Oct 2010 16:09:01 +0000 Subject: [issue10107] Quitting IDLE on Mac doesn't save unsaved code In-Reply-To: <1287076967.07.0.270311596559.issue10107@psf.upfronthosting.co.za> Message-ID: <1287158941.38.0.582920730005.issue10107@psf.upfronthosting.co.za> Tal Einat added the comment: Note that some discussion about this issue is taking place on the idle-dev mailing list. Bruce Sherwood found the line "root.bind('<>', flist.close_all_callback)", which seems to be an unsuccessful attempt to achieve the wanted behavior. Kevin Walzer mentioned that a grep on the idlelib code doesn't turn up any references to "tk::mac::Quit". I don't have access to OSX for testing. Could someone please replace the root.bind call with what Kevin suggested, and see if it solves the problem? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:13:07 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 16:13:07 +0000 Subject: [issue1699594] shlex fails to parse strings correctly Message-ID: <1287159187.08.0.0381006783299.issue1699594@psf.upfronthosting.co.za> Georg Brandl added the comment: That particular commit can't be the reason, but some other must be. Closing as wfm. ---------- dependencies: -shlex.split() does not tokenize like the shell resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:20:29 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 16:20:29 +0000 Subject: [issue9801] Can not use append/extend to lists in a multiprocessing manager dict In-Reply-To: <1283973802.38.0.869176624785.issue9801@psf.upfronthosting.co.za> Message-ID: <1287159629.82.0.692510126725.issue9801@psf.upfronthosting.co.za> Georg Brandl added the comment: For now, documented the current behavior in r85534. If a different solution is desired, a new issue can be opened. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:26:40 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 16:26:40 +0000 Subject: [issue9054] pyexpat configured with "--with-system-expat" is incompatible with expat 2.0.1 In-Reply-To: <1277158370.27.0.787157062055.issue9054@psf.upfronthosting.co.za> Message-ID: <1287160000.16.0.773663303865.issue9054@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r85536, will backport to other branches as well. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:29:30 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 15 Oct 2010 16:29:30 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1287160170.08.0.522515900337.issue9308@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r85537. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:36:07 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 16:36:07 +0000 Subject: [issue7303] pkgutil lacks documentation for useful functions In-Reply-To: <1257891153.41.0.767469344024.issue7303@psf.upfronthosting.co.za> Message-ID: <1287160567.48.0.515998454764.issue7303@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed markup a bit and committed in r85538. Thanks! ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:42:48 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 16:42:48 +0000 Subject: [issue6798] Argument for sys.settrace() callbacks documented incorrectly In-Reply-To: <1251503525.6.0.896923124912.issue6798@psf.upfronthosting.co.za> Message-ID: <1287160968.6.0.943971017958.issue6798@psf.upfronthosting.co.za> Georg Brandl added the comment: Should be fixed in r85540. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:44:19 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 16:44:19 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1287161059.27.0.986953382811.issue8954@psf.upfronthosting.co.za> Georg Brandl added the comment: Raising priority. ---------- priority: normal -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:53:26 2010 From: report at bugs.python.org (Ned Deily) Date: Fri, 15 Oct 2010 16:53:26 +0000 Subject: [issue10107] Quitting IDLE on Mac doesn't save unsaved code In-Reply-To: <1287076967.07.0.270311596559.issue10107@psf.upfronthosting.co.za> Message-ID: <1287161606.58.0.217261631121.issue10107@psf.upfronthosting.co.za> Ned Deily added the comment: It looks like the '::tk::mac::Quit' callback does not exist in the Apple-supplied Tk 8.4.7 in OS X 10.5 and 10.4, although it does work with the Apple-supplied Tk 8.4.19(?) and 8.5 in 10.6 and with a current ActiveState 8.4.19 on 10.4 through 10.6. However, instead of that, it looks like overriding the 'exit' callback will work fine on all of them. In a simple test, I'm able to intercept the Tk app quitting, post a yes/no message, and then terminate the Tk app by destroying the root. Next I'll try integrating into IDLE. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:53:39 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 16:53:39 +0000 Subject: [issue4968] Clarify inspect.is method docs In-Reply-To: <1232162769.03.0.624026715862.issue4968@psf.upfronthosting.co.za> Message-ID: <1287161619.83.0.806775659691.issue4968@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed suggestions with a few changes in r85541. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:54:26 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 16:54:26 +0000 Subject: [issue5729] Allows tabs for indenting JSON output In-Reply-To: <1239297330.19.0.24635332127.issue5729@psf.upfronthosting.co.za> Message-ID: <1287161666.74.0.0372061037282.issue5729@psf.upfronthosting.co.za> Georg Brandl added the comment: Bob, any chance you get to that merge before 3.2b1? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:54:42 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 15 Oct 2010 16:54:42 +0000 Subject: [issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings In-Reply-To: <1287161682.26.0.892900314694.issue10117@psf.upfronthosting.co.za> Message-ID: <1287161682.26.0.892900314694.issue10117@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Tools/scripts/reindent.py -d Lib/test/encoded_modules/module_koi8_r.py Traceback (most recent call last): File "Tools/scripts/reindent.py", line 310, in main() File "Tools/scripts/reindent.py", line 93, in main check(arg) File "Tools/scripts/reindent.py", line 114, in check r = Reindenter(f) File "Tools/scripts/reindent.py", line 162, in __init__ self.raw = f.readlines() File "Lib/codecs.py", line 300, in decode (result, consumed) = self._buffer_decode(data, self.errors, final) UnicodeDecodeError: 'utf8' codec can't decode byte 0xf0 in position 59: invalid continuation byte Attached patch fixes this issue. ---------- components: Demos and Tools files: reindent.diff keywords: needs review, patch messages: 118804 nosy: belopolsky priority: normal severity: normal status: open title: Tools/scripts/reindent.py fails on non-UTF-8 encodings type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19245/reindent.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 18:56:41 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 15 Oct 2010 16:56:41 +0000 Subject: [issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings In-Reply-To: <1287161682.26.0.892900314694.issue10117@psf.upfronthosting.co.za> Message-ID: <1287161801.68.0.0793739059546.issue10117@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +christian.heimes, flox, tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 19:01:21 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 17:01:21 +0000 Subject: [issue7790] struct_time documentation entry should point to the table defining the tuple In-Reply-To: <1264538314.16.0.129243655657.issue7790@psf.upfronthosting.co.za> Message-ID: <1287162081.66.0.676243575715.issue7790@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, moved the table down in r85542. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 19:04:57 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 17:04:57 +0000 Subject: [issue4785] json.JSONDecoder() strict argument undocumented and potentially confusing In-Reply-To: <1230658934.34.0.991784557371.issue4785@psf.upfronthosting.co.za> Message-ID: <1287162297.95.0.831312868432.issue4785@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, applied in r85543 and r85544. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 19:20:22 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 17:20:22 +0000 Subject: [issue7450] document that os.chmod accepts an octal digit mode In-Reply-To: <1260201260.24.0.734078851389.issue7450@psf.upfronthosting.co.za> Message-ID: <1287163222.49.0.165887148935.issue7450@psf.upfronthosting.co.za> Georg Brandl added the comment: We now have the S_IXXX constants documented explicitly, so I don't think this change is needed. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 19:30:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 15 Oct 2010 17:30:57 +0000 Subject: [issue5150] IDLE to support reindent.py In-Reply-To: <1233736664.4.0.115705275626.issue5150@psf.upfronthosting.co.za> Message-ID: <1287163857.89.0.0269295752629.issue5150@psf.upfronthosting.co.za> ?ric Araujo added the comment: reindent.py is very much a script: It lacks a nice, full programmatic API, I mean standalone functions to check a file object or a filename and functions implementing the command-line interface. As it is now, you see for example print calls in the middle of functions, so it?s not usable as a module. Maybe bring this to python-dev or -ideas? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 19:39:56 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 15 Oct 2010 17:39:56 +0000 Subject: [issue5150] IDLE to support reindent.py In-Reply-To: <1233736664.4.0.115705275626.issue5150@psf.upfronthosting.co.za> Message-ID: <1287164396.6.0.963004498995.issue5150@psf.upfronthosting.co.za> Raymond Hettinger added the comment: There's no need to go to python-dev or python-ideas with this one. If someone wants to figure-out a way to add reindent functionality to IDLE, patches are welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 19:45:27 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 15 Oct 2010 17:45:27 +0000 Subject: [issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings In-Reply-To: <1287161682.26.0.892900314694.issue10117@psf.upfronthosting.co.za> Message-ID: <1287164727.66.0.541073526331.issue10117@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 19:53:14 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 17:53:14 +0000 Subject: [issue10111] Minor problems with PyFileObject documentation (Doc/c-api/file.rst) In-Reply-To: <1287125408.14.0.853619758536.issue10111@psf.upfronthosting.co.za> Message-ID: <1287165194.86.0.0350283020424.issue10111@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r85545. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 19:53:46 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 17:53:46 +0000 Subject: [issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings In-Reply-To: <1287161682.26.0.892900314694.issue10117@psf.upfronthosting.co.za> Message-ID: <1287165226.05.0.0893994195812.issue10117@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 19:54:36 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 17:54:36 +0000 Subject: [issue4086] support %z format in time.strftime and _strptime? In-Reply-To: <1223551646.15.0.164355592546.issue4086@psf.upfronthosting.co.za> Message-ID: <1287165276.7.0.231178927664.issue4086@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 19:59:05 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 17:59:05 +0000 Subject: [issue5762] AttributeError: 'NoneType' object has no attribute 'replace' In-Reply-To: <1239798874.6.0.325655580097.issue5762@psf.upfronthosting.co.za> Message-ID: <1287165545.92.0.0855349554261.issue5762@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the test case, committed the fix and the new test in r85546. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 19:59:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 15 Oct 2010 17:59:09 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1287165549.0.0.94218186327.issue9317@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I have verified that the original issue is still present. I will try to narrow it down to a smaller test case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 20:02:41 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 18:02:41 +0000 Subject: [issue6098] xml.dom.minidom incorrectly claims DOM Level 3 conformance In-Reply-To: <1243197780.58.0.272636351535.issue6098@psf.upfronthosting.co.za> Message-ID: <1287165761.34.0.052267037241.issue6098@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r85547. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 20:03:44 2010 From: report at bugs.python.org (David Watson) Date: Fri, 15 Oct 2010 18:03:44 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1287076504.72.0.973773564959.issue9377@psf.upfronthosting.co.za> Message-ID: <20101015180336.GA3180@dbwatson.ukfsn.org> David Watson added the comment: > As a further note: I think socket.gethostname() is a special case, since this is just about a local setting (i.e. not related to DNS). But the hostname *is* commonly intended to be looked up in the DNS or whatever name resolution mechanisms are used locally - socket.getfqdn(), for instance, works by looking up the result using gethostbyaddr() (actually the C function getaddrinfo(), followed by gethostbyaddr()). So I don't see the rationale for treating it differently from the results of gethostbyaddr(), getnameinfo(), etc. POSIX says of the name lookup functions that "in many cases" they are implemented by the Domain Name System, not that they always are, so a name intended for lookup need not be ASCII-only either. > We should then assume that it is encoded in the locale encoding (in particular, that it is encoded in mbcs on Windows). I can see the point of returning the characters that were intended, but code that looked up the returned name would then have to be changed to re-encode it to bytes to avoid the round-tripping issue when non-ASCII characters are returned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 20:28:36 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 15 Oct 2010 18:28:36 +0000 Subject: [issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6 In-Reply-To: <1281222795.64.0.211558756173.issue9539@psf.upfronthosting.co.za> Message-ID: <1287167316.24.0.452944983993.issue9539@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'm afraid this can't be fixed in 2.6. ---------- versions: -3rd party, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 20:32:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 15 Oct 2010 18:32:18 +0000 Subject: [issue9317] Incorrect coverage file from trace test_pickle.py In-Reply-To: <1279677265.36.0.322549269298.issue9317@psf.upfronthosting.co.za> Message-ID: <1287167538.68.0.75102110303.issue9317@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I have found the cause of at least part of the issue. Apparently, module level statements for some of the modules such as pickle do not show up in trace because they are imported by trace itself. In other words, by the time traced script gets executed, pickle is already in sys.module and the code therein does not run. Maybe we should consider clearing sys.modules in Trace.run, but this can cause problems if not done carefully. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 20:40:43 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 15 Oct 2010 18:40:43 +0000 Subject: [issue7140] imp.new_module does not function correctly if the module is returned from a function and used directly In-Reply-To: <1255605892.23.0.543488610886.issue7140@psf.upfronthosting.co.za> Message-ID: <1287168043.3.0.152388895744.issue7140@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Since that revision only touched py3k, I am guessing that it only broke 3.2. ---------- nosy: +terry.reedy versions: +Python 3.2 -Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 20:58:42 2010 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 15 Oct 2010 18:58:42 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287169122.65.0.857197892617.issue9778@psf.upfronthosting.co.za> Skip Montanaro added the comment: Not that anybody needs my input on this, but... Given the range of people advocating for this change, this looks to me like it should be a release blocker for 3.2. Raymond's comment about performance seems especially important, and since the world seems to be moving toward 64-bit operating systems (certainly should happen in a big way during the lifetime of Python 3) it seems worthwhile to hold up further 3.2 releases until this is solved. ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 21:01:28 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 15 Oct 2010 19:01:28 +0000 Subject: [issue10058] Unclear PyString_AsStringAndSize return value In-Reply-To: <1286667477.81.0.428824967814.issue10058@psf.upfronthosting.co.za> Message-ID: <1287169288.28.0.247584361258.issue10058@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I am not much familiar with the C api but I presume that all functions return -1 on error and that this is documented somewhere in the beginning. I also presume that functions that return values thru passed in pointers and that are documented as returning an integer type return 0 on success. And ditto on some general note somewhere. I do not think that such should be repeated for each function. So without further justification, I would be inclined to close this. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 21:07:47 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 15 Oct 2010 19:07:47 +0000 Subject: [issue10060] python.exe crashes or hangs on help() modules when bad modules found In-Reply-To: <1286676227.2.0.62342583611.issue10060@psf.upfronthosting.co.za> Message-ID: <1287169667.29.0.306804246668.issue10060@psf.upfronthosting.co.za> Changes by Terry J. Reedy : Removed file: http://bugs.python.org/file19192/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 21:08:30 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 15 Oct 2010 19:08:30 +0000 Subject: [issue10060] python.exe crashes or hangs on help() modules when bad modules found In-Reply-To: <1286676227.2.0.62342583611.issue10060@psf.upfronthosting.co.za> Message-ID: <1287169710.86.0.237035353345.issue10060@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The unnamed quasi-html file loaded with msg118397 was a unless, essentially unreadable duplicate of that message, hence removed. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 21:12:28 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Oct 2010 19:12:28 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1287169122.65.0.857197892617.issue9778@psf.upfronthosting.co.za> Message-ID: <1287169943.3422.7.camel@localhost.localdomain> Antoine Pitrou added the comment: > Given the range of people advocating for this change, this looks to me > like it should be a release blocker for 3.2. Raymond's comment about > performance seems especially important, and since the world seems to > be moving toward 64-bit operating systems (certainly should happen in > a big way during the lifetime of Python 3) it seems worthwhile to hold > up further 3.2 releases until this is solved. I think this is a bit exagerated. The performance issues will only appear if you have huge dicts and sets. The issue Raymond raised is the potential impossibility of making the change /after/ we settle on a stable ABI. The question is whether the ABI will be enforced starting from 3.2, or from a later date. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 21:21:55 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 19:21:55 +0000 Subject: [issue10058] Unclear PyString_AsStringAndSize return value In-Reply-To: <1286667477.81.0.428824967814.issue10058@psf.upfronthosting.co.za> Message-ID: <1287170515.2.0.22900522496.issue10058@psf.upfronthosting.co.za> Georg Brandl added the comment: Same here. There is only ever one return value on error unless documented otherwise, since the type of error is already contained in the exception that is set on return. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 21:37:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 19:37:25 +0000 Subject: [issue10064] link to page with documentation bugs In-Reply-To: <1286722559.84.0.874686130461.issue10064@psf.upfronthosting.co.za> Message-ID: <1287171445.13.0.538274447198.issue10064@psf.upfronthosting.co.za> Georg Brandl added the comment: The reference you're referring to is in the section about bugs in Python: """ Bug reports for Python itself should be submitted via the Python Bug Tracker (http://bugs.python.org/). """ and it is placed below the section dealing with documentation bugs. As such, this request is a "works for me". ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 21:46:34 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 19:46:34 +0000 Subject: [issue10072] ftplib documentation is unclear In-Reply-To: <1286890330.18.0.528330532597.issue10072@psf.upfronthosting.co.za> Message-ID: <1287171994.29.0.751778799201.issue10072@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed after review in r85548. Thanks! ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 21:52:15 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 19:52:15 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287172335.76.0.588072264789.issue10073@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't see the point. If you file one such bug per day, you won't be finished in a year -- there's no reason to start adding typechecking in this function. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 21:54:12 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 15 Oct 2010 19:54:12 +0000 Subject: [issue10098] intermittent failure in test_os In-Reply-To: <1287045270.71.0.765573711319.issue10098@psf.upfronthosting.co.za> Message-ID: <1287172452.28.0.866160945077.issue10098@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 22:29:52 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 15 Oct 2010 20:29:52 +0000 Subject: [issue10110] Queue doesn't recognize it is full after shrinking maxsize In-Reply-To: <1287105905.32.0.568830983004.issue10110@psf.upfronthosting.co.za> Message-ID: <1287174592.7.0.793134004812.issue10110@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I should point out that in Python 2.5, it was possible for a subclass to override the _full method to account for this situation, but with Python 2.6 and later, the calculation in _full was hand-inlined... so it's not readily possible for a subclass to correct for this behavior. It might be desirable to refactor that calculation into a _full method, though I suspect this would have performance implications, which is why I stuck with just adjusting the comparison in its various uses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 22:45:34 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 15 Oct 2010 20:45:34 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287175534.05.0.683235795744.issue10073@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To me, Alexander's example >>> calendar.isleap("%d") False is a buggy result. So I would reclassify the issue. The rationale for not checking input types is that bad types result in an error, but that does not happen here due to a design decision that some consider clever and some buggy, and some both. (Guido himself would like to deprecate it.) I am in favor of the 'year & 3 == 0' fix so that any input string (and indeed, anything that does not implement both % and & operators) raises an error. Intermediate to expert programmers should know or learn about bit masking. Add a comment to explain the reason -- and a test case. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 22:51:17 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 15 Oct 2010 20:51:17 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287175877.62.0.0641198447943.issue10073@psf.upfronthosting.co.za> Georg Brandl added the comment: > To me, Alexander's example > >>> calendar.isleap("%d") > False > is a buggy result. So I would reclassify the issue. You'll always find plenty "wrong" inputs for which a function doesn't raise an exception. That's the downside of duck typing. > The rationale for not checking input types is that bad types result > in an error, but that does not happen here due to a design decision > that some consider clever and some buggy, and some both. (Guido > himself would like to deprecate it.) You're talking of % string formatting? Well, that's just one operation where duck typing applies. There may be a bit less chance of namespace collisions when calling methods, but it's the same issue at heart. > I am in favor of the 'year & 3 == 0' fix so that any input string > (and indeed, anything that does not implement both % and & operators) > raises an error. Intermediate to expert programmers should know or > learn about bit masking. Add a comment to explain the reason -- and > a test case. I agree that ``year & 3 == 0`` in this place is okay, and if it helps avoid confusion, all the better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 23:18:45 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 15 Oct 2010 21:18:45 +0000 Subject: [issue10109] itertools.product with infinite iterator cause MemoryError. In-Reply-To: <1287103502.64.0.571191585998.issue10109@psf.upfronthosting.co.za> Message-ID: <1287177525.4.0.175854710696.issue10109@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The input to itertools.product must be a finite sequence of finite iterables. itertools.count(startvalue) produces an infinite sequence of ints (which are not iterable). Passing the latter to the former causes the latter to run until memory is exhausted. You should get the same result with tuple(itertools.count()), which is what happens within itertools.product. Your generator example does not show the same problem because it is not nested and never runs. If you are unfamiliar with Python and its stdlib, please ask questions on python-list (mirror on comp.lang.python and gmane.comp.python.general) before reporting what you think might be an error. ---------- nosy: +terry.reedy resolution: -> invalid status: open -> closed versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 23:21:22 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 15 Oct 2010 21:21:22 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1287177682.97.0.34493879243.issue9807@psf.upfronthosting.co.za> Dave Malcolm added the comment: Summarizing IRC discussion: Tested on Fedora 13 x86_64 with: --enable-shared --with-wide-unicode and with confdir != srcdir with: ../configure --enable-shared --with-wide-unicode --with-pydebug Mostly working but, test_distutils fails: test_get_outputs (distutils.tests.test_build_ext.BuildExtTestCase) ... /usr/bin/ld: cannot find -lpython3.2 collect2: ld returned 1 exit status Each build makes a "libpython3.2.a" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 23:50:14 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 15 Oct 2010 21:50:14 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287179414.3.0.16191843819.issue10114@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think the title is slightly misleading. As I read the patch, the issue is that PyArg_ParseTupleAndKeywords requires that string args to C functions be valid Unicode strings (and that it does this by trying to encode to utf-8). Your patch subverts this by redefining filename to be a generic object, with a looser custom-coded test. It is not clear to me that filename, out of all string args to builtins, should be excepted this way. It seems to me that any real filename should be real unicode and there is no need for fake names that are not. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 15 23:50:54 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 15 Oct 2010 21:50:54 +0000 Subject: [issue10110] Queue doesn't recognize it is full after shrinking maxsize In-Reply-To: <1287105905.32.0.568830983004.issue10110@psf.upfronthosting.co.za> Message-ID: <1287179454.74.0.207466416135.issue10110@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I've briefly looked at the patch and it seems reasonable. Will look it in more detail by 3.2 goes out. I'm curious about your use case for wanting to change the maxsize of an existing Queue that is already in use. That seems like a odd design. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 00:00:36 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 15 Oct 2010 22:00:36 +0000 Subject: [issue10110] Queue doesn't recognize it is full after shrinking maxsize In-Reply-To: <1287179454.74.0.207466416135.issue10110@psf.upfronthosting.co.za> Message-ID: <12C7AB425F0DD546B6049311F827C74E097C38683A@VA3DIAXVS141.RED001.local> Jason R. Coombs added the comment: I'm not sure what our use case is. I discovered this when I was looking at our project's util library, and we have a Queue subclass that overrides _full to handle the scenario where the queue shrinks. I'm guessing it's being used to dynamically adjust the queue size for performance reasons. Consider where you have a queue of items, but depending on the run time environment, that queue might need to be more or less limiting. Maybe the queue is larger during the day when requests are heavier and shrinks at night (so it's not accepting more items than it can handle when day breaks). Surely that's a contrived example, and I suspect our actual usage is more concrete. I'll see if I can learn where we're using that functionality. If shrinking maxsize is not allowed, that should be enforced in the interface (such as with a read-only/increase-only property) and documented. If you would rather proceed that way, I'll draft the patch for that instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 00:04:56 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Oct 2010 22:04:56 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287180296.5.0.930149495777.issue10114@psf.upfronthosting.co.za> STINNER Victor added the comment: #6543 changed code->co_filename encoding from filesystem encoding+surrogateescape to utf-8+strict. With my patch, compile('', '\udcc3\udca9', 'exec').co_filename gives '?', it doesn't depend on the filesystem encoding. But '?' cannot be used with all filesystem encodings, eg. with ascii locale encoding (C locale), use it raises an error. I now think that it was a bad idea to use utf-8 instead of the fileystem encoding. All filenames should use the filesystem encoding in Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 00:08:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Oct 2010 22:08:58 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287180538.48.0.921057856768.issue10114@psf.upfronthosting.co.za> STINNER Victor added the comment: See also #9713. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 00:26:47 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Oct 2010 22:26:47 +0000 Subject: [issue9713] Py_CompileString fails on non decode-able paths. In-Reply-To: <1283154413.35.0.877915229941.issue9713@psf.upfronthosting.co.za> Message-ID: <1287181607.95.0.520534570993.issue9713@psf.upfronthosting.co.za> STINNER Victor added the comment: See also issue #10114. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 00:30:51 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 15 Oct 2010 22:30:51 +0000 Subject: [issue10110] Queue doesn't recognize it is full after shrinking maxsize In-Reply-To: <1287105905.32.0.568830983004.issue10110@psf.upfronthosting.co.za> Message-ID: <1287181851.8.0.929567582634.issue10110@psf.upfronthosting.co.za> Raymond Hettinger added the comment: That won't be necessary. The change from == to <= is innocuous. There's no need to lock-up maxsize in a read-only property. We're consenting adults. Besides, it would probably break someone-else's odd use case. I don't want to expand the API, nor do I want to cripple anyone's ability to do weird stuff with it. FWIW, the full() and empty() methods are usually not a good idea. It's better to catch a Full exception. Otherwise, the information can be out of date by the time you try to use it. I'm going to mark this as a 3.2 only change. There were no guarantees about the behavior when maxsize is changed, nor should we make such guarantees. ---------- versions: -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 00:43:42 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 15 Oct 2010 22:43:42 +0000 Subject: [issue10110] Queue doesn't recognize it is full after shrinking maxsize In-Reply-To: <1287181851.8.0.929567582634.issue10110@psf.upfronthosting.co.za> Message-ID: <12C7AB425F0DD546B6049311F827C74E097C386880@VA3DIAXVS141.RED001.local> Jason R. Coombs added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 00:51:00 2010 From: report at bugs.python.org (Mads Kiilerich) Date: Fri, 15 Oct 2010 22:51:00 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: <1197387663.32.0.0598513497038.issue1589@psf.upfronthosting.co.za> Message-ID: <1287183060.19.0.285931982484.issue1589@psf.upfronthosting.co.za> Mads Kiilerich added the comment: Can you confirm that the exception raised both on "too early" and "too late" is something like "...SSL3_GET_SERVER_CERTIFICATE:certificate verify failed"? (If so: It would be nice if a slightly more helpful message could be given. I don't know if that is possible.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 00:58:16 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Oct 2010 22:58:16 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287183496.13.0.656008419995.issue10114@psf.upfronthosting.co.za> STINNER Victor added the comment: > All filenames should use the filesystem encoding in Python. Here is a new patch [code_encoding.patch] implementing this idea: - Use filesystem encoding (and surrogateescape) to encode/decode paths in compile() and the parser, instead of utf-8 in strict mode - Ensure that co_filename attribute can be used as a filename (eg. to not raise UnicodeEncodeError on Linux) - compile() builtin supports bytes filenames - _Py_FindSourceFile() (traceback.c) encodes paths of sys.path into the filesystem encoding, as do find_module() (import.c) - PyRun_SimpleFileExFlags() sets __file__ attribute using the filesystem encoding The patch restores the situation before #6543. ---------- Added file: http://bugs.python.org/file19246/code_encoding.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 00:58:42 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 15 Oct 2010 22:58:42 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287183522.61.0.653674968096.issue10114@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Pardon my ignorance, but given that code.co_filename is a string attribute given as a string, which is to say, unicode in 3.x, I do not see what filesystem encodings, or any other encoding to bytes should really have to do with the attribute. I actually would have expected compile to take your example argument 'abc\uDC80' and paste it onto the code object unchanged. The only issue to me is whether any string should be allowed or only legal-unicode strings. Anything else would seem like a 2.x holdover. If PyBytes_AS_STRING (macro version of PyBytes_AsString) is the implementation of str(bytes_object) (as I would guess from the doc), then as I read your patch, it will produce rather strange 'filenames'. >>> str('abc\uDC80'.encode("utf-8", "surrogateescape")) "b'abc\\x80'" always wrapped in b'...'. If not that, what does it do (with no decoding specified)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 01:00:32 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 15 Oct 2010 23:00:32 +0000 Subject: [issue1589] New SSL module doesn't seem to verify hostname against commonName in certificate In-Reply-To: <1287183060.19.0.285931982484.issue1589@psf.upfronthosting.co.za> Message-ID: <1287183627.3422.33.camel@localhost.localdomain> Antoine Pitrou added the comment: Le vendredi 15 octobre 2010 ? 22:51 +0000, Mads Kiilerich a ?crit : > Mads Kiilerich added the comment: > > Can you confirm that the exception raised both on "too early" and "too > late" is something like "...SSL3_GET_SERVER_CERTIFICATE:certificate > verify failed"? Yes. > (If so: It would be nice if a slightly more helpful message could be > given. I don't know if that is possible.) Agreed. I don't know how to do that, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 01:15:43 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 15 Oct 2010 23:15:43 +0000 Subject: [issue9862] PIPE_BUF is invalid on AIX In-Reply-To: <1284568234.82.0.42184878799.issue9862@psf.upfronthosting.co.za> Message-ID: <1287184543.25.0.469647831718.issue9862@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: -> r.david.murray nosy: +r.david.murray stage: -> commit review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 01:17:37 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Oct 2010 23:17:37 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287184657.96.0.471896442106.issue10114@psf.upfronthosting.co.za> STINNER Victor added the comment: > I do not see what filesystem encodings, or any other encoding > to bytes should really have to do with the [code.co_filename]. co_filename attribute is used to display the traceback: Python opens the related file, read the source code line and display it. On Windows, co_filename is directly used because Windows accepts unicode for filenames. But on other OSes, you have to encode the filename to the filesystem encoding. If your filesystem encoding is 'ascii' (eg. C locale) and co_filename is a non-ascii filename (eg. 'test_?.py'), encode co_filename will raise a UnicodeEncodeError. You can test it simply by using os.fsencode(): $ ./python Python 3.2a3+ (py3k:85551:85553M, Oct 16 2010, 00:54:03) >>> import sys; sys.getfilesystemencoding() 'utf-8' >>> import os; os.fsencode('?') b'\xc3\xa9' $ LANG= ./python Python 3.2a3+ (py3k:85551:85553M, Oct 16 2010, 00:54:03) >>> import sys; sys.getfilesystemencoding() 'ascii' >>> import os; os.fsencode('\xe9') ... UnicodeEncodeError: 'ascii' codec can't encode character '\xe9' ... Said differently, co_filename should be encodable to the filesystem encoding (os.fsencode(co_filename) should not raise an error). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 01:18:56 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Oct 2010 23:18:56 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287184736.98.0.460997565558.issue10114@psf.upfronthosting.co.za> STINNER Victor added the comment: Remove [compile_surrogates.patch] because it creates filenames unencode to the filesystem encoding. Eg. compile('', '\udcc3\udca9', 'exec').co_filename gives '?' even if the filesystem encoding is 'ascii'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 01:19:17 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 15 Oct 2010 23:19:17 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287184757.21.0.779291886718.issue10114@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file19243/compile_surrogates.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 01:28:12 2010 From: report at bugs.python.org (Roger Serwy) Date: Fri, 15 Oct 2010 23:28:12 +0000 Subject: [issue5150] IDLE to support reindent.py In-Reply-To: <1233736664.4.0.115705275626.issue5150@psf.upfronthosting.co.za> Message-ID: <1287185292.5.0.843798739128.issue5150@psf.upfronthosting.co.za> Roger Serwy added the comment: I grabbed the core of reindent.py and put it into an extension, unmodified. The original reindent.py will emit Indentation Errors if they exist. ScriptBinding already has nice code to handle these problems by highlighting the error, placing the cursor at the error, and presenting a message box. Rather than duplicate this code, this extension makes calls into ScriptBinding to check for syntax errors when the core reindent code throws exceptions. ---------- Added file: http://bugs.python.org/file19247/ReindentExtension.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 01:56:46 2010 From: report at bugs.python.org (Roger Serwy) Date: Fri, 15 Oct 2010 23:56:46 +0000 Subject: [issue6014] No shell prompt when a graphics window that was started from IDLE is closed In-Reply-To: <1242252085.07.0.824128250707.issue6014@psf.upfronthosting.co.za> Message-ID: <1287187006.9.0.0414694071137.issue6014@psf.upfronthosting.co.za> Roger Serwy added the comment: This issue can be closed. The natural language toolkit uses Tk for its GUI, the same as IDLE. Under Ubuntu 8.10, IDLE is launched from the menu without a subprocess. Running nltk as described without a subprocess causes this problem. Try launching IDLE without "-n". ---------- nosy: +serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 02:49:09 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 16 Oct 2010 00:49:09 +0000 Subject: [issue9862] PIPE_BUF is invalid on AIX In-Reply-To: <1284568234.82.0.42184878799.issue9862@psf.upfronthosting.co.za> Message-ID: <1287190149.82.0.248723177043.issue9862@psf.upfronthosting.co.za> R. David Murray added the comment: Committed to py3k in r85554, 2.7 in r85556. S?bastien, from what you say it sounds like this does not apply to 3.1, so I blocked it there. If this is incorrect let me know and I'll backport it. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 03:30:30 2010 From: report at bugs.python.org (mark saaltink) Date: Sat, 16 Oct 2010 01:30:30 +0000 Subject: [issue10118] Tkinter does not find font In-Reply-To: <1287192630.89.0.924571330725.issue10118@psf.upfronthosting.co.za> Message-ID: <1287192630.89.0.924571330725.issue10118@psf.upfronthosting.co.za> New submission from mark saaltink : Tkinter, since tk 8.5 apparently, does not find all the fonts that tk knows about. I'm using Python 2.6.5 on Linux but have seen this on previous versions. I have added the font with "xset fp+ "". The font is Richard Jones' zed font, available from http://www.cs.kent.ac.uk/people/staff/rej/Zedfont/latest/ xlsfonts shows the font. tk sees the font; in wish if I type "font families" there it is: % font families {fangsong ti} fixed {clearlyu alternate glyphs} charter lucidatypewriter zedfont {latin modern roman} ... In Tkinter I do not see the font: >>> from Tkinter import * >>> r = Tk() >>> import tkFont >>> tkFont.families(r) ... no sign of the zedfont here. Is this expected behaviour? Is there another way to install the font that avoids this problem? ---------- components: Tkinter messages: 118850 nosy: mark.saaltink priority: normal severity: normal status: open title: Tkinter does not find font type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 04:00:17 2010 From: report at bugs.python.org (Nikolaus Rath) Date: Sat, 16 Oct 2010 02:00:17 +0000 Subject: [issue10058] C-API Intro should be more explicit about error return codes In-Reply-To: <1286667477.81.0.428824967814.issue10058@psf.upfronthosting.co.za> Message-ID: <1287194417.21.0.0527383572279.issue10058@psf.upfronthosting.co.za> Nikolaus Rath added the comment: Georg, this is an important piece of information, but I think it is not yet clearly stated in the documentation. Here is what http://docs.python.org/c-api/intro.html says about return codes: "In general, when a function encounters an error, it sets an exception, discards any object references that it owns, and returns an error indicator ? usually NULL or -1. A few functions return a Boolean true/false result, with false indicating an error. Very few functions return no explicit error indicator or have an ambiguous return value, and require explicit testing for errors with PyErr_Occurred()." If this is meant to say that a function returns *only* -1 or NULL in case of an error, *unless documented otherwise* I suggest that the wording be changed to reflect that. Maybe like this: "In general, when a function encounters an error, it sets an exception, discards any object references that it owns, and returns either NULL or -1 (depending on what is compatible with the function's type). If a functions documentation does not say otherwise, the function can be assumed to follow this convention. Nevertheless, a few functions return a Boolean true/false result, with false indicating an error, and very few functions return no explicit error indicator or have an ambiguous return value, and require explicit testing for errors with PyErr_Occurred()." Wouldn't that be a reasonable change? ---------- title: Unclear PyString_AsStringAndSize return value -> C-API Intro should be more explicit about error return codes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 04:04:39 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 16 Oct 2010 02:04:39 +0000 Subject: [issue10119] test_urllibnet failure when using support.transient_internet In-Reply-To: <1287194679.07.0.887400455499.issue10119@psf.upfronthosting.co.za> Message-ID: <1287194679.07.0.887400455499.issue10119@psf.upfronthosting.co.za> New submission from Senthil Kumaran : I am attaching the script which exhibits the problem. wrapping the urllib.request.urlopen, with the support.transient_internet contextmanager exhibits an Unexpected Behavior. Without the context manager, reading the file using the filedescriptor succeeds, but when wrapping it with the context manager, it fails with a TypeError. ---------- files: simple_test.py messages: 118852 nosy: orsenthil priority: normal severity: normal stage: needs patch status: open title: test_urllibnet failure when using support.transient_internet type: behavior Added file: http://bugs.python.org/file19248/simple_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 04:06:33 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 16 Oct 2010 02:06:33 +0000 Subject: [issue10119] test_urllibnet failure when using support.transient_internet In-Reply-To: <1287194679.07.0.887400455499.issue10119@psf.upfronthosting.co.za> Message-ID: <1287194793.26.0.848183933151.issue10119@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 05:46:08 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 16 Oct 2010 03:46:08 +0000 Subject: [issue9997] function named 'top' gets unexpected namespace/scope behaviour In-Reply-To: <1285849061.79.0.383989167237.issue9997@psf.upfronthosting.co.za> Message-ID: <1287200768.14.0.106058840883.issue9997@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r85562. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 05:52:20 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 16 Oct 2010 03:52:20 +0000 Subject: [issue10116] Sporadic failures in test_urllibnet In-Reply-To: <1287150282.16.0.127032822399.issue10116@psf.upfronthosting.co.za> Message-ID: <1287201140.63.0.653513690029.issue10116@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Issue10119 is related too and both I guess, is boiling down to httplib either not properly using an open socket or closing it prematurely. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 05:58:18 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 16 Oct 2010 03:58:18 +0000 Subject: [issue10107] Quitting IDLE on Mac doesn't save unsaved code In-Reply-To: <1287076967.07.0.270311596559.issue10107@psf.upfronthosting.co.za> Message-ID: <1287201498.41.0.335324332745.issue10107@psf.upfronthosting.co.za> Ned Deily added the comment: Looks like the "exit" callback will work for IDLE but there are the usual edge cases and odd differences among the various branches and build options to work through and fix up. Patch forthcoming. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 06:16:02 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 16 Oct 2010 04:16:02 +0000 Subject: [issue6014] No shell prompt when a graphics window that was started from IDLE is closed In-Reply-To: <1242252085.07.0.824128250707.issue6014@psf.upfronthosting.co.za> Message-ID: <1287202562.06.0.341207371675.issue6014@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: -BreamoreBoy resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 06:40:34 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 16 Oct 2010 04:40:34 +0000 Subject: [issue10058] C-API Intro should be more explicit about error return codes In-Reply-To: <1286667477.81.0.428824967814.issue10058@psf.upfronthosting.co.za> Message-ID: <1287204034.18.0.272092469837.issue10058@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Assuming it is true, the rewrite strikes me as an improvement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 08:35:56 2010 From: report at bugs.python.org (Bob Ippolito) Date: Sat, 16 Oct 2010 06:35:56 +0000 Subject: [issue5729] Allows tabs for indenting JSON output In-Reply-To: <1239297330.19.0.24635332127.issue5729@psf.upfronthosting.co.za> Message-ID: <1287210956.02.0.276700290583.issue5729@psf.upfronthosting.co.za> Bob Ippolito added the comment: Sorry but I don't think I will be able to. I'd be happy to accept patches into simplejson that make it easier to merge with Python 3 in the future, but I simply do not have the time to maintain the Python 3 branch of the code that we don't use. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 09:04:51 2010 From: report at bugs.python.org (Neil Muller) Date: Sat, 16 Oct 2010 07:04:51 +0000 Subject: [issue10120] concurrent.futures module is not installed properly In-Reply-To: <1287212691.14.0.409015662426.issue10120@psf.upfronthosting.co.za> Message-ID: <1287212691.14.0.409015662426.issue10120@psf.upfronthosting.co.za> New submission from Neil Muller : with make install (r85564), lib/python3.2/concurrent is created, but the futures module is not installed there. The attached trivial patch fixes this here. ---------- files: futures-Makefile.diff keywords: patch messages: 118858 nosy: Neil Muller priority: normal severity: normal status: open title: concurrent.futures module is not installed properly Added file: http://bugs.python.org/file19249/futures-Makefile.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 10:29:42 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sat, 16 Oct 2010 08:29:42 +0000 Subject: [issue10119] test_urllibnet failure when using support.transient_internet In-Reply-To: <1287194679.07.0.887400455499.issue10119@psf.upfronthosting.co.za> Message-ID: <1287217782.56.0.486138963058.issue10119@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Actually, this is not related to transient_internet call. Just that file handle not behaving as expected due to some delays. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 11:19:57 2010 From: report at bugs.python.org (Neil Muller) Date: Sat, 16 Oct 2010 09:19:57 +0000 Subject: [issue10120] concurrent.futures module is not installed properly In-Reply-To: <1287212691.14.0.409015662426.issue10120@psf.upfronthosting.co.za> Message-ID: <1287220797.09.0.830033808246.issue10120@psf.upfronthosting.co.za> Neil Muller added the comment: There isn't an entry for anyone in maintainers.rst for concurrent.futures either. That should probably also be fixed. ---------- nosy: +bquinlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 11:34:37 2010 From: report at bugs.python.org (Neil Muller) Date: Sat, 16 Oct 2010 09:34:37 +0000 Subject: [issue1343] XMLGenerator: nice elements In-Reply-To: <1193492035.12.0.0580891111126.issue1343@psf.upfronthosting.co.za> Message-ID: <1287221677.83.0.357649292651.issue1343@psf.upfronthosting.co.za> Neil Muller added the comment: So what still needs to happen to get this in? Patch still applies to current python 3.2 trunk (r85564). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 11:57:18 2010 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 16 Oct 2010 09:57:18 +0000 Subject: [issue10120] concurrent.futures module is not installed properly In-Reply-To: <1287212691.14.0.409015662426.issue10120@psf.upfronthosting.co.za> Message-ID: <1287223038.02.0.695785530056.issue10120@psf.upfronthosting.co.za> Brian Quinlan added the comment: I added myself as the maintainer of concurrent.futures. I'll look at the patch now. ---------- assignee: -> bquinlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 12:29:08 2010 From: report at bugs.python.org (Retro) Date: Sat, 16 Oct 2010 10:29:08 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1287224948.44.0.468790907226.issue2775@psf.upfronthosting.co.za> Retro added the comment: My patch "zipfile-patch.diff" was sent to python-dev. Please act on it as you see fit. Thank you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 12:36:49 2010 From: report at bugs.python.org (Brian Quinlan) Date: Sat, 16 Oct 2010 10:36:49 +0000 Subject: [issue10120] concurrent.futures module is not installed properly In-Reply-To: <1287212691.14.0.409015662426.issue10120@psf.upfronthosting.co.za> Message-ID: <1287225409.32.0.294377415102.issue10120@psf.upfronthosting.co.za> Brian Quinlan added the comment: Patch committed in r85567. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 14:11:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 Oct 2010 12:11:58 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287231118.41.0.139043613499.issue10114@psf.upfronthosting.co.za> STINNER Victor added the comment: > Here is a new patch [code_encoding.patch] implementing this idea: > - Use filesystem encoding (and surrogateescape) to encode/decode > paths in compile() and the parser, instead of utf-8 in strict mode > (...) > The patch restores the situation before #6543. About Python 3.1 compatibility: Python 3.1 doesn't support non-ascii paths with a locale different than utf-8 (see issue #8611), so it doesn't change anything for Python 3.1 (it doesn't work anyway, with utf-8 or filesystem encoding). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 14:22:20 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 Oct 2010 12:22:20 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287231740.82.0.627690313762.issue10114@psf.upfronthosting.co.za> STINNER Victor added the comment: Oh, I just realized that Python 3.1.2 (last Python 3.1 release) was released the 21st March, whereas r82063 (commit for #6543) was made the 17st June. So the encoding change was not released yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 14:39:33 2010 From: report at bugs.python.org (Sandro Tosi) Date: Sat, 16 Oct 2010 12:39:33 +0000 Subject: [issue10121] test_multiprocessing stuck in test_make_pool if run in a loop In-Reply-To: <1287232773.28.0.893033557088.issue10121@psf.upfronthosting.co.za> Message-ID: <1287232773.28.0.893033557088.issue10121@psf.upfronthosting.co.za> New submission from Sandro Tosi : Hello, when trying to see if issue6661 was still valid, I run test_multiprocessing in a tight loop and I got it reproducibly stuck on test_make_pool: ... test_imap_unordered (test.test_multiprocessing.WithManagerTestPool) ... ok test_make_pool (test.test_multiprocessing.WithManagerTestPool) ... when I enter Ctrl+C here's the traceback (on 2.7 HEAD): test_make_pool (test.test_multiprocessing.WithManagerTestPool) ... ^CProcess PoolWorker-5:3: Traceback (most recent call last): File "/home/morph/python-dev/release2.7-maint/Lib/multiprocessing/process.py", line 232, in _bootstrap Process PoolWorker-5:2: Traceback (most recent call last): Process PoolWorker-5:4: File "/home/morph/python-dev/release2.7-maint/Lib/multiprocessing/process.py", line 232, in _bootstrap Traceback (most recent call last): File "/home/morph/python-dev/release2.7-maint/Lib/multiprocessing/process.py", line 232, in _bootstrap Process PoolWorker-5:1: Traceback (most recent call last): File "/home/morph/python-dev/release2.7-maint/Lib/multiprocessing/process.py", line 232, in _bootstrap Process PoolWorker-79: Process PoolWorker-80: Traceback (most recent call last): Traceback (most recent call last): File "/home/morph/python-dev/release2.7-maint/Lib/multiprocessing/process.py", line 232, in _bootstrap File "/home/morph/python-dev/release2.7-maint/Lib/multiprocessing/process.py", line 232, in _bootstrap self.run() self.run() File "/home/morph/python-dev/release2.7-maint/Lib/multiprocessing/process.py", line 88, in run File "/home/morph/python-dev/release2.7-maint/Lib/multiprocessing/process.py", line 88, in run self._target(*self._args, **self._kwargs) self._target(*self._args, **self._kwargs) File "/home/morph/python-dev/release2.7-maint/Lib/multiprocessing/pool.py", line 59, in worker File "/home/morph/python-dev/release2.7-maint/Lib/multiprocessing/pool.py", line 59, in worker task = get() task = get() File "/home/morph/python-dev/release2.7-maint/Lib/multiprocessing/queues.py", line 352, in get File "/home/morph/python-dev/release2.7-maint/Lib/multiprocessing/queues.py", line 350, in get Test suite interrupted by signal SIGINT. 1 test omitted: test_multiprocessing and on py3k: test_make_pool (test.test_multiprocessing.WithProcessesTestPool) ... ^CProcess PoolWorker-5:1: Process PoolWorker-3: Process PoolWorker-5:3: Process PoolWorker-5:4: Process PoolWorker-5:2: Process PoolWorker-4: Process PoolWorker-2: Process PoolWorker-1: Traceback (most recent call last): Traceback (most recent call last): Traceback (most recent call last): Traceback (most recent call last): Traceback (most recent call last): Traceback (most recent call last): File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 233, in _bootstrap File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 233, in _bootstrap File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 233, in _bootstrap File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 233, in _bootstrap File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 233, in _bootstrap File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 233, in _bootstrap Traceback (most recent call last): Traceback (most recent call last): File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 233, in _bootstrap File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 233, in _bootstrap Process PoolWorker-29: Traceback (most recent call last): File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 233, in _bootstrap Test suite interrupted by signal SIGINT. 1 test omitted: self.run() self.run() self.run() File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 88, in run File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 88, in run File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 88, in run self._target(*self._args, **self._kwargs) self._target(*self._args, **self._kwargs) self._target(*self._args, **self._kwargs) File "/home/morph/python-dev/py3k/Lib/multiprocessing/pool.py", line 59, in worker File "/home/morph/python-dev/py3k/Lib/multiprocessing/pool.py", line 59, in worker File "/home/morph/python-dev/py3k/Lib/multiprocessing/pool.py", line 59, in worker self.run() File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 88, in run self._target(*self._args, **self._kwargs) File "/home/morph/python-dev/py3k/Lib/multiprocessing/pool.py", line 59, in worker self.run() File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 88, in run self.run() File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 88, in run self._target(*self._args, **self._kwargs) File "/home/morph/python-dev/py3k/Lib/multiprocessing/pool.py", line 59, in worker self._target(*self._args, **self._kwargs) File "/home/morph/python-dev/py3k/Lib/multiprocessing/pool.py", line 59, in worker self.run() self.run() File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 88, in run File "/home/morph/python-dev/py3k/Lib/multiprocessing/process.py", line 88, in run self._target(*self._args, **self._kwargs) self._target(*self._args, **self._kwargs) File "/home/morph/python-dev/py3k/Lib/multiprocessing/pool.py", line 59, in worker File "/home/morph/python-dev/py3k/Lib/multiprocessing/pool.py", line 59, in worker task = get() File "/home/morph/python-dev/py3k/Lib/multiprocessing/queues.py", line 350, in get task = get() File "/home/morph/python-dev/py3k/Lib/multiprocessing/queues.py", line 350, in get racquire() KeyboardInterrupt racquire() KeyboardInterrupt task = get() File "/home/morph/python-dev/py3k/Lib/multiprocessing/queues.py", line 352, in get task = get() File "/home/morph/python-dev/py3k/Lib/multiprocessing/queues.py", line 350, in get return recv() racquire() KeyboardInterrupt KeyboardInterrupt task = get() File "/home/morph/python-dev/py3k/Lib/multiprocessing/queues.py", line 350, in get racquire() task = get() task = get() KeyboardInterrupt File "/home/morph/python-dev/py3k/Lib/multiprocessing/queues.py", line 350, in get File "/home/morph/python-dev/py3k/Lib/multiprocessing/queues.py", line 350, in get racquire() KeyboardInterrupt racquire() KeyboardInterrupt task = get() File "/home/morph/python-dev/py3k/Lib/multiprocessing/queues.py", line 352, in get return recv() KeyboardInterrupt test_multiprocessing It's reproducible here so I can make any tests you want to verify the problem (I don't know what to look at, sorry); just to give some more info, here's a Debian sid on AMD64. Cheers, Sandro PS: it's my first bug report to python, so please be gentle and forgive any mistakes I could have made :) ---------- components: Tests messages: 118867 nosy: jnoller, sandro.tosi priority: normal severity: normal status: open title: test_multiprocessing stuck in test_make_pool if run in a loop versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 15:51:24 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 Oct 2010 13:51:24 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287237084.87.0.966704688984.issue10114@psf.upfronthosting.co.za> STINNER Victor added the comment: Commited to 3.2 (r85569+r85570). I wait for the buildbot before porting the patch to 3.1 and close the issue. There is already a regression on Gentoo buildbot with ascii locale encoding, test_doctest test_zipimport_support: http://www.python.org/dev/buildbot/all/builders/AMD64%20Gentoo%20Wide%203.x/builds/106 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 16:09:04 2010 From: report at bugs.python.org (Retro) Date: Sat, 16 Oct 2010 14:09:04 +0000 Subject: [issue10122] Documentation typo fix and a side question In-Reply-To: <1287238144.34.0.432770346734.issue10122@psf.upfronthosting.co.za> Message-ID: <1287238144.34.0.432770346734.issue10122@psf.upfronthosting.co.za> New submission from Retro : Please read the first sentence of the docs for the built-in function getattr() here: http://docs.python.org/library/functions.html?highlight=getattr#getattr Fix the word 'attributed' to 'attribute', because the former is a typo. A side question. When you document an object's API in the docstring, you write it like this: getattr(object, name[, default]) -> value Don't you find it nicer if that would look like this: getattr(object, name, [default]) -> value Note the cosmetic fix between the arguments 'name' and 'default'. Do you find my fix acceptable? If yes, please fix docstrings in Python that document the object's API from the '...name[, default]...' format to '...name, [default]...' format. ---------- assignee: docs at python components: Documentation messages: 118869 nosy: Retro, docs at python priority: normal severity: normal status: open title: Documentation typo fix and a side question versions: 3rd party, Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 16:15:54 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 Oct 2010 14:15:54 +0000 Subject: [issue10123] test_doctest failure with ASCII filesystem encoding In-Reply-To: <1287238554.77.0.835644404703.issue10123@psf.upfronthosting.co.za> Message-ID: <1287238554.77.0.835644404703.issue10123@psf.upfronthosting.co.za> New submission from STINNER Victor : In #10114, I changed parser filename encoding from utf-8/strict to the filesystem encoding/surrogateescape. With C locale, the filesystem encoding is ASCII and test_doctest fails because it uses an unencoable filename (foo-b?r at baz.py). A solution is to write a test specific to non-ascii filenames and skip it if the filename is not encodable (try if os.fsencode() raises an UnicodeEncodeError or not), and use only ascii filenames in the other tests. ---------- components: Tests, Unicode messages: 118870 nosy: haypo priority: normal severity: normal status: open title: test_doctest failure with ASCII filesystem encoding versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 16:16:13 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 Oct 2010 14:16:13 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287238573.46.0.359926896469.issue10114@psf.upfronthosting.co.za> STINNER Victor added the comment: I created #10123 for the test_doctest regression. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 16:23:54 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 16 Oct 2010 14:23:54 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1287239034.63.0.413889841773.issue9807@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Interestingly enough, the distutils failure that dmalcolm found was present in the trunk even before my patch. If you build Python with --enable-shared, that distutils test fails because of the default path used for the -L option. I fixed that in my patch, but it was unrelated to the changes I made to expose sys.abiflags. I wonder if we should try to get a buildbot up that uses --enable-shared? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 17:19:26 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 16 Oct 2010 15:19:26 +0000 Subject: [issue10098] intermittent failure in test_os In-Reply-To: <1287045270.71.0.765573711319.issue10098@psf.upfronthosting.co.za> Message-ID: <1287242366.1.0.46330167468.issue10098@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Sorry about this. And thank you for fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 17:31:52 2010 From: report at bugs.python.org (Akira Kitada) Date: Sat, 16 Oct 2010 15:31:52 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> Message-ID: <1287243112.16.0.414931763933.issue5736@psf.upfronthosting.co.za> Changes by Akira Kitada : Removed file: http://bugs.python.org/file13673/issue5736.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 17:32:02 2010 From: report at bugs.python.org (Akira Kitada) Date: Sat, 16 Oct 2010 15:32:02 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> Message-ID: <1287243122.16.0.739034138638.issue5736@psf.upfronthosting.co.za> Changes by Akira Kitada : Removed file: http://bugs.python.org/file13674/issue5736.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 17:32:06 2010 From: report at bugs.python.org (Akira Kitada) Date: Sat, 16 Oct 2010 15:32:06 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> Message-ID: <1287243126.08.0.998441780203.issue5736@psf.upfronthosting.co.za> Changes by Akira Kitada : Removed file: http://bugs.python.org/file13682/test_issue5736.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 17:32:10 2010 From: report at bugs.python.org (Akira Kitada) Date: Sat, 16 Oct 2010 15:32:10 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> Message-ID: <1287243130.16.0.835714599084.issue5736@psf.upfronthosting.co.za> Changes by Akira Kitada : Removed file: http://bugs.python.org/file13676/issue5736.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 17:47:03 2010 From: report at bugs.python.org (Akira Kitada) Date: Sat, 16 Oct 2010 15:47:03 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> Message-ID: <1287244023.3.0.342173560313.issue5736@psf.upfronthosting.co.za> Akira Kitada added the comment: This patch just uses PyObject_GetIter to get an iter. (I just copied the idea from issue9523) ---------- nosy: +ysj.ray versions: +Python 3.2 -Python 2.7 Added file: http://bugs.python.org/file19250/issue5736.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 17:48:48 2010 From: report at bugs.python.org (Paul Bolle) Date: Sat, 16 Oct 2010 15:48:48 +0000 Subject: [issue10124] obvious typo in cporting HOWTO In-Reply-To: <1287244128.31.0.267492647227.issue10124@psf.upfronthosting.co.za> Message-ID: <1287244128.31.0.267492647227.issue10124@psf.upfronthosting.co.za> New submission from Paul Bolle : 0) There's an obvious typo in the cporting HOWTO: [...] It?s also important to remember that PyBytes and PyUnicode in 3.0 are not interchangeable like PyString and PyString are in 2.x. [...] That PyString and PyString are interchangeable is obviously not what the author wanted to tell. 1) I'll attach a patch to change this into what I suppose the author had in mind. (If I knew for sure I wouldn't have read that HOWTO in the first place.) ---------- assignee: docs at python components: Documentation files: python-2.7-Doc-pystring.patch keywords: patch messages: 118875 nosy: docs at python, pebolle priority: normal severity: normal status: open title: obvious typo in cporting HOWTO Added file: http://bugs.python.org/file19251/python-2.7-Doc-pystring.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 18:28:50 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 16 Oct 2010 16:28:50 +0000 Subject: [issue10122] Documentation typo fix and a side question In-Reply-To: <1287238144.34.0.432770346734.issue10122@psf.upfronthosting.co.za> Message-ID: <1287246530.52.0.263551577672.issue10122@psf.upfronthosting.co.za> R. David Murray added the comment: No, that would be incorrect syntax (if you omit the optional argument you should also omit the comma that precedes it). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 18:29:36 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 16 Oct 2010 16:29:36 +0000 Subject: [issue10122] Documentation typo fix and a side question In-Reply-To: <1287238144.34.0.432770346734.issue10122@psf.upfronthosting.co.za> Message-ID: <1287246576.82.0.751373866505.issue10122@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- type: -> behavior versions: -3rd party, Python 2.5, Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 19:00:21 2010 From: report at bugs.python.org (intuited) Date: Sat, 16 Oct 2010 17:00:21 +0000 Subject: [issue10125] Closing a file within its writelines method causes segfault In-Reply-To: <1287248421.18.0.88895338197.issue10125@psf.upfronthosting.co.za> Message-ID: <1287248421.18.0.88895338197.issue10125@psf.upfronthosting.co.za> New submission from intuited : Discovered when using the current Ubuntu 10.04 package of Python: 2.6.5-0ubuntu1 Reproducible with :: outfile = open("tmpout", "w") outfile.writelines(f() or "line" for f in (outfile.close,)) This problem is probably most likely to be encountered when using the ``fileinput`` module, because of the way it abstracts away the closing of files. E.G.:: from fileinput import input lines = input("tmpout", inplace=1) first = lines.next() from sys import stdout stdout.writelines(lines) Both of the above pieces of code cause Segmentation Faults. It looks like in line 1779 of ``Objects/fileobject.c``, ``f->fp`` is being passed to ``fwrite`` as 0. I guess this happens because no check is done after the call to ``PyIter_Next`` on line 1730 to see if the file is still open. I don't see this as a big issue, though it is annoying that it seemingly prevents generators from being used with the `fileinput` module. Doing so would be a bit awkward and hacky anyway though. ---------- components: IO messages: 118877 nosy: intuited priority: normal severity: normal status: open title: Closing a file within its writelines method causes segfault type: crash versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 19:34:54 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 16 Oct 2010 17:34:54 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1279565829.31.0.797750861129.issue9308@psf.upfronthosting.co.za> Message-ID: <1287250494.68.0.0473184894362.issue9308@psf.upfronthosting.co.za> R. David Murray added the comment: I yhink you need to add an svnignore property to that directory for __pycache__. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 20:39:25 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Oct 2010 18:39:25 +0000 Subject: [issue10089] Add support for arbitrary -X options In-Reply-To: <1286996500.23.0.0250789164181.issue10089@psf.upfronthosting.co.za> Message-ID: <1287254365.77.0.126206728041.issue10089@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a new patch renaming the attribute to sys._xoptions, and adding some docs. ---------- Added file: http://bugs.python.org/file19252/xopts2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 20:51:37 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 16 Oct 2010 18:51:37 +0000 Subject: [issue10122] Documentation typo fix and a side question In-Reply-To: <1287238144.34.0.432770346734.issue10122@psf.upfronthosting.co.za> Message-ID: <1287255097.83.0.0906821721421.issue10122@psf.upfronthosting.co.za> Georg Brandl added the comment: Typo fixed in r85572. Otherwise, as David says. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 20:53:42 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 16 Oct 2010 18:53:42 +0000 Subject: [issue10124] obvious typo in cporting HOWTO In-Reply-To: <1287244128.31.0.267492647227.issue10124@psf.upfronthosting.co.za> Message-ID: <1287255222.18.0.216695966722.issue10124@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think this is what was intended; rather str and unicode. Fixed in r85573. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 21:20:48 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 16 Oct 2010 19:20:48 +0000 Subject: [issue10125] Closing a file within its writelines method causes segfault In-Reply-To: <1287248421.18.0.88895338197.issue10125@psf.upfronthosting.co.za> Message-ID: <1287256848.83.0.116235913441.issue10125@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r85574 ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 21:25:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 16 Oct 2010 19:25:06 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1287257106.1.0.0111777113858.issue9807@psf.upfronthosting.co.za> ?ric Araujo added the comment: > I fixed that in my patch, but it was unrelated to the changes I made to expose sys.abiflags. Would you mind committing that part independently of the rest? > I wonder if we should try to get a buildbot up that uses --enable-shared? If the option has significant use, why not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 21:25:14 2010 From: report at bugs.python.org (Bill Janssen) Date: Sat, 16 Oct 2010 19:25:14 +0000 Subject: [issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute In-Reply-To: <1275069249.63.0.318211846232.issue8845@psf.upfronthosting.co.za> Message-ID: <1287257114.62.0.283128342458.issue8845@psf.upfronthosting.co.za> Bill Janssen added the comment: PPC Tiger is using Python 2.7, so it's 3.6.11. Python 3.X also seems to be failing the sqlite tests on PPC Leopard. Is the required version # different between 3.1 and 3.x? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 21:36:29 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Oct 2010 19:36:29 +0000 Subject: [issue10115] accept4 can fail with errno 90 In-Reply-To: <1287149004.76.0.643231504051.issue10115@psf.upfronthosting.co.za> Message-ID: <1287257789.45.0.954843218718.issue10115@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Weekend is coming, so I can lend a hand in implementing whatever you > choose. I don't have any strong opinion about it, so it's whichever you prefer really :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 21:38:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Oct 2010 19:38:47 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1287257927.54.0.276678688589.issue9807@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (barry) > I wonder if we should try to get a buildbot up that uses --enable- > shared? (?ric) > If the option has significant use, why not. Well, it's all the more significant that most Linux distros use shared libraries, so they will use that option. I'll look into changing a buildbot to use --enable-shared, then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 21:39:22 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 16 Oct 2010 19:39:22 +0000 Subject: [issue10089] Add support for arbitrary -X options In-Reply-To: <1286996500.23.0.0250789164181.issue10089@psf.upfronthosting.co.za> Message-ID: <1287257962.53.0.389906649566.issue10089@psf.upfronthosting.co.za> Georg Brandl added the comment: I'd prefer "-X key[=val]" without the possibility to mention multiple key=val pairs, so that val can contain anything (commata in particular). Otherwise, the change looks fine to me. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 21:57:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Oct 2010 19:57:01 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1287259021.26.0.38292085167.issue9807@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've done so on one of the stable buildbots. Let's see how it behaves: http://www.python.org/dev/buildbot/builders/x86%20Ubuntu%20Shared%203.x/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 22:03:17 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Oct 2010 20:03:17 +0000 Subject: [issue5729] Allows tabs for indenting JSON output In-Reply-To: <1239297330.19.0.24635332127.issue5729@psf.upfronthosting.co.za> Message-ID: <1287259397.52.0.0882056062467.issue5729@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: bob.ippolito -> nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 22:15:49 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 16 Oct 2010 20:15:49 +0000 Subject: [issue9308] Remove redundant coding cookies from 3.x stdlib In-Reply-To: <1287250494.68.0.0473184894362.issue9308@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Sat, Oct 16, 2010 at 1:34 PM, R. David Murray wrote: .. > I yhink you need to add an svnignore property to that directory for __pycache__. r85576 (I hope I got it right.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 22:25:52 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Oct 2010 20:25:52 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This happens on Python 3.1: /usr/bin/ld: cannot find -lpython3.1 collect2: ld returned 1 exit status test test_distutils failed -- Traceback (most recent call last): File "/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/distutils/unixccompiler.py", line 254, in link self.spawn(linker + ld_args) File "/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/distutils/ccompiler.py", line 909, in spawn spawn(cmd, dry_run=self.dry_run) File "/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/distutils/spawn.py", line 34, in spawn _spawn_posix(cmd, search_path, dry_run=dry_run) File "/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/distutils/spawn.py", line 138, in _spawn_posix % (cmd[0], exit_status)) distutils.errors.DistutilsExecError: command 'gcc' failed with exit status 1 During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/distutils/tests/test_build_ext.py", line 321, in test_get_outputs cmd.run() File "/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/distutils/command/build_ext.py", line 347, in run self.build_extensions() File "/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/distutils/command/build_ext.py", line 456, in build_extensions self.build_extension(ext) File "/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/distutils/command/build_ext.py", line 543, in build_extension target_lang=language) File "/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/distutils/ccompiler.py", line 719, in link_shared_object extra_preargs, extra_postargs, build_temp, target_lang) File "/srv/buildbot/buildarea/3.1.bolen-ubuntu/build/Lib/distutils/unixccompiler.py", line 256, in link raise LinkError(msg) distutils.errors.LinkError: command 'gcc' failed with exit status 1 (from http://www.python.org/dev/buildbot/builders/x86%20Ubuntu%20Shared%203.1/builds/1132/steps/test/logs/stdio ) Since it is on one of the stable buildbots, it might be considered release-blocking. ---------- components: Tests messages: 118890 nosy: barry, eric.araujo, pitrou, tarek priority: high severity: normal stage: needs patch status: open title: test_distutils failure with --enable-shared type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 22:37:05 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Oct 2010 20:37:05 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287261425.4.0.0738268805754.issue10126@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Similar failure on 2.7: /usr/bin/ld: cannot find -lpython2.7 collect2: ld returned 1 exit status test test_distutils failed -- Traceback (most recent call last): File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/distutils/tests/test_build_ext.py", line 269, in test_get_outputs cmd.run() File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/distutils/command/build_ext.py", line 340, in run self.build_extensions() File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/distutils/command/build_ext.py", line 449, in build_extensions self.build_extension(ext) File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/distutils/command/build_ext.py", line 531, in build_extension target_lang=language) File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/distutils/ccompiler.py", line 741, in link_shared_object extra_preargs, extra_postargs, build_temp, target_lang) File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/distutils/unixccompiler.py", line 258, in link raise LinkError, msg LinkError: command 'gcc' failed with exit status 1 ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 22:38:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 16 Oct 2010 20:38:17 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1287261497.98.0.762086995405.issue9807@psf.upfronthosting.co.za> ?ric Araujo added the comment: Barry: I had misunderstood your message, so disregard my request for commit (since the fix you mention *is* committed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 22:43:51 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Sat, 16 Oct 2010 20:43:51 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287261831.24.0.003427335658.issue10126@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I fixed this in py3k branch, so you just need to backport that. I can do if you can't get to it in the next day or so. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 22:47:13 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Oct 2010 20:47:13 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287261831.24.0.003427335658.issue10126@psf.upfronthosting.co.za> Message-ID: <1287262028.3470.64.camel@localhost.localdomain> Antoine Pitrou added the comment: Le samedi 16 octobre 2010 ? 20:43 +0000, Barry A. Warsaw a ?crit : > Barry A. Warsaw added the comment: > > I fixed this in py3k branch, so you just need to backport that. I can > do if you can't get to it in the next day or so. I don't know how to do it so, yes, it would be better if you do :) Thanks for caring! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 23:03:54 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 16 Oct 2010 21:03:54 +0000 Subject: [issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute In-Reply-To: <1275069249.63.0.318211846232.issue8845@psf.upfronthosting.co.za> Message-ID: <1287263034.07.0.0729646708387.issue8845@psf.upfronthosting.co.za> R. David Murray added the comment: The attribute and test aren't in 3.1 (or 2.7), so this issue only applies to 3.x trunk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 23:14:34 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 16 Oct 2010 21:14:34 +0000 Subject: [issue10127] ssl.SSLSocket().close() does not close the connection In-Reply-To: <1287263674.2.0.992398068639.issue10127@psf.upfronthosting.co.za> Message-ID: <1287263674.2.0.992398068639.issue10127@psf.upfronthosting.co.za> New submission from R. David Murray : Quoting PoltoS from issue 8293: If I do sock.close() (sock is instance of ssl.SSLSocket), the connection is not closed: I see it as Established in netstat and nothing is sent over network: tcpdump show nothing going thru the network. ---------- components: Library (Lib) messages: 118896 nosy: PoltoS, TTT, amaury.forgeotdarc, dandrzejewski, eric.smith, giampaolo.rodola, orsenthil, pitrou, r.david.murray priority: normal severity: normal status: open title: ssl.SSLSocket().close() does not close the connection type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 23:16:33 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 16 Oct 2010 21:16:33 +0000 Subject: [issue8293] HTTPSConnection.close() does not immediately close the connection. In-Reply-To: <1270234708.91.0.197021276581.issue8293@psf.upfronthosting.co.za> Message-ID: <1287263793.67.0.879609553827.issue8293@psf.upfronthosting.co.za> R. David Murray added the comment: I opened issue 10127 for the ssl.SSLSocket().close() problem. ---------- resolution: works for me -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 23:24:51 2010 From: report at bugs.python.org (PoltoS) Date: Sat, 16 Oct 2010 21:24:51 +0000 Subject: [issue10127] ssl.SSLSocket().close() does not close the connection In-Reply-To: <1287263674.2.0.992398068639.issue10127@psf.upfronthosting.co.za> Message-ID: <1287264291.67.0.753158338829.issue10127@psf.upfronthosting.co.za> PoltoS added the comment: After some investigations it seems that a dup() is called in ssl wrap_socket(), so on sock.close() the socket is not really closed, since there is still one more reference (file descriptor) in the kernel's tcp/ip stack. Can someone confirm this? Have not done this, but it is possible to check my supposition using linux lsof command before and after .close(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 23:30:46 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 16 Oct 2010 21:30:46 +0000 Subject: [issue10127] ssl.SSLSocket().close() does not close the connection In-Reply-To: <1287263674.2.0.992398068639.issue10127@psf.upfronthosting.co.za> Message-ID: <1287264646.62.0.8894102432.issue10127@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I cannot reproduce with 2.7, 3.1 or 3.2. It seems the issue is obsolete, many changes having been made to the ssl module since 2.6. ---------- resolution: -> out of date status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 23:52:14 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 Oct 2010 21:52:14 +0000 Subject: [issue10123] test_doctest failure with ASCII filesystem encoding In-Reply-To: <1287238554.77.0.835644404703.issue10123@psf.upfronthosting.co.za> Message-ID: <1287265934.51.0.210716683932.issue10123@psf.upfronthosting.co.za> STINNER Victor added the comment: Failures occurred on: http://www.python.org/dev/buildbot/builders/AMD64%20Gentoo%20Wide%203.x http://www.python.org/dev/buildbot/builders/sparc%20solaris10%20gcc%203.x test_zipimport_support does also fail, but it is linked to test_doctest failures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 16 23:55:17 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 16 Oct 2010 21:55:17 +0000 Subject: [issue10123] test_doctest failure with ASCII filesystem encoding In-Reply-To: <1287238554.77.0.835644404703.issue10123@psf.upfronthosting.co.za> Message-ID: <1287266117.65.0.897384742033.issue10123@psf.upfronthosting.co.za> STINNER Victor added the comment: Fixed by r85578. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 00:10:42 2010 From: report at bugs.python.org (benrg) Date: Sat, 16 Oct 2010 22:10:42 +0000 Subject: [issue5391] mmap: read_byte/write_byte and object type In-Reply-To: <1235818949.96.0.83052759976.issue5391@psf.upfronthosting.co.za> Message-ID: <1287267042.51.0.610319560609.issue5391@psf.upfronthosting.co.za> benrg added the comment: With this patch, read_byte returns an integer in the range -128 to 127 instead of 0 to 255 if char is signed. Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32 is affected by this. I think it is a bug. The test code would fail if the test string contained any bytes outside the ASCII range. (Did this really go unnoticed for a year and a half? I noticed it the moment I first tried to use read_byte (which was just now). I see that read_byte was broken in a different way in 3.0. Does anybody actually use it?) ---------- nosy: +benrg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 00:15:14 2010 From: report at bugs.python.org (Retro) Date: Sat, 16 Oct 2010 22:15:14 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287267314.77.0.726888135348.issue10073@psf.upfronthosting.co.za> Retro added the comment: Please leave this function as is because it works just fine. >>> calendar.isleap(2011) False The argument for isleap() must not be in quotes. That's all. ---------- nosy: +Retro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 00:21:37 2010 From: report at bugs.python.org (Retro) Date: Sat, 16 Oct 2010 22:21:37 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287267697.78.0.466583189081.issue10073@psf.upfronthosting.co.za> Retro added the comment: I would just add an exception to the isleap() function. def isleap(year): """Return 1 for leap years, 0 for non-leap years.""" try: return year % 4 == 0 and (year % 100 != 0 or year % 400 == 0) except TypeError: # somehow inform the user that the argument 'year' must be an integer ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 00:32:30 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 16 Oct 2010 22:32:30 +0000 Subject: [issue5729] Allows tabs for indenting JSON output In-Reply-To: <1239297330.19.0.24635332127.issue5729@psf.upfronthosting.co.za> Message-ID: <1287268350.62.0.56759226536.issue5729@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 00:41:53 2010 From: report at bugs.python.org (Michael Olson) Date: Sat, 16 Oct 2010 22:41:53 +0000 Subject: [issue10128] multiprocessing.Pool throws exception with __main__.py In-Reply-To: <1287268913.13.0.756366299299.issue10128@psf.upfronthosting.co.za> Message-ID: <1287268913.13.0.756366299299.issue10128@psf.upfronthosting.co.za> New submission from Michael Olson : In an application with an entry point of __main__.py, multiprocessing.Pool throws the following: Traceback (most recent call last): File "", line 1, in File "D:\Dev\Python27\lib\multiprocessing\forking.py", line 346, in main prepare(preparation_data) File "D:\Dev\Python27\lib\multiprocessing\forking.py", line 454, in prepare assert main_name not in sys.modules, main_name AssertionError: __main__ These messages repeat as long as the application is running. Demonstration Code, must be in file named __main__.py: -------------------- import multiprocessing import time if __name__ == '__main__': pool = multiprocessing.Pool() time.sleep(2) -------------------- ---------- components: Library (Lib) messages: 118905 nosy: Michael.Olson priority: normal severity: normal status: open title: multiprocessing.Pool throws exception with __main__.py type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 01:17:05 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Sat, 16 Oct 2010 23:17:05 +0000 Subject: [issue10115] accept4 can fail with errno 90 In-Reply-To: <1287149004.76.0.643231504051.issue10115@psf.upfronthosting.co.za> Message-ID: <1287271025.27.0.0450994402396.issue10115@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: Made a proof of concept patch (no doc updates yet). Decided to implement separate accept4() method, cause we have already spent enough time dealing with it and rollback would be pity. ---------- keywords: +patch Added file: http://bugs.python.org/file19253/issue10115_first_attempt.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 02:03:21 2010 From: report at bugs.python.org (Akira Kitada) Date: Sun, 17 Oct 2010 00:03:21 +0000 Subject: [issue10052] Python/dtoa.c:158: #error "Failed to find an exact-width 32-bit integer type" (FreeBSD 4.11 + gcc 2.95.4) In-Reply-To: <1286609205.46.0.0704666326351.issue10052@psf.upfronthosting.co.za> Message-ID: <1287273801.77.0.093624047725.issue10052@psf.upfronthosting.co.za> Akira Kitada added the comment: This patch is specifically targeted at FreeBSD 4. tested on FreeBSD 4.11 and OS X 10.6.4 I don't know how to accommodate SGI IRIX's case. ---------- keywords: +patch Added file: http://bugs.python.org/file19254/issue10052.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 02:31:23 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Oct 2010 00:31:23 +0000 Subject: [issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX) In-Reply-To: <1272979850.31.0.0455265952928.issue8611@psf.upfronthosting.co.za> Message-ID: <1287275483.55.0.950284360791.issue8611@psf.upfronthosting.co.za> STINNER Victor added the comment: Status of this issue, 5 months later: most tests pass except test_gc test_gdb test_runpy test_sys test_wsgiref test_zipimport. Said differently, 95% of the task (or more?) is done. It's possible to run Python installed in a non-ascii directory with any locale (I tested ascii, iso-8859-1 and utf-8). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 02:38:41 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 17 Oct 2010 00:38:41 +0000 Subject: [issue1533105] NetBSD build with --with-pydebug causes SIGSEGV Message-ID: <1287275921.23.0.212458799176.issue1533105@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I don't see this issue on netbsd 5.0.2 i386 in the py3k branch. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 02:44:12 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 17 Oct 2010 00:44:12 +0000 Subject: [issue5510] patches for Modules/socketmodule.c for NetBSD In-Reply-To: <1237400494.47.0.163345338744.issue5510@psf.upfronthosting.co.za> Message-ID: <1287276252.04.0.530145211582.issue5510@psf.upfronthosting.co.za> Gregory P. Smith added the comment: netbsd-wizs-mod.patch applied in 85587. ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith resolution: -> accepted stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 04:04:26 2010 From: report at bugs.python.org (Ned Deily) Date: Sun, 17 Oct 2010 02:04:26 +0000 Subject: [issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute In-Reply-To: <1275069249.63.0.318211846232.issue8845@psf.upfronthosting.co.za> Message-ID: <1287281066.05.0.839429773512.issue8845@psf.upfronthosting.co.za> Ned Deily added the comment: FYI, in a recent py3k installer build test using the same installer image (2-way i386/ppc universal with statically linked sqlite 3.6.11), the test fails on ppc G3 (10.4), ppc g4 (10.5) but passes on i386 (10.6) so I'd go along with Bill's big- vs little-endian hypothesis. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 04:26:07 2010 From: report at bugs.python.org (Ned Deily) Date: Sun, 17 Oct 2010 02:26:07 +0000 Subject: [issue10128] multiprocessing.Pool throws exception with __main__.py In-Reply-To: <1287268913.13.0.756366299299.issue10128@psf.upfronthosting.co.za> Message-ID: <1287282367.29.0.7213606857.issue10128@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 04:58:53 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 17 Oct 2010 02:58:53 +0000 Subject: [issue10128] multiprocessing.Pool throws exception with __main__.py In-Reply-To: <1287268913.13.0.756366299299.issue10128@psf.upfronthosting.co.za> Message-ID: <1287284333.06.0.549218213591.issue10128@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 05:17:27 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 17 Oct 2010 03:17:27 +0000 Subject: [issue3482] re.split, re.sub and re.subn should support flags In-Reply-To: <1217575222.11.0.84305922701.issue3482@psf.upfronthosting.co.za> Message-ID: <1287285447.83.0.526385080838.issue3482@psf.upfronthosting.co.za> R. David Murray added the comment: For reference, the py3k rev was r70091. ---------- nosy: +r.david.murray resolution: -> accepted stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 05:37:51 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 17 Oct 2010 03:37:51 +0000 Subject: [issue10090] python -m locale fails on OSX In-Reply-To: <1286998392.83.0.0924618610068.issue10090@psf.upfronthosting.co.za> Message-ID: <1287286671.07.0.101806296837.issue10090@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 05:42:27 2010 From: report at bugs.python.org (Andreas Kloeckner) Date: Sun, 17 Oct 2010 03:42:27 +0000 Subject: [issue10129] Curious 'name not defined error' with 'python -m' In-Reply-To: <1287286947.38.0.536856909733.issue10129@psf.upfronthosting.co.za> Message-ID: <1287286947.38.0.536856909733.issue10129@psf.upfronthosting.co.za> New submission from Andreas Kloeckner : $ python3.1 -m a b.py results in Traceback (most recent call last): File "/usr/lib/python3.1/runpy.py", line 128, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/usr/lib/python3.1/runpy.py", line 34, in _run_code exec(code, run_globals) File "/home/andreas/tmp/python-mbug/a.py", line 6, in main() File "/home/andreas/tmp/python-mbug/a.py", line 3, in main exec(compile(open(sys.argv[1]).read(), sys.argv[1], 'exec')) File "b.py", line 8, in sys.exit(main()) File "b.py", line 5, in main argv = sys.argv[1:] NameError: global name 'sys' is not defined a.py -------------------------------------------------- def main(): import sys exec(compile(open(sys.argv[1]).read(), sys.argv[1], 'exec')) if __name__=='__main__': main() ------------------------------------------------------- b.py -------------------------------------------------- import sys def main(): sys.argv[1:] if __name__ == "__main__": main() ------------------------------------------------------- ---------- components: Interpreter Core messages: 118913 nosy: inducer priority: normal severity: normal status: open title: Curious 'name not defined error' with 'python -m' type: behavior versions: Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 05:48:05 2010 From: report at bugs.python.org (Andreas Kloeckner) Date: Sun, 17 Oct 2010 03:48:05 +0000 Subject: [issue4949] Constness in PyErr_NewException In-Reply-To: <1231956299.48.0.0179649567226.issue4949@psf.upfronthosting.co.za> Message-ID: <1287287285.87.0.351833014051.issue4949@psf.upfronthosting.co.za> Andreas Kloeckner added the comment: ping? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 08:03:11 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 06:03:11 +0000 Subject: [issue10129] Curious 'name not defined error' with 'python -m' In-Reply-To: <1287286947.38.0.536856909733.issue10129@psf.upfronthosting.co.za> Message-ID: <1287295391.06.0.333949641566.issue10129@psf.upfronthosting.co.za> Georg Brandl added the comment: (This is not specific to running with -m, it occurs as well when you do "python a.py b.py".) The issue here is your call to exec() does not execute the code as its own module. It executes the code as part of the main() function in a.py, with (since you don't give a global namespace argument) the same global namespace as that of a.main(), and there is no "sys" in that namespace. Further, the compiler cannot treat b.main like a nested function of a.main (which would then create a closure over the "sys" imported inside a.main). Therefore, the reference to sys is treated as a global and not found. If you give the exec() function an explicit dictionary as the globals argument, this "works": def main(): d = {'__name__': '__main__'} exec(compile(open(sys.argv[1]).read(), sys.argv[1], 'exec'), d) ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 08:34:47 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 06:34:47 +0000 Subject: [issue10058] C-API Intro should be more explicit about error return codes In-Reply-To: <1286667477.81.0.428824967814.issue10058@psf.upfronthosting.co.za> Message-ID: <1287297287.51.0.347809803759.issue10058@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed a change in that spirit in r85606. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 08:35:48 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 06:35:48 +0000 Subject: [issue10024] Outdated advice in C-API tutorial? In-Reply-To: <1286228751.32.0.127029935422.issue10024@psf.upfronthosting.co.za> Message-ID: <1287297348.34.0.376646052647.issue10024@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 11:19:13 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 09:19:13 +0000 Subject: [issue8556] Confusing string formatting examples In-Reply-To: <1272430647.21.0.217416978231.issue8556@psf.upfronthosting.co.za> Message-ID: <1287307153.0.0.455073929131.issue8556@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r85609. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 11:23:16 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 09:23:16 +0000 Subject: [issue8686] "This isn't defined beyond that" phrase is not friendly to non-native English speakers. In-Reply-To: <1273576436.16.0.861526907899.issue8686@psf.upfronthosting.co.za> Message-ID: <1287307396.67.0.8460264315.issue8686@psf.upfronthosting.co.za> Georg Brandl added the comment: Removed gloss in r85610. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 11:33:32 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 09:33:32 +0000 Subject: [issue8811] fixing sqlite3 docs for py3k In-Reply-To: <1274731029.07.0.155563755489.issue8811@psf.upfronthosting.co.za> Message-ID: <1287308012.01.0.214535517123.issue8811@psf.upfronthosting.co.za> Georg Brandl added the comment: This was mostly fixed already, committed rest in r85611. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 11:35:04 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 09:35:04 +0000 Subject: [issue8818] urlsplit and urlparse add extra slash when using scheme In-Reply-To: <1274798419.99.0.107317054505.issue8818@psf.upfronthosting.co.za> Message-ID: <1287308104.69.0.369450505609.issue8818@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 11:38:14 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 09:38:14 +0000 Subject: [issue8855] Shelve documentation lacks security warning In-Reply-To: <1275180833.97.0.966181786946.issue8855@psf.upfronthosting.co.za> Message-ID: <1287308294.62.0.333761424637.issue8855@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r85612, will be merged to the other maintained branches. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 11:46:24 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 09:46:24 +0000 Subject: [issue8968] token type constants are not documented In-Reply-To: <1276216063.7.0.11813766705.issue8968@psf.upfronthosting.co.za> Message-ID: <1287308784.91.0.339002134817.issue8968@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r85614. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:05:35 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:05:35 +0000 Subject: [issue459007] Document sys.path on Windows Message-ID: <1287309935.08.0.504071845213.issue459007@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the patch, merged with existing info in using/windows.rst in r85615. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:09:17 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:09:17 +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: <1287310157.65.0.0734865905064.issue5212@psf.upfronthosting.co.za> Georg Brandl added the comment: Removed note in r85617. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:15:55 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:15:55 +0000 Subject: [issue9086] Wrong linking terminology in windows FAQ In-Reply-To: <1277546739.53.0.554976149521.issue9086@psf.upfronthosting.co.za> Message-ID: <1287310555.04.0.898354312243.issue9086@psf.upfronthosting.co.za> Georg Brandl added the comment: Okay, I removed mention of static linking and used John's terms "load-time" and "run-time" linking in r85618. I also removed the note that pythonXY.dll is only needed in one case, since it's not true. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:26:09 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:26:09 +0000 Subject: [issue9105] pickle security note should be more prominent In-Reply-To: <1277745956.4.0.951690442784.issue9105@psf.upfronthosting.co.za> Message-ID: <1287311169.11.0.000797017930108.issue9105@psf.upfronthosting.co.za> Georg Brandl added the comment: Moved pickle warning in r85621. A warning in shelve was already added for issue8855. For the tutorial, I don't think a warning needs to be added. Same goes for logging. ---------- nosy: +georg.brandl status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:28:16 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:28:16 +0000 Subject: [issue9112] argparse missing documentation for error() method In-Reply-To: <1277798810.6.0.529590004484.issue9112@psf.upfronthosting.co.za> Message-ID: <1287311296.86.0.357893359491.issue9112@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed after review in r85622. Thanks! ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:38:27 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:38:27 +0000 Subject: [issue9117] class syntax not fully documented in reference manual In-Reply-To: <1277830360.72.0.109155081636.issue9117@psf.upfronthosting.co.za> Message-ID: <1287311907.81.0.22967382618.issue9117@psf.upfronthosting.co.za> Georg Brandl added the comment: This patch was mostly out-of-date since PEP 3115 metaclasses are now documented; I've merged what was missing in r85626. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:44:51 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:44:51 +0000 Subject: [issue9138] Tutorial: classes intro paragraph icky In-Reply-To: <1278020934.41.0.867324522486.issue9138@psf.upfronthosting.co.za> Message-ID: <1287312291.69.0.422651744494.issue9138@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed Aahz' version, with the last sentence reworded to what I think is more positive than what sounds like "you can break things without doing anything". ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:44:59 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:44:59 +0000 Subject: [issue9138] Tutorial: classes intro paragraph icky In-Reply-To: <1278020934.41.0.867324522486.issue9138@psf.upfronthosting.co.za> Message-ID: <1287312299.96.0.0572377960329.issue9138@psf.upfronthosting.co.za> Georg Brandl added the comment: r85627. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:47:31 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:47:31 +0000 Subject: [issue9195] Link in docs from "String Formatting Operations" to "Template Strings" In-Reply-To: <1278571007.55.0.304215462236.issue9195@psf.upfronthosting.co.za> Message-ID: <1287312451.47.0.933485977782.issue9195@psf.upfronthosting.co.za> Georg Brandl added the comment: Mostly out of date now that we have str.format(). ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:52:11 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:52:11 +0000 Subject: [issue5962] Ambiguity about the semantics of sys.exit() and os._exit() in multithreaded program In-Reply-To: <1241722395.44.0.880118568656.issue5962@psf.upfronthosting.co.za> Message-ID: <1287312731.11.0.430580993613.issue5962@psf.upfronthosting.co.za> Georg Brandl added the comment: Added a note about threads to sys.exit(), and changed os._exit() wording to be clear about process exit, in r85629. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:54:18 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 17 Oct 2010 10:54:18 +0000 Subject: [issue10119] test_urllibnet failure when using support.transient_internet In-Reply-To: <1287194679.07.0.887400455499.issue10119@psf.upfronthosting.co.za> Message-ID: <1287312858.87.0.456813631008.issue10119@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in revision 85630. When using fileno attribute of the file-descriptor, the socket had to be in blocking mode. Now the results are consistent. This may resolve the other spurious test failures that were observed too. ---------- assignee: -> orsenthil resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:55:34 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 10:55:34 +0000 Subject: [issue1945] Document back ported C functions In-Reply-To: <1201445858.91.0.21119487494.issue1945@psf.upfronthosting.co.za> Message-ID: <1287312934.64.0.564464999933.issue1945@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, applied in r85632. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 12:56:47 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 17 Oct 2010 10:56:47 +0000 Subject: [issue10116] Sporadic failures in test_urllibnet In-Reply-To: <1287150282.16.0.127032822399.issue10116@psf.upfronthosting.co.za> Message-ID: <1287313007.04.0.396978151609.issue10116@psf.upfronthosting.co.za> Senthil Kumaran added the comment: ixokai, A change made as part of issue10119 should have resolved this issue too. Please let me know if this can be closed. ---------- assignee: -> orsenthil resolution: -> fixed stage: -> committed/rejected type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 13:00:23 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 11:00:23 +0000 Subject: [issue9204] The documentation of PyType_Type in py3k mentions types.TypeType In-Reply-To: <1278612596.78.0.246474788536.issue9204@psf.upfronthosting.co.za> Message-ID: <1287313223.03.0.0939811444731.issue9204@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r85633. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 13:03:28 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 11:03:28 +0000 Subject: [issue5121] PyRun_InteractiveLoop disagrees with documentation? In-Reply-To: <1233457621.0.0.661616898289.issue5121@psf.upfronthosting.co.za> Message-ID: <1287313408.71.0.399070135657.issue5121@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r85635. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 13:06:24 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 11:06:24 +0000 Subject: [issue9237] Add sys.call_tracing to on-line sys module documentation In-Reply-To: <1278973764.17.0.0501374635668.issue9237@psf.upfronthosting.co.za> Message-ID: <1287313584.09.0.227970297506.issue9237@psf.upfronthosting.co.za> Georg Brandl added the comment: Documented in r85636. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 13:32:49 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 11:32:49 +0000 Subject: [issue10130] Create epub format docs and offer them on the download page Message-ID: <1287315169.0.0.39413411509.issue10130@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl nosy: georg.brandl priority: deferred blocker severity: normal status: open title: Create epub format docs and offer them on the download page type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 13:37:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 11:37:25 +0000 Subject: [issue9730] base64 docs refers to strings instead of bytes In-Reply-To: <1283312665.97.0.832544712662.issue9730@psf.upfronthosting.co.za> Message-ID: <1287315445.17.0.69312360416.issue9730@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r85642. ---------- dependencies: -b64decode should accept strings or bytes resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 14:22:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Oct 2010 12:22:11 +0000 Subject: [issue10115] accept4 can fail with errno 90 In-Reply-To: <1287149004.76.0.643231504051.issue10115@psf.upfronthosting.co.za> Message-ID: <1287318131.67.0.815151794729.issue10115@psf.upfronthosting.co.za> Antoine Pitrou added the comment: There would need to be some tests. Also, this last part of the patch looks strange: @@ -3001,6 +3072,10 @@ PyErr_SetString(PyExc_ValueError, "can't use invalid socket value"); return -1; +#ifdef HAVE_ACCEPT4 + /* These flags are not inherited after accept */ + type &= ~(SOCK_NONBLOCK & SOCK_CLOEXEC); +#endif /* HAVE_ACCEPT4 */ What is it meant for? And why does it come right after a "return" statement? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 15:10:13 2010 From: report at bugs.python.org (Stephen Hansen) Date: Sun, 17 Oct 2010 13:10:13 +0000 Subject: [issue10116] Sporadic failures in test_urllibnet In-Reply-To: <1287150282.16.0.127032822399.issue10116@psf.upfronthosting.co.za> Message-ID: <1287321013.41.0.717377264792.issue10116@psf.upfronthosting.co.za> Stephen Hansen added the comment: I'll run the test in -F mode for a few hours to see if it comes up or not: but its hard for me to say one way or the other if anything has fixed or not fixed it, as the failure only came up every once in awhile. But I'll look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 15:27:51 2010 From: report at bugs.python.org (JJeffries) Date: Sun, 17 Oct 2010 13:27:51 +0000 Subject: [issue9909] request for calendar.dayofyear() function In-Reply-To: <1285039663.27.0.59327234025.issue9909@psf.upfronthosting.co.za> Message-ID: <1287322071.8.0.846908270945.issue9909@psf.upfronthosting.co.za> JJeffries added the comment: I agree, I think this would be very useful. I use a function that does this quite often. Should also be added to calendar.py's __all__. ---------- nosy: +JJeffries _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 15:42:20 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sun, 17 Oct 2010 13:42:20 +0000 Subject: [issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document In-Reply-To: <1287322940.78.0.0838139062813.issue10131@psf.upfronthosting.co.za> Message-ID: <1287322940.78.0.0838139062813.issue10131@psf.upfronthosting.co.za> New submission from Florent Xicluna : >>> import copy >>> from xml.dom import minidom >>> doc = minidom.parseString('') >>> doc2 = copy.deepcopy(doc) >>> doc.toxml() u'' >>> doc2.toxml() u'' >>> minidom.parseString(doc2.toxml()) Traceback (most recent call last): ... ExpatError: junk after document element: line 1, column 2 The workaround is to use doc.cloneNode(True). ---------- components: XML messages: 118942 nosy: flox priority: normal severity: normal stage: needs patch status: open title: deepcopying an xml.dom.minidom.Document generates an invalid XML document type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 15:47:11 2010 From: report at bugs.python.org (Florent Xicluna) Date: Sun, 17 Oct 2010 13:47:11 +0000 Subject: [issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document In-Reply-To: <1287322940.78.0.0838139062813.issue10131@psf.upfronthosting.co.za> Message-ID: <1287323231.68.0.864357384446.issue10131@psf.upfronthosting.co.za> Florent Xicluna added the comment: It works fine with 2.5 and 2.6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 15:54:46 2010 From: report at bugs.python.org (JJeffries) Date: Sun, 17 Oct 2010 13:54:46 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: <1286999616.97.0.806385422046.issue10092@psf.upfronthosting.co.za> Message-ID: <1287323686.16.0.00767338090388.issue10092@psf.upfronthosting.co.za> Changes by JJeffries : ---------- nosy: +JJeffries _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 16:58:05 2010 From: report at bugs.python.org (Stephen Hansen) Date: Sun, 17 Oct 2010 14:58:05 +0000 Subject: [issue10116] Sporadic failures in test_urllibnet In-Reply-To: <1287150282.16.0.127032822399.issue10116@psf.upfronthosting.co.za> Message-ID: <1287327485.79.0.14297043168.issue10116@psf.upfronthosting.co.za> Stephen Hansen added the comment: Okay, at -r85630 on branches/py3k, I ran: ./python.exe -m test.regrtest -uall -F test_urllibnet And after 158 retries, got the same error I had before: test test_urllibnet failed -- Traceback (most recent call last): File "/Users/pythonbuildbot/test/build/Lib/urllib/request.py", line 1504, in open return getattr(self, name)(url) File "/Users/pythonbuildbot/test/build/Lib/urllib/request.py", line 1676, in open_http return self._open_generic_http(http.client.HTTPConnection, url, data) File "/Users/pythonbuildbot/test/build/Lib/urllib/request.py", line 1659, in _open_generic_http response = http_conn.getresponse() File "/Users/pythonbuildbot/test/build/Lib/http/client.py", line 1027, in getresponse response.begin() File "/Users/pythonbuildbot/test/build/Lib/http/client.py", line 347, in begin version, status, reason = self._read_status() File "/Users/pythonbuildbot/test/build/Lib/http/client.py", line 303, in _read_status line = str(self.fp.readline(), "iso-8859-1") File "/Users/pythonbuildbot/test/build/Lib/socket.py", line 267, in readinto return self._sock.recv_into(b) socket.error: [Errno 9] Bad file descriptor ---------- resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 17:15:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 17 Oct 2010 15:15:57 +0000 Subject: [issue10020] docs for sqlite3 describe functions not available without recompiling In-Reply-To: <1286124753.24.0.309036392806.issue10020@psf.upfronthosting.co.za> Message-ID: <1287328557.81.0.00101696206727.issue10020@psf.upfronthosting.co.za> ?ric Araujo added the comment: Has this been fixed in 3.1 and 2.7 too? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 17:49:19 2010 From: report at bugs.python.org (Oliver Deppert) Date: Sun, 17 Oct 2010 15:49:19 +0000 Subject: [issue1625] bz2.BZ2File doesn't support multiple streams In-Reply-To: <1197624030.23.0.503522059328.issue1625@psf.upfronthosting.co.za> Message-ID: <1287330559.13.0.297396956672.issue1625@psf.upfronthosting.co.za> Oliver Deppert added the comment: Thanks for the update.... Like I mentioned before in my previous comment, I'm still searching for a solution/patch for python 2.x able to handle multiple streams of bz2. Does anybody know a work-around or have a solution porting the p3k-patch to the good old python 2.x?! At the moment I try to use this patch with py3k and it seems to work. But I need this multistream option for pythone 2.x because the most of the time I deal with matplotlib....and matplotlib at the moment isn't able to deal with py3k....so, I would be very happy for any suggestion running multiple-streams with python 2.x ! ! Thank you very much, and best regards Kontr-Olli ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 17:50:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 17 Oct 2010 15:50:30 +0000 Subject: [issue10130] Create epub format docs and offer them on the download page Message-ID: <1287330630.09.0.17937294098.issue10130@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 18:05:00 2010 From: report at bugs.python.org (Thomas Vander Stichele) Date: Sun, 17 Oct 2010 16:05:00 +0000 Subject: [issue3631] Improve gdbinit of Python 2.6 In-Reply-To: <1219321743.09.0.122028214381.issue3631@psf.upfronthosting.co.za> Message-ID: <1287331500.85.0.0260347816702.issue3631@psf.upfronthosting.co.za> Thomas Vander Stichele added the comment: It's too bad this is closed out of date because a) the macro is still there being distributed b) it simply hangs! c) there's no easy way to figure out that you should be using something else instead. I spent a few hours of my life figuring out why it fails and writing an alternative implementation that works for me. Instead of just closing this ticket, something should be done about the distributions of python so that they don't suggest something that you consider outdated and doesn't actually work. Here's my working version, for reference: # THOMAS: the test for between Py_Main and Py_GetArgcArgv is because # code is in that order in the C file; see Modules/main.c and its comment # print the entire Python call stack # same for eval in Python/ceval.c # in 2.6, PyEval_EvalFrame is only bw compatible, and code now calls # PyEval_EvalFrameEx define pystack set $__lastpc = $pc set $__same = -1 while 1 == 1 # select the highest frame with the same $pc # this will automatically terminate if we reach the top while $pc == $__lastpc up-silently end down-silently if $pc > PyEval_EvalFrameEx && $pc < PyEval_EvalCodeEx pyframe else # frame end up-silently 1 set $__lastpc = $pc end select-frame 0 end ---------- nosy: +thomasvs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 18:06:39 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 17 Oct 2010 16:06:39 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287331599.02.0.718025502467.issue10126@psf.upfronthosting.co.za> ?ric Araujo added the comment: If I understand correctly, only the changes you made to test_build_ext.py have to be backported. I can do it if you want, just assign to me, or else do it and I?ll forward port to distutils2. Note that I don?t fully understand the change, but I trust you that it is indeed the test that was faulty and not the code itself. ---------- assignee: -> tarek components: +Distutils2 versions: +3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 18:07:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 17 Oct 2010 16:07:09 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287331629.12.0.479100988764.issue10126@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: tarek -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 18:12:39 2010 From: report at bugs.python.org (Retro) Date: Sun, 17 Oct 2010 16:12:39 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1287331959.92.0.330749912233.issue2775@psf.upfronthosting.co.za> Retro added the comment: Did you manage to apply my fix "zipfile-patch.diff" to the trunk? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 18:52:53 2010 From: report at bugs.python.org (Matthias Klose) Date: Sun, 17 Oct 2010 16:52:53 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1287334373.03.0.312493786653.issue9807@psf.upfronthosting.co.za> Matthias Klose added the comment: two fixes, the configure.in differentiates the name for the static library, as mentioned in msg118832. the python-config.in fix prints the library name with the abiflags. Index: configure.in =================================================================== --- configure.in (Revision 85644) +++ configure.in (Arbeitskopie) @@ -585,7 +585,7 @@ AC_MSG_CHECKING(LIBRARY) if test -z "$LIBRARY" then - LIBRARY='libpython$(VERSION).a' + LIBRARY='libpython$(VERSION)$(ABIFLAGS).a' fi AC_MSG_RESULT($LIBRARY) Index: Misc/python-config.in =================================================================== --- Misc/python-config.in (Revision 85644) +++ Misc/python-config.in (Arbeitskopie) @@ -45,7 +45,7 @@ elif opt in ('--libs', '--ldflags'): libs = getvar('LIBS').split() + getvar('SYSLIBS').split() - libs.append('-lpython'+pyver) + libs.append('-lpython'+pyver+sys.abiflags) # add the prefix/lib/pythonX.Y/config dir, but only if there is no # shared library in prefix/lib/. if opt == '--ldflags': ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 19:23:58 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Sun, 17 Oct 2010 17:23:58 +0000 Subject: [issue10115] accept4 can fail with errno 90 In-Reply-To: <1287149004.76.0.643231504051.issue10115@psf.upfronthosting.co.za> Message-ID: <1287336238.86.0.601477520413.issue10115@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: >What is it meant for? And why does it come right after a "return" statement? @Antoine, if fd was supplied and it was correct (not returned with -1), let's drop flags that can't be inherited. It's a mistake, at that level we don't know whether we should inherit flags or not... I'm a bit confused... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 19:38:56 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 17 Oct 2010 17:38:56 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <20101015180336.GA3180@dbwatson.ukfsn.org> Message-ID: <4CBB34A8.4020600@v.loewis.de> Martin v. L?wis added the comment: Am 15.10.2010 20:03, schrieb David Watson: > > David Watson added the comment: > >> As a further note: I think socket.gethostname() is a special case, since this is just about a local setting (i.e. not related to DNS). > > But the hostname *is* commonly intended to be looked up in the > DNS or whatever name resolution mechanisms are used locally - > socket.getfqdn(), for instance, works by looking up the result > using gethostbyaddr() (actually the C function getaddrinfo(), > followed by gethostbyaddr()). So I don't see the rationale for > treating it differently from the results of gethostbyaddr(), > getnameinfo(), etc. The result from gethostname likely comes out of machine-local configuration. It may have non-ASCII in it, which is then likely encoded in the local encoding. When looking it up in DNS, IDNA should be applied. OTOH, output from gethostbyaddr likely comes out of the DNS itself. Guessing what encoding it may have is futile - other than guessing that it really ought to be ASCII. > I can see the point of returning the characters that were > intended, but code that looked up the returned name would then > have to be changed to re-encode it to bytes to avoid the > round-tripping issue when non-ASCII characters are returned. Python's socket module is clearly focused on the internet, and intends to support that well. So if you pass a non-ASCII string, it will have to encode that using IDNA. If that's not what you want to get, tough luck. ---------- title: socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names -> socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 19:40:21 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 17 Oct 2010 17:40:21 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1287169943.3422.7.camel@localhost.localdomain> Message-ID: <4CBB3500.90108@v.loewis.de> Martin v. L?wis added the comment: > The issue Raymond raised is the potential impossibility of making the > change /after/ we settle on a stable ABI. The question is whether the > ABI will be enforced starting from 3.2, or from a later date. I'd like to repeat that it will not be impossible to fix this after the ABI is in place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 19:50:46 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Oct 2010 17:50:46 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <4CBB3500.90108@v.loewis.de> Message-ID: <1287337837.3447.36.camel@localhost.localdomain> Antoine Pitrou added the comment: Le dimanche 17 octobre 2010 ? 17:40 +0000, Martin v. L?wis a ?crit : > Martin v. L?wis added the comment: > > > The issue Raymond raised is the potential impossibility of making the > > change /after/ we settle on a stable ABI. The question is whether the > > ABI will be enforced starting from 3.2, or from a later date. > > I'd like to repeat that it will not be impossible to fix this after the > ABI is in place. At the cost of very annoying complications, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 19:53:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 17 Oct 2010 17:53:02 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287337982.47.0.866130422479.issue9778@psf.upfronthosting.co.za> Georg Brandl added the comment: Can't we just do it now, and be done with it regardless of the stable ABI? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 19:57:26 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 17 Oct 2010 17:57:26 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1287338246.51.0.368207248132.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: If any action regarding your patch takes place there will be a comment here about it. Until then assume nothing has happened. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 19:58:06 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 17 Oct 2010 17:58:06 +0000 Subject: [issue4949] Constness in PyErr_NewException In-Reply-To: <1231956299.48.0.0179649567226.issue4949@psf.upfronthosting.co.za> Message-ID: <1287338286.75.0.685961385443.issue4949@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Assuming the patch doesn't cause warnings on the compilers that we use, it looks fine to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 20:01:53 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 17 Oct 2010 18:01:53 +0000 Subject: [issue10130] Create epub format docs and offer them on the download page Message-ID: <1287338513.19.0.538814531695.issue10130@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 20:06:01 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 17 Oct 2010 18:06:01 +0000 Subject: [issue3631] Improve gdbinit of Python 2.6 In-Reply-To: <1219321743.09.0.122028214381.issue3631@psf.upfronthosting.co.za> Message-ID: <1287338761.37.0.811236284385.issue3631@psf.upfronthosting.co.za> Gregory P. Smith added the comment: fyi - for information on using gdb 7 with python see http://bugs.python.org/issue8032 I'm looking at the .gdbinit improvements regardless as not everyone has gdb 7 (notably OS X). ---------- resolution: out of date -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 20:07:15 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 17 Oct 2010 18:07:15 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1287337982.47.0.866130422479.issue9778@psf.upfronthosting.co.za> Message-ID: <4CBB3B4F.5040303@v.loewis.de> Martin v. L?wis added the comment: > Can't we just do it now, and be done with it regardless of the stable ABI? Sure. Somebody needs to implement it (and consider what consequences this has on third-party modules - I'm uncertain). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 20:25:00 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 17 Oct 2010 18:25:00 +0000 Subject: [issue10115] accept4 can fail with errno 90 In-Reply-To: <1287156857.53.0.171830407591.issue10115@psf.upfronthosting.co.za> Message-ID: <4CBB3F75.4010006@v.loewis.de> Martin v. L?wis added the comment: > That's another possibility, in which case we would first remove the > current accept4-calling code in order to fix the buildbot failure. In Python, the lowest layer facing the operating system always directly exposes the API as-is, without reinterpreting the user's request. Not following this principle leads exactly to this kind of problem. So I think .accept() should only call accept(2), and accept4() should only be called if explicitly requested by the application. Exposing it as .accept4(flags) is certainly the most straight-forward way of doing it, but I could also live with .accept(flags) (i.e. call accept4 if flags are being passed, hoping that no other system comes up with another accept extension that has a different integer argument). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 20:51:33 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 17 Oct 2010 18:51:33 +0000 Subject: [issue3631] Improve gdbinit of Python 2.6 In-Reply-To: <1219321743.09.0.122028214381.issue3631@psf.upfronthosting.co.za> Message-ID: <1287341493.25.0.952718760129.issue3631@psf.upfronthosting.co.za> Gregory P. Smith added the comment: everything except the lineno change from gdbinit_python26.patch has been committed in r85646. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 20:55:31 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 17 Oct 2010 18:55:31 +0000 Subject: [issue3631] Improve gdbinit of Python 2.6 In-Reply-To: <1219321743.09.0.122028214381.issue3631@psf.upfronthosting.co.za> Message-ID: <1287341731.43.0.564434693857.issue3631@psf.upfronthosting.co.za> Gregory P. Smith added the comment: and the py_decref in there isn't quite right, fixing... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 20:59:04 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 17 Oct 2010 18:59:04 +0000 Subject: [issue3631] Improve gdbinit of Python 2.6 In-Reply-To: <1219321743.09.0.122028214381.issue3631@psf.upfronthosting.co.za> Message-ID: <1287341944.93.0.0280064249181.issue3631@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think the reference to EasierPythonDebugging is outdated and should be corrected. Dave Malcolm's work is already part of Python, and available with every Python build. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 21:03:24 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 17 Oct 2010 19:03:24 +0000 Subject: [issue3631] Improve gdbinit of Python 2.6 In-Reply-To: <1219321743.09.0.122028214381.issue3631@psf.upfronthosting.co.za> Message-ID: <1287342204.38.0.807215289879.issue3631@psf.upfronthosting.co.za> Gregory P. Smith added the comment: do we have official python docs on this that I should point to? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 21:10:24 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 17 Oct 2010 19:10:24 +0000 Subject: [issue3631] Improve gdbinit of Python 2.6 In-Reply-To: <1287342204.38.0.807215289879.issue3631@psf.upfronthosting.co.za> Message-ID: <4CBB4A1D.5020302@v.loewis.de> Martin v. L?wis added the comment: > do we have official python docs on this that I should point to? I only know of the doc string of libpython.py itself, in Tools/gdb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 21:17:36 2010 From: report at bugs.python.org (Atsushi Odagiri) Date: Sun, 17 Oct 2010 19:17:36 +0000 Subject: [issue10132] mkpkg.py is lacked. In-Reply-To: <1287343056.23.0.00370138188039.issue10132@psf.upfronthosting.co.za> Message-ID: <1287343056.23.0.00370138188039.issue10132@psf.upfronthosting.co.za> New submission from Atsushi Odagiri : I try to install distutils2-1.0a3 to python 2.5. But I got error such a below. $ python -V Python 2.5.2 $ python setup.py build running build running build_py running build_scripts error: file 'distutils2/mkpkg.py' does not exist $ ls distutils2/mkpkg.pyls: cannot access distutils2/mkpkg.py: No such file or directory ---------- assignee: tarek components: Distutils2 messages: 118966 nosy: Atsushi.Odagiri, eric.araujo, tarek priority: normal severity: normal status: open title: mkpkg.py is lacked. versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 21:20:56 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Oct 2010 19:20:56 +0000 Subject: [issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX) In-Reply-To: <1272979850.31.0.0455265952928.issue8611@psf.upfronthosting.co.za> Message-ID: <1287343256.1.0.821424912665.issue8611@psf.upfronthosting.co.za> STINNER Victor added the comment: Updated list of failing test with py3k and a non-ascii path: * Linux, LANG=C: test_gc test_gdb test_runpy test_zipimport * Windows: test_email test_httpservers test_zipimport Possible reasons: * test_httpservers (CGIHTTPServerTestCase.setUp): test should be skipped if sys.executable is not pure ASCII (and it's not possible to create ASCII path using a symlink) * test_zipimport: zipimport uses utf-8 (in strict mode) for the prefix, instead of the filesystem encoding * test_gc (test_get_count): "The following two tests are fragile: ..." :-/ * test_gdb: libpython doesn't support surrogates if paths * test_email: issue with the end of line (\n vs \r\n?) * test_runpy: ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 21:35:37 2010 From: report at bugs.python.org (Case Van Horsen) Date: Sun, 17 Oct 2010 19:35:37 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287344137.07.0.41947840388.issue9778@psf.upfronthosting.co.za> Case Van Horsen added the comment: I'm the maintainer of a third-party library (gmpy) that would be impacted by this and I'm definately in favor of this change. With ever increasing amounts of memory becoming standard in computers, more users will encounter performance issues with large dictionaries. I see 3.2 as the version of Python 3.x that gains wide-spread use. Regardless of the timing of a stable ABI, it's popularity will make it more difficult change the hash size in the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 21:36:59 2010 From: report at bugs.python.org (Michael Olson) Date: Sun, 17 Oct 2010 19:36:59 +0000 Subject: [issue10128] multiprocessing.Pool throws exception with __main__.py In-Reply-To: <1287268913.13.0.756366299299.issue10128@psf.upfronthosting.co.za> Message-ID: <1287344219.85.0.410054920876.issue10128@psf.upfronthosting.co.za> Michael Olson added the comment: I wrapped the offending assertion in a if main_name != '__main__'. I considered not checking the module_name against built-in modules but that seemed likely to be the sort of thing being guarded against, so I left it at an exception for __main__. Ran a few trivial testing using Pool and Process and it seems to work fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 21:44:44 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 17 Oct 2010 19:44:44 +0000 Subject: [issue3631] Improve gdbinit of Python 2.6 In-Reply-To: <1219321743.09.0.122028214381.issue3631@psf.upfronthosting.co.za> Message-ID: <1287344684.24.0.74953099738.issue3631@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I updated the note in gdbinit to point to Tools/gdb/libpython.py for py3k (3.2) and 2.7. Thomas: I didn't do anything with your version of pystack because the existing versions in 3.2 and 2.7 appear to work fine for me. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 21:49:58 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 17 Oct 2010 19:49:58 +0000 Subject: [issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute In-Reply-To: <1275069249.63.0.318211846232.issue8845@psf.upfronthosting.co.za> Message-ID: <1287344998.21.0.754841629493.issue8845@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is now fixed in r85660. The field associated with a T_BOOL must be of type char, so I changed the type of inTransaction. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 21:51:55 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 17 Oct 2010 19:51:55 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1287344137.07.0.41947840388.issue9778@psf.upfronthosting.co.za> Message-ID: <4CBB53D8.4060307@v.loewis.de> Martin v. L?wis added the comment: > I'm the maintainer of a third-party library (gmpy) that would be > impacted by this and I'm definitely in favor of this change. Assume Python would make such a change, and users would build released gmpy versions for such a Python release. What would happen (in terms of observable errors)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 21:54:25 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Sun, 17 Oct 2010 19:54:25 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287345265.27.0.958642819907.issue10073@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: Let me fix this function a little bit... def isleap(year): """Return True for leap years, False for non-leap years.""" if year == 0: raise ValueError('year 0 does not exist') return (year % 4 == 0) and (year % 100 != 0) or (year % 400 == 0) This function, however, does not mind if you give it a negative number. But I think we can leave this option to mean B.C. (Before Christ), so calendar.isleap(-240) would mean 240 B.C., which was a leap year. About the if year == 0 check... Well, read Wikipedia's article http://en.wikipedia.org/wiki/0_(year) which clearly states that "Year zero does not exist in the widely used Gregorian calendar or in its predecessor, the Julian calendar." So we raise a ValueError if this value is used in the calendar.isleap() function. I have uploaded a patch that fixes this function. Please apply it to the trunk and also to the maintenance brances. ---------- keywords: +patch Added file: http://bugs.python.org/file19255/calendar-isleap.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 21:58:01 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 17 Oct 2010 19:58:01 +0000 Subject: [issue10132] mkpkg.py is lacked. In-Reply-To: <1287343056.23.0.00370138188039.issue10132@psf.upfronthosting.co.za> Message-ID: <1287345481.05.0.650475885313.issue10132@psf.upfronthosting.co.za> Tarek Ziad? added the comment: The file was renamed to mkcfg.py, but we forgot to rename it in the scripts options in setup.py for py < 2.6. This was fixed since then. Until the alpha4 release is out you can make the same change in setup.py for your build to work. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 21:58:06 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 17 Oct 2010 19:58:06 +0000 Subject: [issue10132] mkpkg.py is lacked. In-Reply-To: <1287343056.23.0.00370138188039.issue10132@psf.upfronthosting.co.za> Message-ID: <1287345486.9.0.649487646995.issue10132@psf.upfronthosting.co.za> Tarek Ziad? added the comment: The file was renamed to mkcfg.py, but we forgot to rename it in the scripts options in setup.py for py < 2.6. This was fixed since then. Until the alpha4 release is out you can make the same change in setup.py for your build to work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 22:03:13 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Oct 2010 20:03:13 +0000 Subject: [issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX) In-Reply-To: <1272979850.31.0.0455265952928.issue8611@psf.upfronthosting.co.za> Message-ID: <1287345793.09.0.980593458637.issue8611@psf.upfronthosting.co.za> STINNER Victor added the comment: r85655 fixed test_gdb failure. test_runpy failure looks to be linked to test_zipimport problems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 22:11:44 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 17 Oct 2010 20:11:44 +0000 Subject: [issue9772] test_pep277 failure on AMD64 debian parallel buildbot In-Reply-To: <1283601685.6.0.819525034936.issue9772@psf.upfronthosting.co.za> Message-ID: <1287346304.03.0.757259605963.issue9772@psf.upfronthosting.co.za> Martin v. L?wis added the comment: That appears to be a bug in the NFS server. When you creat("Gr\303\274-Gott"), what actually comes out of getdents(3) is Gr\303\274-Gott. This only happens with four bytes of non-ASCII - two UTF-8 bytes are correctly reported. We are investigating this locally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 22:14:55 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Sun, 17 Oct 2010 20:14:55 +0000 Subject: [issue10133] conn_recv_string() broken error handling In-Reply-To: <1287346495.15.0.809946654619.issue10133@psf.upfronthosting.co.za> Message-ID: <1287346495.15.0.809946654619.issue10133@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : Neither conn_recv_string() nor its callers free *newbuffer on error. The promotion rules break negative 'res' for 64-bit Py_ssize_t in the (ulength <= buflength) branch: res = -1 ==> (UINT32)-1 ==> Py_ssize_t 0xffffffff instead of -1. While I'm writing: The _conn_recvall() calls can be factored out of the if(). This patch applies to both 3.2a3 and 2.7. However, the patched failure cases are untested: I do not know how to test them. It passes make test. ---------- components: IO files: conn_recv_string_failures.diff keywords: patch messages: 118978 nosy: hfuru priority: normal severity: normal status: open title: conn_recv_string() broken error handling type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19256/conn_recv_string_failures.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 22:19:14 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Oct 2010 20:19:14 +0000 Subject: [issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX) In-Reply-To: <1272979850.31.0.0455265952928.issue8611@psf.upfronthosting.co.za> Message-ID: <1287346754.94.0.734402005631.issue8611@psf.upfronthosting.co.za> STINNER Victor added the comment: r85659 + r85662 + r85663 fixed test_httpservers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 22:25:38 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 17 Oct 2010 20:25:38 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287347138.7.0.947104882601.issue9778@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's a patch. Please review. ---------- keywords: +patch nosy: +benjamin.peterson Added file: http://bugs.python.org/file19257/hash_t.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 22:26:37 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 17 Oct 2010 20:26:37 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287347197.08.0.297209183143.issue9778@psf.upfronthosting.co.za> Changes by Benjamin Peterson : Added file: http://bugs.python.org/file19258/hash_t.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 22:33:26 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 17 Oct 2010 20:33:26 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287347606.55.0.993797798597.issue9778@psf.upfronthosting.co.za> Changes by Antoine Pitrou : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 23:08:37 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Sun, 17 Oct 2010 21:08:37 +0000 Subject: [issue9730] base64 docs refers to strings instead of bytes In-Reply-To: <1283312665.97.0.832544712662.issue9730@psf.upfronthosting.co.za> Message-ID: <1287349717.34.0.923775526877.issue9730@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: That fixes the example code, but what about the numerous text that reads "strings" that should read "byte sequences", "bytes", or similar? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 22:37:10 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 17 Oct 2010 20:37:10 +0000 Subject: [issue4352] imp.find_module() fails with a UnicodeDecodeError when called with non-ASCII search paths In-Reply-To: <1227071866.1.0.995372704707.issue4352@psf.upfronthosting.co.za> Message-ID: <1287347830.64.0.240847587114.issue4352@psf.upfronthosting.co.za> STINNER Victor added the comment: Good news: this issue is now fixed in py3k (Python 3.2). I cannot give a commit number, because there are too much commits related to this problem (see #8611 and #9425), but it works ;-) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 23:19:18 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 17 Oct 2010 21:19:18 +0000 Subject: [issue8845] Expose sqlite3 connection inTransaction as read-only in_transaction attribute In-Reply-To: <1275069249.63.0.318211846232.issue8845@psf.upfronthosting.co.za> Message-ID: <1287350358.63.0.59351512779.issue8845@psf.upfronthosting.co.za> R. David Murray added the comment: Thank you, Martin. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 23:14:04 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 17 Oct 2010 21:14:04 +0000 Subject: [issue10132] mkpkg.py is missing In-Reply-To: <1287343056.23.0.00370138188039.issue10132@psf.upfronthosting.co.za> Message-ID: <1287350044.72.0.416177614506.issue10132@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: mkpkg.py is lacked. -> mkpkg.py is missing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 22:42:03 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 17 Oct 2010 20:42:03 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287348123.96.0.873515039422.issue9778@psf.upfronthosting.co.za> Martin v. L?wis added the comment: A few comments: - in complex_hash, why did you drop the cast? - in object.rst, add versionchanged. It should also explain that Py_hash_t is a signed integer with the same width as size_t. Otherwise, it looks fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 17 22:55:18 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 17 Oct 2010 20:55:18 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287348918.88.0.628223990781.issue9778@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Dropping the cast was inadvertent. I've now added versionchanged and committed it in r85664. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 00:02:42 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sun, 17 Oct 2010 22:02:42 +0000 Subject: [issue10133] multiprocessing: conn_recv_string() broken error handling In-Reply-To: <1287346495.15.0.809946654619.issue10133@psf.upfronthosting.co.za> Message-ID: <1287352962.83.0.218230387033.issue10133@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- assignee: -> jnoller nosy: +jnoller title: conn_recv_string() broken error handling -> multiprocessing: conn_recv_string() broken error handling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 00:16:00 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Sun, 17 Oct 2010 22:16:00 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287353760.87.0.838147875956.issue10126@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Hi Eric, yes, that's basically what I did. See _fix_command(), which *should* be the only thing that needs to be backported. I do believe it's a faulty test and hopefully the comment explains why it's necessary. Thanks for giving the backport a shot! ---------- assignee: -> eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 00:23:50 2010 From: report at bugs.python.org (Skip Montanaro) Date: Sun, 17 Oct 2010 22:23:50 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287354230.49.0.764773123723.issue9778@psf.upfronthosting.co.za> Skip Montanaro added the comment: I added a placeholder to the What's New document. Since it will affect extension module authors it should be mentioned at a higher level than just Misc/NEWS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 00:48:56 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 17 Oct 2010 22:48:56 +0000 Subject: [issue1343] XMLGenerator: nice elements In-Reply-To: <1193492035.12.0.0580891111126.issue1343@psf.upfronthosting.co.za> Message-ID: <1287355736.29.0.779108652315.issue1343@psf.upfronthosting.co.za> R. David Murray added the comment: Committed Neil's patch (after adding docs) in r85671. Thanks. ---------- nosy: +r.david.murray resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 01:09:54 2010 From: report at bugs.python.org (Bruce Sherwood) Date: Sun, 17 Oct 2010 23:09:54 +0000 Subject: [issue10079] idlelib for Python 3 with Guilherme Polo GSoC enhancements In-Reply-To: <1286939996.87.0.346411752414.issue10079@psf.upfronthosting.co.za> Message-ID: <1287356994.48.0.181852291137.issue10079@psf.upfronthosting.co.za> Bruce Sherwood added the comment: I found a couple of mistakes in the patch I submitted (places where "vidle" should have been "idlelib", and which aren't addressed in Ned Deily's patch), so I've rebuilt the patch starting from the tag r32a3, which I assume is the version from which Ned started. ---------- Added file: http://bugs.python.org/file19259/idlelib20101012_from_r32a3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 01:13:43 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 17 Oct 2010 23:13:43 +0000 Subject: [issue9730] base64 docs refers to strings instead of bytes In-Reply-To: <1283312665.97.0.832544712662.issue9730@psf.upfronthosting.co.za> Message-ID: <1287357223.83.0.160690543445.issue9730@psf.upfronthosting.co.za> R. David Murray added the comment: I reviewed the doc and tightened up the wording (which was already mostly correct) in r85672. Also fixed one typo and changed it to consistently use 'byte string' (rather than 'bytestring' which was used in one or two places). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 01:45:47 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 17 Oct 2010 23:45:47 +0000 Subject: [issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX) In-Reply-To: <1272979850.31.0.0455265952928.issue8611@psf.upfronthosting.co.za> Message-ID: <1287359147.61.0.737499609144.issue8611@psf.upfronthosting.co.za> R. David Murray added the comment: Victor, can you paste or attach the error for email? My MSDN subscription has expired so I can't set up to test it myself (I've submitted the renewal, but who knows how long it will take to process :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 02:20:59 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Oct 2010 00:20:59 +0000 Subject: [issue4499] redefinition of TILDE macro on AIX platform In-Reply-To: <1228258808.76.0.068417078821.issue4499@psf.upfronthosting.co.za> Message-ID: <1287361259.13.0.560244765453.issue4499@psf.upfronthosting.co.za> R. David Murray added the comment: Committed to py3k in r85675, 3.1 in r85676, and 2.7 in r85677. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 03:15:35 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Oct 2010 01:15:35 +0000 Subject: [issue678250] test_mmap failling on AIX Message-ID: <1287364535.33.0.968380921842.issue678250@psf.upfronthosting.co.za> R. David Murray added the comment: Committed to py3k in r85678. If I'm reading this string correctly, I believe this can (and should be) be backported. Am I correct? ---------- nosy: +r.david.murray resolution: -> fixed stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 04:43:27 2010 From: report at bugs.python.org (Case Van Horsen) Date: Mon, 18 Oct 2010 02:43:27 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287369807.57.0.453380548612.issue9778@psf.upfronthosting.co.za> Case Van Horsen added the comment: The patch does not address that "unsigned long" is still used to calculate the hash values. This breaks numeric hashing and leads to incorrect values. Python 3.2a3+ (py3k, Oct 17 2010, 19:03:38) [MSC v.1500 64 bit (AMD64)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import sys >>> sys.hash_info sys.hash_info(width=64, modulus=-1, inf=314159, nan=0, imag=1000003) >>> Would "size_t" be the appropriate type to use? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 05:22:40 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 18 Oct 2010 03:22:40 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287372160.41.0.379350551995.issue9778@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Good point. Here's another patch: ---------- Added file: http://bugs.python.org/file19260/deunsignify.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 05:49:04 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Oct 2010 03:49:04 +0000 Subject: [issue10134] test_email failures on Windows: end of line issue? In-Reply-To: <1287373744.55.0.18095949035.issue10134@psf.upfronthosting.co.za> Message-ID: <1287373744.55.0.18095949035.issue10134@psf.upfronthosting.co.za> New submission from STINNER Victor : See attached file for the full output. One example: == CPython 3.2a3+ (py3k:85660, Oct 17 2010, 21:57:48) [MSC v.1500 32 bit (Intel)] == Windows-XP-5.1.2600-SP3 little-endian ====================================================================== FAIL: test_MIME_digest (email.test.test_email.TestBytesGeneratorIdempotent) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\victor\py3k\lib\email\test\test_email.py", line 2016, in test_MIME_digest self._idempotent(msg, text) File "C:\victor\py3k\lib\email\test\test_email.py", line 2947, in _idempotent self.assertEqual(data, b.getvalue()) File "C:\victor\py3k\lib\email\test\test_email.py", line 2952, in assertEqual self.assertListEqual(str1.split(b'\n'), str2.split(b'\n')) AssertionError: Lists differ: [b'MIME-version: 1.0\r', b'Fro... != [b'MIME-version: 1.0', b'From:... First differing element 0: b'MIME-version: 1.0\r' b'MIME-version: 1.0' - [b'MIME-version: 1.0\r', ? -- + [b'MIME-version: 1.0', - b'From: ppp-request at zzz.org\r', ? -- + b'From: ppp-request at zzz.org', - b'Sender: ppp-admin at zzz.org\r', ? -- + b'Sender: ppp-admin at zzz.org', - b'To: ppp at zzz.org\r', ? -- + b'To: ppp at zzz.org', - b'Subject: Ppp digest, Vol 1 #2 - 5 msgs\r', ? -- + b'Subject: Ppp digest, Vol 1 #2 - 5 msgs', - b'Date: Fri, 20 Apr 2001 20:18:00 -0400 (EDT)\r', ? -- + b'Date: Fri, 20 Apr 2001 20:18:00 -0400 (EDT)', - b'X-Mailer: Mailman v2.0.4\r', ? -- + b'X-Mailer: Mailman v2.0.4', - b'X-Mailman-Version: 2.0.4\r', ? -- + b'X-Mailman-Version: 2.0.4', - b'Content-Type: multipart/mixed; boundary="192.168.1.2.889.32614.987812255.500.21814"\r', ? -- + b'Content-Type: multipart/mixed; boundary="192.168.1.2.889.32614.987812255.500.21814"', - b'\r', ? -- + b'', - b'--192.168.1.2.889.32614.987812255.500.21814\r', ? -- + b'--192.168.1.2.889.32614.987812255.500.21814', - b'Content-type: text/plain; charset=us-ascii\r', ? -- + b'Content-type: text/plain; charset=us-ascii', - b'Content-description: Masthead (Ppp digest, Vol 1 #2)\r', ? -- + b'Content-description: Masthead (Ppp digest, Vol 1 #2)', - b'\r', ? -- + b'', b'Send Ppp mailing list submissions to\r', b'\tppp at zzz.org\r', b'\r', b'To subscribe or unsubscribe via the World Wide Web, visit\r', b'\thttp://www.zzz.org/mailman/listinfo/ppp\r', b"or, via email, send a message with subject or body 'help' to\r", b'\tppp-request at zzz.org\r', b'\r', b'You can reach the person managing the list at\r', b'\tppp-admin at zzz.org\r', b'\r', b'When replying, please edit your Subject line so it is more specific\r', b'than "Re: Contents of Ppp digest..."\r', b'\r', - b'\r', ? -- + b'', - b'--192.168.1.2.889.32614.987812255.500.21814\r', ? -- + b'--192.168.1.2.889.32614.987812255.500.21814', - b'Content-type: text/plain; charset=us-ascii\r', ? -- + b'Content-type: text/plain; charset=us-ascii', - b"Content-description: Today's Topics (5 msgs)\r", ? -- + b"Content-description: Today's Topics (5 msgs)", - b'\r', ? -- + b'', b"Today's Topics:\r", b'\r', b' 1. testing #1 (Barry A. Warsaw)\r', b' 2. testing #2 (Barry A. Warsaw)\r', b' 3. testing #3 (Barry A. Warsaw)\r', b' 4. testing #4 (Barry A. Warsaw)\r', b' 5. testing #5 (Barry A. Warsaw)\r', - b'\r', ? -- + b'', - b'--192.168.1.2.889.32614.987812255.500.21814\r', ? -- + b'--192.168.1.2.889.32614.987812255.500.21814', - b'Content-Type: multipart/digest; boundary="__--__--"\r', ? -- + b'Content-Type: multipart/digest; boundary="__--__--"', - b'\r', ? -- + b'', - b'--__--__--\r', ? -- + b'--__--__--', - b'\r', ? -- + b'', - b'Message: 1\r', ? -- + b'Message: 1', - b'Content-Type: text/plain; charset=us-ascii\r', ? -- + b'Content-Type: text/plain; charset=us-ascii', - b'Content-Transfer-Encoding: 7bit\r', ? -- + b'Content-Transfer-Encoding: 7bit', - b'Date: Fri, 20 Apr 2001 20:16:13 -0400\r', ? -- + b'Date: Fri, 20 Apr 2001 20:16:13 -0400', - b'To: ppp at zzz.org\r', ? -- + b'To: ppp at zzz.org', - b'From: barry at digicool.com (Barry A. Warsaw)\r', ? -- + b'From: barry at digicool.com (Barry A. Warsaw)', - b'Subject: [Ppp] testing #1\r', ? -- + b'Subject: [Ppp] testing #1', - b'Precedence: bulk\r', ? -- + b'Precedence: bulk', - b'\r', ? -- + b'', b'\r', b'hello\r', b'\r', - b'\r', ? -- + b'', - b'--__--__--\r', ? -- + b'--__--__--', - b'\r', ? -- + b'', - b'Message: 2\r', ? -- + b'Message: 2', - b'Date: Fri, 20 Apr 2001 20:16:21 -0400\r', ? -- + b'Date: Fri, 20 Apr 2001 20:16:21 -0400', - b'Content-Type: text/plain; charset=us-ascii\r', ? -- + b'Content-Type: text/plain; charset=us-ascii', - b'Content-Transfer-Encoding: 7bit\r', ? -- + b'Content-Transfer-Encoding: 7bit', - b'To: ppp at zzz.org\r', ? -- + b'To: ppp at zzz.org', - b'From: barry at digicool.com (Barry A. Warsaw)\r', ? -- + b'From: barry at digicool.com (Barry A. Warsaw)', - b'Precedence: bulk\r', ? -- + b'Precedence: bulk', - b'\r', ? -- + b'', b'\r', b'hello\r', b'\r', - b'\r', ? -- + b'', - b'--__--__--\r', ? -- + b'--__--__--', - b'\r', ? -- + b'', - b'Message: 3\r', ? -- + b'Message: 3', - b'Date: Fri, 20 Apr 2001 20:16:25 -0400\r', ? -- + b'Date: Fri, 20 Apr 2001 20:16:25 -0400', - b'Content-Type: text/plain; charset=us-ascii\r', ? -- + b'Content-Type: text/plain; charset=us-ascii', - b'Content-Transfer-Encoding: 7bit\r', ? -- + b'Content-Transfer-Encoding: 7bit', - b'To: ppp at zzz.org\r', ? -- + b'To: ppp at zzz.org', - b'From: barry at digicool.com (Barry A. Warsaw)\r', ? -- + b'From: barry at digicool.com (Barry A. Warsaw)', - b'Subject: [Ppp] testing #3\r', ? -- + b'Subject: [Ppp] testing #3', - b'Precedence: bulk\r', ? -- + b'Precedence: bulk', - b'\r', ? -- + b'', b'\r', b'hello\r', b'\r', - b'\r', ? -- + b'', - b'--__--__--\r', ? -- + b'--__--__--', - b'\r', ? -- + b'', - b'Message: 4\r', ? -- + b'Message: 4', - b'Date: Fri, 20 Apr 2001 20:16:28 -0400\r', ? -- + b'Date: Fri, 20 Apr 2001 20:16:28 -0400', - b'Content-Type: text/plain; charset=us-ascii\r', ? -- + b'Content-Type: text/plain; charset=us-ascii', - b'Content-Transfer-Encoding: 7bit\r', ? -- + b'Content-Transfer-Encoding: 7bit', - b'To: ppp at zzz.org\r', ? -- + b'To: ppp at zzz.org', - b'From: barry at digicool.com (Barry A. Warsaw)\r', ? -- + b'From: barry at digicool.com (Barry A. Warsaw)', - b'Subject: [Ppp] testing #4\r', ? -- + b'Subject: [Ppp] testing #4', - b'Precedence: bulk\r', ? -- + b'Precedence: bulk', - b'\r', ? -- + b'', b'\r', b'hello\r', b'\r', - b'\r', ? -- + b'', - b'--__--__--\r', ? -- + b'--__--__--', - b'\r', ? -- + b'', - b'Message: 5\r', ? -- + b'Message: 5', - b'Date: Fri, 20 Apr 2001 20:16:32 -0400\r', ? -- + b'Date: Fri, 20 Apr 2001 20:16:32 -0400', - b'Content-Type: text/plain; charset=us-ascii\r', ? -- + b'Content-Type: text/plain; charset=us-ascii', - b'Content-Transfer-Encoding: 7bit\r', ? -- + b'Content-Transfer-Encoding: 7bit', - b'To: ppp at zzz.org\r', ? -- + b'To: ppp at zzz.org', - b'From: barry at digicool.com (Barry A. Warsaw)\r', ? -- + b'From: barry at digicool.com (Barry A. Warsaw)', - b'Subject: [Ppp] testing #5\r', ? -- + b'Subject: [Ppp] testing #5', - b'Precedence: bulk\r', ? -- + b'Precedence: bulk', - b'\r', ? -- + b'', b'\r', b'hello\r', b'\r', b'\r', b'\r', - b'\r', ? -- + b'', - b'--__--__----\r', ? -- + b'--__--__----', - b'--192.168.1.2.889.32614.987812255.500.21814\r', ? -- + b'--192.168.1.2.889.32614.987812255.500.21814', - b'Content-type: text/plain; charset=us-ascii\r', ? -- + b'Content-type: text/plain; charset=us-ascii', - b'Content-description: Digest Footer\r', ? -- + b'Content-description: Digest Footer', - b'\r', ? -- + b'', b'_______________________________________________\r', b'Ppp mailing list\r', b'Ppp at zzz.org\r', b'http://www.zzz.org/mailman/listinfo/ppp\r', b'\r', - b'\r', ? -- + b'', - b'--192.168.1.2.889.32614.987812255.500.21814--\r', ? -- + b'--192.168.1.2.889.32614.987812255.500.21814--', b'\r', b'End of Ppp Digest\r', b'\r', b''] ---------- components: Library (Lib) files: out.txt messages: 118996 nosy: haypo, r.david.murray priority: normal severity: normal status: open title: test_email failures on Windows: end of line issue? versions: Python 3.2 Added file: http://bugs.python.org/file19261/out.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 05:49:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Oct 2010 03:49:58 +0000 Subject: [issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX) In-Reply-To: <1272979850.31.0.0455265952928.issue8611@psf.upfronthosting.co.za> Message-ID: <1287373798.96.0.284547906568.issue8611@psf.upfronthosting.co.za> STINNER Victor added the comment: > Victor, can you paste or attach the error for email? It doesn't look to be related to the path name (same failure with "py3k?" or "py3k" directory name), so I opened #10134. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 11:24:12 2010 From: report at bugs.python.org (=?utf-8?b?U8OpYmFzdGllbiBTYWJsw6k=?=) Date: Mon, 18 Oct 2010 09:24:12 +0000 Subject: [issue9862] PIPE_BUF is invalid on AIX In-Reply-To: <1284568234.82.0.42184878799.issue9862@psf.upfronthosting.co.za> Message-ID: <1287393852.0.0.920687644031.issue9862@psf.upfronthosting.co.za> S?bastien Sabl? added the comment: Thanks R. David. I checked in 3.1 and PIPE_BUF is not defined in the select module, so the default value of 512 is used in subprocess. So no correction is needed for that version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 11:52:46 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 18 Oct 2010 09:52:46 +0000 Subject: [issue10048] urllib.request documentation confusing In-Reply-To: <1286535990.46.0.129844190964.issue10048@psf.upfronthosting.co.za> Message-ID: <1287395566.92.0.115923881872.issue10048@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: docs at python -> orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 12:08:56 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 18 Oct 2010 10:08:56 +0000 Subject: [issue1531775] HTTPSConnection request hangs Message-ID: <1287396536.81.0.341988313433.issue1531775@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Not an issue anymore as socket timeout at client is supposed to happen with the connection is hung due to unresponsive host. The original bug was raised py2.3. Closing it as out of date. ---------- nosy: +orsenthil resolution: -> out of date stage: unit test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 12:11:22 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 18 Oct 2010 10:11:22 +0000 Subject: [issue1520831] urrlib2 max_redirections=0 disables redirects Message-ID: <1287396682.38.0.633624733595.issue1520831@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 12:18:45 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 18 Oct 2010 10:18:45 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287397125.95.0.481151818282.issue9778@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Wouldn't it be better to use Py_hash_t instead of size_t for calculating the hash values in those hash functions ? ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 12:21:02 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 18 Oct 2010 10:21:02 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287397262.74.0.60815440391.issue9778@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: And related to my previous comment: shouldn't Py_hash_t map to size_t instead of Py_ssize_t ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 12:25:33 2010 From: report at bugs.python.org (=?utf-8?b?U8OpYmFzdGllbiBTYWJsw6k=?=) Date: Mon, 18 Oct 2010 10:25:33 +0000 Subject: [issue678250] test_mmap failling on AIX Message-ID: <1287397533.05.0.256887057229.issue678250@psf.upfronthosting.co.za> S?bastien Sabl? added the comment: I also believe this patch should be backported. If the issue2643 is not backported, then the patch to apply should be "patch_flush_mmap.diff" instead of "patch_mmap_flush_updated.diff" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 12:26:03 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Mon, 18 Oct 2010 10:26:03 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287397563.59.0.0941833598936.issue10135@psf.upfronthosting.co.za> Message-ID: <1287397563.59.0.0941833598936.issue10135@psf.upfronthosting.co.za> New submission from Bo?tjan Mejak : Have your default locale set to 'Slovenian' which uses a comma for the decimal symbol, like 2.76 is written as 2,76. Observe that the format specifier 'n' does not work for the default 'Slovenian' locale setting. Then try running this in the Python interpreter: '{number:.3n}'.format(number=2.76) You get this: >>> '{number:.3n}'.format(number=2.76) '2.76' Excepted the is the return value '2,76'. Please fix this bug. ---------- components: Interpreter Core messages: 119003 nosy: Retro priority: normal severity: normal status: open title: Format specifier 'n' not working type: behavior versions: 3rd party, Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 12:36:21 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 18 Oct 2010 10:36:21 +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: <1287398181.41.0.762940315766.issue4733@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 12:45:20 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 18 Oct 2010 10:45:20 +0000 Subject: [issue9730] base64 docs refers to strings instead of bytes In-Reply-To: <1283554637.01.0.167836774867.issue9730@psf.upfronthosting.co.za> Message-ID: <20101018104510.GC10299@remy> Senthil Kumaran added the comment: On Fri, Sep 03, 2010 at 10:57:17PM +0000, Georg Brandl wrote: > That's why I said to use "testsetup" directives -- they are not > visible in the HTML/PDF/... output, but used when running the tests. Do you already have such a directive in sphinx? I think, it would be a good idea to have doctests succeed. And having examples in the docs working 'directly out of text'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 12:47:27 2010 From: report at bugs.python.org (Matthias Klose) Date: Mon, 18 Oct 2010 10:47:27 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1287398847.3.0.213620389223.issue9807@psf.upfronthosting.co.za> Matthias Klose added the comment: Index: Misc/python.pc.in =================================================================== --- Misc/python.pc.in (Revision 85644) +++ Misc/python.pc.in (Arbeitskopie) @@ -8,6 +8,6 @@ Requires: Version: @VERSION@ Libs.private: @LIBS@ -Libs: -L${libdir} -lpython at VERSION@ +Libs: -L${libdir} -lpython at VERSION@@ABIFLAGS@ Cflags: -I${includedir}/python at VERSION@ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 12:48:31 2010 From: report at bugs.python.org (Matthias Klose) Date: Mon, 18 Oct 2010 10:48:31 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1287398911.77.0.163965001142.issue9807@psf.upfronthosting.co.za> Matthias Klose added the comment: the name of the library should not differ for the static and the shared library. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 13:29:55 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 18 Oct 2010 11:29:55 +0000 Subject: [issue10136] kill_python doesn't work with short path In-Reply-To: <1287401395.69.0.888132012732.issue10136@psf.upfronthosting.co.za> Message-ID: <1287401395.69.0.888132012732.issue10136@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : When kill_python[,d].exe was called via short path, no python processes won't be killed. This happens because, directory path is compared via simple wcsnicmp. If one is short path and another is long path, wcsnicmp determines they are not same path. This patch solves this issue with GetFileInformationByHandle's File ID information. Probably this won't happen so much, so priority is low. ---------- components: Build files: py3k_fix_kill_python_for_short_path.patch keywords: patch messages: 119007 nosy: ocean-city priority: normal severity: normal status: open title: kill_python doesn't work with short path type: behavior versions: Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file19262/py3k_fix_kill_python_for_short_path.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 13:38:25 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 18 Oct 2010 11:38:25 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287397563.59.0.0941833598936.issue10135@psf.upfronthosting.co.za> Message-ID: <1287401905.71.0.123911223905.issue10135@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +eric.smith, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 13:40:37 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 18 Oct 2010 11:40:37 +0000 Subject: [issue10127] ssl.SSLSocket().close() does not close the connection In-Reply-To: <1287263674.2.0.992398068639.issue10127@psf.upfronthosting.co.za> Message-ID: <1287402037.8.0.248982448018.issue10127@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 13:41:18 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 18 Oct 2010 11:41:18 +0000 Subject: [issue5736] Add the iterator protocol to dbm modules In-Reply-To: <1239457673.6.0.50765651359.issue5736@psf.upfronthosting.co.za> Message-ID: <1287402078.14.0.432012181306.issue5736@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 13:44:16 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 18 Oct 2010 11:44:16 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287397563.59.0.0941833598936.issue10135@psf.upfronthosting.co.za> Message-ID: <1287402256.63.0.568377111357.issue10135@psf.upfronthosting.co.za> Eric Smith added the comment: How are you setting the Slovenian locale? Could please let me know what this prints: import locale locale.localeconv() Also, could you let me know what: locale.format('%.3f', 2.45) prints? Both of these would be when the Slovenian locale is selected. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 13:47:15 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Oct 2010 11:47:15 +0000 Subject: [issue9730] base64 docs refers to strings instead of bytes In-Reply-To: <1283312665.97.0.832544712662.issue9730@psf.upfronthosting.co.za> Message-ID: <1287402435.76.0.0358978973498.issue9730@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, Georg mentioned the directive because it exists :) See the turtle docs for some examples, I think. I seem to remember using it when I made those doctests pass on 2.7 (warning: it writes weird stuff on your screen :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 14:00:26 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 18 Oct 2010 12:00:26 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287397563.59.0.0941833598936.issue10135@psf.upfronthosting.co.za> Message-ID: <1287403226.72.0.750130764136.issue10135@psf.upfronthosting.co.za> Eric Smith added the comment: Oops, I meant "locale.format('%.3f', 2.76)", although of course the number shouldn't matter. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 14:19:55 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 18 Oct 2010 12:19:55 +0000 Subject: [issue678250] test_mmap failing on AIX Message-ID: <1287404395.97.0.642921589287.issue678250@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- title: test_mmap failling on AIX -> test_mmap failing on AIX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 14:45:42 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 18 Oct 2010 12:45:42 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1287397262.74.0.60815440391.issue9778@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: 2010/10/18 Marc-Andre Lemburg : > > Marc-Andre Lemburg added the comment: > > And related to my previous comment: shouldn't Py_hash_t map to size_t instead of Py_ssize_t ? No, negative values have to be allowed. ---------- title: Make hash values the same width as a pointer (or Py_ssize_t) -> Make hash values the same width as a pointer (or Py_ssize_t) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 15:09:53 2010 From: report at bugs.python.org (jan matejek) Date: Mon, 18 Oct 2010 13:09:53 +0000 Subject: [issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6 In-Reply-To: <1281222795.64.0.211558756173.issue9539@psf.upfronthosting.co.za> Message-ID: <1287407393.9.0.686757058826.issue9539@psf.upfronthosting.co.za> jan matejek added the comment: i was able to reproduce this in clean 2.7 Sandro, this is only reproducible on systems without python - so by definition, you can hit this only during installation as for issue8335, yes, i think that it's a duplicate distutils2 is irrelevant here, because you can only install it on top of existing python. The problem here is that stdlib's distutils must use the newly built libpython, *not* the systemwide one - a problem that distutils2 don't need to solve until they become part of stdlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 15:28:07 2010 From: report at bugs.python.org (Floris Bruynooghe) Date: Mon, 18 Oct 2010 13:28:07 +0000 Subject: [issue3526] Customized malloc implementation on SunOS and AIX In-Reply-To: <1218190381.02.0.174331191244.issue3526@psf.upfronthosting.co.za> Message-ID: <1287408487.86.0.0874969452737.issue3526@psf.upfronthosting.co.za> Changes by Floris Bruynooghe : ---------- nosy: +flub _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 15:29:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 13:29:06 +0000 Subject: [issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6 In-Reply-To: <1281222795.64.0.211558756173.issue9539@psf.upfronthosting.co.za> Message-ID: <1287408546.89.0.360927074661.issue9539@psf.upfronthosting.co.za> ?ric Araujo added the comment: > i was able to reproduce this in clean 2.7 > as for issue8335, yes, i think that it's a duplicate Ok, then please add your failure messages on the other bug. > Sandro, this is only reproducible on systems without python >- so by definition, you can hit this only during installation Hm, Sandro didn?t say whether he had a system Python or not. > distutils2 is irrelevant here This is internal bookkeeping, you can ignore it. When we fix something in distutils, it?s forward-ported to distutils2. I don?t want to wait until the end to synchronize bug fixes. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> distutils test_build_ext's test_get_outputs fails in bootstrap environment _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 15:32:18 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 13:32:18 +0000 Subject: [issue8335] distutils test_build_ext's test_get_outputs fails in bootstrap environment In-Reply-To: <1270662842.61.0.49246293202.issue8335@psf.upfronthosting.co.za> Message-ID: <1287408738.61.0.389524601198.issue8335@psf.upfronthosting.co.za> ?ric Araujo added the comment: This may be solved by backporting the fix in #10126. I?ll do it when my network gives me access to svn again :/ ---------- components: +Distutils2 versions: +3rd party, Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 15:39:05 2010 From: report at bugs.python.org (Case Van Horsen) Date: Mon, 18 Oct 2010 13:39:05 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287409145.8.0.808802653028.issue9778@psf.upfronthosting.co.za> Case Van Horsen added the comment: Some quick comments on the latest patch. 1) I don't think you can remove the type cast used when comparing the hash value against -1 and -2. IIRC, GCC considers that undefined behavior. 2) In sysmodule.c, we need to use PyLong_FromSsize_t when storing _PyHASH_MODULUS. 3) In pyport.h, we need a better way to define _PyHASH_MODULUS. The existing "((1UL << _PyHASH_BITS) - 1)" fails when unsigned long is smaller than Py_ssize_t. "((1ULL << _PyHASH_BITS) - 1)" works on 64-bit Windows but is not a good solution for systems that don't have an unsigned long long type. I haven't thought of a better solution for one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 15:44:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 13:44:01 +0000 Subject: [issue8335] distutils test_build_ext's test_get_outputs fails in bootstrap environment In-Reply-To: <1270662842.61.0.49246293202.issue8335@psf.upfronthosting.co.za> Message-ID: <1287409441.01.0.471323411427.issue8335@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +sandro.tosi, valeo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 15:49:42 2010 From: report at bugs.python.org (Sandro Tosi) Date: Mon, 18 Oct 2010 13:49:42 +0000 Subject: [issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6 In-Reply-To: <1287408546.89.0.360927074661.issue9539@psf.upfronthosting.co.za> Message-ID: Sandro Tosi added the comment: On Mon, Oct 18, 2010 at 15:29, ?ric Araujo wrote: > ?ric Araujo added the comment: >> Sandro, this is only reproducible on systems without python >>- so by definition, you can hit this only during installation > > Hm, Sandro didn?t say whether he had a system Python or not. yes I have :) I can try on an isolated chroot to replicate the problem, but it will probably take me some day to have the time to do that, Cheers, -- Sandro Tosi (aka morph, morpheus, matrixhasu) My website: http://matrixhasu.altervista.org/ Me at Debian: http://wiki.debian.org/SandroTosi ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 15:56:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 13:56:03 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: Message-ID: Alexander Belopolsky added the comment: On Mon, Oct 18, 2010 at 8:45 AM, Benjamin Peterson wrote: .. > No, negative values have to be allowed. > Why? As far as I can tell, negative values are only used as sentinels and we can use say (size_t)-1 instead of -1L. Are there cases where hash values' ordering is important? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 15:57:57 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 18 Oct 2010 13:57:57 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1287410277.48.0.140220482334.issue5117@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Committed fixes in r85689(py3k), r85693(release31-maint), r85694(release27-maint). (This should work because I simply ported already working fix in ntpath.relpath) ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 15:59:46 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 18 Oct 2010 13:59:46 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: Message-ID: <1287410381.3492.2.camel@localhost.localdomain> Antoine Pitrou added the comment: Le lundi 18 octobre 2010 ? 13:56 +0000, Alexander Belopolsky a ?crit : > Alexander Belopolsky added the comment: > > On Mon, Oct 18, 2010 at 8:45 AM, Benjamin Peterson > wrote: > .. > > No, negative values have to be allowed. > > > > Why? As far as I can tell, negative values are only used as sentinels > and we can use say (size_t)-1 instead of -1L. You can, except that changing the sentinel value will probably break a lot of code out there (and there's no benefit AFAICT). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 16:09:12 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 14:09:12 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1287410381.3492.2.camel@localhost.localdomain> Message-ID: Alexander Belopolsky added the comment: On Mon, Oct 18, 2010 at 9:59 AM, Antoine Pitrou wrote: .. >> Why? ?As far as I can tell, negative values are only used as sentinels >> and we can use say (size_t)-1 instead of -1L. > > You can, except that changing the sentinel value will probably break a > lot of code out there (and there's no benefit AFAICT). AFAICT, a change from (Py_ssize_t)-1 to (size_t)-1 is less likely to break code than a change from -1L to (Py_ssize_t)-1. (Assuming a sizeof(long) != sizeof(void*) platform.) The benefit, though is that hash computations can be performed natively on the hash values without casting to an unrelated type. If Py_hash_t needs to be signed, I would like to see a typedef Py_uhash_t size_t next to that for Py_hash_t and Py_uhash_t used in hash computations rather than explicit size_t. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 16:11:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 14:11:55 +0000 Subject: [issue1646068] Dict lookups fail if sizeof(Py_ssize_t) < sizeof(long) Message-ID: <1287411115.6.0.781459389782.issue1646068@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Issue #9778 makes this out of date. ---------- assignee: tim_one -> belopolsky nosy: -BreamoreBoy resolution: -> out of date status: open -> pending superseder: -> Make hash values the same width as a pointer (or Py_ssize_t) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 16:40:37 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 18 Oct 2010 14:40:37 +0000 Subject: [issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6 In-Reply-To: <1281222795.64.0.211558756173.issue9539@psf.upfronthosting.co.za> Message-ID: <1287412837.51.0.831553908845.issue9539@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Even though this one's older, I'm going to mark it as a duplicate of issue 10126, which is tracking the backport of the fix I made in Python 3.2 to 3.1 and 2.7. The key issues here are that Python was built with --enabled-shared and the test *only* fails when running 'make test'. Running ./python as Sandro did does not trigger the bug - at least it didn't in 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 16:41:49 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 18 Oct 2010 14:41:49 +0000 Subject: [issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6 In-Reply-To: <1281222795.64.0.211558756173.issue9539@psf.upfronthosting.co.za> Message-ID: <1287412909.94.0.42113596439.issue9539@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Seems like roundup hates me. Just go to issue 10126. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 16:41:51 2010 From: report at bugs.python.org (Stephen Hansen) Date: Mon, 18 Oct 2010 14:41:51 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1287412911.75.0.586827223965.issue5117@psf.upfronthosting.co.za> Stephen Hansen added the comment: FYI, this fix broke some buildbots: http://www.python.org/dev/buildbot/all/builders/x86%20Snow%20Leopard%202.7/builds/50 for instance. Gentoo too. ---------- nosy: +ixokai _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 16:46:14 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 14:46:14 +0000 Subject: [issue9539] python-2.6.4: test failure in test_distutils due to linking to system libpython2.6 In-Reply-To: <1281222795.64.0.211558756173.issue9539@psf.upfronthosting.co.za> Message-ID: <1287413174.43.0.936798825537.issue9539@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- superseder: distutils test_build_ext's test_get_outputs fails in bootstrap environment -> test_distutils failure with --enable-shared _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 16:47:36 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 18 Oct 2010 14:47:36 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: Message-ID: <4CBC5E05.8030608@egenix.com> Marc-Andre Lemburg added the comment: Benjamin Peterson wrote: > > Benjamin Peterson added the comment: >> Marc-Andre Lemburg added the comment: >> >> And related to my previous comment: shouldn't Py_hash_t map to size_t instead of Py_ssize_t ? > > No, negative values have to be allowed. Ah, right... we use -1 as error indicator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 16:48:12 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 14:48:12 +0000 Subject: [issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings In-Reply-To: <1287161682.26.0.892900314694.issue10117@psf.upfronthosting.co.za> Message-ID: <1287413292.17.0.398798879522.issue10117@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in r85695. Leaving open to discuss whether anything can/should be done for the case when reindent acts as an stdin to stdout filter. Also, what is the policy on backporting Tools' bug fixes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 17:17:17 2010 From: report at bugs.python.org (Sebastian Ramacher) Date: Mon, 18 Oct 2010 15:17:17 +0000 Subject: [issue1699259] replacing char* with const char* in sysmodule.c/.h Message-ID: <1287415037.39.0.0645391423939.issue1699259@psf.upfronthosting.co.za> Sebastian Ramacher added the comment: Any news on that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 17:17:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 15:17:25 +0000 Subject: [issue8335] distutils test_build_ext's test_get_outputs fails in bootstrap environment In-Reply-To: <1270662842.61.0.49246293202.issue8335@psf.upfronthosting.co.za> Message-ID: <1287415045.62.0.798290941116.issue8335@psf.upfronthosting.co.za> ?ric Araujo added the comment: Marking as duplicate, following Barry in msg119022 ---------- nosy: +barry resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> test_distutils failure with --enable-shared _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 17:19:21 2010 From: report at bugs.python.org (Case Van Horsen) Date: Mon, 18 Oct 2010 15:19:21 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287415161.37.0.445409166737.issue9778@psf.upfronthosting.co.za> Case Van Horsen added the comment: Also, note that hash(-12) is -12. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 17:27:28 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 18 Oct 2010 15:27:28 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: Message-ID: <1287415644.3492.5.camel@localhost.localdomain> Antoine Pitrou added the comment: > AFAICT, a change from (Py_ssize_t)-1 to (size_t)-1 is less likely to > break code than a change from -1L to (Py_ssize_t)-1. (Assuming a > sizeof(long) != sizeof(void*) platform.) That's true. > The benefit, though is that > hash computations can be performed natively on the hash values without > casting to an unrelated type. I don't understand what you mean by "native" and "unrelated". Signed integers are not less native than unsigned ones. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 17:34:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 15:34:15 +0000 Subject: [issue1699259] replacing char* with const char* in sysmodule.c/.h In-Reply-To: <1287415037.39.0.0645391423939.issue1699259@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Oct 18, 2010 at 11:17 AM, Sebastian Ramacher wrote: .. > Any news on that? Is this patch still relevant for 3.2? It looks like const has been added when char* was changed to wchar_t* in the affected functions. See r62178. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 17:44:43 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 15:44:43 +0000 Subject: [issue1699259] replacing char* with const char* in sysmodule.c/.h Message-ID: <1287416683.87.0.623631900052.issue1699259@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: In fact, it looks like const has been added in py3k as early as r57439. I am resetting "versions" to 2.7, but I am -0 on backporting. I am also unselecting "type" because with "feature request" type this should be closed while some may argue that this is a bug. ---------- nosy: -BreamoreBoy type: feature request -> versions: +Python 2.7 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 17:54:05 2010 From: report at bugs.python.org (Bruce Sherwood) Date: Mon, 18 Oct 2010 15:54:05 +0000 Subject: [issue10137] Patch to IDLE for Python 2.7, at Guido's request In-Reply-To: <1287417245.71.0.949450394447.issue10137@psf.upfronthosting.co.za> Message-ID: <1287417245.71.0.949450394447.issue10137@psf.upfronthosting.co.za> New submission from Bruce Sherwood : At Guido's request, I've carried out the same update to the IDLE distributed with Python 2.7 that I submitted for Python 3, to incorporate the work of Guilherme Polo in the Google Summer of Code 2009. Guido was concerned that with significant problems reported for IDLE 2.7, there should be an update despite Python 2.7 itself being essentially frozen. The basic structure for IDLE 3.2 was carried over. The main changes that had to be made were the change in module names between Python 2.7 and Python 3.2 (e.g. Tkinter in 2.7 is tkinter in 3.2). ---------- components: IDLE files: idlelib2.7.patch keywords: patch messages: 119033 nosy: Bruce.Sherwood priority: normal severity: normal status: open title: Patch to IDLE for Python 2.7, at Guido's request type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file19263/idlelib2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 17:55:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 15:55:17 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287397563.59.0.0941833598936.issue10135@psf.upfronthosting.co.za> Message-ID: <1287417317.93.0.787026136345.issue10135@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: -3rd party, Python 2.5, Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 18:09:19 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 16:09:19 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1287415644.3492.5.camel@localhost.localdomain> Message-ID: Alexander Belopolsky added the comment: On Mon, Oct 18, 2010 at 11:27 AM, Antoine Pitrou wrote: .. >> The benefit, though is that >> hash computations can be performed natively on the hash values without >> casting to an unrelated type. > > I don't understand what you mean by "native" and "unrelated". Signed > integers are not less native than unsigned ones. Sorry, I could have been clearer indeed. Consider the following code: static Py_hash_t long_hash(PyLongObject *v) { unsigned long x; ... x = x * sign; if (x == (unsigned long)-1) x = (unsigned long)-2; return (Py_hash_t)x; } Wouldn't it be cleaner if x was the same type as hash? Note that unsigned long is now wrong. What is needed is "unsigned integer type of the same size as Py_hash_t." If Py_hash_t has to stay signed, I think we should at least not rely of sizeof(Py_hash_t) to always remain the same as sizeof(size_t). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 18:14:53 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 16:14:53 +0000 Subject: [issue10118] Tkinter does not find font In-Reply-To: <1287192630.89.0.924571330725.issue10118@psf.upfronthosting.co.za> Message-ID: <1287418493.35.0.114790640208.issue10118@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 18:22:48 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 16:22:48 +0000 Subject: [issue10087] HTML calendar is broken In-Reply-To: <1286984608.4.0.168516535909.issue10087@psf.upfronthosting.co.za> Message-ID: <1287418968.12.0.0402040569755.issue10087@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 18:35:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 16:35:10 +0000 Subject: [issue2571] cmd.py always uses raw_input, even when another stdin is specified In-Reply-To: <1207594702.67.0.73869549091.issue2571@psf.upfronthosting.co.za> Message-ID: <1287419710.75.0.512324456993.issue2571@psf.upfronthosting.co.za> ?ric Araujo added the comment: You could say my question was half-academic. I read your closing message and thought ?this feature request has been closed because of the version, not really rejected?, so I asked about reopening. On a second level, it appears from your detailed message (thanks for writing it) that the situation is still unclear, so I do think that a review of docs and tests is needed, and maybe an API cleanup. I?m assigning this to myself as an opportunity to learn the insides of cmd in some months. ---------- assignee: -> eric.araujo resolution: out of date -> remind stage: unit test needed -> type: feature request -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 18:38:54 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 16:38:54 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1287345265.27.0.958642819907.issue10073@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Sun, Oct 17, 2010 at 3:54 PM, Bo?tjan Mejak wrote: .. > About the ?if year == 0 ?check... Well, read Wikipedia's article ?http://en.wikipedia.org/wiki/0_(year) ?which clearly > states that "Year zero does not exist in the widely used Gregorian calendar or in its predecessor, the Julian > calendar." ?So we raise a ValueError if this value is used in the calendar.isleap() function. > Well, Wikipedia is not the most authoritative source, but if you go the right article there, you will find that """ Mathematically, it is more convenient to include a year zero and represent earlier years as negative, for the specific purpose of facilitating the calculation of the number of years between a negative (BC) year and a positive (AD) year. This is the convention used in astronomical year numbering and in the international standard date system, ISO 8601. In these systems, the year 0 is a leap year.[2] """ Python documentation states that calendar module implements 'the ?proleptic Gregorian? calendar in Dershowitz and Reingold?s book ?Calendrical Calculations?'. See http://docs.python.org/dev/py3k/library/calendar.html I don't have Dershowitz and Reingold?s book to check, but ISO/FDIS 8601:2000(E) standard contains a note that states: "In the prolaptic [sic] Gregorian calendar the calendar year [0000] is a leap year." In any case, I think there are more important issues with the calendar module than perceived bugs in isleap() function. See for example issue 10087. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 18:39:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 16:39:47 +0000 Subject: [issue10086] test_sysconfig failure with site-packages In-Reply-To: <1286980763.58.0.308351769071.issue10086@psf.upfronthosting.co.za> Message-ID: <1287419987.47.0.402880999558.issue10086@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the fix, good catch! Do you want to write a patch to test_sysconfig to add a test? Otherwise I?ll do it. ---------- components: +Distutils2, Library (Lib) versions: +3rd party, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 18:43:03 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 16:43:03 +0000 Subject: [issue10086] test_sysconfig failure with site-packages In-Reply-To: <1286980763.58.0.308351769071.issue10086@psf.upfronthosting.co.za> Message-ID: <1287420183.61.0.819965767056.issue10086@psf.upfronthosting.co.za> ?ric Araujo added the comment: I wrote too fast, I thought your diff was for sysconfig itself, not test_sysconfig. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 18:58:49 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 18 Oct 2010 16:58:49 +0000 Subject: [issue5111] httplib: wrong Host header when connecting to IPv6 litteral URL In-Reply-To: <1233334139.62.0.259128767537.issue5111@psf.upfronthosting.co.za> Message-ID: <1287421129.83.0.743055259245.issue5111@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 19:03:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 17:03:44 +0000 Subject: =?utf-8?q?=5Bissue10039=5D_python_=C3=A9=2Epy_fails_with_UnicodeEncodeErr?= =?utf-8?q?or_if_PYTHONFSENCODING_is_used?= In-Reply-To: <1286414733.34.0.0267403088134.issue10039@psf.upfronthosting.co.za> Message-ID: <1287421424.28.0.928415450224.issue10039@psf.upfronthosting.co.za> ?ric Araujo added the comment: > Do you know something better than the locale encoding? I don't. Neither do I, sorry. >> Can?t each filesystem have its own encoding? > Yes, but how do you get the encoding of each filesystem? If I really had to, on linux I could parse the output of the mount command, but this could get messy quickly, and of course is not okay for official Python. > Backup programs can use the "raw" (bytes) API of Python 3 to avoid > all encoding issues. Neat! > As wrote R. David Murray, read issue #9992 if you would like to know > more about this problem and the different proposed solutions. I did so, thanks for the pointer and all the explanations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 19:03:54 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 18 Oct 2010 17:03:54 +0000 Subject: [issue5111] httplib: wrong Host header when connecting to IPv6 litteral URL In-Reply-To: <1233334139.62.0.259128767537.issue5111@psf.upfronthosting.co.za> Message-ID: <1287421434.16.0.0123832567845.issue5111@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 19:12:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 17:12:51 +0000 Subject: [issue5111] httplib: wrong Host header when connecting to IPv6 litteral URL In-Reply-To: <1233334139.62.0.259128767537.issue5111@psf.upfronthosting.co.za> Message-ID: <1287421971.76.0.112616833113.issue5111@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 19:15:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 17:15:16 +0000 Subject: [issue10086] test_sysconfig failure with site-packages In-Reply-To: <1286980763.58.0.308351769071.issue10086@psf.upfronthosting.co.za> Message-ID: <1287422116.51.0.705691169894.issue10086@psf.upfronthosting.co.za> ?ric Araujo added the comment: Attaching a patch with your two suggestions. Two things worry me and prevent me from committing right now: 1) sysconfig was originally distutils.sysconfig, and some duplication remains. Can?t this bug happen with distutils.sysconfig too? Should we duplicate tests from test_sysconfig to distutils.test_sysconfig? 2) How to prevent a regression? That is, how to run tests with custom ./configure options? ---------- keywords: +needs review, patch stage: needs patch -> patch review Added file: http://bugs.python.org/file19264/fix10086.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 19:23:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 17:23:40 +0000 Subject: [issue10138] calendar module does not support years outside [1, 9999] range In-Reply-To: <1287422620.12.0.790695371078.issue10138@psf.upfronthosting.co.za> Message-ID: <1287422620.12.0.790695371078.issue10138@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Documentation for the calendar module says: """ Most of these functions and classes rely on the datetime module which uses an idealized calendar, the current Gregorian calendar indefinitely extended in both directions. """ However, neither the datetime nor as a consequence the calendar module support years outside [1, 9999] range. ---------- assignee: belopolsky components: Documentation messages: 119041 nosy: belopolsky priority: normal severity: normal status: open title: calendar module does not support years outside [1, 9999] range versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 19:23:54 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Mon, 18 Oct 2010 17:23:54 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287403226.72.0.750130764136.issue10135@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: {'mon_decimal_point': '', 'int_frac_digits': 127, 'p_sep_by_space': 127, 'frac_digits': 127, 'thousands_sep': '', 'n_sign_posn': 127, 'decimal_point': '.', 'int_curr_symbol': '', 'n_cs_precedes': 127, 'p_sign_posn': 127, 'mon_thousands_sep': '', 'negative_sign': '', 'currency_symbol': '', 'n_sep_by_space': 127, 'mon_grouping': [], 'p_cs_precedes': 127, 'positive_sign': '', 'grouping': []} '2.760' And the output of locale.format() in this case should be '2,760' On Mon, Oct 18, 2010 at 2:00 PM, Eric Smith wrote: > > Eric Smith added the comment: > > Oops, I meant "locale.format('%.3f', 2.76)", although of course the number > shouldn't matter. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19265/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
>>> import locale
>>> locale.localeconv()
{'mon_decimal_point': '', 'int_frac_digits': 127, 'p_sep_by_space': 127, 'frac_digits': 127, 'thousands_sep': '', 'n_sign_posn': 127, 'decimal_point': '.', 'int_curr_symbol': '', 'n_cs_precedes': 127, 'p_sign_posn': 127, 'mon_thousands_sep': '', 'negative_sign': '', 'currency_symbol': '', 'n_sep_by_space': 127, 'mon_grouping': [], 'p_cs_precedes': 127, 'positive_sign': '', 'grouping': []}
??
It prints this:
>>> import locale
>>> locale.format('%.3f', 2.76)
'2.760'
??
And the output of locale.format() in this case should be
'2,760'

On Mon, Oct 18, 2010 at 2:00 PM, Eric Smith <report at bugs.python.org> wrote:

Eric Smith <eric at trueblade.com> added the comment:

Oops, I meant "locale.format('%.3f', 2.76)", although of course the number shouldn't matter.

----------

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

From report at bugs.python.org Mon Oct 18 19:25:30 2010 From: report at bugs.python.org (Case Van Horsen) Date: Mon, 18 Oct 2010 17:25:30 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287422730.95.0.665646066397.issue9778@psf.upfronthosting.co.za> Case Van Horsen added the comment: >Sorry, I could have been clearer indeed. Consider the following code: > >static Py_hash_t >long_hash(PyLongObject *v) >{ > unsigned long x; >... > x = x * sign; > if (x == (unsigned long)-1) > x = (unsigned long)-2; > return (Py_hash_t)x; >} >Wouldn't it be cleaner if x was the same type as hash? Note that >unsigned long is now wrong. What is needed is "unsigned integer type >of the same size as Py_hash_t." If Py_hash_t has to stay signed, I >think we should at least not rely of sizeof(Py_hash_t) to always >remain the same as sizeof(size_t). The calculation of long_hash assumes an unsigned temporary type to get correct results for the bit shifting and masking. The calculation is done on the absolute value of the long and then the sign is applied. We either needed to (1) add an unsigned Py_hash_t type or (2) just use size_t and Py_ssize_t. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 19:29:14 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 18 Oct 2010 17:29:14 +0000 Subject: [issue10137] Patch to IDLE for Python 2.7, at Guido's request In-Reply-To: <1287417245.71.0.949450394447.issue10137@psf.upfronthosting.co.za> Message-ID: <1287422954.71.0.306390920642.issue10137@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +kbk, taleinat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 19:29:35 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 18 Oct 2010 17:29:35 +0000 Subject: [issue10137] Patch to IDLE for Python 2.7, at Guido's request In-Reply-To: <1287417245.71.0.949450394447.issue10137@psf.upfronthosting.co.za> Message-ID: <1287422975.76.0.788085211799.issue10137@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 19:31:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 17:31:51 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1287422730.95.0.665646066397.issue9778@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Mon, Oct 18, 2010 at 1:25 PM, Case Van Horsen wrote: .. > We either needed to (1) add an unsigned Py_hash_t type or (2) just use size_t and Py_ssize_t. > Option (2) may actually be preferable because dict and set implementations rely on Py_hash_t being compatible with Py_ssize_t. See issue 1646068. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 19:32:09 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 18 Oct 2010 17:32:09 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287397563.59.0.0941833598936.issue10135@psf.upfronthosting.co.za> Message-ID: <1287423129.51.0.814484223528.issue10135@psf.upfronthosting.co.za> Eric Smith added the comment: It looks like the float.__format__ code is correctly using the value of decimal_point = '.'. It also agrees with locale.format(). How are you setting the locale? The problem appears to be either how you are setting the locale or the contents of the locale, not in the formatting code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 19:37:40 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 18 Oct 2010 17:37:40 +0000 Subject: [issue9437] can't build extensions with non-default ldflags (e.g. -m32) In-Reply-To: <1280591712.46.0.151463924195.issue9437@psf.upfronthosting.co.za> Message-ID: <1287423460.87.0.711546909675.issue9437@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 19:44:43 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 18 Oct 2010 17:44:43 +0000 Subject: [issue10137] Patch to IDLE for Python 2.7, at Guido's request In-Reply-To: <1287417245.71.0.949450394447.issue10137@psf.upfronthosting.co.za> Message-ID: <1287423883.85.0.614480872844.issue10137@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: But this patch is a diff between a 2.7 and a 3.2 version of IDLE, isn't it? The tkinter->Tkinter renaming is not supposed to happen in the 2.7 branch. Could you instead show a diff between the present version of IDLE in 2.7 and the result of your work, so we can better see the impact of the change? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 19:56:45 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Mon, 18 Oct 2010 17:56:45 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287423129.51.0.814484223528.issue10135@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: So do I need additional things to set in my code if I use the 'n' format specifier in order for it to be locale-aware? So using just the 'n' format specifier is not enough? Please explain in depth. On Mon, Oct 18, 2010 at 7:32 PM, Eric Smith wrote: > > Eric Smith added the comment: > > It looks like the float.__format__ code is correctly using the value of > decimal_point = '.'. It also agrees with locale.format(). > > How are you setting the locale? The problem appears to be either how you > are setting the locale or the contents of the locale, not in the formatting > code. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19266/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- So do I need additional things to set in my code if I use the 'n' format specifier in order for it to be locale-aware? So using just the 'n' format specifier is not enough? Please explain in depth.

On Mon, Oct 18, 2010 at 7:32 PM, Eric Smith <report at bugs.python.org> wrote:

Eric Smith <eric at trueblade.com> added the comment:

It looks like the float.__format__ code is correctly using the value of decimal_point = '.'. It also agrees with locale.format().

How are you setting the locale? The problem appears to be either how you are setting the locale or the contents of the locale, not in the formatting code.

----------

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

From report at bugs.python.org Mon Oct 18 19:59:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 17:59:27 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287424767.34.0.282370740611.issue10073@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: The most pedantic implementation of calendar.isleap() would be from datetime import date, timedelta def isleap(year): return date(year, 3, 1) - date(year, 2, 1) == timedelta(29) Since python calendar only supports years in the range [1, 9999], the above will properly raise ValueError: year is out of range on negative or zero year. This also guarantees that calendar module's notion of leap year is the same as that of datetime module. If this is found to be a worthwhile change, I would also rewrite monthrange as def monthrange(year, month): first = date(year, month, 1) if month == 12: ndays = 31 else: ndays = (date(year, month + 1, 1) - first).days return first.weekday(), ndays ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:08:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 18:08:44 +0000 Subject: [issue10051] distutils fail to install unicode-encoded files with POSIX locale In-Reply-To: <1286538579.43.0.363477643478.issue10051@psf.upfronthosting.co.za> Message-ID: <1287425324.37.0.874053808809.issue10051@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. This is a duplicate, you can add yourself to the nosy list on the superseder bug to track status. ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> distutils: set encoding to utf-8 for input and output files _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:09:23 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Oct 2010 18:09:23 +0000 Subject: [issue10134] test_email failures on Windows: end of line issue? In-Reply-To: <1287373744.55.0.18095949035.issue10134@psf.upfronthosting.co.za> Message-ID: <1287425363.48.0.807071751189.issue10134@psf.upfronthosting.co.za> R. David Murray added the comment: The interesting question is, why aren't the buildbots seeing this failure? I can reproduce it in my Windows VM using 3.2a3, and will work on a fix (to the tests, the code under test is doing the "correct" thing, though that thing is somewhat broken by design). ---------- components: +Tests priority: normal -> high stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:09:35 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Oct 2010 18:09:35 +0000 Subject: [issue10134] test_email failures on Windows: end of line issue? In-Reply-To: <1287373744.55.0.18095949035.issue10134@psf.upfronthosting.co.za> Message-ID: <1287425375.58.0.198574731326.issue10134@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: -> r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:10:34 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 18 Oct 2010 18:10:34 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287425434.12.0.178608132272.issue10073@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: -georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:11:47 2010 From: report at bugs.python.org (David Watson) Date: Mon, 18 Oct 2010 18:11:47 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <4CBB34A8.4020600@v.loewis.de> Message-ID: <20101018181136.GA3631@dbwatson.ukfsn.org> David Watson added the comment: > The result from gethostname likely comes out of machine-local > configuration. It may have non-ASCII in it, which is then likely > encoded in the local encoding. When looking it up in DNS, IDNA > should be applied. I would have thought that someone who intended a Unicode hostname to be looked up in its IDNA form would have encoded it using IDNA, rather than an 8-bit encoding - how many C programs would transcode the name that way, rather than just passing the char * from one interface to another? In fact, I would think that non-ASCII bytes in a hostname most probably indicated that a name resolution mechanism other than the DNS was in use, and that the byte string should be passed unaltered just as a typical C program would. > OTOH, output from gethostbyaddr likely comes out of the DNS itself. > Guessing what encoding it may have is futile - other than guessing > that it really ought to be ASCII. Sure, but that doesn't mean the result can't be made to round-trip if it turns out not to be ASCII. The guess that it will be ASCII is, after all, still a guess (as is the guess that it comes from the DNS). > Python's socket module is clearly focused on the internet, and > intends to support that well. So if you pass a non-ASCII > string, it will have to encode that using IDNA. If that's > not what you want to get, tough luck. I don't object to that, but it does force a choice between decoding an 8-bit name for display (e.g. by using the locale encoding), and decoding it to round-trip automatically (e.g. by using ASCII/surrogateescape, with support on the encoding side). Using PyUnicode_DecodeFSDefault() for the hostname or other returned names (thus decoding them for display) would make this issue solvable with programmer intervention - for instance, "socket.gethostbyaddr(socket.gethostname())" could be replaced by "socket.gethostbyaddr(os.fsencode(socket.gethostname()))", but programmers might well neglect to do this, given that no encoding was needed in Python 2. Also, even displaying a non-ASCII name decoded according to the locale creates potential for confusion, as when the user types the same characters into a Python program for lookup (again, barring programmer intervention), they will not represent the same byte sequence as the characters the user sees on the screen (as they will instead represent their IDNA ASCII-compatible equivalent). So overall, I do think it is better to decode names for automatic round-tripping rather than for display, but my main concern is simply that it should be possible to recover the original bytes so that round-tripping is at least possible. PyUnicode_DecodeFSDefault() would accomplish that much at least. ---------- title: socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names -> socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:12:48 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Mon, 18 Oct 2010 18:12:48 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: Message-ID: Bo??tjan Mejak added the comment: Also, your "pedantic" version of isleap() is not pedantic at all. return date(year, 3, 1) - date(year, 2, 1) == timedelta(29) does not seem readable at all. Readability counts! return date(year, 3, 1) is not understandable. What are the arguments 3 and 1 in the date() function for? On Mon, Oct 18, 2010 at 8:06 PM, Bo??tjan Mejak wrote: > else: > --> ndays = (date(year, month + 1, 1) - first).days > return first.weekday(), ndays > > Oh my God! The line with a pointer is so ugly! > > On Mon, Oct 18, 2010 at 7:59 PM, Alexander Belopolsky < > report at bugs.python.org> wrote: > >> >> Alexander Belopolsky added the >> comment: >> >> The most pedantic implementation of calendar.isleap() would be >> >> from datetime import date, timedelta >> def isleap(year): >> return date(year, 3, 1) - date(year, 2, 1) == timedelta(29) >> >> Since python calendar only supports years in the range [1, 9999], the >> above will properly raise ValueError: year is out of range on negative or >> zero year. This also guarantees that calendar module's notion of leap year >> is the same as that of datetime module. >> >> If this is found to be a worthwhile change, I would also rewrite >> monthrange as >> >> def monthrange(year, month): >> first = date(year, month, 1) >> if month == 12: >> ndays = 31 >> else: >> ndays = (date(year, month + 1, 1) - first).days >> return first.weekday(), ndays >> >> ---------- >> >> _______________________________________ >> Python tracker >> >> _______________________________________ >> > > ---------- Added file: http://bugs.python.org/file19267/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Also, your "pedantic" version of isleap() is not pedantic at all.

return date(year, 3, 1) - date(year, 2, 1) == timedelta(29)
does not seem readable at all. Readability counts!

return date(year, 3, 1) is not understandable. What are the arguments 3 and 1 in the date() function for?


On Mon, Oct 18, 2010 at 8:06 PM, Bo??tjan Mejak <bostjan.mejak at gmail.com> wrote:
???? ??else:
--> ?? ??ndays = (date(year, month + 1, 1) - first).days
???? ??return first.weekday(), ndays

Oh my God! The line with a pointer is so ugly!

On Mon, Oct 18, 2010 at 7:59 PM, Alexander Belopolsky <report at bugs.python.org> wrote:

Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

The most pedantic implementation of calendar.isleap() would be

from datetime import date, timedelta
def isleap(year):
?? ??return date(year, 3, 1) - date(year, 2, 1) == timedelta(29)

Since python calendar only supports years in the range [1, 9999], the above will properly raise ValueError: year is out of range on negative or zero year. ??This also guarantees that calendar module's notion of leap year is the same as that of datetime module.

If this is found to be a worthwhile change, I would also rewrite monthrange as

def monthrange(year, month):
?? ??first = date(year, month, 1)
?? ??if month == 12:
?? ?? ?? ??ndays = 31
?? ??else:
?? ?? ?? ??ndays = (date(year, month + 1, 1) - first).days
?? ??return first.weekday(), ndays

----------

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


From report at bugs.python.org Mon Oct 18 20:14:16 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 18 Oct 2010 18:14:16 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287397563.59.0.0941833598936.issue10135@psf.upfronthosting.co.za> Message-ID: <1287425656.65.0.34488521389.issue10135@psf.upfronthosting.co.za> Georg Brandl added the comment: You need to call setlocale() in your program. For more in-depth explanations, please refer to the docs at . ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:14:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 18:14:44 +0000 Subject: [issue10091] ast.literal_eval does not handled new set literals In-Reply-To: <1286998602.58.0.486068120725.issue10091@psf.upfronthosting.co.za> Message-ID: <1287425684.45.0.722781284941.issue10091@psf.upfronthosting.co.za> ?ric Araujo added the comment: Set literals, a new feature indeed, have been backported to 2.7 and 3.1. The lack of support in ast.literal_eval is arguably a bug. Benjamin, can you make a statement as release manager? Thanks. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:17:08 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 18 Oct 2010 18:17:08 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287425828.15.0.749427316177.issue10073@psf.upfronthosting.co.za> Georg Brandl added the comment: > return date(year, 3, 1) is not understandable. What are the arguments 3 and > 1 in the date() function for? Bo?tjan, we appreciate your concern for the programming style of the Python standard library. However, your question shows that you should probably spend a bit more time reading documentation than "fixing" code. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:17:11 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Mon, 18 Oct 2010 18:17:11 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1287424767.34.0.282370740611.issue10073@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: else: --> ndays = (date(year, month + 1, 1) - first).days return first.weekday(), ndays Oh my God! The line with a pointer is so ugly! On Mon, Oct 18, 2010 at 7:59 PM, Alexander Belopolsky < report at bugs.python.org> wrote: > > Alexander Belopolsky added the comment: > > The most pedantic implementation of calendar.isleap() would be > > from datetime import date, timedelta > def isleap(year): > return date(year, 3, 1) - date(year, 2, 1) == timedelta(29) > > Since python calendar only supports years in the range [1, 9999], the above > will properly raise ValueError: year is out of range on negative or zero > year. This also guarantees that calendar module's notion of leap year is > the same as that of datetime module. > > If this is found to be a worthwhile change, I would also rewrite monthrange > as > > def monthrange(year, month): > first = date(year, month, 1) > if month == 12: > ndays = 31 > else: > ndays = (date(year, month + 1, 1) - first).days > return first.weekday(), ndays > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19268/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- ???? ??else:
--> ?? ??ndays = (date(year, month + 1, 1) - first).days
???? ??return first.weekday(), ndays

Oh my God! The line with a pointer is so ugly!

On Mon, Oct 18, 2010 at 7:59 PM, Alexander Belopolsky <report at bugs.python.org> wrote:

Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

The most pedantic implementation of calendar.isleap() would be

from datetime import date, timedelta
def isleap(year):
?? ??return date(year, 3, 1) - date(year, 2, 1) == timedelta(29)

Since python calendar only supports years in the range [1, 9999], the above will properly raise ValueError: year is out of range on negative or zero year. ??This also guarantees that calendar module's notion of leap year is the same as that of datetime module.

If this is found to be a worthwhile change, I would also rewrite monthrange as

def monthrange(year, month):
?? ??first = date(year, month, 1)
?? ??if month == 12:
?? ?? ?? ??ndays = 31
?? ??else:
?? ?? ?? ??ndays = (date(year, month + 1, 1) - first).days
?? ??return first.weekday(), ndays

----------

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

From report at bugs.python.org Mon Oct 18 20:18:48 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Mon, 18 Oct 2010 18:18:48 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287425656.65.0.34488521389.issue10135@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: I thought having "Slovenian" locale set in Windows OS is the way the 'n' format specifier works. So I must set the locale in the app. Now we're cookin'! ;) Thanks Georg. On Mon, Oct 18, 2010 at 8:14 PM, Georg Brandl wrote: > > Georg Brandl added the comment: > > You need to call setlocale() in your program. For more in-depth > explanations, please refer to the docs at < > http://docs.python.org/library/locale>. > > ---------- > nosy: +georg.brandl > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19269/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- I thought having "Slovenian" locale set in Windows OS is the way the 'n' format specifier works. So I must set the locale in the app. Now we're cookin'! ;) Thanks Georg.

On Mon, Oct 18, 2010 at 8:14 PM, Georg Brandl <report at bugs.python.org> wrote:

Georg Brandl <georg at python.org> added the comment:

You need to call setlocale() in your program. ??For more in-depth explanations, please refer to the docs at <http://docs.python.org/library/locale>.

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

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

From report at bugs.python.org Mon Oct 18 20:19:03 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 Oct 2010 18:19:03 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287425943.28.0.85143821031.issue9778@psf.upfronthosting.co.za> Raymond Hettinger added the comment: My expectation is that Py_hash_t is the same as Py_ssize_t. The goal is to make hashes match the range of possible table sizes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:24:55 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 18:24:55 +0000 Subject: [issue10031] Withdraw anti-recommendation of relative imports from documentation In-Reply-To: <1286309891.2.0.339569302596.issue10031@psf.upfronthosting.co.za> Message-ID: <1287426295.7.0.813504805286.issue10031@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report and suggestions. I agree to the gist of your changes, but I wouldn?t remove the explanation of implicit relative imports (the part starting with ?If you?re writing code?). ---------- keywords: +patch nosy: +eric.araujo stage: -> patch review versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:25:03 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 18:25:03 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287426303.63.0.462309203163.issue10073@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I don't think anything good will come out of this. Closing as "rejected." ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:25:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 18:25:20 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287426320.98.0.761128274717.issue10073@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file19267/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:25:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 18:25:27 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287426327.57.0.0696103081473.issue10073@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file19268/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:25:28 2010 From: report at bugs.python.org (=?utf-8?b?TWljaGHFgiBHw7Nybnk=?=) Date: Mon, 18 Oct 2010 18:25:28 +0000 Subject: [issue9561] distutils: set encoding to utf-8 for input and output files In-Reply-To: <1281462699.26.0.0348702049008.issue9561@psf.upfronthosting.co.za> Message-ID: <1287426328.82.0.415778265032.issue9561@psf.upfronthosting.co.za> Changes by Micha? G?rny : ---------- nosy: +mgorny _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:28:34 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 18 Oct 2010 18:28:34 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287397563.59.0.0941833598936.issue10135@psf.upfronthosting.co.za> Message-ID: <1287426514.34.0.506746327928.issue10135@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:28:46 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 18 Oct 2010 18:28:46 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287397563.59.0.0941833598936.issue10135@psf.upfronthosting.co.za> Message-ID: <1287426526.1.0.572446958318.issue10135@psf.upfronthosting.co.za> Changes by Eric Smith : Removed file: http://bugs.python.org/file19265/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:28:55 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 18 Oct 2010 18:28:55 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287397563.59.0.0941833598936.issue10135@psf.upfronthosting.co.za> Message-ID: <1287426535.09.0.218727180377.issue10135@psf.upfronthosting.co.za> Changes by Eric Smith : Removed file: http://bugs.python.org/file19266/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:29:05 2010 From: report at bugs.python.org (Eric Smith) Date: Mon, 18 Oct 2010 18:29:05 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287397563.59.0.0941833598936.issue10135@psf.upfronthosting.co.za> Message-ID: <1287426545.72.0.648720540247.issue10135@psf.upfronthosting.co.za> Changes by Eric Smith : Removed file: http://bugs.python.org/file19269/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:34:41 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 18 Oct 2010 18:34:41 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1287426881.68.0.548161088842.issue5117@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:46:24 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Mon, 18 Oct 2010 18:46:24 +0000 Subject: [issue1467929] %-formatting and dicts Message-ID: <1287427584.24.0.500267747873.issue1467929@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: Updated patch against py3k. Fixing last reported issue with '%(a)s %%' % {'a':'xyz'} ---------- nosy: +nvetoshkin Added file: http://bugs.python.org/file19270/issue1467929_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:50:45 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 18 Oct 2010 18:50:45 +0000 Subject: [issue9344] please add posix.getgrouplist() In-Reply-To: <1279890657.77.0.804697326433.issue9344@psf.upfronthosting.co.za> Message-ID: <1287427845.79.0.904367720213.issue9344@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I don't see how this difference is relevant for exposing the functionality in python: Linux: int getgrouplist(const char *user, gid_t group, gid_t *groups, int *ngroups); MacOS: int getgrouplist(const char *name, int basegid, int *groups, int *ngroups); The only difference is that Linux uses gid_t and MacOS uses int. The requested posix.getgrouplist() will take a python string and a python integer and return a list of integers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:55:26 2010 From: report at bugs.python.org (Ned Deily) Date: Mon, 18 Oct 2010 18:55:26 +0000 Subject: [issue10137] Patch to IDLE for Python 2.7, at Guido's request In-Reply-To: <1287417245.71.0.949450394447.issue10137@psf.upfronthosting.co.za> Message-ID: <1287428126.64.0.891877489748.issue10137@psf.upfronthosting.co.za> Ned Deily added the comment: I believe the enhancements here are the same as submitted for py3k in Issue10079. Since it is likely the same comments will apply to both variants, I think it would be better to have just one issue, so I would recommend regenerating the patch against the current 2.7 svn top of trunk (or the 2.7 release), attaching the patch to #10079, and closing this as a duplicate. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:55:47 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 18 Oct 2010 18:55:47 +0000 Subject: [issue10091] ast.literal_eval does not handled new set literals In-Reply-To: <1287425684.45.0.722781284941.issue10091@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: 2010/10/18 ?ric Araujo : > > ?ric Araujo added the comment: > > Set literals, a new feature indeed, have been backported to 2.7 and 3.1. ?The lack of support in ast.literal_eval is arguably a bug. ?Benjamin, can you make a statement as release manager? ?Thanks. No change please. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 20:57:47 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Mon, 18 Oct 2010 18:57:47 +0000 Subject: [issue9344] please add posix.getgrouplist() In-Reply-To: <1279890657.77.0.804697326433.issue9344@psf.upfronthosting.co.za> Message-ID: <1287428267.16.0.600159775431.issue9344@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: @Alexander, it was just a note, that implementation in posixmodule.c won't be the same across all flavours of Unix :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 21:00:17 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Oct 2010 19:00:17 +0000 Subject: [issue10134] test_email failures on Windows: end of line issue? In-Reply-To: <1287373744.55.0.18095949035.issue10134@psf.upfronthosting.co.za> Message-ID: <1287428417.31.0.677875166041.issue10134@psf.upfronthosting.co.za> R. David Murray added the comment: Drat, there's a real bug here, too. The bytes parsing machinery doesn't correctly translate crlf on input. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 21:13:38 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Mon, 18 Oct 2010 19:13:38 +0000 Subject: [issue1467929] %-formatting and dicts Message-ID: <1287429218.4.0.825136796386.issue1467929@psf.upfronthosting.co.za> Changes by Vetoshkin Nikita : Removed file: http://bugs.python.org/file19270/issue1467929_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 21:14:38 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Mon, 18 Oct 2010 19:14:38 +0000 Subject: [issue1467929] %-formatting and dicts Message-ID: <1287429278.44.0.179120361701.issue1467929@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: Updated patch to capture another patological case: '%(a)s %' % {'a':'xyz'} - incomplete formatter at the end of the line ---------- Added file: http://bugs.python.org/file19271/issue1467929_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 21:22:11 2010 From: report at bugs.python.org (Bill Janssen) Date: Mon, 18 Oct 2010 19:22:11 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1287429731.12.0.236015357699.issue5117@psf.upfronthosting.co.za> Bill Janssen added the comment: Broke bunches of 2.7 buildbots. But why are we running test_ntpath on OS X, anyway? Shouldn't this be skipped everywhere except win32 platforms? ---------- nosy: +janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 21:24:00 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 18 Oct 2010 19:24:00 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1287429840.67.0.0185406822063.issue5117@psf.upfronthosting.co.za> Georg Brandl added the comment: No - the posixpath/ntpath routines are meant to be usable for path manipulation for posix/NT paths on any platform. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 21:25:03 2010 From: report at bugs.python.org (Bill Janssen) Date: Mon, 18 Oct 2010 19:25:03 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1287429903.39.0.989517543949.issue5117@psf.upfronthosting.co.za> Bill Janssen added the comment: Then we need to revert this patch and find one that works. ---------- resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 21:33:45 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 18 Oct 2010 19:33:45 +0000 Subject: [issue10091] ast.literal_eval does not handled new set literals In-Reply-To: <1286998602.58.0.486068120725.issue10091@psf.upfronthosting.co.za> Message-ID: <1287430425.15.0.701959464515.issue10091@psf.upfronthosting.co.za> Raymond Hettinger added the comment: ast.literal_eval's docs: 'The string or node provided may only consist of the following Python literal structures: strings, numbers, tuples, lists, dicts, booleans, and None.' ---------- resolution: out of date -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 22:00:45 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 18 Oct 2010 20:00:45 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1287432045.16.0.0932858282548.issue9807@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Here now is the second half of the patch, which installs the binary, library, and includes into names with abiflags. I understand this is more controversial, but it will help continue the discussion. ---------- Added file: http://bugs.python.org/file19272/install.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 22:12:58 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Oct 2010 20:12:58 +0000 Subject: [issue10134] test_email failures on Windows: end of line issue? In-Reply-To: <1287373744.55.0.18095949035.issue10134@psf.upfronthosting.co.za> Message-ID: <1287432778.96.0.347493673704.issue10134@psf.upfronthosting.co.za> R. David Murray added the comment: Here is a patch that adds a test of the underlying problem and fixes it. I don't like this patch because it tries to detect the line ending style of the input stream and changes behavior based on that, but because email wants to use '\n' as the separator internally I don't see another way to fix it at the moment. The ugliest part is that I changed the expected result of one existing test...but that test uses an artificial way of opening an input file in order to test the parser's universal newline handling, and I think the behavior tested is arguably incorrect. I'm not sure this will fix all the windows failures, but it should fix most of them. ---------- keywords: +patch Added file: http://bugs.python.org/file19273/windows_email_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 22:19:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 20:19:08 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1287433148.24.0.817787464971.issue6011@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1 for distutils_makefile_encoding.patch. The doc is not updated, because it does not exist, so that?s okay; tests for the new behavior are missing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 22:36:21 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 18 Oct 2010 20:36:21 +0000 Subject: [issue10137] Patch to IDLE for Python 2.7, at Guido's request In-Reply-To: <1287417245.71.0.949450394447.issue10137@psf.upfronthosting.co.za> Message-ID: <1287434181.73.0.203780604633.issue10137@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Bruce, what Ned suggests is what I intended with my IDLE-list message, and in accord with usual tracker practice. Issues often apply to multiple versions and thereby require multiple patches and commits. I know you are relatively new at this and very much appreciate you pushing this IDLE update. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 22:37:08 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 18 Oct 2010 20:37:08 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <20101018181136.GA3631@dbwatson.ukfsn.org> Message-ID: <4CBCAFF1.9050105@v.loewis.de> Martin v. L?wis added the comment: > I would have thought that someone who intended a Unicode hostname > to be looked up in its IDNA form would have encoded it using > IDNA, rather than an 8-bit encoding - how many C programs would > transcode the name that way, rather than just passing the char * > from one interface to another? Well, Python is not C. In Python, you would pass a str, and expect it to work, which means it will get automatically encoded with IDNA. > In fact, I would think that non-ASCII bytes in a hostname most > probably indicated that a name resolution mechanism other than > the DNS was in use, and that the byte string should be passed > unaltered just as a typical C program would. I'm not talking about byte strings, but character strings. > I don't object to that, but it does force a choice between > decoding an 8-bit name for display (e.g. by using the locale > encoding), and decoding it to round-trip automatically (e.g. by > using ASCII/surrogateescape, with support on the encoding side). In the face of ambiguity, refuse the temptation to guess. > So overall, I do think it is better to decode names for automatic > round-tripping rather than for display, but my main concern is > simply that it should be possible to recover the original bytes > so that round-tripping is at least possible. Marc-Andre wants gethostname to use the Wide API on Windows, which, in theory, allows for cases where round-tripping to bytes is impossible. ---------- title: socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names -> socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 22:44:27 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 18 Oct 2010 20:44:27 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1287415644.3492.5.camel@localhost.localdomain> Message-ID: <4CBCB1A8.3070100@v.loewis.de> Martin v. L?wis added the comment: Am 18.10.2010 17:27, schrieb Antoine Pitrou: > > Antoine Pitrou added the comment: > >> AFAICT, a change from (Py_ssize_t)-1 to (size_t)-1 is less likely to >> break code than a change from -1L to (Py_ssize_t)-1. (Assuming a >> sizeof(long) != sizeof(void*) platform.) > > That's true. I don't think it is. Code that is changed to use the new return type will not break in a change from long to Py_ssize_t, since all values will sign-expand correctly, in all cases; the same is true if the new return type was size_t. So for code that gets adjusted in its return value, no breakage in either case. For code that *doesn't* get adjusted, I'm still uncertain what will happen. However, ISTM that if there is a cast to the "correct" function pointer type, you get an incorrect detection of the guard value in either case: e.g. on AMD64, the return value is in RAX, yet the hash function may only fill out EAX. I'm not sure what values the upper 32 bits will have, but I doubt it gets sign-expanded - which it should regardless of whether the expected value is (size_t)-1 or (Py_ssize_t)-1. So you get breakage in either case. Please correct me if I'm wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 22:44:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 20:44:52 +0000 Subject: [issue5731] bdist_wininst no longer works on non-Windows platforms In-Reply-To: <1239310284.73.0.299420830333.issue5731@psf.upfronthosting.co.za> Message-ID: <1287434692.74.0.0367777827729.issue5731@psf.upfronthosting.co.za> ?ric Araujo added the comment: Follow-up in #8954 ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 22:46:26 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 18 Oct 2010 20:46:26 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: Message-ID: <4CBCB220.10904@v.loewis.de> Martin v. L?wis added the comment: > Wouldn't it be cleaner if x was the same type as hash? Note that > unsigned long is now wrong. What is needed is "unsigned integer type > of the same size as Py_hash_t." If Py_hash_t has to stay signed, I > think we should at least not rely of sizeof(Py_hash_t) to always > remain the same as sizeof(size_t). But this is an absolute requirement, a guarantee that we provide forever, and the whole point of this patch. Py_hash_t *will* be a signed version of size_t, just as Py_ssize_t. Not by chance, but by careful, inherent design. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 22:48:43 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 18 Oct 2010 20:48:43 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1287425943.28.0.85143821031.issue9778@psf.upfronthosting.co.za> Message-ID: <4CBCB2A8.4040100@v.loewis.de> Martin v. L?wis added the comment: > My expectation is that Py_hash_t is the same as Py_ssize_t. The goal > is to make hashes match the range of possible table sizes. Please read the patch: typedef Py_ssize_t Py_hash_t; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 22:58:21 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Oct 2010 20:58:21 +0000 Subject: [issue10134] test_email failures on Windows: end of line issue? In-Reply-To: <1287373744.55.0.18095949035.issue10134@psf.upfronthosting.co.za> Message-ID: <1287435501.83.0.343116467537.issue10134@psf.upfronthosting.co.za> R. David Murray added the comment: Revised patch that seems to fix all the windows failures. Still not sure why they were not showing up on the buildbots. Victor was working from an svn checkout and I from the binary installer, so it's not just a difference in the svn eol handling. ---------- Added file: http://bugs.python.org/file19274/windows_email_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 22:58:32 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Oct 2010 20:58:32 +0000 Subject: [issue10134] test_email failures on Windows: end of line issue? In-Reply-To: <1287373744.55.0.18095949035.issue10134@psf.upfronthosting.co.za> Message-ID: <1287435512.53.0.927175709033.issue10134@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file19273/windows_email_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 23:03:45 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Mon, 18 Oct 2010 21:03:45 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287435825.89.0.343699683722.issue10073@psf.upfronthosting.co.za> Changes by Bo?tjan Mejak : Removed file: http://bugs.python.org/file19255/calendar-isleap.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 23:16:28 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Mon, 18 Oct 2010 21:16:28 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287436588.95.0.0884313024675.issue10073@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: I have uploaded a new patch. It removes the if year == 0 nonsense. Check it out. I hope you like it now. When you were organizing the Standard Library, you didn't fix flaws in the calendar module. What I have in mind is, for example, the isleap() function which should be defined as is_leap(). But now it's all too late for that fixes. Please apply my patch for calendar.isleap() to the trunk. Thanks. ---------- Added file: http://bugs.python.org/file19275/calendar-isleap.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 23:17:57 2010 From: report at bugs.python.org (Philip Jenvey) Date: Mon, 18 Oct 2010 21:17:57 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287436677.14.0.707775853746.issue10073@psf.upfronthosting.co.za> Changes by Philip Jenvey : ---------- nosy: -pjenvey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 23:22:32 2010 From: report at bugs.python.org (nick caruso) Date: Mon, 18 Oct 2010 21:22:32 +0000 Subject: [issue9974] tokenizer.untokenize not invariant with line continuations In-Reply-To: <1285695065.99.0.439423855227.issue9974@psf.upfronthosting.co.za> Message-ID: <1287436952.76.0.198027751522.issue9974@psf.upfronthosting.co.za> nick caruso added the comment: -------------------------- import StringIO import tokenize tokens = [] def fnord(*a): tokens.append(a) tokenize.tokenize(StringIO.StringIO("a = 1").readline, fnord) tokenize.untokenize(tokens) ---------------------------------- Generates the same assertion failure, for what it's worth. No line continuation needed. This does not happen in 2.5 on my machine. ---------- nosy: +nick.caruso _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 23:28:19 2010 From: report at bugs.python.org (nick caruso) Date: Mon, 18 Oct 2010 21:28:19 +0000 Subject: [issue9974] tokenizer.untokenize not invariant with line continuations In-Reply-To: <1285695065.99.0.439423855227.issue9974@psf.upfronthosting.co.za> Message-ID: <1287437299.55.0.548864803061.issue9974@psf.upfronthosting.co.za> nick caruso added the comment: Additionally, substituting "a=1\n" for "a=1" results in no assertion and successful "untokenizing" to "a = 1\n" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 23:31:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 18 Oct 2010 21:31:05 +0000 Subject: [issue8954] wininst regression: errors when building on linux In-Reply-To: <1276093244.44.0.895217979727.issue8954@psf.upfronthosting.co.za> Message-ID: <1287437465.15.0.0661498552387.issue8954@psf.upfronthosting.co.za> ?ric Araujo added the comment: I get an error trying to run the command because of the use of the mbcs codec. Ezio made some comments on Rietveld, I addressed them in a local clone. Question for Windows users/experts: Do the terms ?binary extension? and ?binary code? make sense? If not, I can change them to the clearer ?extension modules? and ?C code?. ---------- assignee: tarek -> eric.araujo versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 23:36:53 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 18 Oct 2010 21:36:53 +0000 Subject: [issue10134] test_email failures on Windows: end of line issue? In-Reply-To: <1287373744.55.0.18095949035.issue10134@psf.upfronthosting.co.za> Message-ID: <1287437813.26.0.913509380441.issue10134@psf.upfronthosting.co.za> R. David Murray added the comment: Clarification of my earlier comment on the patch: I think the behavior *originally* tested for by the changed test is arguably incorrect, given email's internal use of '\n' line endings. So I think the patch improves things, but it is a potential behavior change. Potential only, I hope, because it is unlikely anyone parsing emails in text mode would use anything other than universal newline handling in Python3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 18 23:46:31 2010 From: report at bugs.python.org (Roumen Petrov) Date: Mon, 18 Oct 2010 21:46:31 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1287438391.75.0.790926420928.issue9807@psf.upfronthosting.co.za> Roumen Petrov added the comment: - As configure script add new "substitute variable" LDVERSION" why do not use LDVERSION in Makefile instead $(VERSION)$(ABIFLAGS). Note first to replace in configure script LDVERSION="$(VERSION)" to LDVERSION="$VERSION" ! - May be $(LN) -s is not portable. What about to add macro AC_PROG_LN_S in configure script and to use $(LN_S) in makefile ? ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 00:26:02 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Mon, 18 Oct 2010 22:26:02 +0000 Subject: [issue10139] regex A|B : both A and B match, but B is wrongly preferred In-Reply-To: <1287440762.5.0.953129438054.issue10139@psf.upfronthosting.co.za> Message-ID: <1287440762.5.0.953129438054.issue10139@psf.upfronthosting.co.za> New submission from ??????? ???????? (Christos Georgiou) : This is based on that StackOverflow answer: http://stackoverflow.com/questions/3957164/3963443#3963443. It also applies to Python 2.6 . Searching for a regular expression that satisfies the mentioned SO question (a regular expression that matches strings with an initial A and/or final Z and returns everything except said initial A and final Z), I discovered something that I consider a bug. I've tried to thoroughly verify that this is not a PEBCAK before reporting the issue here. Given: >>> import re >>> text= 'A***Z' then: >>> re.compile('(?<=^A).*(?=Z$)').search(text).group(0) # regex_1 '***' >>> re.compile('(?<=^A).*').search(text).group(0) # regex_2 '***Z' >>> re.compile('.*(?=Z$)').search(text).group(0) # regex_3 'A***' >>> re.compile('(?<=^A).*(?=Z$)|(?<=^A).*').search(text).group(0) # regex_1|regex_2 '***' >>> re.compile('(?<=^A).*(?=Z$)|.*(?=Z$)').search(text).group(0) # regex_1|regex_3 'A***' >>> re.compile('(?<=^A).*|.*(?=Z$)').search(text).group(0) # regex_2|regex_3 'A***' >>> re.compile('(?<=^A).*(?=Z$)|(?<=^A).*|.*(?=Z$)').search(text).group(0) # regex_1|regex_2|regex_3 'A***' regex_1 returns '***'. Based on the documentation (http://docs.python.org/py3k/library/re.html#regular-expression-syntax), I assert that, likewise, '***' should be returned by: regex_1|regex_2 regex_1|regex_3 regex_1|regex_2|regex_3 And yet, regex_3 ( ".*(?=Z$)" ) seems to take precedence over both regex_1 and regex_2, even though it's the last alternative. This works even if I substitute "(?:regex_n)" for every "regex_n", so it's not a matter of precedence. I really hope that this is a PEBCAK; if that is true, I apologize for any time lost on the issue by anyone; but really don't think it is. ---------- components: Regular Expressions messages: 119088 nosy: tzot priority: normal severity: normal status: open title: regex A|B : both A and B match, but B is wrongly preferred type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 00:32:23 2010 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 18 Oct 2010 22:32:23 +0000 Subject: [issue9011] ast_for_factor unary minus optimization changes AST In-Reply-To: <1276702740.62.0.249201197468.issue9011@psf.upfronthosting.co.za> Message-ID: <1287441143.65.0.561252119115.issue9011@psf.upfronthosting.co.za> Neil Schemenauer added the comment: I'm late to the party but looks like Mark has a good handle on the issues. I would recommend not changing behavior in a bugfix release. I'm pretty sure code "in the wild" would be broken. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 00:38:18 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Mon, 18 Oct 2010 22:38:18 +0000 Subject: [issue10139] regex A|B : both A and B match, but B is wrongly preferred In-Reply-To: <1287440762.5.0.953129438054.issue10139@psf.upfronthosting.co.za> Message-ID: <1287441498.46.0.0723094843025.issue10139@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: For completeness' sake, I also provide the "(?:regex_n)" results: >>> text= 'A***Z' >>> re.compile('(?:(?<=^A).*(?=Z$))').search(text).group(0) # regex_1 '***' >>> re.compile('(?:(?<=^A).*)').search(text).group(0) # regex_2 '***Z' >>> re.compile('(?:.*(?=Z$))').search(text).group(0) # regex_3 'A***' >>> re.compile('(?:(?<=^A).*(?=Z$))|(?:(?<=^A).*)').search(text).group(0) # regex_1|regex_2 '***' >>> re.compile('(?:(?<=^A).*(?=Z$))|(?:.*(?=Z$))').search(text).group(0) # regex_1|regex_3 'A***' >>> re.compile('(?:(?<=^A).*)|(?:.*(?=Z$))').search(text).group(0) # regex_2|regex_3 'A***' >>> re.compile('(?:(?<=^A).*(?=Z$))|(?:(?<=^A).*)|(?:.*(?=Z$))').search(text).group(0) # regex_1|regex_2|regex_3 'A***' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 00:54:21 2010 From: report at bugs.python.org (Neil Schemenauer) Date: Mon, 18 Oct 2010 22:54:21 +0000 Subject: [issue7759] mhlib fails on Btrfs filesystem (test_mhlib failure) In-Reply-To: <1264198934.84.0.705718671648.issue7759@psf.upfronthosting.co.za> Message-ID: <1287442461.96.0.678585301651.issue7759@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Closing this bug. I don't think it makes sense to change the mhlib module in bugfix release. My patch is fairly simple but not simple enough to make me feel comfortable. ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 01:17:00 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 18 Oct 2010 23:17:00 +0000 Subject: [issue10140] Tools/scripts/pathfix.py: add option to preserve timestamps In-Reply-To: <1287443820.79.0.521760966173.issue10140@psf.upfronthosting.co.za> Message-ID: <1287443820.79.0.521760966173.issue10140@psf.upfronthosting.co.za> New submission from Dave Malcolm : I'm attempting to fix up the build in my Fedora/RHEL packages of Python to preserve timestamps of .py files as far as possible during the build, so that .pyc/.pyo files end up with predictable embedded mtime values and thus predictable hashes. Am attaching a patch to the py3k branch which adds a "-p" option to the Tools/script/pathfix.py script, which makes it preserve the mtime of the input files. ---------- components: Build files: pathfix-preserve-timestamps.patch keywords: needs review, patch messages: 119092 nosy: dmalcolm priority: normal severity: normal stage: patch review status: open title: Tools/scripts/pathfix.py: add option to preserve timestamps type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file19276/pathfix-preserve-timestamps.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 01:33:32 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 18 Oct 2010 23:33:32 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287444812.4.0.612564031623.issue10073@psf.upfronthosting.co.za> Georg Brandl added the comment: Not only is this issue already closed, the patch is also wrong -- your change to the parentheses changes the semantics. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 01:39:31 2010 From: report at bugs.python.org (nestor) Date: Mon, 18 Oct 2010 23:39:31 +0000 Subject: [issue10091] ast.literal_eval does not handled new set literals In-Reply-To: <1286998602.58.0.486068120725.issue10091@psf.upfronthosting.co.za> Message-ID: <1287445171.14.0.486095059577.issue10091@psf.upfronthosting.co.za> nestor added the comment: FYI although it breaks symmetry with eval, I am fine with this going in for 3.2. It just surprised me and I wanted to make sure it was documented here for future reference. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 01:52:42 2010 From: report at bugs.python.org (Bruce Sherwood) Date: Mon, 18 Oct 2010 23:52:42 +0000 Subject: [issue10137] Patch to IDLE for Python 2.7, at Guido's request In-Reply-To: <1287423883.85.0.614480872844.issue10137@psf.upfronthosting.co.za> Message-ID: Bruce Sherwood added the comment: Perhaps I've used misleadingt terminology. What I meant is that I did do a diff between IDLE 2.7 and the result of Guilherme Polo's work, but the latter code started from Python 3 code and was modified as needed for 2.7 (e.g. renaming tkinter as Tkinter, etc.) before generating the patch. Bruce Sherwood On Mon, Oct 18, 2010 at 11:44 AM, Amaury Forgeot d'Arc wrote: > > Amaury Forgeot d'Arc added the comment: > > But this patch is a diff between a 2.7 and a 3.2 version of IDLE, isn't it? ?The tkinter->Tkinter renaming is not supposed to happen in the 2.7 branch. > Could you instead show a diff between the present version of IDLE in 2.7 and the result of your work, so we can better see the impact of the change? > > ---------- > nosy: +amaury.forgeotdarc > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 02:49:27 2010 From: report at bugs.python.org (instigatorirc) Date: Tue, 19 Oct 2010 00:49:27 +0000 Subject: [issue10141] SocketCan support In-Reply-To: <1287449366.98.0.655876257649.issue10141@psf.upfronthosting.co.za> Message-ID: <1287449366.98.0.655876257649.issue10141@psf.upfronthosting.co.za> New submission from instigatorirc : Python lacks support for the AF_CAN family of sockets ( http://en.wikipedia.org/wiki/Controller_area_network http://lwn.net/Articles/253425/) https://lists.berlios.de/pipermail/socketcan-users/2010-July/001456.html ---------- components: IO files: socketcan.dpatch messages: 119096 nosy: instigatorirc priority: normal severity: normal status: open title: SocketCan support type: feature request versions: Python 2.6, Python 3.3 Added file: http://bugs.python.org/file19277/socketcan.dpatch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 03:02:37 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Oct 2010 01:02:37 +0000 Subject: [issue9425] Rewrite import machinery to work with unicode paths In-Reply-To: <1280448814.73.0.312881779361.issue9425@psf.upfronthosting.co.za> Message-ID: <1287450157.62.0.519486864302.issue9425@psf.upfronthosting.co.za> STINNER Victor added the comment: Starting at r85691, the full test suite of Python 3.2 pass with ASCII, ISO-8859-1 and UTF-8 locale encodings in a non-ascii directory. The work on this issue is done. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 03:02:51 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Oct 2010 01:02:51 +0000 Subject: [issue8611] Python3 doesn't support locale different than utf8 and an non-ASCII path (POSIX) In-Reply-To: <1272979850.31.0.0455265952928.issue8611@psf.upfronthosting.co.za> Message-ID: <1287450171.84.0.26430911138.issue8611@psf.upfronthosting.co.za> STINNER Victor added the comment: Starting at r85691, the full test suite of Python 3.2 pass with ASCII, ISO-8859-1 and UTF-8 locale encodings in a non-ascii directory. The work on this issue is done. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 03:22:21 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Oct 2010 01:22:21 +0000 Subject: [issue10114] compile() doesn't support the PEP 383 (surrogates) In-Reply-To: <1287146091.4.0.492257332187.issue10114@psf.upfronthosting.co.za> Message-ID: <1287451341.08.0.506942883986.issue10114@psf.upfronthosting.co.za> STINNER Victor added the comment: Buildbots are green again (#10123 is closed). I ported the fix to Python 3.1 (r85716). Close this issue. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 03:25:56 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 19 Oct 2010 01:25:56 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1287451556.23.0.958001213342.issue5117@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Sorry, I've commit the fix in r85717(release27-maint). I'll sit and watch buildbot. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 03:59:38 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 19 Oct 2010 01:59:38 +0000 Subject: [issue5117] os.path.relpath problem with root directory In-Reply-To: <1233386752.72.0.952122419494.issue5117@psf.upfronthosting.co.za> Message-ID: <1287453578.65.0.695207484208.issue5117@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I confirmed test runs fine on x86 Snow Leopard 2.7. So I'm closing this issue.... ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 04:03:12 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Oct 2010 02:03:12 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1287453792.66.0.14354890061.issue6011@psf.upfronthosting.co.za> STINNER Victor added the comment: I'm not sure that the patch is still needed on Python 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 04:04:38 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Oct 2010 02:04:38 +0000 Subject: [issue9713] Py_CompileString fails on non decode-able paths. In-Reply-To: <1283154413.35.0.877915229941.issue9713@psf.upfronthosting.co.za> Message-ID: <1287453878.93.0.951594998706.issue9713@psf.upfronthosting.co.za> STINNER Victor added the comment: See issue #10114: fixed in Python 3.1 (r85716) and in Python 3.2 (r85569+r85570). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 04:13:21 2010 From: report at bugs.python.org (David Stanek) Date: Tue, 19 Oct 2010 02:13:21 +0000 Subject: [issue2193] Cookie Colon Name Bug In-Reply-To: <1203992843.27.0.867127322082.issue2193@psf.upfronthosting.co.za> Message-ID: <1287454401.67.0.00302370033798.issue2193@psf.upfronthosting.co.za> David Stanek added the comment: My Java may be a bit rusty, but it seems that it would filter out the colon. tspecials contains a colon and thus having a colon in the cookie name would make in invalid. I glanced at the Perl code and couldn't find where it filtered out any characters. Would it be better to file bugs against buggy implementations instead of changing Python's implementation to be more lenient? ---------- nosy: +dstanek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 04:14:19 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Oct 2010 02:14:19 +0000 Subject: [issue8988] import + coding = failure (3.1.2/win32) In-Reply-To: <1276426235.15.0.873898512927.issue8988@psf.upfronthosting.co.za> Message-ID: <1287454459.75.0.523007631076.issue8988@psf.upfronthosting.co.za> STINNER Victor added the comment: I tested the example with Python 3.2 (r85691) and the issue looks to be fixed. Can someone else confirm that? I decompressed the ZIP archive, moved into the directory containing a.py and b.py, and called \path\to\python.exe a.py: it works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 04:15:01 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Oct 2010 02:15:01 +0000 Subject: [issue8988] import + coding = failure (3.1.2/win32) In-Reply-To: <1276426235.15.0.873898512927.issue8988@psf.upfronthosting.co.za> Message-ID: <1287454501.53.0.931642766824.issue8988@psf.upfronthosting.co.za> STINNER Victor added the comment: See also #3080 for the full unicode support in the import machinery. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 04:19:14 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Oct 2010 02:19:14 +0000 Subject: [issue3080] Full unicode import system In-Reply-To: <1213208697.49.0.984990811807.issue3080@psf.upfronthosting.co.za> Message-ID: <1287454754.76.0.684124229236.issue3080@psf.upfronthosting.co.za> STINNER Victor added the comment: With #8611 and #9425, I patched a lot of functions and modules, including the NullImporter and zipimport, but not the core of the import machinery. In my import_unicode SVN branch, I patched the import machinery to manipulate unicode strings, instead of bytes strings. But the patch is huge and the import machinery is fragile. Since Python 3.2 now works in a non-ASCII directory with an ASCII locale (fileystem) encoding, I don't plan to merge the patch into py3k. The patch is still useful on Windows, because Python uses the mbcs encoding to encode/decode filenames, and this encoding is usually a very small subset of Unicode (eg. cp1252 is 256 codes wheres unicode 6.0 has 109,449 characters). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 04:21:22 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 19 Oct 2010 02:21:22 +0000 Subject: [issue10027] os.lstat/os.stat don't set st_nlink on Windows In-Reply-To: <1286289327.29.0.159315245099.issue10027@psf.upfronthosting.co.za> Message-ID: <1287454882.03.0.53948284598.issue10027@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: How about this patch? * st_nlink support for stat()/lstat(). * lstat() for junction read attributes of junction not target. * stat() for symlink of system locked file (ie: c:/pagefile.sys) should read attributes from target locked file not of symlink even via FindFirstFile. (I cannot test this, sorry) I hope other behavior was not changed by this patch. ---------- Added file: http://bugs.python.org/file19278/py3k_posixpath_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 04:22:01 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Oct 2010 02:22:01 +0000 Subject: [issue1552880] [Python2] Use utf-8 in the import machinery on Windows to support unicode paths Message-ID: <1287454921.55.0.87164901366.issue1552880@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI, I finished my work on non-ascii filenames in Python 3.2 (#8611, #9425): Python 3.2 now suports any filename with any locale (filesystem) encoding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 04:24:02 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 19 Oct 2010 02:24:02 +0000 Subject: [issue10027] os.lstat/os.stat don't set st_nlink on Windows In-Reply-To: <1286289327.29.0.159315245099.issue10027@psf.upfronthosting.co.za> Message-ID: <1287455042.9.0.1769803787.issue10027@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: ... I noticed I can test this via buildbot... Probably I'll try this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 04:39:32 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 19 Oct 2010 02:39:32 +0000 Subject: [issue10027] os.lstat/os.stat don't set st_nlink on Windows In-Reply-To: <1286289327.29.0.159315245099.issue10027@psf.upfronthosting.co.za> Message-ID: <1287455972.35.0.542077182829.issue10027@psf.upfronthosting.co.za> Brian Curtin added the comment: I'll also give it a run on my Windows machines but won't be able to until tomorrow morning (~1300 UTC). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 05:15:19 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 19 Oct 2010 03:15:19 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> New submission from Jes?s Cea Avi?n : ZFS supports SEEK_HOLE/SEEK_DATA in "lseek()" syscall. Oracle Solaris man page por "lseek": """ [...] o If whence is SEEK_HOLE, the offset of the start of the next hole greater than or equal to the supplied offset is returned. The definition of a hole is provided near the end of the DESCRIPTION. o If whence is SEEK_DATA, the file pointer is set to the start of the next non-hole file region greater than or equal to the supplied offset. The symbolic constants SEEK_SET, SEEK_CUR, SEEK_END, SEEK_HOLE, and SEEK_DATA are defined in the header . [...] A "hole" is defined as a contiguous range of bytes in a file, all having the value of zero, but not all zeros in a file are guaranteed to be represented as holes returned with SEEK_HOLE. Filesystems are allowed to expose ranges of zeros with SEEK_HOLE, but not required to. Applications can use SEEK_HOLE to optimise their behavior for ranges of zeros, but must not depend on it to find all such ranges in a file. The existence of a hole at the end of every data region allows for easy programming and implies that a virtual hole exists at the end of the file. Applications should use fpathconf(_PC_MIN_HOLE_SIZE) or pathconf(_PC_MIN_HOLE_SIZE) to determine if a filesystem supports SEEK_HOLE. See fpath- conf(2). For filesystems that do not supply information about holes, the file will be represented as one entire data region. """ Implementation would be trivial. Simply conditionally compile the constant export in the C module. Or adopt the approach in the last phrase. Any novice?. ---------- keywords: easy messages: 119112 nosy: jcea priority: normal severity: normal status: open title: Support for SEEK_HOLE/SEEK_DATA type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 05:16:36 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 19 Oct 2010 03:16:36 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1287458196.94.0.714277682574.issue10142@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- components: +IO, Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 05:30:32 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 19 Oct 2010 03:30:32 +0000 Subject: [issue10143] Update "os.pathconf" values In-Reply-To: <1287459031.95.0.424598520823.issue10143@psf.upfronthosting.co.za> Message-ID: <1287459031.95.0.424598520823.issue10143@psf.upfronthosting.co.za> New submission from Jes?s Cea Avi?n : os.pathconf and related functions are a bit outdated and some platforms, like Solaris are pretty badly represented. We need to support more values. Trivial to implement. ---------- components: Library (Lib) keywords: easy messages: 119113 nosy: jcea priority: normal severity: normal status: open title: Update "os.pathconf" values versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 05:31:29 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 19 Oct 2010 03:31:29 +0000 Subject: [issue10143] Update "os.pathconf" values In-Reply-To: <1287459031.95.0.424598520823.issue10143@psf.upfronthosting.co.za> Message-ID: <1287459089.13.0.808921542142.issue10143@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- stage: -> needs patch type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 05:31:41 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 19 Oct 2010 03:31:41 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1287459101.97.0.224263921202.issue10142@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 05:53:57 2010 From: report at bugs.python.org (Ron Adam) Date: Tue, 19 Oct 2010 03:53:57 +0000 Subject: [issue9319] segfault when searching modules with help() In-Reply-To: <1279693765.46.0.777254335316.issue9319@psf.upfronthosting.co.za> Message-ID: <1287460437.25.0.0170002609664.issue9319@psf.upfronthosting.co.za> Ron Adam added the comment: The test in the patch isn't quite right. The following still fails. Python 3.2a3+ (py3k:85719, Oct 18 2010, 22:32:47) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import imp >>> imp.find_module('test/badsyntax_pep3120') Segmentation fault ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 06:05:48 2010 From: report at bugs.python.org (Wes McKinney) Date: Tue, 19 Oct 2010 04:05:48 +0000 Subject: [issue10144] Buffering bug after calling curses function In-Reply-To: <1287461148.01.0.951326412516.issue10144@psf.upfronthosting.co.za> Message-ID: <1287461148.01.0.951326412516.issue10144@psf.upfronthosting.co.za> New submission from Wes McKinney : We tracked a bug originating in IPython to the Python interpreter itself, seems to be present in 2.6.x and 2.7.x but not 3.1.x. This is on Ubuntu Linux 10.04, does not seem to occur in OS X 10.6. Reference: http://article.gmane.org/gmane.comp.python.ipython.user/5336 > cat bufferbug.py """Strange bug in buffering of sys.stdout after calling curses functions. """ import time import curses def bug(): curses.initscr() curses.endwin() def f(n=2): s = 0.75 for i in range(n): print i time.sleep(s) print i+1 if __name__ == '__main__': f() print 'Calling bug() now!' bug() f() #### ---------- components: Interpreter Core messages: 119115 nosy: Wes.McKinney priority: normal severity: normal status: open title: Buffering bug after calling curses function type: behavior versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 06:20:24 2010 From: report at bugs.python.org (Bruce Sherwood) Date: Tue, 19 Oct 2010 04:20:24 +0000 Subject: [issue10079] idlelib for Python 3 with Guilherme Polo GSoC enhancements In-Reply-To: <1286939996.87.0.346411752414.issue10079@psf.upfronthosting.co.za> Message-ID: <1287462024.28.0.29523604422.issue10079@psf.upfronthosting.co.za> Bruce Sherwood added the comment: At Guido's request, I've carried out the same update to the IDLE distributed with Python 2.7 that I submitted for Python 3, to incorporate the work of Guilherme Polo in the Google Summer of Code 2009. Guido was concerned that with significant problems reported for IDLE 2.7, there should be an update despite Python 2.7 itself being essentially frozen. The basic structure for IDLE 3.2 was carried over. The main changes that had to be made to the Polo code were the change in module names between Python 2.7 and Python 3.2 (e.g. Tkinter in 2.7 is tkinter in 3.2). The patch was built from the release27-maint branch. Bug report 10137 should now be listed as a duplicate. ---------- Added file: http://bugs.python.org/file19279/idlelib2.7_from_release27-maint.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 06:22:15 2010 From: report at bugs.python.org (Bruce Sherwood) Date: Tue, 19 Oct 2010 04:22:15 +0000 Subject: [issue10137] Patch to IDLE for Python 2.7, at Guido's request In-Reply-To: <1287417245.71.0.949450394447.issue10137@psf.upfronthosting.co.za> Message-ID: <1287462135.76.0.71669616083.issue10137@psf.upfronthosting.co.za> Bruce Sherwood added the comment: I've rebuilt and resubmitted this patch to Issue10079 as requested by Ned Deily. This issue (10137) can now be labeled a duplicate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 06:29:26 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 19 Oct 2010 04:29:26 +0000 Subject: [issue10137] Patch to IDLE for Python 2.7, at Guido's request In-Reply-To: <1287417245.71.0.949450394447.issue10137@psf.upfronthosting.co.za> Message-ID: <1287462566.97.0.398284479455.issue10137@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- resolution: -> duplicate status: open -> closed superseder: -> idlelib for Python 3 with Guilherme Polo GSoC enhancements _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 06:40:55 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 19 Oct 2010 04:40:55 +0000 Subject: [issue10140] Tools/scripts/pathfix.py: add option to preserve timestamps In-Reply-To: <1287443820.79.0.521760966173.issue10140@psf.upfronthosting.co.za> Message-ID: <1287463255.97.0.909797126279.issue10140@psf.upfronthosting.co.za> Senthil Kumaran added the comment: The patch was fine and yes agree that preserving timestamp as an option is useful in many situations. Committed in r85720. Thanks. ---------- assignee: -> orsenthil nosy: +orsenthil resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 06:46:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 19 Oct 2010 04:46:01 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287463561.5.0.317917708972.issue10073@psf.upfronthosting.co.za> ?ric Araujo added the comment: > for example, the isleap() function which should be defined as is_leap() Who says that? Not PEP?8: ?Function names should be lowercase, with words separated by underscores *as necessary to improve readability*? (emphasis mine). isleap is perfectly readable. > But now it's all too late for that fixes. You?ll find that Python has a balance between readability/ease of use and pragmatism. In some cases, changes can?t be made, but it?s best to accept it and move on to the next issue. Working on feature requests instead of style issues is great. On a closing note, I?ll let you enjoy the Zen of Python: $ python -m this ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 06:47:20 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 19 Oct 2010 04:47:20 +0000 Subject: [issue10141] SocketCan support In-Reply-To: <1287449366.98.0.655876257649.issue10141@psf.upfronthosting.co.za> Message-ID: <1287463640.07.0.93157426476.issue10141@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Looks like an interesting feature request. What are the packages or external libraries which may rely on this and how do they deal with SocketCan support at moment for their requirements? (That thread mentions several, but some details may help further). BTW, this can go in Python 3.2 if it gets in before Nov 2nd week. It wont be going into Python 2.x series. ---------- nosy: +orsenthil stage: -> patch review versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 06:49:58 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 19 Oct 2010 04:49:58 +0000 Subject: [issue8988] import + coding = failure (3.1.2/win32) In-Reply-To: <1276426235.15.0.873898512927.issue8988@psf.upfronthosting.co.za> Message-ID: <1287463798.44.0.893443992949.issue8988@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 06:50:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 19 Oct 2010 04:50:07 +0000 Subject: [issue3080] Full unicode import system In-Reply-To: <1213208697.49.0.984990811807.issue3080@psf.upfronthosting.co.za> Message-ID: <1287463807.53.0.662136189118.issue3080@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 06:58:10 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 19 Oct 2010 04:58:10 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1287464290.58.0.227705215514.issue10142@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Martin, any thoughts on adding a ZFS dependent feature? ISTM this Solaris feature hasn't taken hold elsewhere and it may be a mistake to immortalize it in Python. ---------- assignee: -> loewis nosy: +loewis, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 07:39:21 2010 From: report at bugs.python.org (instigatorirc) Date: Tue, 19 Oct 2010 05:39:21 +0000 Subject: [issue10141] SocketCan support In-Reply-To: <1287449366.98.0.655876257649.issue10141@psf.upfronthosting.co.za> Message-ID: <1287466761.48.0.882133380185.issue10141@psf.upfronthosting.co.za> instigatorirc added the comment: forgot to include this: http://en.wikipedia.org/wiki/Socketcan SocketCan is the (currently) Linux-specific Berkley-socket CAN implementation created by Volkswagen. Alot of previous CAN implementations use a rather inferior (explained in can.txt in the Linux sources) character device approach. So the use case for programs that use SocketCan is raw sockets in C, as it is a rather specialty form of interface. But considering that it fits fairly well into an existing interface, it seems appropriate to add to python. I clicked 2.7 because that was what the patch was written for. Our personal use case is for an IVI dash, to access vehicle devices that output familiar metrics like speed, tach, fuel levels, seat belts, etc over CAN. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 07:42:18 2010 From: report at bugs.python.org (instigatorirc) Date: Tue, 19 Oct 2010 05:42:18 +0000 Subject: [issue10141] SocketCan support In-Reply-To: <1287449366.98.0.655876257649.issue10141@psf.upfronthosting.co.za> Message-ID: <1287466938.64.0.801721838111.issue10141@psf.upfronthosting.co.za> instigatorirc added the comment: * PF_CAN family of sockets ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 09:15:07 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 19 Oct 2010 07:15:07 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287472507.12.0.377304464383.issue9778@psf.upfronthosting.co.za> Mark Dickinson added the comment: > The calculation of long_hash assumes an unsigned temporary type to get > correct results for the bit shifting and masking. Yes, exactly. > The calculation is > done on the absolute value of the long and then the sign is applied. We > either needed to (1) add an unsigned Py_hash_t type or (2) just use > size_t and Py_ssize_t. I like (2); the use of Py_hash_t suggests to me that the type used for the hash is configurable independently of Py_ssize_t, which isn't true. Also, with Py_hash_t it's no longer clear that printing a hash value (e.g., using PyErr_Format and friends) should use the '%zd' modifier. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 09:33:26 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 19 Oct 2010 07:33:26 +0000 Subject: [issue10139] regex A|B : both A and B match, but B is wrongly preferred In-Reply-To: <1287440762.5.0.953129438054.issue10139@psf.upfronthosting.co.za> Message-ID: <1287473606.82.0.778728172353.issue10139@psf.upfronthosting.co.za> Georg Brandl added the comment: I'm not sure this is valid. First, I think I have a much easier example: >>> import re >>> re.search('bc|abc', 'abc').group() 'abc' I assume you'd expect this to give 'bc' as well. However, for a string s, "search" looks for matches looking at s, then looking at s[1:], then s[2:], and so on. For s, it looks at both branches, and the second branch matches. This can be inferred from the docs of "search": """Scan through string looking for a location where the regular expression pattern produces a match;""", for the first location a match is produced for the second branch. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 09:50:14 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Tue, 19 Oct 2010 07:50:14 +0000 Subject: [issue10139] regex A|B : both A and B match, but B is wrongly preferred In-Reply-To: <1287440762.5.0.953129438054.issue10139@psf.upfronthosting.co.za> Message-ID: <1287474614.93.0.792419717728.issue10139@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: As I see it, it's more like: >>> re.search('a.*c|a.*|.*c', 'abc').group() producing 'bc' instead of 'abc'. Substitute "(?<=^A)" for "a" and "(?=Z$)" for "c" in the pattern above. In your example, the first part ('bc') does not match the whole string ('abc'). In my example, the first part ('(?<=^A).*(?=Z$)') matches the whole string ('A***Z'). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 09:54:27 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Tue, 19 Oct 2010 07:54:27 +0000 Subject: [issue10139] regex A|B : both A and B match, but B is wrongly preferred In-Reply-To: <1287440762.5.0.953129438054.issue10139@psf.upfronthosting.co.za> Message-ID: <1287474867.02.0.280638013956.issue10139@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: Georg, please re-open it. Focus on the difference between example regex_1|regex_2 (both matching; regex_1 is used as it should be), and regex_1|regex_3 (both matching; regex_3 is used incorrectly). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 10:11:34 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Tue, 19 Oct 2010 08:11:34 +0000 Subject: [issue10139] regex A|B : both A and B match, but B is wrongly preferred In-Reply-To: <1287440762.5.0.953129438054.issue10139@psf.upfronthosting.co.za> Message-ID: <1287475894.19.0.358044067831.issue10139@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: No, my mistake, you did well for closing it. The more explicit version of the explanation: both regex_1 and regex_2 start actually matching at index 1, while regex_3 starts matching at index 0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 11:34:44 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 19 Oct 2010 09:34:44 +0000 Subject: [issue10141] SocketCan support In-Reply-To: <1287449366.98.0.655876257649.issue10141@psf.upfronthosting.co.za> Message-ID: <1287480884.55.0.880484977456.issue10141@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 12:11:04 2010 From: report at bugs.python.org (=?utf-8?q?Brian_Boss=C3=A9?=) Date: Tue, 19 Oct 2010 10:11:04 +0000 Subject: [issue9974] tokenizer.untokenize not invariant with line continuations In-Reply-To: <1285695065.99.0.439423855227.issue9974@psf.upfronthosting.co.za> Message-ID: <1287483064.15.0.991140409885.issue9974@psf.upfronthosting.co.za> Brian Boss? added the comment: Yup, that's related to ENDMARKER being tokenized to its own line, even if EOF happens at the end of the last line of actual code. I don't know if anything relies on that behavior so I can't really suggest changing it. My patch handles the described situation, albeit a bit poorly as I mentioned in comment 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 12:29:19 2010 From: report at bugs.python.org (Eric Smith) Date: Tue, 19 Oct 2010 10:29:19 +0000 Subject: [issue10135] Format specifier 'n' not working In-Reply-To: <1287397563.59.0.0941833598936.issue10135@psf.upfronthosting.co.za> Message-ID: <1287484159.57.0.379568813715.issue10135@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 12:33:12 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 19 Oct 2010 10:33:12 +0000 Subject: [issue10027] os.lstat/os.stat don't set st_nlink on Windows In-Reply-To: <1286289327.29.0.159315245099.issue10027@psf.upfronthosting.co.za> Message-ID: <1287484392.54.0.362981315396.issue10027@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I noticed stat() won't set S_IEXEC in stat() with my patch (py3k_posixpath_v1.patch). :-( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 12:37:44 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 19 Oct 2010 10:37:44 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1287484664.45.0.178541380294.issue10142@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Seems to be adopted too in *bsd: http://manpages.ubuntu.com/manpages/lucid/man2/lseek.2freebsd.html . The feature has patches available too for Linux, but never integrated in mainline kernel, AFAIK. Googling "SEEK_HOLE" is interesting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 12:44:06 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 19 Oct 2010 10:44:06 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1287485046.66.0.517497854719.issue10142@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If it's just additional constants then I don't see the problem. We already have a lot of platform-specific constants. However, it would be a lot better if the io module were made to work properly with these constants, too. There are a lot of places where we hardcode tests such as `whence == SEEK_SET` or even `whence == 0`, and whence values above 2 aren't generally considered. So the patch is probably a bit less trivial than what you imagine :) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 13:40:40 2010 From: report at bugs.python.org (Ralph Corderoy) Date: Tue, 19 Oct 2010 11:40:40 +0000 Subject: [issue10145] (4.2).is_integer() is undocumented. In-Reply-To: <1287488440.57.0.0400472595143.issue10145@psf.upfronthosting.co.za> Message-ID: <1287488440.57.0.0400472595143.issue10145@psf.upfronthosting.co.za> New submission from Ralph Corderoy : floats now have an is_integer() method. I think it was added in 2.6 around the same time as as_integer_ratio(). It has a docstring but it isn't mentioned in the documentation. I only idled across it when reading the C source. I'd expect to find it, for example, at http://docs.python.org/library/stdtypes.html?highlight=as_integer_ratio#additional-methods-on-float http://docs.python.org/py3k/library/stdtypes.html?highlight=as_integer_ratio#additional-methods-on-float Can it please be added, and for Py2, mention what version it appeared in. ---------- assignee: docs at python components: Documentation messages: 119133 nosy: docs at python, ralph.corderoy priority: normal severity: normal status: open title: (4.2).is_integer() is undocumented. versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 14:36:53 2010 From: report at bugs.python.org (Ask Solem) Date: Tue, 19 Oct 2010 12:36:53 +0000 Subject: [issue10128] multiprocessing.Pool throws exception with __main__.py In-Reply-To: <1287268913.13.0.756366299299.issue10128@psf.upfronthosting.co.za> Message-ID: <1287491813.16.0.743901582249.issue10128@psf.upfronthosting.co.za> Ask Solem added the comment: Is this on Windows? Does it work for you now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 14:37:19 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 19 Oct 2010 12:37:19 +0000 Subject: [issue10134] test_email failures on Windows: end of line issue? In-Reply-To: <1287373744.55.0.18095949035.issue10134@psf.upfronthosting.co.za> Message-ID: <1287491839.11.0.23376335025.issue10134@psf.upfronthosting.co.za> R. David Murray added the comment: Having looked more carefully at the email4 (python2) code, I think I'm wrong. The test I changed appears to codify the behavior expected when parsing a crlf file in binary mode. This means that email4 code being ported to email5 may depend on that behavior. So my initial statement was in fact correct: the email5 code as it stands is correct, it is the tests that are broken. Fixing the tests so that they run on Windows may be hard enough that I end up just skipping that particular test class on Windows. The difficulty arises from the fact that email uses '\n' when serializing headers, but the message bodies in binary mode will have the \r\n line endings if and only if the source used \r\n. Since the source files for those tests are text, they have different line endings depending on the platform, and so the output of re-serializing the messages is different. Which means, in essence, that on Windows those test failures are correct failures: binary parse/binary serialize are *not* inverses. This is also, then, true for a binary parse of an RFC valid input stream, since the RFCs require \r\n line separators. In Python2 this wasn't a problem because the file or data stream could be read as text using universal newline mode, thus obscuring the difference in the input line end discipline. In Python3 this is not possible. So, an alternative and perhaps better fix is to add a new feature to email5's BytesGenerator that allows the output line end character sequence to be specified. This would have the additional advantage of closing issue 1349106, and would make it easier to interface with an as-yet-nonexistent binary input interface in smtplib. ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 14:53:27 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 19 Oct 2010 12:53:27 +0000 Subject: [issue10145] (4.2).is_integer() is undocumented. In-Reply-To: <1287488440.57.0.0400472595143.issue10145@psf.upfronthosting.co.za> Message-ID: <1287492807.38.0.386570530344.issue10145@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: docs at python -> nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 15:03:47 2010 From: report at bugs.python.org (Matthias Klose) Date: Tue, 19 Oct 2010 13:03:47 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1287493427.76.0.776687802959.issue9807@psf.upfronthosting.co.za> Matthias Klose added the comment: the python.pc installation name should be changed too, and a symlink added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 15:13:49 2010 From: report at bugs.python.org (Matthias Klose) Date: Tue, 19 Oct 2010 13:13:49 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1287494029.02.0.638838089789.issue9807@psf.upfronthosting.co.za> Matthias Klose added the comment: Lib/distutils/command/install.py () needs updates in INSTALL_SCHEMES/headers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 16:28:36 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 19 Oct 2010 14:28:36 +0000 Subject: [issue9929] subprocess.Popen unbuffered not work In-Reply-To: <1285265742.42.0.656694330002.issue9929@psf.upfronthosting.co.za> Message-ID: <1287498516.77.0.624520064167.issue9929@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I implemented msg117279 with v2 patch. Can I commit it? # If your are already working on this issue, please ignore # my patch. ---------- Added file: http://bugs.python.org/file19280/py3k_fix_unbuffered_in_subprocess_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 16:34:33 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Tue, 19 Oct 2010 14:34:33 +0000 Subject: [issue9929] subprocess.Popen unbuffered not work In-Reply-To: <1285265742.42.0.656694330002.issue9929@psf.upfronthosting.co.za> Message-ID: <1287498873.37.0.408229321588.issue9929@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Umm, v2 patch broke test_subprocess. I'll repost v3 patch after removing "bufsize=0 && universal_newlines" check. ====================================================================== ERROR: test_universal_newlines (__main__.ProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "e:\python-dev\py3k\lib\test\test_subprocess.py", line 422, in test_unive rsal_newlines universal_newlines=1) File "e:\python-dev\py3k\lib\subprocess.py", line 621, in __init__ raise ValueError("cannot use bufsize=0 with universal newlines") ValueError: cannot use bufsize=0 with universal newlines ====================================================================== ERROR: test_universal_newlines_communicate (__main__.ProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "e:\python-dev\py3k\lib\test\test_subprocess.py", line 442, in test_unive rsal_newlines_communicate universal_newlines=1) File "e:\python-dev\py3k\lib\subprocess.py", line 621, in __init__ raise ValueError("cannot use bufsize=0 with universal newlines") ValueError: cannot use bufsize=0 with universal newlines ---------- Added file: http://bugs.python.org/file19281/py3k_fix_unbuffered_in_subprocess_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 17:41:42 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 19 Oct 2010 15:41:42 +0000 Subject: [issue3062] Turtle speed() function has no effect under Mac OS X In-Reply-To: <1212923215.43.0.432854849061.issue3062@psf.upfronthosting.co.za> Message-ID: <1287502902.81.0.256726234716.issue3062@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a simpler and hopefully more revealing test, speed_test.py. This test repeatedly draws a full circle at various speeds and prints the time spent. Here is the result: # python3.1 speed_test.py 0: 0.03 1: 6.61 2: 4.32 3: 3.78 4: 3.23 5: 3.21 6: 2.65 7: 2.72 8: 2.66 9: 2.86 10: 2.67 Note that time decreases as speed changes from 1 to 4 as expected, but then changes unpredictably as speed changes from 5 to 10. ---------- nosy: +belopolsky Added file: http://bugs.python.org/file19282/speed_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 17:43:23 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 19 Oct 2010 15:43:23 +0000 Subject: [issue3062] Turtle speed() function has no effect under Mac OS X In-Reply-To: <1212923215.43.0.432854849061.issue3062@psf.upfronthosting.co.za> Message-ID: <1287503003.41.0.713210513824.issue3062@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +gregorlingl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 18:10:03 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Tue, 19 Oct 2010 16:10:03 +0000 Subject: [issue10036] compiler warnings for various modules on Linux buildslaves In-Reply-To: <1286344285.28.0.174737248843.issue10036@psf.upfronthosting.co.za> Message-ID: <1287504603.96.0.177473259954.issue10036@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: At least one of these also happens on Gentoo: Modules/_ctypes/libffi/src/dlmalloc.c:3193: warning: implicit declaration of function 'mremap' Modules/_ctypes/libffi/src/dlmalloc.c:3193: warning: cast to pointer from integer of different size Modules/_ctypes/libffi/src/dlmalloc.c:3612: warning: comparison between pointer and integer ---------- nosy: +djc title: compiler warnings for various modules on Ubuntu x86 -> compiler warnings for various modules on Linux buildslaves _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 18:19:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 19 Oct 2010 16:19:00 +0000 Subject: [issue10145] float.is_integer is undocumented In-Reply-To: <1287488440.57.0.0400472595143.issue10145@psf.upfronthosting.co.za> Message-ID: <1287505140.77.0.592911715496.issue10145@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- stage: -> needs patch title: (4.2).is_integer() is undocumented. -> float.is_integer is undocumented versions: -Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 18:25:24 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Tue, 19 Oct 2010 16:25:24 +0000 Subject: [issue10036] compiler warnings for various modules on Linux buildslaves In-Reply-To: <1286344285.28.0.174737248843.issue10036@psf.upfronthosting.co.za> Message-ID: <1287505524.5.0.859185793242.issue10036@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: Current Ubuntu builds from the buildbot also only show the libffi warning: http://www.python.org/dev/buildbot/builders/x86%20Ubuntu%20Shared%203.x/builds/2326/steps/compile/logs/warnings I suspect we don't really fix libffi compile warnings because (a) libffi is just bundled from upstream in python, for ctypes, AFAICT, and (b) libffi maintenance seems to be intermittent at best. For example, it seems like we're not bundling any released version of libffi, but just some snapshot from the upstream repo. ---------- nosy: +theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 18:32:02 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 19 Oct 2010 16:32:02 +0000 Subject: [issue10145] float.is_integer is undocumented In-Reply-To: <1287488440.57.0.0400472595143.issue10145@psf.upfronthosting.co.za> Message-ID: <1287505922.18.0.0727207780139.issue10145@psf.upfronthosting.co.za> R. David Murray added the comment: Woops, I didn't meant to unassign docs. ---------- assignee: -> docs at python nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 18:34:40 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 19 Oct 2010 16:34:40 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1287463561.5.0.317917708972.issue10073@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: I have read the Zen of PYthon before. I have also written a typo report. But got rejected. No one listens to my ideas. So why do you have a bug tracker anyway? On Tue, Oct 19, 2010 at 6:46 AM, ??ric Araujo wrote: > > ??ric Araujo added the comment: > > > for example, the isleap() function which should be defined as is_leap() > Who says that? Not PEP 8: ???Function names should be lowercase, with words > separated by underscores *as necessary to improve readability*??? (emphasis > mine). isleap is perfectly readable. > > > But now it's all too late for that fixes. > You???ll find that Python has a balance between readability/ease of use and > pragmatism. In some cases, changes can???t be made, but it???s best to accept > it and move on to the next issue. Working on feature requests instead of > style issues is great. > > On a closing note, I???ll let you enjoy the Zen of Python: > $ python -m this > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19283/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- I have read the Zen of PYthon before. I have also written a typo report. But got rejected. No one listens to my ideas. So why do you have a bug tracker anyway?

On Tue, Oct 19, 2010 at 6:46 AM, ??ric Araujo <report at bugs.python.org> wrote:

??ric Araujo <merwok at netwok.org> added the comment:

> for example, the isleap() function which should be defined as is_leap()
Who says that? ??Not PEP??8: ???Function names should be lowercase, with words separated by underscores *as necessary to improve readability*??? (emphasis mine). ??isleap is perfectly readable.

> But now it's all too late for that fixes.
You???ll find that Python has a balance between readability/ease of use and pragmatism. ??In some cases, changes can???t be made, but it???s best to accept it and move on to the next issue. ??Working on feature requests instead of style issues is great.

On a closing note, I???ll let you enjoy the Zen of Python:
$ python -m this

----------

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

From report at bugs.python.org Tue Oct 19 18:40:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 19 Oct 2010 16:40:51 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287506451.41.0.153247292313.issue10073@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : Removed file: http://bugs.python.org/file19283/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 18:58:03 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 19 Oct 2010 16:58:03 +0000 Subject: [issue10090] python -m locale fails on OSX In-Reply-To: <1286998392.83.0.0924618610068.issue10090@psf.upfronthosting.co.za> Message-ID: <1287507483.02.0.856214444377.issue10090@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo, loewis versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 18:58:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 19 Oct 2010 16:58:52 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: <1286999616.97.0.806385422046.issue10092@psf.upfronthosting.co.za> Message-ID: <1287507532.64.0.198476402653.issue10092@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 19:02:29 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 19 Oct 2010 17:02:29 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: Message-ID: Alexander Belopolsky added the comment: On Tue, Oct 19, 2010 at 12:34 PM, Bo?tjan Mejak wrote: > I have also written a typo report. But > got rejected. No one listens to my ideas. So why do you have a bug tracker > anyway? Bug tracker is not the place to discuss ideas. We have python-ideas mailing list for that. I searched the tracker and found four documentation issues that you submitted in the past: #4389, #4648, #4649, and #6475. In each case, your issue received attention from the most senior python developers. In each case the issue was closed with a detailed comment explaining the reasons for rejection. I think if you search the tracker for issues with "accepted" or "fixed" resolution, you will understand why we have the bug tracker. Reading successful reports may also help you to submit better reports in the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 19:27:38 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 19 Oct 2010 17:27:38 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: Message-ID: Bo??tjan Mejak added the comment: > > your change to the parentheses changes the semantics. (Georg Brandl) How does adding those parens change semantics? The behaviour of the function isleap() is the same. I have throughtly tested this function and found no semantic errors in it. So the parens don't matter for behaviour, only for clarity they matter. But since you decided not to fix this, I won't push the envelope. At least fix the docstrings to match the return value. Please fix the docstrings to """Return True for leap years, False for non-leap years.""" On Tue, Oct 19, 2010 at 7:02 PM, Alexander Belopolsky < report at bugs.python.org> wrote: > > Alexander Belopolsky added the comment: > > On Tue, Oct 19, 2010 at 12:34 PM, Bo??tjan Mejak > wrote: > > I have also written a typo report. But > > got rejected. No one listens to my ideas. So why do you have a bug > tracker > > anyway? > > Bug tracker is not the place to discuss ideas. We have python-ideas > mailing list for that. > > I searched the tracker and found four documentation issues that you > submitted in the past: #4389, #4648, #4649, and #6475. In each case, > your issue received attention from the most senior python developers. > In each case the issue was closed with a detailed comment explaining > the reasons for rejection. > > I think if you search the tracker for issues with "accepted" or > "fixed" resolution, you will understand why we have the bug tracker. > Reading successful reports may also help you to submit better reports > in the future. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19284/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
your change to the parentheses changes the semantics. (Georg Brandl)

How does adding those parens change semantics? The behaviour of the function isleap() is the same. I have throughtly tested this function and found no semantic errors in it. So the parens don't matter for behaviour, only for clarity they matter. But since you decided not to fix this, I won't push the envelope. At least fix the docstrings to match the return value. Please fix the docstrings to """Return True for leap years, False for non-leap years."""


On Tue, Oct 19, 2010 at 7:02 PM, Alexander Belopolsky <report at bugs.python.org> wrote:

Alexander Belopolsky <belopolsky at users.sourceforge.net> added the comment:

On Tue, Oct 19, 2010 at 12:34 PM, Bo??tjan Mejak <report at bugs.python.org> wrote:
> I have also written a typo report. But
> got rejected. No one listens to my ideas. So why do you have a bug tracker
> anyway?

Bug tracker is not the place to discuss ideas. ??We have python-ideas
mailing list for that.

I searched the tracker and found four documentation issues that you
submitted in the past: #4389, #4648, #4649, and #6475. ??In each case,
your issue received attention from the most senior python developers.
In each case the issue was closed with a detailed comment explaining
the reasons for rejection.

I think if you search the tracker for issues with "accepted" or
"fixed" resolution, you will understand why we have the bug tracker.
Reading successful reports may also help you to submit better reports
in the future.

----------

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

From report at bugs.python.org Tue Oct 19 19:30:41 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 19 Oct 2010 17:30:41 +0000 Subject: [issue4480] bdist_msi and bdist_wininst are missing an uninstaller icon In-Reply-To: <1228122344.22.0.401809698411.issue4480@psf.upfronthosting.co.za> Message-ID: <1287509441.64.0.179024272528.issue4480@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 19:30:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 19 Oct 2010 17:30:57 +0000 Subject: [issue4480] bdist_msi and bdist_wininst are missing an uninstaller icon In-Reply-To: <1228122344.22.0.401809698411.issue4480@psf.upfronthosting.co.za> Message-ID: <1287509457.05.0.138214480629.issue4480@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Distutils2 -Distutils, Windows versions: +3rd party -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 19:31:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 19 Oct 2010 17:31:11 +0000 Subject: [issue4480] bdist_msi and bdist_wininst are missing an uninstaller icon In-Reply-To: <1228122344.22.0.401809698411.issue4480@psf.upfronthosting.co.za> Message-ID: <1287509471.12.0.668883035652.issue4480@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 19:32:59 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 19 Oct 2010 17:32:59 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287509579.15.0.364263162962.issue10073@psf.upfronthosting.co.za> Changes by Bo?tjan Mejak : Removed file: http://bugs.python.org/file19284/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 19:33:05 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 19 Oct 2010 17:33:05 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287509585.18.0.352619982986.issue10073@psf.upfronthosting.co.za> Changes by Bo?tjan Mejak : Removed file: http://bugs.python.org/file19275/calendar-isleap.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 19:36:58 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 19 Oct 2010 17:36:58 +0000 Subject: [issue1528363] forward in turtle module may cause incorrect display Message-ID: <1287509818.61.0.351327662329.issue1528363@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I cannot reproduce this on OSX. I have verified that the turtle position is correct (-70.00,30.00) after the steps reported by OP. This must be out of date. ---------- nosy: +belopolsky resolution: -> out of date stage: unit test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 19:37:43 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 19 Oct 2010 17:37:43 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287509863.78.0.11513286295.issue10073@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: I am applying a patch that only fixes the docstrings to match the return value of calendar.isleap(). The return value of isleap() is not 1 or 0 -- it is True or False. Please apply the patch. Thank you. ---------- Added file: http://bugs.python.org/file19285/isleap-docstrings.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 19:44:33 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 19 Oct 2010 17:44:33 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287510273.55.0.0717451938754.issue10073@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed the docstring patch in r85725. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 19:59:34 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 19 Oct 2010 17:59:34 +0000 Subject: [issue4117] missing update() in _Screen.setup() of Lib/turtle.py In-Reply-To: <1223938964.4.0.025382695872.issue4117@psf.upfronthosting.co.za> Message-ID: <1287511174.23.0.53429696521.issue4117@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: It looks like this has been fixed in turtle 1.1. See r72318 and issue 5923. ---------- nosy: +belopolsky, georg.brandl resolution: -> out of date stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 20:16:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 19 Oct 2010 18:16:25 +0000 Subject: [issue5135] Expose simplegeneric function in functools module In-Reply-To: <1233604660.52.0.0984436233806.issue5135@psf.upfronthosting.co.za> Message-ID: <1287512185.53.0.6577468219.issue5135@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file18131/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 20:16:29 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 19 Oct 2010 18:16:29 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287512189.51.0.468788410123.issue10073@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: Thank you for applying my patch. Glad to help. Please apply it to the trunk and other branches as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 20:19:12 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 19 Oct 2010 18:19:12 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287512352.59.0.141208935598.issue10073@psf.upfronthosting.co.za> Georg Brandl added the comment: It will be merged in due time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 20:29:05 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 19 Oct 2010 18:29:05 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: <1286999616.97.0.806385422046.issue10092@psf.upfronthosting.co.za> Message-ID: <1287512945.04.0.87797425999.issue10092@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: It seems that calendar.LocaleTextCalendar() changes the locale for the current interpreter session to the one you pass to argument 'locale'. This is a bug to be fixed. ---------- nosy: +Retro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 20:33:26 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 19 Oct 2010 18:33:26 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1287513206.08.0.782977371409.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > It seems that 'add=False' would be same as 'add=None' and more > consistent with below. The add argument is passed unchanged to canvas' bind method which is documented as taking either '' or '+' string: http://docs.python.org/library/tkinter.html?highlight=canvas#bindings-and-events I think anything that can be used in boolean context can be used there. None and '' are equivalent to False and '+' is equivalent to True. I agree that True/False are better options and suggest to change tkinter doc accordingly. As far as changing the default value from None to False, if this is done in doc, the same should be done in the code. I am -0 on that. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 20:36:33 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 19 Oct 2010 18:36:33 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: <1286999616.97.0.806385422046.issue10092@psf.upfronthosting.co.za> Message-ID: <1287513393.17.0.688760173833.issue10092@psf.upfronthosting.co.za> ?ric Araujo added the comment: Indeed. Would you like to try to make a patch for Python?3.2? Help is here: http://www.python.org/dev/ (especially http://www.python.org/dev/patches/ ) and here: http://docs.pythonsprints.com/core_development/beginners.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 20:39:19 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 19 Oct 2010 18:39:19 +0000 Subject: [issue10073] calendar.isleap() not checking parameter type In-Reply-To: <1286891276.3.0.0479149618072.issue10073@psf.upfronthosting.co.za> Message-ID: <1287513559.49.0.701125900285.issue10073@psf.upfronthosting.co.za> ?ric Araujo added the comment: > How does adding those parens change semantics? It changes boolean evaluation paths. See for example http://docs.python.org/py3k/reference/expressions#boolean-operations . If you have more questions, python-list is an open and friendly mailing list dedicated to answering them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 20:50:22 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 19 Oct 2010 18:50:22 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: <1287513393.17.0.688760173833.issue10092@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: > > Would you like to try to make a patch for Python 3.2? I'm not that geeky. :) On Tue, Oct 19, 2010 at 8:36 PM, ??ric Araujo wrote: > > ??ric Araujo added the comment: > > Indeed. Would you like to try to make a patch for Python 3.2? Help is > here: http://www.python.org/dev/ (especially > http://www.python.org/dev/patches/ ) and here: > http://docs.pythonsprints.com/core_development/beginners.html > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19286/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
Would you like to try to make a patch for Python??3.2?
I'm not that geeky. :)??

On Tue, Oct 19, 2010 at 8:36 PM, ??ric Araujo <report at bugs.python.org> wrote:

??ric Araujo <merwok at netwok.org> added the comment:

Indeed. ??Would you like to try to make a patch for Python??3.2? ??Help is here: http://www.python.org/dev/ (especially http://www.python.org/dev/patches/ ) and here: http://docs.pythonsprints.com/core_development/beginners.html

----------

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

From report at bugs.python.org Tue Oct 19 20:55:26 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 19 Oct 2010 18:55:26 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: <1286999616.97.0.806385422046.issue10092@psf.upfronthosting.co.za> Message-ID: <1287514526.66.0.354243349579.issue10092@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r85728. The problem was that unlike other system calls, setlocale() doesn't return the old setting but the new setting. The context manager that resets the locale therefore didn't work as intended. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 21:10:45 2010 From: report at bugs.python.org (Noah Kantrowitz) Date: Tue, 19 Oct 2010 19:10:45 +0000 Subject: [issue10146] Incorrect regex generation in translate_pattern In-Reply-To: <1287515445.03.0.219266745901.issue10146@psf.upfronthosting.co.za> Message-ID: <1287515445.03.0.219266745901.issue10146@psf.upfronthosting.co.za> New submission from Noah Kantrowitz : If a prefix is passed to translate_pattern it will generate a pattern using the unescaped output of os.path.join(). This is fine on *nix, but on Windows it results in a pattern like r'build\.*', which matches any string starting with "build" (in my case, "buildout.cfg"). Escaping the separator fixes this (patch attached). ---------- assignee: tarek components: Distutils files: filelist.diff keywords: patch messages: 119159 nosy: coderanger, eric.araujo, tarek priority: normal severity: normal status: open title: Incorrect regex generation in translate_pattern type: behavior versions: Python 2.6, Python 2.7, Python 3.1 Added file: http://bugs.python.org/file19287/filelist.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 21:19:53 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 19 Oct 2010 19:19:53 +0000 Subject: [issue10147] Python Documentation bugs In-Reply-To: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> Message-ID: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> New submission from Bo?tjan Mejak : Please read the docs here: http://docs.python.org/py3k/reference/expressions#boolean-operations This is the last sentence in the '5.10. Boolean operations' text): ([...] Because not has to >>>invent<<< a value anyway, it does not bother to return a value of the same type as its argument, so e.g., not 'foo' yields False, not ''.) Fix to: ([...] Because not has to >>>invert<<< a value anyway, it does not bother to return a value of the same type as its argument, so e.g., not 'foo' yields False, not ''.) ---------- assignee: docs at python components: Documentation messages: 119160 nosy: Retro, docs at python priority: normal severity: normal status: open title: Python Documentation bugs versions: 3rd party, Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 22:07:52 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 19 Oct 2010 20:07:52 +0000 Subject: [issue10144] Buffering bug after calling curses function In-Reply-To: <1287461148.01.0.951326412516.issue10144@psf.upfronthosting.co.za> Message-ID: <1287518872.78.0.450527447458.issue10144@psf.upfronthosting.co.za> Ned Deily added the comment: The problem is reproducible with the python2 versions I have access to, that is, on Mac OS X and Debian Linux, and likewise not with any of the python3 3.1 and 3.2 versions. It is most likely due to the underlying ncurses library interacting with the libc stdio, maybe changing the buffer size of the stdout file. The output is flushed as expected if the program is changed to use the python2.7 io module to write to stdout, like python3 does, rather than print which uses the 'file' object. As a workaround on python2, it looks like the expected behavior can be restored by closing and reopening sys.stdout with something like this: f() stdout=sys.stdout print('Calling bug() now!') bug() fn = sys.stdout.fileno() sys.stdout.close() sys.stdout = os.fdopen(fn,'a') f() ---------- nosy: +akuchling, ned.deily, pitrou versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 22:09:20 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 19 Oct 2010 20:09:20 +0000 Subject: [issue10147] Python Documentation bugs In-Reply-To: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> Message-ID: <1287518960.68.0.830878305928.issue10147@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: There is one more typo bug I noted in the documentation. Please go here: http://docs.python.org/library/locale#locale.setlocale Fix this text... setlocale() is not >>>thread safe<<< on most systems. ...like this: setlocale() is not >>>thread-safe<<< on most systems. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 22:12:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 19 Oct 2010 20:12:47 +0000 Subject: [issue10146] Incorrect regex generation in translate_pattern In-Reply-To: <1287515445.03.0.219266745901.issue10146@psf.upfronthosting.co.za> Message-ID: <1287519167.72.0.434328263154.issue10146@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Impossible to include file in sdist that starts with 'build' on Win32 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 22:26:43 2010 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Tue, 19 Oct 2010 20:26:43 +0000 Subject: [issue10144] Buffering bug after calling curses function In-Reply-To: <1287461148.01.0.951326412516.issue10144@psf.upfronthosting.co.za> Message-ID: <1287520003.04.0.926020563883.issue10144@psf.upfronthosting.co.za> Andreas St?hrk added the comment: That behaviour is indeed caused by ncurses as it changes the buffer size of stdio. The rationale behind that is explained in a comment in ncurses/tinfo/setbuf.c (http://codesearch.google.com/codesearch/p?hl=en#5KTrgOW2hXs/pub/nslu2/sources/ncurses-5.4.tar.gz%7CqZkYBenqdbw/ncurses-5.4/ncurses/tinfo/setbuf.c&l=46) That behaviour is also mentioned in the man-page of ncurses and one can disable it using the NCURSES_NO_SETBUF environment variable. If I set that environment variable, the example behaves as expected on my machine. ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 22:44:12 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 19 Oct 2010 20:44:12 +0000 Subject: [issue10144] Buffering bug after calling curses function In-Reply-To: <1287461148.01.0.951326412516.issue10144@psf.upfronthosting.co.za> Message-ID: <1287521052.86.0.740834312529.issue10144@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for NCURSES_NO_SETBUF ("when it doubt read the man page"!). Since the problem does not seem to exist in python3 and this is likely been an issue for a long time and apparently not previously reported and there are various workarounds, I think this could be closed as "wont fix". Any objections? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 23:08:30 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 19 Oct 2010 21:08:30 +0000 Subject: [issue10147] Python Documentation bugs In-Reply-To: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> Message-ID: <1287522510.64.0.333949582933.issue10147@psf.upfronthosting.co.za> Georg Brandl added the comment: The first one is not a typo. Fixed the second one (and similar occurrences of "thread safe") in r85731. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 23:10:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 19 Oct 2010 21:10:59 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1287522659.85.0.914237275218.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed some of the simpler fixes in r85732. > ?? Unclear how [delay()] interacts with turtle.speed Unclear indeed. See issue 3062. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 23:12:26 2010 From: report at bugs.python.org (John J Lee) Date: Tue, 19 Oct 2010 21:12:26 +0000 Subject: [issue2193] Cookie Colon Name Bug In-Reply-To: <1203992843.27.0.867127322082.issue2193@psf.upfronthosting.co.za> Message-ID: <1287522746.7.0.285586493633.issue2193@psf.upfronthosting.co.za> John J Lee added the comment: dstanek> Would it be better to file bugs against buggy implementations instead of changing Python's implementation to be more lenient? No. Another app running on the same domain that knows nothing about RFC 2109 (and why should it?) shouldn't break your Cookie.py-using app -- did you look at the trac bug? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 23:17:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 19 Oct 2010 21:17:09 +0000 Subject: [issue3062] Turtle speed() function has no effect under Mac OS X In-Reply-To: <1212923215.43.0.432854849061.issue3062@psf.upfronthosting.co.za> Message-ID: <1287523029.9.0.553900263548.issue3062@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching another test that demonstrates that the speed of the turtle is different when it draws a straight line and a circle. The output shows the time it takes to draw a line and a circle of the same length at various speed settings. $ python3 speed_test2.py 0: 0.01 0.02 1: 0.96 2.25 2: 0.67 2.24 3: 0.32 1.81 4: 0.25 1.39 5: 0.27 1.89 6: 0.15 1.44 7: 0.12 1.53 8: 0.10 1.69 9: 0.10 1.73 10: 0.08 1.64 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 23:44:29 2010 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 19 Oct 2010 21:44:29 +0000 Subject: [issue6460] test failure in test_xmlrpc on Gentoo in trunk In-Reply-To: <1247281782.39.0.752563688041.issue6460@psf.upfronthosting.co.za> Message-ID: <1287524669.98.0.53014363186.issue6460@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hello, can we consider this bug as fixed? test has been fixed, buildbots don't show this problem anymore and a run on my system with 300 instances of the test_xmlrpc running in parallel generated only OK as result. Regards, Sandro ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 23:47:09 2010 From: report at bugs.python.org (Fernando Perez) Date: Tue, 19 Oct 2010 21:47:09 +0000 Subject: [issue10144] Buffering bug after calling curses function In-Reply-To: <1287461148.01.0.951326412516.issue10144@psf.upfronthosting.co.za> Message-ID: <1287524829.84.0.000181626273684.issue10144@psf.upfronthosting.co.za> Fernando Perez added the comment: No problem for us (IPython) if you mark it as won't fix. I've just applied the environment workaround you guys suggested: http://github.com/ipython/ipython/commit/147b245d2ead0e15d2c17b7bb760a03126660fb7 Thanks a lot for that tip! That leaves us in good shape. ---------- nosy: +fperez _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 19 23:51:37 2010 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 19 Oct 2010 21:51:37 +0000 Subject: [issue7096] test_curses fails on 3.1 when run under regrtest In-Reply-To: <1255143233.91.0.954013064992.issue7096@psf.upfronthosting.co.za> Message-ID: <1287525097.49.0.320165723629.issue7096@psf.upfronthosting.co.za> Sandro Tosi added the comment: mh, 3 months and no taker, let's close it? :) ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 00:02:17 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 19 Oct 2010 22:02:17 +0000 Subject: [issue10144] Buffering bug after calling curses function In-Reply-To: <1287461148.01.0.951326412516.issue10144@psf.upfronthosting.co.za> Message-ID: <1287525737.55.0.194792229379.issue10144@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 00:06:49 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 19 Oct 2010 22:06:49 +0000 Subject: [issue6460] test failure in test_xmlrpc on Gentoo in trunk In-Reply-To: <1247281782.39.0.752563688041.issue6460@psf.upfronthosting.co.za> Message-ID: <1287526009.18.0.712976857706.issue6460@psf.upfronthosting.co.za> Ned Deily added the comment: I have not seen any recent failures either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 00:20:50 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 19 Oct 2010 22:20:50 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287464290.58.0.227705215514.issue10142@psf.upfronthosting.co.za> Message-ID: <4CBE19BF.1070309@v.loewis.de> Martin v. L?wis added the comment: Am 19.10.2010 06:58, schrieb Raymond Hettinger: > > Raymond Hettinger added the > comment: > > Martin, any thoughts on adding a ZFS dependent feature? ISTM this > Solaris feature hasn't taken hold elsewhere and it may be a mistake > to immortalize it in Python. There isn't any specific patch to review yet. However, Python has a long tradition of exposing all symbolic constants that users have asked for, and these are no different (e.g. how many systems support EX_SOFTWARE, or ENOTACTIVE). As long as it's just new constants, and as long as they are guarded with an ifdef, no approval is necessary for adding them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 00:22:35 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 19 Oct 2010 22:22:35 +0000 Subject: [issue6460] test failure in test_xmlrpc on Gentoo in trunk In-Reply-To: <1247281782.39.0.752563688041.issue6460@psf.upfronthosting.co.za> Message-ID: <1287526955.32.0.229320655719.issue6460@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 00:25:18 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 19 Oct 2010 22:25:18 +0000 Subject: [issue7096] test_curses fails on 3.1 when run under regrtest In-Reply-To: <1255143233.91.0.954013064992.issue7096@psf.upfronthosting.co.za> Message-ID: <1287527118.39.0.0393331982113.issue7096@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 01:04:25 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Oct 2010 23:04:25 +0000 Subject: [issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error In-Reply-To: <1275332485.24.0.0853481149333.issue8863@psf.upfronthosting.co.za> Message-ID: <1287529465.72.0.497686853891.issue8863@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch version 7: - don't use snprintf() because it is not signal safe - catch also SIGBUS and SIGILL if available - Py_FatalError() uses fileno(stderr) instead of directly 2 - Factorize code in segfault.c and test_segfault.py ---------- Added file: http://bugs.python.org/file19288/segfault_handler-7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 01:06:22 2010 From: report at bugs.python.org (Sandro Tosi) Date: Tue, 19 Oct 2010 23:06:22 +0000 Subject: [issue9791] nntplib.py lacks a test suite In-Reply-To: <1283885249.67.0.188742256424.issue9791@psf.upfronthosting.co.za> Message-ID: <1287529582.96.0.790119866517.issue9791@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hello, in r85111 Antoine revamped nntplib modules, making it compatible with Python 3, improving its documentation and also adding a test suite. I'm marking this bug as closed/accepted; Giampaolo, if you feel you still want to work on the test suite (I admit I didn't check the coverage), please reopen it (or log a new one). Regards, Sandro ---------- nosy: +sandro.tosi resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 01:14:31 2010 From: report at bugs.python.org (Luke McCarthy) Date: Tue, 19 Oct 2010 23:14:31 +0000 Subject: [issue10148] st_mtime differs after shutil.copy2 In-Reply-To: <1287530071.19.0.608159353416.issue10148@psf.upfronthosting.co.za> Message-ID: <1287530071.19.0.608159353416.issue10148@psf.upfronthosting.co.za> New submission from Luke McCarthy : When copying a file with shutil.copy2() between two ext4 filesystems on 64-bit Linux, the mtime of the destination file is different after the copy. It appears as if the resolution is slightly different, so the mtime is truncated slightly. For example: source file mtime: 1287367331.8433506 destination file mtime: 1287367331.84335 ---------- components: Library (Lib) messages: 119176 nosy: shaurz priority: normal severity: normal status: open title: st_mtime differs after shutil.copy2 type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 01:15:11 2010 From: report at bugs.python.org (David Watson) Date: Tue, 19 Oct 2010 23:15:11 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <4CBCAFF1.9050105@v.loewis.de> Message-ID: <20101019231500.GA4627@dbwatson.ukfsn.org> David Watson added the comment: > > In fact, I would think that non-ASCII bytes in a hostname most > > probably indicated that a name resolution mechanism other than > > the DNS was in use, and that the byte string should be passed > > unaltered just as a typical C program would. > > I'm not talking about byte strings, but character strings. I mean that passing the str object from socket.gethostname() to the Python lookup function ought to result in the same byte string being passed to the C lookup function as was returned by the C gethostname() function (or else that the programmer must re-encode the str to ensure that that result is obtained). > > I don't object to that, but it does force a choice between > > decoding an 8-bit name for display (e.g. by using the locale > > encoding), and decoding it to round-trip automatically (e.g. by > > using ASCII/surrogateescape, with support on the encoding side). > > In the face of ambiguity, refuse the temptation to guess. Yes, I would interpret that to mean not using the locale encoding for data obtained from the network. That's another reason why the ASCII/surrogateescape scheme appeals to me more. > Well, Python is not C. In Python, you would pass a str, and > expect it to work, which means it will get automatically encoded > with IDNA. I think there might be a misunderstanding here - I've never proposed changing the interpretation of Unicode characters in hostname arguments. The ASCII/surrogateescape scheme I suggested only changes the interpretation of unpaired surrogate codes, as they do not occur in IDNs or any other genuine Unicode data; all IDNs, including those solely consisting of ASCII characters, would be encoded to the same byte sequence as before. ASCII/surrogateescape decoding could also be used without support on the encoding side - that would satisfy the requirement to "refuse the temptation to guess", would allow the original bytes to be recovered, and would mean that attempting to look up a non-ASCII result in str form would raise an exception rather than looking up the wrong name. > Marc-Andre wants gethostname to use the Wide API on Windows, which, > in theory, allows for cases where round-tripping to bytes is > impossible. Well, the name resolution APIs wrapped by Python are all byte-oriented, so if the computer name were to have no bytes equivalent then it wouldn't be possible to resolve it anyway, and an exception rightly ought be raised at some point in the process of trying to do so. ---------- title: socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names -> socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 01:28:12 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Oct 2010 23:28:12 +0000 Subject: [issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error In-Reply-To: <1275332485.24.0.0853481149333.issue8863@psf.upfronthosting.co.za> Message-ID: <1287530892.51.0.500230669348.issue8863@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch version 8: - fix compiler warning on Windows - skip test_sigfpe() on Windows: it looks like the signal handler is not executed, the program exits directly - fix tests for Windows end of line (\r\n vs \n) ---------- Added file: http://bugs.python.org/file19289/segfault_handler-8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 01:48:30 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Oct 2010 23:48:30 +0000 Subject: [issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error In-Reply-To: <1275332485.24.0.0853481149333.issue8863@psf.upfronthosting.co.za> Message-ID: <1287532110.95.0.937885492526.issue8863@psf.upfronthosting.co.za> STINNER Victor added the comment: > One other concern: many OSes (e.g. Linux distributions) implement > some kind of system-wide crash-catching utility; ... Even if it would be possible to call the original signal handler, I think that it would be better to just disable this feature if a (better?) program also watchs for segfaults. We should provide different ways to enable and/or disable this feature: - command line option? (eg. see issue #10089) - environment variable? - add a function to the sys module (or another module) to enable or disable this feature? (eg. sys.getsegfaultenabled(), sys.setsegfaultenabled(False)) I don't think that a command line option and an environment variable is pratical for an OS distributor. With a sys function, the OS distributor can call it in the site module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 01:55:27 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 19 Oct 2010 23:55:27 +0000 Subject: [issue8725] Python3: use ASCII for the file system encoding on initfsencoding() failure In-Reply-To: <1273927146.76.0.292282765786.issue8725@psf.upfronthosting.co.za> Message-ID: <1287532527.55.0.688664402727.issue8725@psf.upfronthosting.co.za> STINNER Victor added the comment: initfsencoding() now raises a fatal error on get_codeset() error. Use a encoding different than the locale encoding on get_codeset() only leads to mojibake and encoding issues, it's not a good idea. Close this issue as invalid. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 02:32:35 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 20 Oct 2010 00:32:35 +0000 Subject: [issue10148] st_mtime differs after shutil.copy2 In-Reply-To: <1287530071.19.0.608159353416.issue10148@psf.upfronthosting.co.za> Message-ID: <1287534755.18.0.46298322689.issue10148@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is a system limitation. The underlying file system supports nanosecond resolution for the file stamps, and stat(2) also supports reporting them. However, utimes(2) only supports microsecond resolution when setting them. Linux supports utimensat(2) since 2.6.22 (July 2007), however, Python doesn't use it. It would be possible to come up with a patch to transparently use it where available. Are you interested in writing such a patch? As a consequential issue: For Python, a long time ago, it was decided that time stamps in system interfaces are floating point numbers. As a consequence, nanoseconds cannot be accurately represented for today's dates (IIUC). I doubt there is anything we could do about this; this is likely "won't fix". ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 02:59:31 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 20 Oct 2010 00:59:31 +0000 Subject: [issue10027] os.lstat/os.stat don't set st_nlink on Windows In-Reply-To: <1286289327.29.0.159315245099.issue10027@psf.upfronthosting.co.za> Message-ID: <1287536371.89.0.719927252712.issue10027@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Added file: http://bugs.python.org/file19290/py3k_posixpath_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 02:59:47 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 20 Oct 2010 00:59:47 +0000 Subject: [issue10027] os.lstat/os.stat don't set st_nlink on Windows In-Reply-To: <1286289327.29.0.159315245099.issue10027@psf.upfronthosting.co.za> Message-ID: <1287536387.77.0.699478002703.issue10027@psf.upfronthosting.co.za> Changes by Hirokazu Yamamoto : Removed file: http://bugs.python.org/file19278/py3k_posixpath_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 03:03:12 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Wed, 20 Oct 2010 01:03:12 +0000 Subject: [issue10027] os.lstat/os.stat don't set st_nlink on Windows In-Reply-To: <1286289327.29.0.159315245099.issue10027@psf.upfronthosting.co.za> Message-ID: <1287536592.16.0.929759477163.issue10027@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I replaced my patch (almost reverted stat() part) I think st_nlink will be set via stat()/lstat(), at least. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 03:27:31 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Oct 2010 01:27:31 +0000 Subject: [issue10134] test_email failures on Windows: end of line issue? In-Reply-To: <1287373744.55.0.18095949035.issue10134@psf.upfronthosting.co.za> Message-ID: <1287538051.02.0.614623841454.issue10134@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- dependencies: +email.Generators does not separates headers with "\r\n" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 03:33:17 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Oct 2010 01:33:17 +0000 Subject: [issue1349106] email.Generator does not separate headers with "\r\n" Message-ID: <1287538397.31.0.395779869308.issue1349106@psf.upfronthosting.co.za> R. David Murray added the comment: Malcolm: a Content-Transfer-Encoding of 8bit may only contain \r and \n characters as part of the line ending sequence. 8bit is *not* binary; to use a CTE of binary the SMTP server must support BINARYMIME, which I don't think is all that common yet. At any rate, my up-to-date postfix server doesn't support it. And in any case, the email package doesn't support the binary CTE, so it's kind of irrelevant anyway :) All that said, however, it certainly seems useful to be able to generate crlf terminated messages as an option. And it turns out that that capability is needed in order to be able to generate binary messages in Python3 while still remaining backward compatible with the behavior of Python2 when parsing binary messages (see issue 10134). (Actually I think the scenario I'm finding problematic in Python3 is also problematic in Python2, it's just that there are tricks you can use to work around it in Python2 that aren't allowed in Python3 because of the byte/string separation.) So, attached find a patch implementing a linesep option in Generator.flatten and Header.encode. Note that this patch also fleshes out the currently abbreviated documentation for BytesGenerator. ---------- keywords: +patch stage: unit test needed -> patch review title: email.Generators does not separates headers with "\r\n" -> email.Generator does not separate headers with "\r\n" versions: -Python 2.7 Added file: http://bugs.python.org/file19291/email_linesep.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 03:43:21 2010 From: report at bugs.python.org (Maciek J) Date: Wed, 20 Oct 2010 01:43:21 +0000 Subject: [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> New submission from Maciek J : Not sure if this is a Python problem or an expat problem, but I get truncated data while parsing XML documents. This particular project is for parsing an XML file of Wikipedia dump. The attached files are: * xml-parse-revisions.py - parser script * revision-test.xml - input XML * revision-test.xml.sql - output XML * revision_create.sql - not really needed for this test case, but attached for completeness You can notice that the output file sometimes contains too short values for the "timestamp". Also note that if you add whitespace to the input XML, then different timestamps will be truncated. My Python is 2.6.6. ---------- components: XML files: pyxml_error.zip messages: 119184 nosy: Maciek.J priority: normal severity: normal status: open title: Data truncation in expat parser versions: Python 2.6 Added file: http://bugs.python.org/file19292/pyxml_error.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 04:33:26 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Oct 2010 02:33:26 +0000 Subject: [issue8465] re: Backreferences vs. escapes: a silent failure solved In-Reply-To: <1271711477.02.0.868706319352.issue8465@psf.upfronthosting.co.za> Message-ID: <1287542006.06.0.115338751998.issue8465@psf.upfronthosting.co.za> R. David Murray added the comment: I agree with Terry. ---------- nosy: +r.david.murray resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 05:35:18 2010 From: report at bugs.python.org (Michael Olson) Date: Wed, 20 Oct 2010 03:35:18 +0000 Subject: [issue10128] multiprocessing.Pool throws exception with __main__.py In-Reply-To: <1287268913.13.0.756366299299.issue10128@psf.upfronthosting.co.za> Message-ID: <1287545718.23.0.103715673674.issue10128@psf.upfronthosting.co.za> Michael Olson added the comment: Sorry about that, yes, this is on Windows XP and 7, 32 bit. And with the if statement it seems to work fine. v/r -- Michael Olson ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 06:01:48 2010 From: report at bugs.python.org (James Bowman) Date: Wed, 20 Oct 2010 04:01:48 +0000 Subject: [issue10150] Local references not released after exception In-Reply-To: <1287547307.96.0.164615718741.issue10150@psf.upfronthosting.co.za> Message-ID: <1287547307.96.0.164615718741.issue10150@psf.upfronthosting.co.za> New submission from James Bowman : import sys def foo(): x = [o] * 100 raise ArithmeticError o = "something" print sys.getrefcount(o) try: foo() except ArithmeticError: pass print sys.getrefcount(o) ------------------------------------------- Gives: 4 104 Looking at the CPython source, FrameObject's deallocator does actually decrement refcounts of its locals and arguments. Guessing that the FrameObject is not being deallocated. ---------- components: Interpreter Core messages: 119187 nosy: James.Bowman priority: normal severity: normal status: open title: Local references not released after exception type: resource usage versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 06:58:52 2010 From: report at bugs.python.org (Alex) Date: Wed, 20 Oct 2010 04:58:52 +0000 Subject: [issue10150] Local references not released after exception In-Reply-To: <1287547307.96.0.164615718741.issue10150@psf.upfronthosting.co.za> Message-ID: <1287550732.68.0.203115406534.issue10150@psf.upfronthosting.co.za> Alex added the comment: That's because in Python 2.5 at that point in the code sys.exc_info() still points at the traceback (and by extension, the frame) thus x is not deallocated yet. I don't think this is a bug. ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 08:15:50 2010 From: report at bugs.python.org (Stephen Hansen) Date: Wed, 20 Oct 2010 06:15:50 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: <1286999616.97.0.806385422046.issue10092@psf.upfronthosting.co.za> Message-ID: <1287555350.67.0.319826822923.issue10092@psf.upfronthosting.co.za> Stephen Hansen added the comment: I can't be entirely sure, because a) I have never even glanced at the calendar module, and b) my locale-fu is very weak, but my buildbot has consistently failed on this test since this commit: ====================================================================== ERROR: test_localecalendars (test.test_calendar.CalendarTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/test_calendar.py", line 264, in test_localecalendars locale=def_locale).formatmonthname(2010, 10, 10) File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/calendar.py", line 520, in formatmonthname with different_locale(self.locale): File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/calendar.py", line 490, in __enter__ _locale.setlocale(_locale.LC_TIME, self.locale) File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/locale.py", line 538, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting I will look into it in more detail tomorrow to try to provide more meaningful feedback, but I think this "fix" has introduced a problem. If someone sees what before I have time to dig into this unfamiliar territory, yay. :) ---------- nosy: +ixokai _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 08:22:08 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 20 Oct 2010 06:22:08 +0000 Subject: [issue10150] Local references not released after exception In-Reply-To: <1287547307.96.0.164615718741.issue10150@psf.upfronthosting.co.za> Message-ID: <1287555728.66.0.870029195636.issue10150@psf.upfronthosting.co.za> Georg Brandl added the comment: Alex is correct. (You can prove that by raising and catching another exception before the second getrefcount().) ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 08:53:12 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 20 Oct 2010 06:53:12 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: <1286999616.97.0.806385422046.issue10092@psf.upfronthosting.co.za> Message-ID: <1287557592.64.0.963215383274.issue10092@psf.upfronthosting.co.za> Georg Brandl added the comment: Let's see if r85735 fixed this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 08:53:15 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 20 Oct 2010 06:53:15 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: <1286999616.97.0.806385422046.issue10092@psf.upfronthosting.co.za> Message-ID: <1287557595.31.0.985989040782.issue10092@psf.upfronthosting.co.za> Changes by Georg Brandl : Removed file: http://bugs.python.org/file19286/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 09:19:47 2010 From: report at bugs.python.org (Thomas Guettler) Date: Wed, 20 Oct 2010 07:19:47 +0000 Subject: [issue10151] Docs: can globals() be updated? In-Reply-To: <1287559187.64.0.23978641371.issue10151@psf.upfronthosting.co.za> Message-ID: <1287559187.64.0.23978641371.issue10151@psf.upfronthosting.co.za> New submission from Thomas Guettler : Hi, the documentation of "globals()" is missing a note if you can update the dictionary: http://docs.python.org/library/functions.html?highlight=globals#globals For "locals()" it is documented: http://docs.python.org/library/functions.html?highlight=locals#locals ---------- assignee: docs at python components: Documentation messages: 119192 nosy: docs at python, guettli priority: normal severity: normal status: open title: Docs: can globals() be updated? versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 09:20:48 2010 From: report at bugs.python.org (Ask Solem) Date: Wed, 20 Oct 2010 07:20:48 +0000 Subject: [issue10128] multiprocessing.Pool throws exception with __main__.py In-Reply-To: <1287268913.13.0.756366299299.issue10128@psf.upfronthosting.co.za> Message-ID: <1287559248.41.0.0939488941787.issue10128@psf.upfronthosting.co.za> Changes by Ask Solem : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 10:08:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 20 Oct 2010 08:08:47 +0000 Subject: [issue8863] Display Python backtrace on SIGSEGV, SIGFPE and fatal error In-Reply-To: <1287532110.95.0.937885492526.issue8863@psf.upfronthosting.co.za> Message-ID: <1287562122.3429.2.camel@localhost.localdomain> Antoine Pitrou added the comment: > I don't think that a command line option and an environment variable > is pratical for an OS distributor. Environment variables are probably the most practical for OS vendors, since they can simply set them in /etc/profile.d (Mandriva does that with PYTHONDONTWRITEBYTECODE :-/). If it's an env variable, though, it should be clear that it's CPython-specific, so I'm not sure how to call it. CPYTHONNOSEGFAULTHANDLER? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 10:52:52 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Wed, 20 Oct 2010 08:52:52 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: <1286999616.97.0.806385422046.issue10092@psf.upfronthosting.co.za> Message-ID: <1287564772.67.0.552174528839.issue10092@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: >>> import calendar >>> calendar.LocaleTextCalendar(locale='fr_FR').formatmonthname(2010,10,10) Traceback (most recent call last): File "", line 1, in File "C:\Python27\lib\calendar.py", line 522, in formatmonthname with TimeEncoding(self.locale) as encoding: File "C:\Python27\lib\calendar.py", line 489, in __enter__ self.oldlocale = _locale.setlocale(_locale.LC_TIME, self.locale) File "C:\Python27\lib\locale.py", line 531, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting Is it just my machine or is this a common thing on most machines? If I do a test and I try to set a locale with the setlocale() method, I get this "locale.Error: unsupported locale setting". So I gather that the method setlocale() is broken and we should fix it before fixing the Locale{Text,HTML}Calendar ones. The way setlocale() is implemented, is this: def setlocale(category, value=None): """ setlocale(integer,string=None) -> string. Activates/queries locale processing. """ if value not in (None, '', 'C'): raise Error, '_locale emulation only supports "C" locale' return 'C' Please note that the online documentation documents its API like this: locale.setlocale(category[, locale]) See http://docs.python.org/library/locale.html#locale.setlocale So you can see that the implementation differs from the documentation in that it documents the 2nd argument as 'locale' where in the implementation there is 'value'. If that's a bug, I don't know. Anyway, please fix the implementation. I found out some very interesting thing... Note the line "if value not in (None, '', 'C')" in the implementation. This is the faulty thing in the function because NoneType is not iterable. Test it for yourself in the interpreter: >>> value = None >>> value not in None Traceback (most recent call last): File "", line 1, in TypeError: argument of type 'NoneType' is not iterable So this setlocale() always raises an error. Please fix this. Of course, this is valid: >>> value = None >>> value is not None False No error here. So try to combine this into a workable patch. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 11:18:48 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 20 Oct 2010 09:18:48 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: <1286999616.97.0.806385422046.issue10092@psf.upfronthosting.co.za> Message-ID: <1287566328.92.0.730400244356.issue10092@psf.upfronthosting.co.za> Georg Brandl added the comment: Bostjan, both your points are invalid. First, the locale settings that a machine supports vary greatly. "fr_FR" doesn't need to be a valid setting on your machine. Second, "val in None" will always fail. "val in (None, ...)" will succeed, since you're testing membership in the given tuple that includes None. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 11:20:09 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 20 Oct 2010 09:20:09 +0000 Subject: [issue10151] Docs: can globals() be updated? In-Reply-To: <1287559187.64.0.23978641371.issue10151@psf.upfronthosting.co.za> Message-ID: <1287566409.4.0.999948366043.issue10151@psf.upfronthosting.co.za> Georg Brandl added the comment: It is documented, however, that globals() returns the dictionary of a module, which can be modified. For locals(), the situation is quite more complicated, which is why the warning there is warranted. ---------- nosy: +georg.brandl resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 11:37:59 2010 From: report at bugs.python.org (Tim Golden) Date: Wed, 20 Oct 2010 09:37:59 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: <1287566328.92.0.730400244356.issue10092@psf.upfronthosting.co.za> Message-ID: <4CBEB84A.7050605@timgolden.me.uk> Tim Golden added the comment: Bo?tjan, the code segment you quote is the *fallback* if the C module hasn't been built for some reason. The module simply calls through to the underlying C Library. I notice you're running on Windows, so this is a useful MS page: http://msdn.microsoft.com/en-us/library/x99tb11d%28VS.71%29.aspx and you can see there that a call of setlocale (LC_ALL, "English") is valid (of "French" if you prefer): Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.setlocale (locale.LC_ALL, "French") 'French_France.1252' >>> ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 12:47:53 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 20 Oct 2010 10:47:53 +0000 Subject: [issue10152] symtable.c: ste_tmpname uninitialized In-Reply-To: <1287571673.13.0.775838367643.issue10152@psf.upfronthosting.co.za> Message-ID: <1287571673.13.0.775838367643.issue10152@psf.upfronthosting.co.za> New submission from Stefan Krah : Found by Valgrind: ==3947== Use of uninitialised value of size 8 ==3947== at 0x5716D13: _itoa_word (in /lib/libc-2.8.90.so) ==3947== by 0x5719F53: vfprintf (in /lib/libc-2.8.90.so) ==3947== by 0x5743239: vsnprintf (in /lib/libc-2.8.90.so) ==3947== by 0x4956AF: PyOS_vsnprintf (mysnprintf.c:74) ==3947== by 0x495661: PyOS_snprintf (mysnprintf.c:47) ==3947== by 0x49FC1E: symtable_new_tmpname (symtable.c:1092) ==3947== by 0x4A2CE6: symtable_handle_comprehension (symtable.c:1648) ==3947== by 0x4A2F7C: symtable_visit_listcomp (symtable.c:1673) ==3947== by 0x4A1C63: symtable_visit_expr (symtable.c:1363) ==3947== by 0x4A07C5: symtable_visit_stmt (symtable.c:1178) ==3947== by 0x4A0BBE: symtable_visit_stmt (symtable.c:1200) ==3947== by 0x4A08D4: symtable_visit_stmt (symtable.c:1187) The patch fixes the issue (unless the intent was to use somewhat randomized tmpnames). ---------- files: ste_tmpname.patch keywords: patch messages: 119198 nosy: skrah priority: normal severity: normal status: open title: symtable.c: ste_tmpname uninitialized Added file: http://bugs.python.org/file19293/ste_tmpname.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 12:48:20 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 20 Oct 2010 10:48:20 +0000 Subject: [issue10152] symtable.c: ste_tmpname uninitialized In-Reply-To: <1287571673.13.0.775838367643.issue10152@psf.upfronthosting.co.za> Message-ID: <1287571700.15.0.23563886929.issue10152@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- stage: -> patch review type: -> behavior versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 12:51:47 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 20 Oct 2010 10:51:47 +0000 Subject: [issue6864] IDLE 2.6.1 locks up on Mac OS 10.6 In-Reply-To: <1252417045.55.0.880559864665.issue6864@psf.upfronthosting.co.za> Message-ID: <1287571907.68.0.784639170638.issue6864@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Richard: I don't understand your message. What abort are you talking about? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 12:58:29 2010 From: report at bugs.python.org (Malcolm Box) Date: Wed, 20 Oct 2010 10:58:29 +0000 Subject: [issue1349106] email.Generator does not separate headers with "\r\n" Message-ID: <1287572309.9.0.384674125356.issue1349106@psf.upfronthosting.co.za> Malcolm Box added the comment: David: Great to see a patch for this. You're right of course, 8bit isn't binary - I meant binary. The main place this shows up is when you're using MIME not in email (e.g. on the web), where binary transport is entirely possible. This fix should mean that the MIME libraries are much more usable in non-email environments. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 13:09:36 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 20 Oct 2010 11:09:36 +0000 Subject: [issue10153] Memory leak in pythonrun.c In-Reply-To: <1287572976.12.0.192446732245.issue10153@psf.upfronthosting.co.za> Message-ID: <1287572976.12.0.192446732245.issue10153@psf.upfronthosting.co.za> New submission from Stefan Krah : Found by Valgrind, patch attached: ==4921== 24 bytes in 1 blocks are definitely lost in loss record 419 of 2,694 ==4921== at 0x4C2412C: malloc (vg_replace_malloc.c:195) ==4921== by 0x417F06: _PyObject_New (object.c:244) ==4921== by 0x520C4E: PyFile_NewStdPrinter (fileobject.c:364) ==4921== by 0x499438: Py_InitializeEx (pythonrun.c:281) ==4921== by 0x49951E: Py_Initialize (pythonrun.c:322) ==4921== by 0x4B2579: Py_Main (main.c:587) ==4921== by 0x417D6B: main (python.c:51) ---------- components: Interpreter Core files: pythonrun.patch keywords: patch messages: 119201 nosy: skrah priority: normal severity: normal stage: patch review status: open title: Memory leak in pythonrun.c type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file19294/pythonrun.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 13:10:56 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 20 Oct 2010 11:10:56 +0000 Subject: [issue10152] symtable.c: ste_tmpname uninitialized In-Reply-To: <1287571673.13.0.775838367643.issue10152@psf.upfronthosting.co.za> Message-ID: <1287573056.64.0.897106609211.issue10152@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 13:54:34 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Oct 2010 11:54:34 +0000 Subject: [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1287575674.07.0.311032415095.issue10149@psf.upfronthosting.co.za> R. David Murray added the comment: For other reviewers, I'm reposting just his python program as a text file. Maciek: I myself don't know enough about expat to comment, but is it possible you have an issue similar to issue 10026? ---------- nosy: +r.david.murray Added file: http://bugs.python.org/file19295/xml-parse-revisions.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 14:21:40 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 20 Oct 2010 12:21:40 +0000 Subject: [issue10152] symtable.c: ste_tmpname uninitialized In-Reply-To: <1287571673.13.0.775838367643.issue10152@psf.upfronthosting.co.za> Message-ID: <1287577300.79.0.933044704977.issue10152@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 14:59:37 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 20 Oct 2010 12:59:37 +0000 Subject: [issue7473] Compile error when building a 3-way universal framework when a 2-way universal framework is present In-Reply-To: <1260470622.19.0.0787488117432.issue7473@psf.upfronthosting.co.za> Message-ID: <1287579577.59.0.484115345875.issue7473@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've verified that the patch does not cause problems when building the OSX installer. That patch should be applied, with a short comment that explains why the code block is disabled for framework builds. ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 15:09:55 2010 From: report at bugs.python.org (Michael Olson) Date: Wed, 20 Oct 2010 13:09:55 +0000 Subject: [issue10128] multiprocessing.Pool throws exception with __main__.py In-Reply-To: <1287268913.13.0.756366299299.issue10128@psf.upfronthosting.co.za> Message-ID: <1287580195.96.0.330062567798.issue10128@psf.upfronthosting.co.za> Michael Olson added the comment: Ummm, I think I've been unclear on where I was making changes, I changed lib\multiprocessing\forking.py to fix the issue. Patch attached. ---------- keywords: +patch resolution: invalid -> status: closed -> open Added file: http://bugs.python.org/file19296/issue10128.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 15:13:15 2010 From: report at bugs.python.org (Michael Olson) Date: Wed, 20 Oct 2010 13:13:15 +0000 Subject: [issue10128] multiprocessing.Pool throws exception with __main__.py In-Reply-To: <1287268913.13.0.756366299299.issue10128@psf.upfronthosting.co.za> Message-ID: <1287580395.07.0.746703163218.issue10128@psf.upfronthosting.co.za> Michael Olson added the comment: As a note, I didn't attach a patch at first because I was fairly sure I was kludging it into submission, but at least this makes it clear as to what I did. v/r -- Michael Olson ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 15:41:36 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 20 Oct 2010 13:41:36 +0000 Subject: [issue7473] Compile error when building a 3-way universal framework when a 2-way universal framework is present In-Reply-To: <1260470622.19.0.0787488117432.issue7473@psf.upfronthosting.co.za> Message-ID: <1287582096.47.0.169790007001.issue7473@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Committed the fix for 3.2 in r85744, for 2.7 in r85745 and for 3.1 in r85746 BTW. The installer does mention which architectures are supported, both in a README on the disk image and in one of the readme screens in the installer. ---------- stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 15:56:33 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 20 Oct 2010 13:56:33 +0000 Subject: [issue763708] Failures in test_macostools for --enable-unicode=ucs4 Message-ID: <1287582993.68.0.237235191524.issue763708@psf.upfronthosting.co.za> Changes by Ronald Oussoren : Removed file: http://bugs.python.org/file13487/issue763708.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 15:58:49 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 20 Oct 2010 13:58:49 +0000 Subject: [issue763708] Failures in test_macostools for --enable-unicode=ucs4 Message-ID: <1287583129.72.0.733612508482.issue763708@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've attached a new patch that works for me. The new patch doesn't try to warn when running the configure script, but bails out when you run make by using an '#error' in pymacconfig.h. (Removing 2.6 because that's in security-fix-only mode and 3.1 because this issue only affects 2.x) ---------- keywords: -26backport, needs review, patch versions: -Python 2.6, Python 3.1 Added file: http://bugs.python.org/file19297/issue763708.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 16:11:15 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 20 Oct 2010 14:11:15 +0000 Subject: [issue3367] Uninitialized value read in parsetok.c In-Reply-To: <1216153264.95.0.467111480464.issue3367@psf.upfronthosting.co.za> Message-ID: <1287583875.51.0.935218628167.issue3367@psf.upfronthosting.co.za> Stefan Krah added the comment: I can still reproduce it in py3k just by hitting Ctrl-D in the interactive interpreter: $ valgrind --db-attach=yes --suppressions=Misc/valgrind-python.supp ./python ==16724== Memcheck, a memory error detector ==16724== Copyright (C) 2002-2009, and GNU GPL'd, by Julian Seward et al. ==16724== Using Valgrind-3.5.0 and LibVEX; rerun with -h for copyright info ==16724== Command: ./python ==16724== Python 3.2a3+ (py3k:85735M, Oct 20 2010, 14:19:24) [GCC 4.2.4 (Ubuntu 4.2.4-3ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> ==16724== Conditional jump or move depends on uninitialised value(s) ==16724== at 0x4F4DB7: parsetok (parsetok.c:198) ==16724== by 0x4F4B03: PyParser_ParseFileFlagsEx (parsetok.c:100) ==16724== by 0x49C8FB: PyParser_ASTFromFile (pythonrun.c:1884) ==16724== by 0x49AAC6: PyRun_InteractiveOneFlags (pythonrun.c:1124) ==16724== by 0x49A7B8: PyRun_InteractiveLoopFlags (pythonrun.c:1035) ==16724== by 0x49A677: PyRun_AnyFileExFlags (pythonrun.c:1004) ==16724== by 0x4B1EDE: run_file (main.c:296) ==16724== by 0x4B293E: Py_Main (main.c:681) ==16724== by 0x417D6B: main (python.c:51) ==16724== ==16724== ==16724== ---- Attach to debugger ? --- [Return/N/n/Y/y/C/c] ---- y ==16724== starting debugger with cmd: /usr/bin/gdb -nw /proc/16725/fd/1014 16725 GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu"... Attaching to program: /proc/16725/fd/1014, process 16725 0x00000000004f4db7 in parsetok (tok=0x6c705d0, g=0x80bac0, start=256, err_ret=0x7fefffee0, flags=0x7feffff1c) at Parser/parsetok.c:198 198 if (a >= tok->line_start) (gdb) ---------- nosy: +skrah resolution: fixed -> status: closed -> open versions: +Python 3.2 -Python 2.6, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 16:32:14 2010 From: report at bugs.python.org (Richard) Date: Wed, 20 Oct 2010 14:32:14 +0000 Subject: [issue6864] IDLE 2.6.1 locks up on Mac OS 10.6 In-Reply-To: <1252417045.55.0.880559864665.issue6864@psf.upfronthosting.co.za> Message-ID: <1287585134.42.0.0673905802216.issue6864@psf.upfronthosting.co.za> Richard added the comment: Sorry to be obscure, Ronald. I mistook my configuration problem, described below for the original problem. But I can reproduce the problem with opening an existing file under IDLE, which is a segmentation fault. When opening a new window, I get a blank screen but no >>> prompt. I should have done this before on my two boxes. It shows pretty clearly that the abort trap problem in 2.6.x is my configuration problem. On the development box, I have mutliple Pythons, with varying degrees of IDLE success; on the production box I have only the factory installed 2.6.1 with no IDLE problem other than the one originally reported. Both boxes are under 10.6.4. Development: Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin $ /usr/bin/idle2.6 CGColor with 1 components Abort trap # This is probably due to paths crossed with 2.6.6 $ sudo /usr/bin/idle2.6 2010-10-20 10:12:16.329 Python[11954:1707] __CFServiceControllerBeginPBSLoadForLocalizations timed out while talking to pbs 2010-10-20 10:12:31.868 Python[11954:1707] __CFServiceControllerBeginPBSLoadForLocalizations timed out while talking to pbs 0 #IDLE works, otherwise, except for the segmentation issue Production: Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin #IDLE works, except for the segmentation issue for completeness: Development: Python 3.1.2 (r312:79360M, Mar 24 2010, 01:33:18) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin $ idle3 Floating point exception Development: Python 2.7 (r27:82508, Jul 3 2010, 21:12:11) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin ** IDLE can't import Tkinter. Your Python may not be configured for Tk. ** Development: Python 2.6.6 (r266:84292, Aug 28 2010, 10:17:47) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin #IDLE hangs ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 16:45:45 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 20 Oct 2010 14:45:45 +0000 Subject: [issue9670] Exceed Recursion Limit in Thread In-Reply-To: <1282656201.3.0.572219885558.issue9670@psf.upfronthosting.co.za> Message-ID: <1287585945.3.0.186742667735.issue9670@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The attached patch explicitly sets the minimal stack size to about 704K, which is the minimal size where 'def f(): f()' doesn't cause a buserror when run in a thread. ---------- keywords: +needs review, patch stage: needs patch -> patch review Added file: http://bugs.python.org/file19298/issue9670.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 16:56:33 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 20 Oct 2010 14:56:33 +0000 Subject: [issue6763] Crash on mac os x leopard in mimetypes.guess_type (or PyObject_Malloc) In-Reply-To: <1250976396.98.0.596987057251.issue6763@psf.upfronthosting.co.za> Message-ID: <1287586593.33.0.204958736391.issue6763@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I'm closing this as a duplicate of #9670, that is: too deep recursion in a thread doesn't trigger the appropriate exception but causes a hard crash instead. I have attached a patch to that issue (but haven't applied it yet, I'd like someone else too look at the patch as well). BTW. I don't think this issue is serious enough to warrant a backport to 2.6. ---------- resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 16:59:25 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 20 Oct 2010 14:59:25 +0000 Subject: [issue9047] Python 2.7rc2 includes -isysroot twice on each gcc command line In-Reply-To: <1277145493.52.0.0439952052215.issue9047@psf.upfronthosting.co.za> Message-ID: <1287586765.29.0.693620018902.issue9047@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Marc-Andre: does the current HEAD of the 2.7 and 3.2 branches work for you? The build still has duplicate flags, but that doesn't seem to cause problems on my machines. If it also doesn't cause problems on your machines I'd prefer to close this issue as won't fixed because cleaning up the duplicate flags is non-trivial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 17:31:25 2010 From: report at bugs.python.org (Stephen Hansen) Date: Wed, 20 Oct 2010 15:31:25 +0000 Subject: [issue10154] locale.normalize strips "-" from UTF-8, which fails on Mac In-Reply-To: <1287588685.92.0.0691926945263.issue10154@psf.upfronthosting.co.za> Message-ID: <1287588685.92.0.0691926945263.issue10154@psf.upfronthosting.co.za> New submission from Stephen Hansen : In the course of investigating issue10092, Georg discovered that the behavior of locale.normalize() on Mac is bad. Basically, "en_US.UTF-8" is how the "correct" locale string should be spelled on the Mac. If you drop the dash, it fails: which locale.normalize does, so you can't pass the return value of the function to setlocale, even though that's what its documented to be for. If that isn't clear, this should demonstrate (from /branches/py3k): Top-2:build pythonbuildbot$ ./python.exe Python 3.2a3+ (py3k:85631, Oct 17 2010, 06:45:22) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import locale [51767 refs] >>> locale.normalize("en_US.UTF-8") 'en_US.UTF8' [51770 refs] >>> locale.setlocale(locale.LC_TIME, 'en_US.UTF8') Traceback (most recent call last): File "", line 1, in File "/Users/pythonbuildbot/test/build/Lib/locale.py", line 538, in setlocale return _setlocale(category, locale) locale.Error: unsupported locale setting [51816 refs] >>> locale.setlocale(locale.LC_TIME, 'en_US.UTF-8') 'en_US.UTF-8' [51816 refs] The precise same behavior exists on my stock/system Python 2.6, too, fwiw. (Not that it can be fixed on 2.6, but maybe 2.7?) ---------- assignee: ronaldoussoren components: Library (Lib), Macintosh messages: 119213 nosy: ixokai, ronaldoussoren priority: normal severity: normal status: open title: locale.normalize strips "-" from UTF-8, which fails on Mac type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 17:41:40 2010 From: report at bugs.python.org (Leonardo Santagada) Date: Wed, 20 Oct 2010 15:41:40 +0000 Subject: [issue9670] Exceed Recursion Limit in Thread In-Reply-To: <1282656201.3.0.572219885558.issue9670@psf.upfronthosting.co.za> Message-ID: <1287589300.13.0.686685764818.issue9670@psf.upfronthosting.co.za> Leonardo Santagada added the comment: Why not make it bigger so it doesn't crash for much bigger functions? ---------- nosy: +santagada _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 17:44:50 2010 From: report at bugs.python.org (And Clover) Date: Wed, 20 Oct 2010 15:44:50 +0000 Subject: [issue9022] TypeError in wsgiref.handlers when using CGIHandler In-Reply-To: <1276820747.2.0.467969862682.issue9022@psf.upfronthosting.co.za> Message-ID: <1287589490.67.0.228630875274.issue9022@psf.upfronthosting.co.za> And Clover added the comment: Yes, CGIHandler is broken in 3.0-3.1; wsgiref in general has been in limbo until the whole issue of py3k-WSGI is sorted. This seems to be happening now in PEP 3333. Attached patch to make CGIHandler use the byte interfaces for stdin/stdout, which allows the write calls to work and provides byte streams to the WSGI application as required by PEP 3333. ---------- keywords: +patch nosy: +aclover Added file: http://bugs.python.org/file19299/issue9022.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 17:46:23 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 20 Oct 2010 15:46:23 +0000 Subject: [issue10154] locale.normalize strips "-" from UTF-8, which fails on Mac In-Reply-To: <1287588685.92.0.0691926945263.issue10154@psf.upfronthosting.co.za> Message-ID: Ronald Oussoren added the comment: This patch solves the immediate failure: Index: Lib/locale.py =================================================================== --- Lib/locale.py (revision 85743) +++ Lib/locale.py (working copy) @@ -396,6 +396,9 @@ else: encoding = defenc #print 'found encoding %r' % encoding + if sys.platform == 'darwin' and encoding == 'UTF8': + encoding = 'UTF-8' + if encoding: return langname + '.' + encoding else: I'm not happy about hardcoding this specific exception though, there should be a better solution than this. Ronald ---------- Added file: http://bugs.python.org/file19300/smime.p7s _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From report at bugs.python.org Wed Oct 20 17:48:42 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 20 Oct 2010 15:48:42 +0000 Subject: [issue9670] Exceed Recursion Limit in Thread In-Reply-To: <1287589300.13.0.686685764818.issue9670@psf.upfronthosting.co.za> Message-ID: <19C43D39-8842-4EC3-9E3A-1B3F75A6A6FE@mac.com> Ronald Oussoren added the comment: On 20 Oct, 2010, at 17:41, Leonardo Santagada wrote: > > Leonardo Santagada added the comment: > > Why not make it bigger so it doesn't crash for much bigger functions? I don't mind making it bigger, but a larger size does come with a cost: the larger the initial stack size the less threads you can have without trashing the system (or running out of address space on a 32-bit build). I'm fine with increasing it to 1M, which is a nice round number build not larger. BTW. I haven't looked up the default stack size for the main thread on OSX. Ronald > > ---------- > nosy: +santagada > > _______________________________________ > Python tracker > > _______________________________________ ---------- Added file: http://bugs.python.org/file19301/smime.p7s _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: smime.p7s Type: application/pkcs7-signature Size: 2224 bytes Desc: not available URL: From report at bugs.python.org Wed Oct 20 17:49:01 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 20 Oct 2010 15:49:01 +0000 Subject: [issue10154] locale.normalize strips "-" from UTF-8, which fails on Mac In-Reply-To: <1287588685.92.0.0691926945263.issue10154@psf.upfronthosting.co.za> Message-ID: <1287589741.71.0.134532216976.issue10154@psf.upfronthosting.co.za> Changes by Ronald Oussoren : Removed file: http://bugs.python.org/file19300/smime.p7s _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 17:53:08 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 20 Oct 2010 15:53:08 +0000 Subject: [issue10089] Add support for arbitrary -X options In-Reply-To: <1286996500.23.0.0250789164181.issue10089@psf.upfronthosting.co.za> Message-ID: <1287589988.66.0.410362093624.issue10089@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a simpler version without comma-separated pairs. ---------- Added file: http://bugs.python.org/file19302/xopts3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 17:58:00 2010 From: report at bugs.python.org (Leonardo Santagada) Date: Wed, 20 Oct 2010 15:58:00 +0000 Subject: [issue9670] Exceed Recursion Limit in Thread In-Reply-To: <1282656201.3.0.572219885558.issue9670@psf.upfronthosting.co.za> Message-ID: <1287590280.11.0.862486122674.issue9670@psf.upfronthosting.co.za> Leonardo Santagada added the comment: The default stack size in osx is 8MB. I think it is a safer bet, and no one is supposed to be using more than like 40-50 threads anyway (specially in 32 bit only systems limited to 8 cores). Is there a user case for hundreds/thousands of threads in python? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 18:23:42 2010 From: report at bugs.python.org (And Clover) Date: Wed, 20 Oct 2010 16:23:42 +0000 Subject: [issue10155] Add fixups for encoding problems to wsgiref In-Reply-To: <1287591822.31.0.50492787235.issue10155@psf.upfronthosting.co.za> Message-ID: <1287591822.31.0.50492787235.issue10155@psf.upfronthosting.co.za> New submission from And Clover : Currently wsgiref's CGIHandler makes a WSGI environ from the CGI environ without changes. Unfortunately the CGI environ is wrong in a number of common circumstances: - on Windows, the native environ is Unicode, and different servers choose different decodings for HTTP bytes to store in the environ (most notably for PATH_INFO); - on Windows with Python 2.x, os.environ is read from the Unicode native environ using the ANSI encoding, which will lose/mangle non-ASCII characters; - on Posix with Python 3.x, os.environ is read from a native bytes environ using the filesystemencoding which is probably not ISO-8859-1. - on IIS, PATH_INFO inappropriately includes SCRIPT_NAME unless a hidden, rarely-used, and problematic config option is applied. Previously, it was not clear in PEP 333 what was supposed to happen with headers and encodings, especially under Python 3. PEP 3333 clears this up. These patches add fixups to wsgiref to try to generate the nearest to a 'correct' environ as per PEP 3333 as possible for the current platform and server software. They also fix simple_server to use the correct encoding for PATH_INFO, and include the fix for issue 9022, correspondingly updating the simple_server demo app and tests to conform to PEP 3333's expectation that headers will be ISO-8859-1-decoded Unicode strings. The test_bytes_validation test is removed: as I understand it, it's no long allowed to use byte string headers/status. ---------- components: Library (Lib) files: wsgiref-patches-3.2a3.patch keywords: patch messages: 119220 nosy: aclover priority: normal severity: normal status: open title: Add fixups for encoding problems to wsgiref type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file19303/wsgiref-patches-3.2a3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 18:25:32 2010 From: report at bugs.python.org (And Clover) Date: Wed, 20 Oct 2010 16:25:32 +0000 Subject: [issue10155] Add fixups for encoding problems to wsgiref In-Reply-To: <1287591822.31.0.50492787235.issue10155@psf.upfronthosting.co.za> Message-ID: <1287591932.74.0.484416629612.issue10155@psf.upfronthosting.co.za> And Clover added the comment: (patch for Python 2.x, for what it's worth) ---------- Added file: http://bugs.python.org/file19304/wsgiref-patches-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 18:30:32 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Oct 2010 16:30:32 +0000 Subject: [issue9670] Exceed Recursion Limit in Thread In-Reply-To: <1282656201.3.0.572219885558.issue9670@psf.upfronthosting.co.za> Message-ID: <1287592232.71.0.593710563157.issue9670@psf.upfronthosting.co.za> R. David Murray added the comment: It would be nice if we could expand this fix to include FreeBSD, which as I understand it has the same problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 18:39:02 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Oct 2010 16:39:02 +0000 Subject: [issue4388] test_cmd_line fails on MacOS X In-Reply-To: <1227329681.44.0.462897262909.issue4388@psf.upfronthosting.co.za> Message-ID: <1287592742.88.0.069476788224.issue4388@psf.upfronthosting.co.za> STINNER Victor added the comment: > One solution would be to duplicate the UTF-8 decoder for OSX, > incorporating surrogate escape. This should be much shorter > than the full UTF-8 codec, and perhaps at least utf8_code_length > could be shared. Good idea, implemented in the attached patch [osx_utf8_cmdline-3.patch]. I tested the patch on x86 Snow Leopard 3.x and it looks like it fixes the test_cmd_line failure (I modified some tests to remove manually LC_ALL, LC_CTYPE and LANG environment variables). ---------- Added file: http://bugs.python.org/file19305/osx_utf8_cmdline-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 18:56:02 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Oct 2010 16:56:02 +0000 Subject: [issue4388] test_cmd_line fails on MacOS X In-Reply-To: <1287592742.88.0.069476788224.issue4388@psf.upfronthosting.co.za> Message-ID: <201010201855.53329.victor.stinner@haypocalc.com> STINNER Victor added the comment: _Py_DecodeUTF8_surrogateescape() is a simplified version of PyUnicode_DecodeUTF8Stateful(): - no "consumed" argument - only support surrogateescape error handler - no optimization - don't resize the buffer at exit Hum, resize the buffer is maybe a good idea to not waste memory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 19:05:03 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Wed, 20 Oct 2010 17:05:03 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: <4CBEB84A.7050605@timgolden.me.uk> Message-ID: Bo??tjan Mejak added the comment: Thank you so much for your answer. The locale.setlocale(category=locale.LC_NUMERIC, locale="Slovenian") works like a charm in my application. Now the 'n' format specifier works as I want. But tell me whether the 'n' format specifier can be forced to round the float to just one decimal place. I know that the 'f' format specifier does that by specifying ".1f", but 'f' is not locale-aware. I have set the 'n' format specifier in my application like ".3n", which is okay if the returned number is two integers and one decimal, but is not okay if the returned number is one integer and two decimals, because I want just one decimal, always. How can I make that by using the 'n' format specifier? On Wed, Oct 20, 2010 at 11:37 AM, Tim Golden wrote: > > Tim Golden added the comment: > > Bo??tjan, the code segment you quote is the *fallback* if the > C module hasn't been built for some reason. The module simply > calls through to the underlying C Library. I notice you're > running on Windows, so this is a useful MS page: > > http://msdn.microsoft.com/en-us/library/x99tb11d%28VS.71%29.aspx > > and you can see there that a call of setlocale (LC_ALL, "English") > is valid (of "French" if you prefer): > > Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit > (Intel)] on win32 > Type "help", "copyright", "credits" or "license" for more information. > >>> import locale > >>> locale.setlocale (locale.LC_ALL, "French") > 'French_France.1252' > >>> > > ---------- > nosy: +tim.golden > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19306/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Thank you so much for your answer. The ??locale.setlocale(category=locale.LC_NUMERIC, locale="Slovenian") ??works like a charm in my application. Now the 'n' format specifier works as I want. But tell me whether the 'n' format specifier can be forced to round the float to just one decimal place. I know that the 'f' format specifier does that by specifying ".1f", but 'f' is not locale-aware. I have set the 'n' format specifier in my application like ".3n", which is okay if the returned number is two integers and one decimal, but is not okay if the returned number is one integer and two decimals, because I want just one decimal, always. How can I make that by using the 'n' format specifier?


On Wed, Oct 20, 2010 at 11:37 AM, Tim Golden <report at bugs.python.org> wrote:

Tim Golden <mail at timgolden.me.uk> added the comment:

Bo??tjan, the code segment you quote is the *fallback* if the
C module hasn't been built for some reason. The module simply
calls through to the underlying C Library. I notice you're
running on Windows, so this is a useful MS page:

http://msdn.microsoft.com/en-us/library/x99tb11d%28VS.71%29.aspx

and you can see there that a call of setlocale (LC_ALL, "English")
is valid (of "French" if you prefer):

Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit
(Intel)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import locale
>>> locale.setlocale (locale.LC_ALL, "French")
'French_France.1252'
>>>

----------
nosy: +tim.golden

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

From report at bugs.python.org Wed Oct 20 19:27:07 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 20 Oct 2010 17:27:07 +0000 Subject: [issue10156] Memory leak (r70459) In-Reply-To: <1287595627.82.0.548953621137.issue10156@psf.upfronthosting.co.za> Message-ID: <1287595627.82.0.548953621137.issue10156@psf.upfronthosting.co.za> New submission from Stefan Krah : This is one of two remaining "definitely lost" leaks in py3k. It started to appear in r70459. How to reproduce: make distclean && ./configure OPT="-O0 -g" --without-pymalloc && make valgrind --leak-check=full --suppressions=Misc/valgrind-python.supp ./python > VGOUT 2>&1 Then search for 'definitely'. This leak is not present in release-2.7. ==2058== 56 bytes in 1 blocks are definitely lost in loss record 918 of 2,136 ==2058== at 0x4C2412C: malloc (vg_replace_malloc.c:195) ==2058== by 0x4167DE: _PyObject_New (object.c:243) ==2058== by 0x42C278: _PyUnicode_New (unicodeobject.c:341) ==2058== by 0x4306BD: PyUnicodeUCS2_DecodeUTF8Stateful (unicodeobject.c:2100) ==2058== by 0x430671: PyUnicodeUCS2_DecodeUTF8 (unicodeobject.c:2065) ==2058== by 0x42C8F7: PyUnicodeUCS2_FromStringAndSize (unicodeobject.c:541) ==2058== by 0x42C973: PyUnicodeUCS2_FromString (unicodeobject.c:559) ==2058== by 0x50B432: PyDict_SetItemString (dictobject.c:2088) ==2058== by 0x4258DF: PyType_Ready (typeobject.c:3844) ==2058== by 0x517B64: PyStructSequence_InitType (structseq.c:522) ==2058== by 0x4F3B4F: _PyFloat_Init (floatobject.c:1905) ==2058== by 0x4813CE: Py_InitializeEx (pythonrun.c:217) ---------- components: Interpreter Core messages: 119226 nosy: mark.dickinson, skrah priority: normal severity: normal status: open title: Memory leak (r70459) type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 19:33:22 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 20 Oct 2010 17:33:22 +0000 Subject: [issue10157] Memory leak (r70152) In-Reply-To: <1287596001.72.0.908968504513.issue10157@psf.upfronthosting.co.za> Message-ID: <1287596001.72.0.908968504513.issue10157@psf.upfronthosting.co.za> New submission from Stefan Krah : This is one of two remaining "definitely lost" leaks in py3k. It first appeared in r70152. How to reproduce: make distclean && ./configure OPT="-O0 -g" --without-pymalloc && make valgrind --leak-check=full --suppressions=Misc/valgrind-python.supp ./python > VGOUT 2>&1 Then search for 'definitely'. This leak is not present in release-2.7. ==25233== 106 (56 direct, 50 indirect) bytes in 1 blocks are definitely lost in loss record 1,432 of 2,121 ==25233== at 0x4C2412C: malloc (vg_replace_malloc.c:195) ==25233== by 0x4167AE: _PyObject_New (object.c:243) ==25233== by 0x42C1C4: _PyUnicode_New (unicodeobject.c:341) ==25233== by 0x430562: PyUnicodeUCS2_DecodeUTF8Stateful (unicodeobject.c:2036) ==25233== by 0x430516: PyUnicodeUCS2_DecodeUTF8 (unicodeobject.c:2001) ==25233== by 0x479F81: r_object (marshal.c:726) ==25233== by 0x47A03E: r_object (marshal.c:745) ==25233== by 0x47A720: r_object (marshal.c:873) ==25233== by 0x47AF4B: PyMarshal_ReadObjectFromString (marshal.c:1053) ==25233== by 0x47AE2A: PyMarshal_ReadLastObjectFromFile (marshal.c:1012) ==25233== by 0x471C5B: read_compiled_module (import.c:823) ==25233== by 0x47230C: load_source_module (import.c:1043) ---------- assignee: amaury.forgeotdarc components: Interpreter Core messages: 119227 nosy: amaury.forgeotdarc, benjamin.peterson, pitrou, skrah priority: normal severity: normal status: open title: Memory leak (r70152) type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 19:34:29 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 20 Oct 2010 17:34:29 +0000 Subject: [issue10157] Memory leak (r70152) In-Reply-To: <1287596001.72.0.908968504513.issue10157@psf.upfronthosting.co.za> Message-ID: <1287596069.42.0.19313188541.issue10157@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- assignee: amaury.forgeotdarc -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 19:44:15 2010 From: report at bugs.python.org (Sandro Tosi) Date: Wed, 20 Oct 2010 17:44:15 +0000 Subject: [issue10121] test_multiprocessing stuck in test_make_pool if run in a loop In-Reply-To: <1287232773.28.0.893033557088.issue10121@psf.upfronthosting.co.za> Message-ID: <1287596655.03.0.652381974855.issue10121@psf.upfronthosting.co.za> Sandro Tosi added the comment: just for the reference, the loop I ran was: while date ; do ./python Lib/test/regrtest.py -v test_multiprocessing ; done ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 19:58:31 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 20 Oct 2010 17:58:31 +0000 Subject: [issue10157] Memory leak (r70152) In-Reply-To: <1287596001.72.0.908968504513.issue10157@psf.upfronthosting.co.za> Message-ID: <1287597511.66.0.516928181128.issue10157@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 19:58:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 20 Oct 2010 17:58:55 +0000 Subject: [issue10156] Memory leak (r70459) In-Reply-To: <1287595627.82.0.548953621137.issue10156@psf.upfronthosting.co.za> Message-ID: <1287597535.04.0.233159458464.issue10156@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 20:05:29 2010 From: report at bugs.python.org (Maciek J) Date: Wed, 20 Oct 2010 18:05:29 +0000 Subject: [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1287597929.66.0.0602225715872.issue10149@psf.upfronthosting.co.za> Maciek J added the comment: Hm... It turns out that there is a "buffer_text" attribute: http://docs.python.org/library/pyexpat.html#xml.parsers.expat.xmlparser.buffer_text And setting this attribute to "True" seems to solve the problem. It solves my problem, but docs are still very confusing. I see two things that should be fixed: 1. In CharacterDataHandler description it should be explicitly noted that data may be chunked even if it is short(!). 2. Description of buffer_text attribute should contain a notice that data may also be arbitrary chunked if this is set to False. My data _was_not_ chunked at new line characters (as the description suggest). It was chunked in the middle of a sentence (there were no whitespace in it!). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 20:45:40 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 20 Oct 2010 18:45:40 +0000 Subject: [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1287600340.17.0.0198513999935.issue10149@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: -> docs at python components: +Documentation -XML nosy: +docs at python stage: -> needs patch type: -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 21:37:24 2010 From: report at bugs.python.org (David Watson) Date: Wed, 20 Oct 2010 19:37:24 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1280082784.57.0.628810673592.issue9377@psf.upfronthosting.co.za> Message-ID: <20101020193714.GA2978@dbwatson.ukfsn.org> David Watson added the comment: I was looking at the MSDN pages linked to above, and these two pages seemed to suggest that Unicode characters appearing in DNS names represented UTF-8 sequences, and that Windows allowed such non-ASCII byte sequences in the DNS by default: http://msdn.microsoft.com/en-us/library/ms724220%28v=VS.85%29.aspx http://msdn.microsoft.com/en-us/library/ms682032%28v=VS.85%29.aspx (See the discussion of DNS_ERROR_NON_RFC_NAME in the latter.) Can anyone confirm if this is the case? The BSD-style gethostname() function can't be returning UTF-8, though, or else the "N?tk?tti" example above would have been decoded successfully, given that Python currently uses PyUnicode_FromString(). Also, if GetComputerNameEx() only offers a choice of DNS names or NetBIOS names, and both are byte-oriented underneath (that was my reading of the "Computer Names" page), then presumably there shouldn't be a problem with mapping the result to a bytes equivalent when necessary? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 21:49:50 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 20 Oct 2010 19:49:50 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <20101020193714.GA2978@dbwatson.ukfsn.org> Message-ID: <4CBF47DB.9080202@v.loewis.de> Martin v. L?wis added the comment: > Also, if GetComputerNameEx() only offers a choice of DNS names or > NetBIOS names, and both are byte-oriented underneath (that was my > reading of the "Computer Names" page), then presumably there > shouldn't be a problem with mapping the result to a bytes > equivalent when necessary? They aren't byte-oriented underneath.It depends on whether use GetComputerNameA or GetComputerNameW whether you get bytes or Unicode. If bytes, they are converted as if by WideCharToMultiByte using CP_ACP, which in turn will introduce question marks and the like for unconvertable characters. ---------- title: socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names -> socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 21:57:25 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Wed, 20 Oct 2010 19:57:25 +0000 Subject: [issue1467929] %-formatting and dicts Message-ID: <1287604645.99.0.510378425833.issue1467929@psf.upfronthosting.co.za> Changes by Vetoshkin Nikita : Removed file: http://bugs.python.org/file19271/issue1467929_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 21:57:56 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Wed, 20 Oct 2010 19:57:56 +0000 Subject: [issue1467929] %-formatting and dicts Message-ID: <1287604676.54.0.59210547918.issue1467929@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: Updated patch: some tests added. ---------- Added file: http://bugs.python.org/file19307/issue1467929_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 22:54:22 2010 From: report at bugs.python.org (Bob Halley) Date: Wed, 20 Oct 2010 20:54:22 +0000 Subject: [issue10158] BadInternalCall running test_multiprocessing In-Reply-To: <1287608062.36.0.615501498317.issue10158@psf.upfronthosting.co.za> Message-ID: <1287608062.36.0.615501498317.issue10158@psf.upfronthosting.co.za> New submission from Bob Halley : For reasons not germane to this bug report, I was running a modified Python 2.7 where PyTrash_UNWIND_LEVEL in Include/object.h had been defined to 10 instead of 50. With such a python, running test_multiprocessing causes a BadInternalCall to be triggered at line 903 of weakrefobject.c. test_finalize (__main__.WithProcessesTestFinalize) ... Process Process-18: Traceback (most recent call last): File "/Users/halley/src/release27-maint/Lib/multiprocessing/process.py", line 229, in _bootstrap util._run_after_forkers() File "/Users/halley/src/release27-maint/Lib/multiprocessing/util.py", line 125, in _run_after_forkers items = list(_afterfork_registry.items()) File "/Users/halley/src/release27-maint/Lib/weakref.py", line 116, in items for key, wr in self.data.items(): SystemError: Objects/weakrefobject.c:903: bad argument to internal function I'm running the head of the release27-maint branch, but the problem occurs with the released 2.7 too. The trigger for the error is that object->ob_refcount is 1. I stuck an abort() into the code just before the BadInternalCall, and looked at the core. The ob_type is a Semaphore, and the last bit of the call chain is: (gdb) bt #0 0x00007fff8791c3d6 in __kill () #1 0x00007fff879bc972 in abort () #2 0x000000010007eb05 in PyObject_ClearWeakRefs (object=) at Objects/weakrefobject.c:903 #3 0x000000010006c949 in subtype_dealloc (self=0x10070a150) at Objects/typeobject.c:952 #4 0x000000010005341b in _PyTrash_destroy_chain () at Objects/object.c:2435 #5 0x000000010003bfaf in listiter_next (it=0x1006db8d0) at Objects/listobject.c:2917 #6 0x00000001000b9f16 in PyEval_EvalFrameEx (f=0x1013b91a0, throwflag=) at Python/ceval.c:2496 #7 0x00000001000c0966 in PyEval_EvalFrameEx (f=0x1013bcc40, throwflag=) at Python/ceval.c:4098 #8 0x00000001000c0966 in PyEval_EvalFrameEx (f=0x10137a500, throwflag=) at Python/ceval.c:4098 #9 0x00000001000c0966 in PyEval_EvalFrameEx (f=0x101374aa0, throwflag=) at Python/ceval.c:4098 #10 0x00000001000c1826 in PyEval_EvalCodeEx (co=0x10065d1b0, globals=, locals=, args=0x100708458, argcount=2, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3252 #11 0x0000000100037580 in function_call (func=0x100678488, arg=0x100708440, kw=0x0) at Objects/funcobject.c:526 #12 0x00000001000063e2 in PyObject_Call (func=0x100678488, arg=0x100708440, kw=0x0) at Objects/abstract.c:2529 #13 0x00000001000177bd in instancemethod_call (func=0x100678488, arg=0x100708440, kw=0x0) at Objects/classobject.c:2578 #14 0x00000001000063e2 in PyObject_Call (func=0x100704780, arg=0x1006f17d0, kw=0x0) at Objects/abstract.c:2529 #15 0x0000000100071a38 in slot_tp_init (self=, args=0x1006f17d0, kwds=0x0) at Objects/typeobject.c:5651 #16 0x000000010006ee75 in type_call (type=0x10130bd10, args=0x1006f17d0, kwds=0x0) at Objects/typeobject.c:726 #17 0x00000001000063e2 in PyObject_Call (func=0x10130bd10, arg=0x1006f17d0, kw=0x0) at Objects/abstract.c:2529 Note that the trashcan function _PyTrash_destroy_chain() is involved. I don't understand this code well enough to have figured out what's going wrong yet. I worry that there's some subtle interaction with weakrefs, subtyped objects, and the trashcan, but maybe it's something simpler! Regards, /Bob ---------- components: Interpreter Core messages: 119233 nosy: rthalley priority: normal severity: normal status: open title: BadInternalCall running test_multiprocessing type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 23:14:46 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 20 Oct 2010 21:14:46 +0000 Subject: [issue10157] Memory leak (r70152) In-Reply-To: <1287596001.72.0.908968504513.issue10157@psf.upfronthosting.co.za> Message-ID: <1287609286.27.0.863998148917.issue10157@psf.upfronthosting.co.za> Stefan Krah added the comment: I tracked it down to r68683, which is still a large commit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 23:25:40 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 20 Oct 2010 21:25:40 +0000 Subject: [issue10152] symtable.c: ste_tmpname uninitialized In-Reply-To: <1287571673.13.0.775838367643.issue10152@psf.upfronthosting.co.za> Message-ID: <1287609940.59.0.402612454616.issue10152@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r85757 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 23:35:25 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 20 Oct 2010 21:35:25 +0000 Subject: [issue10158] BadInternalCall running test_multiprocessing In-Reply-To: <1287608062.36.0.615501498317.issue10158@psf.upfronthosting.co.za> Message-ID: <1287610525.27.0.405415268168.issue10158@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> jnoller nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 20 23:47:46 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 20 Oct 2010 21:47:46 +0000 Subject: [issue10154] locale.normalize strips "-" from UTF-8, which fails on Mac In-Reply-To: Message-ID: <4CBF637A.3000204@egenix.com> Marc-Andre Lemburg added the comment: Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > This patch solves the immediate failure: > > Index: Lib/locale.py > =================================================================== > --- Lib/locale.py (revision 85743) > +++ Lib/locale.py (working copy) > @@ -396,6 +396,9 @@ > else: > encoding = defenc > #print 'found encoding %r' % encoding > + if sys.platform == 'darwin' and encoding == 'UTF8': > + encoding = 'UTF-8' > + > if encoding: > return langname + '.' + encoding > else: > > I'm not happy about hardcoding this specific exception though, there should be a better solution than this. Could you tell me the values of localename, code, langname and encoding at that step in the process ? We may need to add an locale_encoding_alias from 'UTF8' to 'UTF-8', since the version with the hyphen is what the C lib uses. ---------- nosy: +lemburg title: locale.normalize strips "-" from UTF-8, which fails on Mac -> locale.normalize strips "-" from UTF-8, which fails on Mac _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 00:10:04 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 20 Oct 2010 22:10:04 +0000 Subject: [issue10156] Memory leak (r70459) In-Reply-To: <1287595627.82.0.548953621137.issue10156@psf.upfronthosting.co.za> Message-ID: <1287612604.11.0.028769880869.issue10156@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The stack corresponds to the allocation of type(sys.float_info).__doc__. Why would only this object appear as a memory leak? It is certainly not deallocated, but all other types are in the same situation. For example, sys.int_info is very similar, and happens to be defined in r70459. Why doesn't it appear in the report? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 00:24:44 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 20 Oct 2010 22:24:44 +0000 Subject: [issue10156] Memory leak (r70459) In-Reply-To: <1287595627.82.0.548953621137.issue10156@psf.upfronthosting.co.za> Message-ID: <1287613484.67.0.0667865614901.issue10156@psf.upfronthosting.co.za> Stefan Krah added the comment: To add to the mystery, the leak disappears if the key value is not interned in PyDict_SetItemString: Index: Objects/dictobject.c =================================================================== --- Objects/dictobject.c (revision 70459) +++ Objects/dictobject.c (working copy) @@ -2088,7 +2088,6 @@ kv = PyUnicode_FromString(key); if (kv == NULL) return -1; - PyUnicode_InternInPlace(&kv); /* XXX Should we really? */ err = PyDict_SetItem(v, kv, item); Py_DECREF(kv); return err; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 00:29:41 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 20 Oct 2010 22:29:41 +0000 Subject: [issue10156] Memory leak (r70459) In-Reply-To: <1287613484.67.0.0667865614901.issue10156@psf.upfronthosting.co.za> Message-ID: <4CBF6D43.8060508@egenix.com> Marc-Andre Lemburg added the comment: Stefan Krah wrote: > > Stefan Krah added the comment: > > To add to the mystery, the leak disappears if the key value is not > interned in PyDict_SetItemString: I'm not sure how you determine what is a leak and what not. Interned Unicode objects stay alive until the interpreter is finalized. Are you suggesting that the finalization does not free the interned Unicode strings or not all of them ? > Index: Objects/dictobject.c > =================================================================== > --- Objects/dictobject.c (revision 70459) > +++ Objects/dictobject.c (working copy) > @@ -2088,7 +2088,6 @@ > kv = PyUnicode_FromString(key); > if (kv == NULL) > return -1; > - PyUnicode_InternInPlace(&kv); /* XXX Should we really? */ > err = PyDict_SetItem(v, kv, item); > Py_DECREF(kv); > return err; ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 00:40:14 2010 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Wed, 20 Oct 2010 22:40:14 +0000 Subject: [issue10159] rlcompleter's tests depend on dict order In-Reply-To: <1287614414.29.0.153122456911.issue10159@psf.upfronthosting.co.za> Message-ID: <1287614414.29.0.153122456911.issue10159@psf.upfronthosting.co.za> New submission from Andreas St?hrk : Some tests in test_rlcompleter make assumptions about the order of the list of names that the completion methods of a Completer object return. That order is not guaranteed and will break when running the tests under e.g. PyPy. The attached patch against py3k branch tries to fix that. ---------- components: Tests files: test_rlcompleter_order.patch keywords: patch messages: 119240 nosy: Trundle priority: normal severity: normal status: open title: rlcompleter's tests depend on dict order versions: Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file19308/test_rlcompleter_order.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 00:47:17 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 20 Oct 2010 22:47:17 +0000 Subject: [issue10156] Memory leak (r70459) In-Reply-To: <4CBF6D43.8060508@egenix.com> Message-ID: <20101020224559.GA19660@yoda.bytereef.org> Stefan Krah added the comment: Marc-Andre Lemburg wrote: > I'm not sure how you determine what is a leak and what not. > Interned Unicode objects stay alive until the interpreter > is finalized. > > Are you suggesting that the finalization does not free the > interned Unicode strings or not all of them ? No, Valgrind's "definitely lost" category means that all pointers to an allocated region have been lost, so it would not be possible to free the area. [1] There are hundreds of "possibly lost" warnings as well, but I did not report those. My experience is that Valgrind is usually correct with "definitely lost", see e.g. #10153. That said, of course it _could_ be a false alarm. [1] Last category from: http://mail.python.org/pipermail/python-dev/2002-October/029758.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 01:08:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 20 Oct 2010 23:08:58 +0000 Subject: [issue4388] test_cmd_line fails on MacOS X In-Reply-To: <1227329681.44.0.462897262909.issue4388@psf.upfronthosting.co.za> Message-ID: <1287616138.88.0.533280395131.issue4388@psf.upfronthosting.co.za> STINNER Victor added the comment: I commited my patch to Python 3.2 (r85765), with a specific test in test_cmd_line. Reopen the issue if the bug is not fixed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 01:34:53 2010 From: report at bugs.python.org (Ned Deily) Date: Wed, 20 Oct 2010 23:34:53 +0000 Subject: [issue10159] rlcompleter's tests depend on dict order In-Reply-To: <1287614414.29.0.153122456911.issue10159@psf.upfronthosting.co.za> Message-ID: <1287617693.97.0.430470578607.issue10159@psf.upfronthosting.co.za> Ned Deily added the comment: The patch looks good to me. ---------- nosy: +ned.deily, pitrou stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 01:36:11 2010 From: report at bugs.python.org (And Clover) Date: Wed, 20 Oct 2010 23:36:11 +0000 Subject: [issue10155] Add fixups for encoding problems to wsgiref In-Reply-To: <1287591822.31.0.50492787235.issue10155@psf.upfronthosting.co.za> Message-ID: <1287617771.85.0.376907852165.issue10155@psf.upfronthosting.co.za> And Clover added the comment: (same again for branch PJ Eby's wsgiref svn: same as previous 2.7 patch aside from the line numbers) ---------- Added file: http://bugs.python.org/file19309/wsgiref-patches-eby2692.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 01:42:58 2010 From: report at bugs.python.org (David Watson) Date: Wed, 20 Oct 2010 23:42:58 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <4CBF47DB.9080202@v.loewis.de> Message-ID: <20101020234248.GA4405@dbwatson.ukfsn.org> David Watson added the comment: > > Also, if GetComputerNameEx() only offers a choice of DNS names or > > NetBIOS names, and both are byte-oriented underneath (that was my > > reading of the "Computer Names" page), then presumably there > > shouldn't be a problem with mapping the result to a bytes > > equivalent when necessary? > > They aren't byte-oriented underneath.It depends on whether use > GetComputerNameA or GetComputerNameW whether you get bytes or Unicode. > If bytes, they are converted as if by WideCharToMultiByte using > CP_ACP, which in turn will introduce question marks and the like > for unconvertable characters. Sorry, I didn't mean how Windows constructs the result for the "A" interface - I was talking about Python code being able to map the result from the Unicode interface to the form used in the protocol (e.g. DNS). I believe the proposal is to use the DNS name, so since the DNS is byte oriented, I would have thought that the Unicode "DNS name" result would always have a bytes equivalent that the DNS resolver code would use - perhaps its UTF-8 encoding? ---------- title: socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names -> socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 01:51:10 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 20 Oct 2010 23:51:10 +0000 Subject: [issue10158] BadInternalCall running test_multiprocessing In-Reply-To: <1287608062.36.0.615501498317.issue10158@psf.upfronthosting.co.za> Message-ID: <1287618670.35.0.86611880515.issue10158@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Does it happen when compiled in debug mode? There may be asserts that will give a better (or earlier) error message. Some thoughts: the '_PyTrash_delete_later' chain can only contain a limited set of objects: lists, frames... (which code contain the Py_TRASHCAN_SAFE_BEGIN macro)... and the stack dumps suggests (subtype_dealloc) that it is also an instance of a user-defined class. The only candidate I see is the class 'multiprocessing.managers.ProcessLocalSet', which inherits from 'set'. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 01:56:24 2010 From: report at bugs.python.org (Ned Deily) Date: Wed, 20 Oct 2010 23:56:24 +0000 Subject: [issue10155] Add fixups for encoding problems to wsgiref In-Reply-To: <1287591822.31.0.50492787235.issue10155@psf.upfronthosting.co.za> Message-ID: <1287618984.71.0.261734084083.issue10155@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +pje _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:10:21 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Thu, 21 Oct 2010 00:10:21 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> New submission from ??????? ???????? (Christos Georgiou) : (Discovered in that StackOverflow answer: http://stackoverflow.com/questions/3940518/3942509#3942509 ; check the comments too) operator.attrgetter in its simplest form (i.e. with a single non-dotted name) needs more time to execute than an equivalent lambda expression. Attached file so3940518.py runs a simple benchmark comparing: a list comprehension of plain attribute access; attrgetter; and lambda. I will append sample benchmark times at the end of the comment. Browsing Modules/operator.c, I noticed that the dotted_getattr function was using PyUnicode_Check and (possibly) splitting on dots on *every* call of the attrgetter, which I thought to be most inefficient. I changed the py3k-daily-snapshot source to make the PyUnicode_Check calls in the attrgetter_new function; also, I modified the algorithm to pre-parse the operator.attrgetter functions for possible dots in the names, in order for the dotted_getattr function to become speedier. The only ?drawback? is that now operator.attrgetter raises a TypeError on creation, not on subsequent calls of the attrgetter object; this shouldn't be a compatibility problem. However, I obviously had to update both Doc/library/operator.rst and Lib/test/test_operator.py . I am not sure whether I should attach a zip/tar file with both the attachments (the sample benchmark and the diff); so I'll attach the diff in a further comment. On the Ubuntu server 9.10 where I made the changes, I ran the so3940518.py sample benchmark before and after the changes. Run before the changes (third column is seconds, less is better): list comp 0.40999999999999925 1000000 map attrgetter 1.3899999999999997 1000000 map lambda 1.0099999999999998 1000000 Run after the changes: list comp 0.40000000000000036 1000000 map attrgetter 0.5199999999999996 1000000 map lambda 0.96 1000000 ---------- assignee: docs at python components: Documentation, Library (Lib), Tests files: so3940518.py messages: 119247 nosy: docs at python, tzot priority: normal severity: normal status: open title: operator.attrgetter slower than lambda after adding dotted names ability versions: Python 3.2 Added file: http://bugs.python.org/file19310/so3940518.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:14:05 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Oct 2010 00:14:05 +0000 Subject: [issue10161] unittest: use ascii() instead of repr() to display values on error In-Reply-To: <1287620045.08.0.616475344874.issue10161@psf.upfronthosting.co.za> Message-ID: <1287620045.08.0.616475344874.issue10161@psf.upfronthosting.co.za> New submission from STINNER Victor : On a failure, unittest does its best to display values. But sometimes, the output doesn't help me. Example: FAIL: test_listdir (test.test_pep277.UnicodeFileTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Users/db3l/buildarea/3.x.bolen-tiger/build/Lib/test/test_pep277.py", line 157, in test_listdir self.assertEqual(sf0, sf2) AssertionError: Items in the first set but not the second: '@test_18608_tmp/ ????????????' '@test_18608_tmp/??????????????????????????????????????????' Items in the second set but not the first: '@test_18608_tmp/ ????????????' '@test_18608_tmp/??????????????????????????????????????????' '@test_18608_tmp/????????????' This is a test on unicode filenames. I would prefer to see non-ASCII characters as \xHH or \uXXXX than strange characters or boxes. Do you think that it is a good idea to replace calls to repr() by ascii() in the unittest library? In Python2, repr(unicode) escapes all non-ASCII characters. But in Python3, only control characters and surrogates are escaped. So the output depends on the terminal encoding. Write non-ASCII characters in a backtrace may also raise a new error if the terminal is unable to a character. Raise an error while printing an error is just horrible :-) -- Attached patch is a try to replace repr() by ascii() in the unittest module. But I don't know this library, so don't trust the patch :-) ---------- components: Library (Lib), Unicode files: unittest_ascii.patch keywords: patch messages: 119248 nosy: haypo priority: normal severity: normal status: open title: unittest: use ascii() instead of repr() to display values on error versions: Python 3.2 Added file: http://bugs.python.org/file19311/unittest_ascii.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:22:39 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Thu, 21 Oct 2010 00:22:39 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287620559.26.0.228445009836.issue10160@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: Here comes the diff to Modules/operator.c, Doc/library/operator.rst and Lib/test/test_operator.py . As far as I could check, there are no leaks, but a more experienced eye in core development could not hurt. Also, obviously test_operatory.py passes all tests. Should this be accepted, I believe it should be backported to 2.7 (at least). I can do that, just let me know. ---------- keywords: +patch Added file: http://bugs.python.org/file19312/issue10160.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:22:55 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 21 Oct 2010 00:22:55 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287620575.44.0.891571883745.issue10160@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:27:33 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Thu, 21 Oct 2010 00:27:33 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287620853.99.0.50107479976.issue10160@psf.upfronthosting.co.za> Changes by ??????? ???????? (Christos Georgiou) : Removed file: http://bugs.python.org/file19312/issue10160.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:28:48 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Thu, 21 Oct 2010 00:28:48 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287620928.13.0.470488767783.issue10160@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: Newer version of the diff, since I forgot some "if(0) fprintf" debug calls that shouldn't be there. ---------- Added file: http://bugs.python.org/file19313/issue10160.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:40:53 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Thu, 21 Oct 2010 00:40:53 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287621653.02.0.326065744057.issue10160@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: An explanation to the changes. The old code kept the operator.itemgetter arguments in the ag->attr member. If the argument count (ag->nattrs) was 1, the single argument was kept; if more than 1, a tuple of the original arguments was kept. On every attrgetter_call call, if ag->nattrs was 1, dotted_getattr was called with the plain ag->attr as attribute name; if > 2, dotted_getattr was called for every one of the original arguments. Now, ag->attr is always a tuple, containing either dotless strings or tuples of dotless strings: operator.attrgetter("name1", "name2.name3", "name4") stores ("name1", ("name2", "name3"), "name4") in ag->attr. dotted_getattr accordingly chooses based on type (either str or tuple, ensured by attrgetter_new) whether to do a single access or a recursive one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:42:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Oct 2010 00:42:58 +0000 Subject: [issue7828] chr() and ord() documentation for wide characters In-Reply-To: <1264999918.27.0.407460194608.issue7828@psf.upfronthosting.co.za> Message-ID: <1287621778.83.0.773395081548.issue7828@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Unicode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:44:37 2010 From: report at bugs.python.org (And Clover) Date: Thu, 21 Oct 2010 00:44:37 +0000 Subject: [issue10162] mimetypes read_windows_registry should tolerate permissions errors In-Reply-To: <1287621877.59.0.625449070173.issue10162@psf.upfronthosting.co.za> Message-ID: <1287621877.59.0.625449070173.issue10162@psf.upfronthosting.co.za> New submission from And Clover : It is relatively common to have keys in the HKEY_CLASSES_ROOT MIME database that are not readable to all users, typically written by third-party applications. (My WinXP test box has a dozen, for apps like Flash, Silverlight and Java.) Currently, initialising mimetypes causes Python to try to read them all, and if the user running Python doesn't have permission to read a key (in particular, if the user is a low-privilege daemon user such as IUSR_...), the script that caused mimetypes to be called will error out. This patch moves the try-block around the call to OpenKey as well as QueryValueEx, allowing the key to be skipped if unreadable. ---------- components: Library (Lib) files: mimetypes-patch-3.2a3.patch keywords: patch messages: 119252 nosy: aclover priority: normal severity: normal status: open title: mimetypes read_windows_registry should tolerate permissions errors type: feature request versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file19314/mimetypes-patch-3.2a3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:45:51 2010 From: report at bugs.python.org (And Clover) Date: Thu, 21 Oct 2010 00:45:51 +0000 Subject: [issue10162] mimetypes read_windows_registry should tolerate permissions errors In-Reply-To: <1287621877.59.0.625449070173.issue10162@psf.upfronthosting.co.za> Message-ID: <1287621951.37.0.468044968958.issue10162@psf.upfronthosting.co.za> And Clover added the comment: (same against 2.7 branch) ---------- Added file: http://bugs.python.org/file19315/mimetypes-patch-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:54:29 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Oct 2010 00:54:29 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1287622469.76.0.810548735974.issue9167@psf.upfronthosting.co.za> STINNER Victor added the comment: I just closed #4388 with r85765 (Python 3.2): always use UTF-8 to decode the command line arguments on Mac OS X, not the locale encoding. I suppose that it does fix this issue. Can someone check that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 02:58:22 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 21 Oct 2010 00:58:22 +0000 Subject: [issue8776] Bytes version of sys.argv In-Reply-To: <1274357456.02.0.0768864678422.issue8776@psf.upfronthosting.co.za> Message-ID: <1287622702.09.0.494128511609.issue8776@psf.upfronthosting.co.za> STINNER Victor added the comment: Since r85765 (issue #4388), always use UTF-8 to decode the command line arguments on Mac OS X, not the locale encoding. Which means that the pseudo-code becomes: if os.name != 'nt': if sys.platform == 'darwin': encoding = 'utf-8' else: encoding = locale.getpreferredencoding() sys.argvb = [arg.decode(encoding, 'surrogateescape') for arg in sys.argv] sys.argvb should be synchronized with sys.argv, as os.environb with os.environ. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 03:16:58 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 21 Oct 2010 01:16:58 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1287623818.61.0.850482485643.issue10142@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Jes?s, can you attach a patch (with the appropriate #ifdefs)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 03:43:29 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Thu, 21 Oct 2010 01:43:29 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: Message-ID: Bo??tjan Mejak added the comment: Please respond... On Wed, Oct 20, 2010 at 7:05 PM, Bo??tjan Mejak wrote: > > Bo????tjan Mejak added the comment: > > Thank you so much for your answer. The > locale.setlocale(category=locale.LC_NUMERIC, > locale="Slovenian") works like a charm in my application. Now the 'n' > format specifier works as I want. But tell me whether the 'n' format > specifier can be forced to round the float to just one decimal place. I > know > that the 'f' format specifier does that by specifying ".1f", but 'f' is not > locale-aware. I have set the 'n' format specifier in my application like > ".3n", which is okay if the returned number is two integers and one > decimal, > but is not okay if the returned number is one integer and two decimals, > because I want just one decimal, always. How can I make that by using the > 'n' format specifier? > > On Wed, Oct 20, 2010 at 11:37 AM, Tim Golden > wrote: > > > > > Tim Golden added the comment: > > > > Bo????tjan, the code segment you quote is the *fallback* if the > > C module hasn't been built for some reason. The module simply > > calls through to the underlying C Library. I notice you're > > running on Windows, so this is a useful MS page: > > > > http://msdn.microsoft.com/en-us/library/x99tb11d%28VS.71%29.aspx > > > > and you can see there that a call of setlocale (LC_ALL, "English") > > is valid (of "French" if you prefer): > > > > Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit > > (Intel)] on win32 > > Type "help", "copyright", "credits" or "license" for more information. > > >>> import locale > > >>> locale.setlocale (locale.LC_ALL, "French") > > 'French_France.1252' > > >>> > > > > ---------- > > nosy: +tim.golden > > > > _______________________________________ > > Python tracker > > > > _______________________________________ > > > > ---------- > Added file: http://bugs.python.org/file19306/unnamed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19316/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Please respond...

On Wed, Oct 20, 2010 at 7:05 PM, Bo??tjan Mejak <report at bugs.python.org> wrote:

Bo????tjan Mejak <bostjan.mejak at gmail.com> added the comment:

Thank you so much for your answer. The
locale.setlocale(category=locale.LC_NUMERIC,
locale="Slovenian") ??works like a charm in my application. Now the 'n'
format specifier works as I want. But tell me whether the 'n' format
specifier can be forced to round the float to just one decimal place. I know
that the 'f' format specifier does that by specifying ".1f", but 'f' is not
locale-aware. I have set the 'n' format specifier in my application like
".3n", which is okay if the returned number is two integers and one decimal,
but is not okay if the returned number is one integer and two decimals,
because I want just one decimal, always. How can I make that by using the
'n' format specifier?

On Wed, Oct 20, 2010 at 11:37 AM, Tim Golden <report at bugs.python.org> wrote:

>
> Tim Golden <mail at timgolden.me.uk> added the comment:
>
> Bo????tjan, the code segment you quote is the *fallback* if the
> C module hasn't been built for some reason. The module simply
> calls through to the underlying C Library. I notice you're
> running on Windows, so this is a useful MS page:
>
> http://msdn.microsoft.com/en-us/library/x99tb11d%28VS.71%29.aspx
>
> and you can see there that a call of setlocale (LC_ALL, "English")
> is valid (of "French" if you prefer):
>
> Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit
> (Intel)] on win32
> Type "help", "copyright", "credits" or "license" for more information.
> >>> import locale
> >>> locale.setlocale (locale.LC_ALL, "French")
> 'French_France.1252'
> >>>
>
> ----------
> nosy: +tim.golden
>
> _______________________________________
> Python tracker <report at bugs.python.org>
> <http://bugs.python.org/issue10092>
> _______________________________________
>

----------
Added file: http://bugs.python.org/file19306/unnamed

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

From report at bugs.python.org Thu Oct 21 04:04:13 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 21 Oct 2010 02:04:13 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287626653.86.0.185298691453.issue10160@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Thanks for noticing this. I wasn't aware that it had slowed down after dotted name support had been added. Since it is a mild performance issue, I'm lowering the priority. Will take a further look when I get the chance. A first look at the patch shows that it is bigger than I expected. Isn't it possible to check for a dot on construction and just record the boolean so that a fast, non-splitting path can be used. I'm reluctant to make the code volume grow much for this function. It is already a bit voluminous for the minor convenience it offers. ---------- priority: normal -> low stage: -> patch review type: -> performance _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 04:33:58 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 21 Oct 2010 02:33:58 +0000 Subject: [issue10158] BadInternalCall running test_multiprocessing In-Reply-To: <1287608062.36.0.615501498317.issue10158@psf.upfronthosting.co.za> Message-ID: <1287628438.56.0.349547799675.issue10158@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 04:43:52 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 21 Oct 2010 02:43:52 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: <1286999616.97.0.806385422046.issue10092@psf.upfronthosting.co.za> Message-ID: <1287629032.5.0.970303920983.issue10092@psf.upfronthosting.co.za> R. David Murray added the comment: The bug tracker is not an appropriate place to get help on using Python. Please ask your question on a forum where you are more likely to get help, such as python-list. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 05:57:39 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 21 Oct 2010 03:57:39 +0000 Subject: [issue10155] Add fixups for encoding problems to wsgiref In-Reply-To: <1287591822.31.0.50492787235.issue10155@psf.upfronthosting.co.za> Message-ID: <1287633459.31.0.72670487376.issue10155@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 06:03:10 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Thu, 21 Oct 2010 04:03:10 +0000 Subject: [issue9022] TypeError in wsgiref.handlers when using CGIHandler In-Reply-To: <1276820747.2.0.467969862682.issue9022@psf.upfronthosting.co.za> Message-ID: <1287633790.45.0.527623298546.issue9022@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 06:34:49 2010 From: report at bugs.python.org (Ned Deily) Date: Thu, 21 Oct 2010 04:34:49 +0000 Subject: [issue10162] mimetypes read_windows_registry should tolerate permissions errors In-Reply-To: <1287621877.59.0.625449070173.issue10162@psf.upfronthosting.co.za> Message-ID: <1287635689.17.0.946290239478.issue10162@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- components: +Windows nosy: +brian.curtin, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 07:09:55 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 21 Oct 2010 05:09:55 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <20101020234248.GA4405@dbwatson.ukfsn.org> Message-ID: <4CBFCB1D.3080003@v.loewis.de> Martin v. L?wis added the comment: > Sorry, I didn't mean how Windows constructs the result for the > "A" interface - I was talking about Python code being able to map > the result from the Unicode interface to the form used in the > protocol (e.g. DNS). I believe the proposal is to use the DNS > name I disagree with the proposal - it should return whatever name gethostname from winsock.dll returns (which I expect to be the netbios name). > so since the DNS is byte oriented, I would have thought > that the Unicode "DNS name" result would always have a bytes > equivalent that the DNS resolver code would use - perhaps its > UTF-8 encoding? No no no. When Microsoft calls it the DNS name, they don't actually mean that it has to do anything with DNS. In particular, it's not byte-oriented. ---------- title: socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names -> socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 07:33:25 2010 From: report at bugs.python.org (Alex) Date: Thu, 21 Oct 2010 05:33:25 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287639205.87.0.251173550816.issue10160@psf.upfronthosting.co.za> Alex added the comment: Voice of ignorance here: why can't this be implemented in the "naive" way one might in Python, use the existing string splitting algorithms of stringlib, but just leave it in __new__. ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 07:51:16 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 21 Oct 2010 05:51:16 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1287640276.63.0.56863859187.issue9167@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Thank you. I'll check, but probably only sometime next week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 07:58:40 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 21 Oct 2010 05:58:40 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1287640720.15.0.621582421243.issue4111@psf.upfronthosting.co.za> Ronald Oussoren added the comment: I've the same question as Jes?s Cea Avi?n: what is needed to get this in 3.2? This would IMHO be a useful feature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 08:56:01 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Thu, 21 Oct 2010 06:56:01 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287644161.72.0.406199879747.issue10160@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: Modules/operator.c grows by ~70 lines, most of it the setup code for ag->attr; also I loop twice over the args of attrgetter_new, choosing fast code that runs once per attrgetter creation than temporary data. Alex's suggestion to make use of Python-level functions to shorten the code of attrgetter_new could obviously work to decrease the source lines. I don't know how fast I would produce such a version if requested, though. Whatever the way attrgetter_new sets up the data, I would suggest that you keep the logic changes in general, i.e. set-up in attrgetter_new and keep a thinner dotted_getattr , since it avoids running the same checks and splitting over and over again for every attrgetter_call invocation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 09:10:18 2010 From: report at bugs.python.org (Case Van Horsen) Date: Thu, 21 Oct 2010 07:10:18 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287645018.82.0.392760191322.issue9778@psf.upfronthosting.co.za> Case Van Horsen added the comment: I've attached a patch that fixes hashing for numerical types, sys.hash_info is now correct, fixes typeobject.c/wrap_hashfunc and tupleobject.c/tuplehash to use Py_ssize_t instead of long, and uses Py_ssize_t instead of Py_hash_t. I think it is clearer to use Py_ssize_t instead of Py_hash_t. I found two occurances where PyLong_FromLong needed to be replaced by PyLong_FromSsize_t and I think bugs like that would be easier to catch if Py_ssize_t is used. ---------- Added file: http://bugs.python.org/file19317/py_ssize_t_hash_patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 09:40:17 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 07:40:17 +0000 Subject: [issue10159] rlcompleter's tests depend on dict order In-Reply-To: <1287614414.29.0.153122456911.issue10159@psf.upfronthosting.co.za> Message-ID: <1287646817.91.0.429521285554.issue10159@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r85766. Thanks! ---------- nosy: +georg.brandl resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 09:46:04 2010 From: report at bugs.python.org (Tim Golden) Date: Thu, 21 Oct 2010 07:46:04 +0000 Subject: [issue10162] mimetypes read_windows_registry should tolerate permissions errors In-Reply-To: <1287635690.63.0.970884247819.issue10162@psf.upfronthosting.co.za> Message-ID: <4CBFEFA9.8070108@timgolden.me.uk> Tim Golden added the comment: I've only read the patch and not applied it, yet. But in principle I'm +1 on this. If Brian doesn't get there first, I'll try to apply later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 09:46:54 2010 From: report at bugs.python.org (Tim Golden) Date: Thu, 21 Oct 2010 07:46:54 +0000 Subject: [issue10092] calendar does not restore locale properly In-Reply-To: Message-ID: <4CBFEFE9.9030901@timgolden.me.uk> Tim Golden added the comment: I'm afraid this falls outside my particular area of knowledge, and also outside the remit of the bug tracker. Perhaps you could post to python-list to see if anyone there can help? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 11:08:24 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 21 Oct 2010 09:08:24 +0000 Subject: [issue10157] Memory leak (r70152) In-Reply-To: <1287596001.72.0.908968504513.issue10157@psf.upfronthosting.co.za> Message-ID: <1287652104.16.0.128116738211.issue10157@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Your traceback suggests it's a string allocated when reading a module file... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 11:15:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 21 Oct 2010 09:15:31 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1287652531.97.0.962626904482.issue4111@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I've the same question as Jes?s Cea Avi?n: what is needed to get this > in 3.2? Same as usual: someone to review, apply, commit. Why do you ask? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 11:24:47 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 21 Oct 2010 09:24:47 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <4CBFCB1D.3080003@v.loewis.de> Message-ID: <4CC006D9.5030305@egenix.com> Marc-Andre Lemburg added the comment: Martin v. L?wis wrote: > > Martin v. L?wis added the comment: > >> Sorry, I didn't mean how Windows constructs the result for the >> "A" interface - I was talking about Python code being able to map >> the result from the Unicode interface to the form used in the >> protocol (e.g. DNS). I believe the proposal is to use the DNS >> name > > I disagree with the proposal - it should return whatever > name gethostname from winsock.dll returns (which I expect > to be the netbios name). > >> so since the DNS is byte oriented, I would have thought >> that the Unicode "DNS name" result would always have a bytes >> equivalent that the DNS resolver code would use - perhaps its >> UTF-8 encoding? > > No no no. When Microsoft calls it the DNS name, they don't actually > mean that it has to do anything with DNS. In particular, it's not > byte-oriented. Just to clarify: I was proposing to use the GetComputerNameExW() win32 API with ComputerNamePhysicalDnsHostname, which returns Unicode without needing any roundtrip via bytes and the issues associated with this. I don't understand why Martin insists that the MS "DNS name" doesn't have anything to with DNS... the fully qualified DNS name of a machine is determined as hostname.domainname, just like you would expect in DNS. http://msdn.microsoft.com/en-us/library/ms724301(v=VS.85).aspx http://msdn.microsoft.com/en-us/library/ms724224(v=VS.85).aspx As I said earlier: NetBIOS is being phased out in favor of DNS. MS is using a convention which mandates that NetBIOS names match DNS names. The only difference between the two is that NetBIOS names have a length limitation: http://msdn.microsoft.com/en-us/library/ms724931(v=VS.85).aspx Perhaps Martin could clarify why he insists on using the ANSI WinSock interface gethostname instead. PS: WinSock provides many other Unicode APIs for socket module interfaces as well, so at least for that platform, we could use those to resolve uncertainties about the encoding used in name resolution. On other platforms, I guess we'll just have to do some trial and error to see what works and what not. E.g. on Linux it is possible to set the hostname to a non-ASCII value, but then the resolver returns an error, so it's not very practical: # hostname l\303\266wis # hostname l?wis # hostname -f hostname: Resolver Error 0 (no error) Using the IDNA version doesn't help either: # hostname xn--lwis-5qa # hostname xn--lwis-5qa # hostname -f hostname: Resolver Error 0 (no error) Python2 happily returns the host name, but fails to return a fully qualified domain name: 'l\xc3\xb6wis' >>> socket.getfqdn() 'l\xc3\xb6wis' and 'xn--lwis-5qa' >>> socket.getfqdn() 'xn--lwis-5qa' Just for comparison: # hostname newton # hostname newton # hostname -f newton.egenix.internal and 'newton' >>> socket.getfqdn() 'newton.egenix.internal' So at least on Linux, using non-ASCII hostnames doesn't really appear to be an option at this time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 12:20:12 2010 From: report at bugs.python.org (Bob Halley) Date: Thu, 21 Oct 2010 10:20:12 +0000 Subject: [issue10158] BadInternalCall running test_multiprocessing In-Reply-To: <1287608062.36.0.615501498317.issue10158@psf.upfronthosting.co.za> Message-ID: <1287656412.09.0.515912002154.issue10158@psf.upfronthosting.co.za> Bob Halley added the comment: I rebuilt using --with-pydebug and -O0 -g. It now triggers an assertion a bit earlier. test_finalize (__main__.WithProcessesTestFinalize) ... Assertion failed: (op->ob_refcnt == 0), function _PyTrash_destroy_chain, file Objects/object.c, line 2433 (gdb) bt #0 0x00007fff8791c3d6 in __kill () #1 0x00007fff879bc972 in abort () #2 0x00007fff879a99b4 in __assert_rtn () #3 0x00000001000796e0 in _PyTrash_destroy_chain () at Objects/object.c:2433 #4 0x0000000100053efe in list_dealloc (op=0x10114cc18) at Objects/listobject.c:317 #5 0x000000010007905b in _Py_Dealloc (op=0x10114cc18) at Objects/object.c:2228 #6 0x000000010005aee7 in listiter_next (it=0x10160d610) at Objects/listobject.c:2917 #7 0x00000001001158c8 in PyEval_EvalFrameEx (f=0x1014c72c0, throwflag=0) at Python/ceval.c:2496 [ ... snip ... ] (gdb) f 3 #3 0x00000001000796e0 in _PyTrash_destroy_chain () at Objects/object.c:2433 2433 assert(op->ob_refcnt == 0); (gdb) list 2428 * fool Py_DECREF into calling it indirectly, but 2429 * Py_DECREF was already called on this object, and in 2430 * assorted non-release builds calling Py_DECREF again ends 2431 * up distorting allocation statistics. 2432 */ 2433 assert(op->ob_refcnt == 0); 2434 ++_PyTrash_delete_nesting; 2435 (*dealloc)(op); 2436 --_PyTrash_delete_nesting; 2437 } (gdb) p *op $2 = { _ob_next = 0x0, _ob_prev = 0x0, ob_refcnt = 1, ob_type = 0x101441d70 } (gdb) p *op->ob_type $4 = { _ob_next = 0x10076d798, _ob_prev = 0x101442930, ob_refcnt = 9, ob_type = 0x1001f84e0, ob_size = 0, tp_name = 0x1013e88b4 "Semaphore", tp_basicsize = 48, tp_itemsize = 0, tp_dealloc = 0x10009dd9d , tp_print = 0, tp_getattr = 0, tp_setattr = 0, tp_compare = 0, tp_repr = 0x1000af4a0 , tp_as_number = 0x101441f08, tp_as_sequence = 0x101442058, tp_as_mapping = 0x101442040, tp_hash = 0x1000761bc <_Py_HashPointer>, tp_call = 0, tp_str = 0x1000a44e4 , tp_getattro = 0x10007728a , tp_setattro = 0x100077676 , tp_as_buffer = 0x1014420a8, tp_flags = 940027, tp_doc = 0x0, tp_traverse = 0x10009da40 , tp_clear = 0x10009dce5 , tp_richcompare = 0, tp_weaklistoffset = 40, tp_iter = 0, tp_iternext = 0x100076c13 <_PyObject_NextNotImplemented>, tp_methods = 0x0, tp_members = 0x1014420e8, tp_getset = 0x0, tp_base = 0x1014499f0, tp_dict = 0x101442930, tp_descr_get = 0, tp_descr_set = 0, tp_dictoffset = 32, tp_init = 0x1000b06dd , tp_alloc = 0x10009d7a7 , tp_new = 0x1000a3f03 , tp_free = 0x10016bda4 , tp_is_gc = 0, tp_bases = 0x1010bc840, tp_mro = 0x100744060, tp_cache = 0x0, tp_subclasses = 0x10074d240, tp_weaklist = 0x10075f528, tp_del = 0, tp_version_tag = 194 } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 13:03:54 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 21 Oct 2010 11:03:54 +0000 Subject: [issue10157] Memory leak (r70152) In-Reply-To: <1287596001.72.0.908968504513.issue10157@psf.upfronthosting.co.za> Message-ID: <1287659034.92.0.306197931924.issue10157@psf.upfronthosting.co.za> Stefan Krah added the comment: I also thought that it might be a pointer that's lost in marshal.c. However, perhaps a pointer is lost in Py_Finalize. With this ... Index: Modules/main.c =================================================================== --- Modules/main.c (revision 85766) +++ Modules/main.c (working copy) @@ -697,6 +697,7 @@ sts = PyRun_AnyFileFlags(stdin, "", &cf) != 0; } + exit(0); Py_Finalize(); #ifdef __INSURE__ ... Valgrind does not report the leak. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 13:11:20 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 11:11:20 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287659480.39.0.279433908642.issue10160@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: -Documentation nosy: -docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 13:21:50 2010 From: report at bugs.python.org (Henry Eshbaugh) Date: Thu, 21 Oct 2010 11:21:50 +0000 Subject: [issue10163] 7/200 and 7%200 show weird results In-Reply-To: <1287660110.32.0.294845890342.issue10163@psf.upfronthosting.co.za> Message-ID: <1287660110.32.0.294845890342.issue10163@psf.upfronthosting.co.za> New submission from Henry Eshbaugh : This may be happening with other numbers, but I got weird results with the modulus and division operators, after I imported the math module. I tried to do 7/200 and got 0, and 200%7 yielded 7, an impossibility with modulus. ---------- messages: 119274 nosy: Henry.Eshbaugh priority: normal severity: normal status: open title: 7/200 and 7%200 show weird results _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 13:24:36 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 11:24:36 +0000 Subject: [issue10163] 7/200 and 7%200 show weird results In-Reply-To: <1287660110.32.0.294845890342.issue10163@psf.upfronthosting.co.za> Message-ID: <1287660276.62.0.789596582938.issue10163@psf.upfronthosting.co.za> Georg Brandl added the comment: The result of 7 / 200 is easy to explain -- this is how integer division works in Python 2. (To get a floating result, one of the numbers must be a float.) 200 % 7 giving 7 however is strange. Are you sure this is what you calculated? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 13:44:19 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 11:44:19 +0000 Subject: [issue10117] Tools/scripts/reindent.py fails on non-UTF-8 encodings In-Reply-To: <1287161682.26.0.892900314694.issue10117@psf.upfronthosting.co.za> Message-ID: <1287661459.6.0.690933527263.issue10117@psf.upfronthosting.co.za> ?ric Araujo added the comment: When working as a filter, reindent should use sys.{stdin,stdout}.encoding (defaulting to sys.getdefaultencoding()) for reading and writing, respectively. Detecting encoding on streams is not worth it IMO. People can set PYTHONIOENCODING for baroque needs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 13:54:33 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 21 Oct 2010 11:54:33 +0000 Subject: [issue1349106] email.Generator does not separate headers with "\r\n" Message-ID: <1287662073.96.0.354675167617.issue1349106@psf.upfronthosting.co.za> R. David Murray added the comment: Updated patch that adds a missing test for BytesGenerator.flatten and fixes the bugs in it. Also added versionchanged tags to the docs for the linesep argument. I think this is ready to go in. ---------- stage: patch review -> commit review Added file: http://bugs.python.org/file19318/email_linesep.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 13:54:43 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 21 Oct 2010 11:54:43 +0000 Subject: [issue1349106] email.Generator does not separate headers with "\r\n" Message-ID: <1287662083.95.0.557127708025.issue1349106@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file19291/email_linesep.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 13:59:03 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 21 Oct 2010 11:59:03 +0000 Subject: [issue1349106] email.Generator does not separate headers with "\r\n" Message-ID: <1287662343.2.0.54699421866.issue1349106@psf.upfronthosting.co.za> Changes by R. David Murray : Removed file: http://bugs.python.org/file19318/email_linesep.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 14:00:00 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 21 Oct 2010 12:00:00 +0000 Subject: [issue1349106] email.Generator does not separate headers with "\r\n" Message-ID: <1287662400.69.0.0949788438263.issue1349106@psf.upfronthosting.co.za> R. David Murray added the comment: Removed some debugging cruft from the latest patch. ---------- Added file: http://bugs.python.org/file19319/email_linesep.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 14:04:33 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 21 Oct 2010 12:04:33 +0000 Subject: [issue10163] 7/200 and 7%200 show weird results In-Reply-To: <1287660110.32.0.294845890342.issue10163@psf.upfronthosting.co.za> Message-ID: <1287662673.98.0.356981235382.issue10163@psf.upfronthosting.co.za> Eric Smith added the comment: Which version of python? Could you run this from the command line and paste the complete session, including the version info that python prints on startup? ---------- nosy: +eric.smith, mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 14:16:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 12:16:57 +0000 Subject: [issue10161] unittest: use ascii() instead of repr() to display values on error In-Reply-To: <1287620045.08.0.616475344874.issue10161@psf.upfronthosting.co.za> Message-ID: <1287663417.26.0.200767853536.issue10161@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 14:20:38 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 12:20:38 +0000 Subject: [issue5017] import suds help( suds ) fails In-Reply-To: <1232501801.2.0.242744979679.issue5017@psf.upfronthosting.co.za> Message-ID: <1287663638.63.0.1283800911.issue5017@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- components: +Library (Lib) -Demos and Tools _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 14:48:17 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 21 Oct 2010 12:48:17 +0000 Subject: [issue10164] Add an assertBytesMultiLineEqual to unittest and use it for bytes assertEqual In-Reply-To: <1287665297.21.0.48545376383.issue10164@psf.upfronthosting.co.za> Message-ID: <1287665297.21.0.48545376383.issue10164@psf.upfronthosting.co.za> New submission from R. David Murray : Just as with regular strings, when comparing failed output involving bytes strings it is really helpful to have a diff showing which bytes have changed. The attached patch adds an assertMultiLineEqual method to unittest and uses it for comparing bytes in assertEqual. The diff output is created by first breaking the byte strings into lines using 'splitlines(True)' just as in assertMultiLineEqual, but then each line is converted to a string using 'repr' before the lines sets are passed to ndiff. This results in output containing escaped bytes, making it easier to compare the differences in the byte strings. (NB: this patch is the end result of several attempts to make the unittest output more useful in the email package when testing bytes handling). ---------- files: bytes_multi_line_equal.diff keywords: patch messages: 119280 nosy: michael.foord, r.david.murray priority: normal severity: normal stage: patch review status: open title: Add an assertBytesMultiLineEqual to unittest and use it for bytes assertEqual type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file19320/bytes_multi_line_equal.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 14:50:00 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 12:50:00 +0000 Subject: [issue8999] Add Mercurial support to patchcheck In-Reply-To: <1276593572.4.0.720668123002.issue8999@psf.upfronthosting.co.za> Message-ID: <1287665400.01.0.72267264057.issue8999@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r85767. ---------- nosy: +georg.brandl resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 14:50:06 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 12:50:06 +0000 Subject: [issue9095] patchcheck should handle extraneous whitespace in .rst files In-Reply-To: <1277683188.13.0.698937807833.issue9095@psf.upfronthosting.co.za> Message-ID: <1287665406.51.0.186939272684.issue9095@psf.upfronthosting.co.za> Georg Brandl added the comment: Now done in r85767. ---------- dependencies: -`make patchcheck` should check the whitespace of .c/.h files nosy: +georg.brandl status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 14:53:50 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 12:53:50 +0000 Subject: [issue3964] quiet the freeze makefile In-Reply-To: <1222356648.66.0.370920569039.issue3964@psf.upfronthosting.co.za> Message-ID: <1287665630.59.0.756462892934.issue3964@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing as "works for me". ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 14:59:35 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 12:59:35 +0000 Subject: [issue9919] gdbinit lineno result is one line in excess In-Reply-To: <1285151676.58.0.234965887204.issue9919@psf.upfronthosting.co.za> Message-ID: <1287665975.29.0.857999699112.issue9919@psf.upfronthosting.co.za> Georg Brandl added the comment: Patch looks good, committed in r85768. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:01:51 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 13:01:51 +0000 Subject: [issue6364] freeze tool broken in Python 3.x In-Reply-To: <1246245349.44.0.542405438388.issue6364@psf.upfronthosting.co.za> Message-ID: <1287666111.44.0.0477023774895.issue6364@psf.upfronthosting.co.za> Georg Brandl added the comment: An equivalent patch had already been committed in r83606. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:02:29 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 13:02:29 +0000 Subject: [issue1772721] [python-mode] Properly highlight lambda with no arguments Message-ID: <1287666149.79.0.0420952150924.issue1772721@psf.upfronthosting.co.za> Georg Brandl added the comment: python-mode.el is not maintained in Python anymore. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:29:20 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 13:29:20 +0000 Subject: [issue3077] h2py char literal doesn't work In-Reply-To: <1213172768.79.0.156029263713.issue3077@psf.upfronthosting.co.za> Message-ID: <1287667760.67.0.966117244786.issue3077@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r85770. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:30:37 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 13:30:37 +0000 Subject: [issue9102] pybench: Cannot compare 2.x and 3.x benchmarks In-Reply-To: <1277739722.07.0.677340784013.issue9102@psf.upfronthosting.co.za> Message-ID: <1287667837.08.0.394467011375.issue9102@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:31:08 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 21 Oct 2010 13:31:08 +0000 Subject: [issue10165] char overwrite mode is by default on in Python console under Vista In-Reply-To: <1287667868.12.0.532990029308.issue10165@psf.upfronthosting.co.za> Message-ID: <1287667868.12.0.532990029308.issue10165@psf.upfronthosting.co.za> New submission from anatoly techtonik : I never used Python console much, but now I see it has a very annoying behavior under Windows Vista. By default entered char overwrites the char under cursor. If you press Insert key once - it allows to insert key, but after you press enter - overwrite mode is back. ---------- messages: 119289 nosy: techtonik priority: normal severity: normal status: open title: char overwrite mode is by default on in Python console under Vista versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:31:14 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 13:31:14 +0000 Subject: [issue5978] cProfile and profile don't work with pygtk/pyqt and sys.exit(0) In-Reply-To: <1241895448.39.0.497331485225.issue5978@psf.upfronthosting.co.za> Message-ID: <1287667874.21.0.756844637838.issue5978@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> docs at python components: +Documentation -Demos and Tools nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:35:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 13:35:02 +0000 Subject: [issue1203650] Allow larger programs to be frozen under Win32 Message-ID: <1287668102.16.0.352171409887.issue1203650@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied in r85771. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:36:55 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 21 Oct 2010 13:36:55 +0000 Subject: [issue10165] char overwrite mode is by default on in Python console under Vista In-Reply-To: <1287667868.12.0.532990029308.issue10165@psf.upfronthosting.co.za> Message-ID: <1287668215.6.0.0829588307927.issue10165@psf.upfronthosting.co.za> Brian Curtin added the comment: This has nothing to do with Python. IIRC from another issue, you have pyreadline installed. Your cmd.exe settings may be conflicting with something that pyreadline is trying to do. ---------- nosy: +brian.curtin resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:37:36 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 13:37:36 +0000 Subject: [issue6088] Python3.0.1.1 is not available when system locale is zh_TW.eucTW In-Reply-To: <1243007545.21.0.68248439701.issue6088@psf.upfronthosting.co.za> Message-ID: <1287668256.17.0.334689688283.issue6088@psf.upfronthosting.co.za> Georg Brandl added the comment: This is very probably resolved in 3.1 or 3.2, where lots of environment vs Unicode bugs were fixed. ---------- nosy: +georg.brandl status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:40:07 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 13:40:07 +0000 Subject: [issue3486] bytes.join does not accept a sequence of bytearrays In-Reply-To: <1217612850.46.0.924257550681.issue3486@psf.upfronthosting.co.za> Message-ID: <1287668407.07.0.432979344498.issue3486@psf.upfronthosting.co.za> Georg Brandl added the comment: py3k bytes won't be backported now. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:42:44 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 21 Oct 2010 13:42:44 +0000 Subject: [issue10089] Add support for arbitrary -X options In-Reply-To: <1286996500.23.0.0250789164181.issue10089@psf.upfronthosting.co.za> Message-ID: <1287668564.7.0.694040300288.issue10089@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r85772. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:46:00 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 13:46:00 +0000 Subject: [issue4829] confusing error for file("foo", "w++") In-Reply-To: <1231067838.12.0.558588021919.issue4829@psf.upfronthosting.co.za> Message-ID: <1287668760.08.0.882660397819.issue4829@psf.upfronthosting.co.za> Georg Brandl added the comment: Amended error message in r85773. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:47:48 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 13:47:48 +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: <1287668868.38.0.6390614214.issue5218@psf.upfronthosting.co.za> Georg Brandl added the comment: Is this ready to commit? ---------- assignee: -> pitrou nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:48:56 2010 From: report at bugs.python.org (Tim Golden) Date: Thu, 21 Oct 2010 13:48:56 +0000 Subject: [issue10165] char overwrite mode is by default on in Python console under Vista In-Reply-To: <1287667868.12.0.532990029308.issue10165@psf.upfronthosting.co.za> Message-ID: <4CC044C3.3050001@timgolden.me.uk> Tim Golden added the comment: If you don't often use the console, then I expect your console settings have Insert mode off. (Alt-Space > Properties > Options > Insert Mode [x]) ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 15:53:59 2010 From: report at bugs.python.org (Stephen Hansen) Date: Thu, 21 Oct 2010 13:53:59 +0000 Subject: [issue10154] locale.normalize strips "-" from UTF-8, which fails on Mac In-Reply-To: <1287588685.92.0.0691926945263.issue10154@psf.upfronthosting.co.za> Message-ID: <1287669239.43.0.118232747043.issue10154@psf.upfronthosting.co.za> Stephen Hansen added the comment: Mark, the locals() right before "if encoding:" (line 399) are: >>> locale.normalize("en_US.UTF-8") {'code': 'en_US.ISO8859-1', 'langname': 'en_US', 'encoding': 'UTF8', 'norm_encoding': 'utf_8', 'defenc': 'ISO8859-1', 'localename': 'en_US.UTF-8', 'lookup_name': 'en_us.utf-8', 'fullname': 'en_us.utf-8'} 'en_US.UTF8' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 16:02:10 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 21 Oct 2010 14:02:10 +0000 Subject: [issue10163] 7/200 and 7%200 show weird results In-Reply-To: <1287660110.32.0.294845890342.issue10163@psf.upfronthosting.co.za> Message-ID: <1287669730.86.0.388875062598.issue10163@psf.upfronthosting.co.za> Mark Dickinson added the comment: Seconding Eric's comment. This is what I get on my machine; can you cut and paste the equivalent output on yours (including whatever else is required to reproduce the results you describe) Python 2.6.1 (r261:67515, Feb 11 2010, 15:47:53) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> 200 % 7 4 In any case, please let us know which version of Python you're using, and where you got it from. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 16:11:57 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 14:11:57 +0000 Subject: [issue10163] 7/200 and 7%200 show weird results In-Reply-To: <1287660110.32.0.294845890342.issue10163@psf.upfronthosting.co.za> Message-ID: <1287670317.2.0.804103400298.issue10163@psf.upfronthosting.co.za> Georg Brandl added the comment: The bug title interestingly says "7%200", which does result in 7. I therefore think the OP just confused the order of operands for "%". ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 16:15:07 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 21 Oct 2010 14:15:07 +0000 Subject: [issue10154] locale.normalize strips "-" from UTF-8, which fails on Mac In-Reply-To: <1287669239.43.0.118232747043.issue10154@psf.upfronthosting.co.za> Message-ID: <4CC04AE7.6030305@egenix.com> Marc-Andre Lemburg added the comment: Stephen Hansen wrote: > > Stephen Hansen added the comment: > > Mark, the locals() right before "if encoding:" (line 399) are: > >>>> locale.normalize("en_US.UTF-8") > {'code': 'en_US.ISO8859-1', 'langname': 'en_US', 'encoding': 'UTF8', 'norm_encoding': 'utf_8', 'defenc': 'ISO8859-1', 'localename': 'en_US.UTF-8', 'lookup_name': 'en_us.utf-8', 'fullname': 'en_us.utf-8'} > 'en_US.UTF8' Thanks. Line 646 in the alias table is wrong: 'utf_8': 'UTF8', should read: 'utf_8': 'UTF-8', I wonder why this wasn't reported earlier - did the GlibC change the UTF-8 spelling at some point ? I do vaguely remember that I had to remove the hyphen due to problems with setlocale() not accepting 'UTF-8', but that was at the time I wrote that part of locale.py, i.e. many years ago. It doesn't appear to be necessary anymore. I checked on openSUSE 10.3 and 11.3. Both work fine with 'UTF-8' and 'UTF8'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 16:19:53 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 21 Oct 2010 14:19:53 +0000 Subject: [issue10165] char overwrite mode is by default on in Python console under Vista In-Reply-To: <1287667868.12.0.532990029308.issue10165@psf.upfronthosting.co.za> Message-ID: <1287670793.89.0.827426128657.issue10165@psf.upfronthosting.co.za> anatoly techtonik added the comment: I don't have pyreadline installed. But I had Insert Mode disabled for Python, indeed. I wonder if the setting comes disabled by default? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 16:23:11 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 21 Oct 2010 14:23:11 +0000 Subject: [issue10165] char overwrite mode is by default on in Python console under Vista In-Reply-To: <1287667868.12.0.532990029308.issue10165@psf.upfronthosting.co.za> Message-ID: <1287670991.63.0.0685311051819.issue10165@psf.upfronthosting.co.za> Brian Curtin added the comment: > I wonder if the setting comes disabled by default? Correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 16:49:13 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 21 Oct 2010 14:49:13 +0000 Subject: [issue10165] char overwrite mode is by default on in Python console under Vista In-Reply-To: <1287670991.63.0.0685311051819.issue10165@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: >> I wonder if the setting comes disabled by default? > > Correct. Can we turn it on by default in Windows installer? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 16:50:00 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Thu, 21 Oct 2010 14:50:00 +0000 Subject: [issue10157] Memory leak (r70152) In-Reply-To: <1287596001.72.0.908968504513.issue10157@psf.upfronthosting.co.za> Message-ID: <1287672600.81.0.283682283895.issue10157@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Hello. Does this patch fix the problem? ---------- keywords: +patch nosy: +ocean-city Added file: http://bugs.python.org/file19321/py3k_issue10157.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 16:50:07 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 21 Oct 2010 14:50:07 +0000 Subject: [issue10162] mimetypes read_windows_registry should tolerate permissions errors In-Reply-To: <1287621877.59.0.625449070173.issue10162@psf.upfronthosting.co.za> Message-ID: <1287672607.82.0.51034688537.issue10162@psf.upfronthosting.co.za> Brian Curtin added the comment: Fixed in py3k (r85774, minor correction in r85775), and release27-maint (r85776). Thanks for the patches! ---------- assignee: -> brian.curtin resolution: -> fixed stage: -> committed/rejected status: open -> closed type: feature request -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 17:01:23 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 21 Oct 2010 15:01:23 +0000 Subject: [issue10165] char overwrite mode is by default on in Python console under Vista In-Reply-To: <1287667868.12.0.532990029308.issue10165@psf.upfronthosting.co.za> Message-ID: <1287673283.56.0.931446788046.issue10165@psf.upfronthosting.co.za> Brian Curtin added the comment: I'm not sure if it's possible, but even if so, I don't think we should do it. For cmd.exe itself and all processes that run in it, the default is to have it off, and you can enable it on a case-by-case basis. Insert mode really should only be enabled by those who know what it does. For example, left clicking while a process is using stdout will block until you left click, and I can see that confusing users who are not aware of what happened or why. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 17:02:49 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 21 Oct 2010 15:02:49 +0000 Subject: [issue10165] char overwrite mode is by default on in Python console under Vista In-Reply-To: <1287667868.12.0.532990029308.issue10165@psf.upfronthosting.co.za> Message-ID: <1287673369.27.0.282680874322.issue10165@psf.upfronthosting.co.za> Brian Curtin added the comment: "will block until you left click" should be... "will block until you right click (or hit enter)" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 17:27:06 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 21 Oct 2010 15:27:06 +0000 Subject: [issue10154] locale.normalize strips "-" from UTF-8, which fails on Mac In-Reply-To: <1287588685.92.0.0691926945263.issue10154@psf.upfronthosting.co.za> Message-ID: <1287674826.68.0.247115386276.issue10154@psf.upfronthosting.co.za> Georg Brandl added the comment: If other Posix-y systems accept both spellings and only Macs insist on the dash, we should probably indeed change the alias entry to use it. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 17:45:06 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 21 Oct 2010 15:45:06 +0000 Subject: [issue10165] char overwrite mode is by default on in Python console under Vista In-Reply-To: <1287673369.27.0.282680874322.issue10165@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: You must have been mistaken this for QuickEdit mode. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 17:50:14 2010 From: report at bugs.python.org (=?utf-8?q?Adam_Biela=C5=84ski?=) Date: Thu, 21 Oct 2010 15:50:14 +0000 Subject: [issue10166] maximum recursion depth exceeded in lib\pstats.py In-Reply-To: <1287676214.72.0.937902766344.issue10166@psf.upfronthosting.co.za> Message-ID: <1287676214.72.0.937902766344.issue10166@psf.upfronthosting.co.za> New submission from Adam Biela?ski : There's a bug in module lib\pstats.py, line 150. Let me paste a little piece of surrounding code: class Stats: (....) def add(self, *arg_list): if not arg_list: return self if len(arg_list) > 1: self.add(*arg_list[1:]) #Line 150, the problem is right here! other = arg_list[0] (... do some processing with first item from arg_list ...) This is the code for adding profiling stats from multiple files (names are on arg_list) so that they can be displayed in cumulated and readable form. As you can see it chops off the first item from the list and then uses recursion to process the rest of it. It's no wonder then that when you profiled a little too many function calls, you're bound to see RuntimeError with 'maximum recursion depth exceeded' message when you try using this. IMO this should be done with iteration instead, like: def add(self, *arg_list): if not arg_list: return self for other in arg_list: #Preserved variable name only for sake of comparison with previous snippet (... do some processing with each item from arg_list, merging results in some rightful manner ...) You can find a patch for this issue in the attachment. ---------- components: Library (Lib) files: pstats.patch keywords: patch messages: 119311 nosy: Adam.Biela?ski priority: normal severity: normal status: open title: maximum recursion depth exceeded in lib\pstats.py type: crash versions: Python 2.6 Added file: http://bugs.python.org/file19322/pstats.patch _______________________________________ Python tracker _______________________________________ From mail at timgolden.me.uk Thu Oct 21 17:03:09 2010 From: mail at timgolden.me.uk (Tim Golden) Date: Thu, 21 Oct 2010 16:03:09 +0100 Subject: [issue10165] char overwrite mode is by default on in Python console under Vista Message-ID: <4CC0562D.4030901@timgolden.me.uk> Agree that it's not really up to us; and that it's trivial to change once for all future python processes. As to the left-click blocking, I think that's "Quick Edit" mode you're thinking of, not "Insert" TJG From report at bugs.python.org Thu Oct 21 17:56:05 2010 From: report at bugs.python.org (And Clover) Date: Thu, 21 Oct 2010 15:56:05 +0000 Subject: [issue2193] Cookie Colon Name Bug In-Reply-To: <1203992843.27.0.867127322082.issue2193@psf.upfronthosting.co.za> Message-ID: <1287676565.53.0.0376969638445.issue2193@psf.upfronthosting.co.za> And Clover added the comment: The various attempts by RFCs to codify HTTP cookies are useless and bear no resemblance to what browsers actually do. In the real world, every byte in the range 0x20-0x7E is allowed, except for the semicolon, the equals (in names), and in Opera, in some places, the double-quote. Many browsers even allow most of the control codes! The question of non-ASCII Unicode characters is tricky, but none of them cause a token break. Contrary to RFC2109 and its successors, no browser takes any notice of quoted-string cookies or backslash-escaping, so the effort Cookie.py puts into producing an encoded string and 'parsing' input cookies is completely wasted. It should do what everyone else does: split on semicolon, left-strip the whitespace, split each cookie on first equals. (In reality cookie names and values have no inherent encoding scheme, so if you want to include out-of-band characters like semicolon, control characters or non-ASCII characters you have to use an ad-hoc encoding scheme, often URL-encoding.) ---------- nosy: +aclover _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 18:05:05 2010 From: report at bugs.python.org (Alexander Collins) Date: Thu, 21 Oct 2010 16:05:05 +0000 Subject: [issue10167] ESET Torgan Alert [python-3.1.2.amd64 ON Win7-64] In-Reply-To: <1287677105.85.0.830529518835.issue10167@psf.upfronthosting.co.za> Message-ID: <1287677105.85.0.830529518835.issue10167@psf.upfronthosting.co.za> New submission from Alexander Collins : While trying to install 3.1.2 on my windows 7. I was faced with a Trojan alert from my ESET "NOD32" anti-virus. The link to the file: http://www.python.org/ftp/python/3.1.2/python-3.1.2.amd64.msi A snapshot is attached. Windows 7 x64 ESET Smart Security 4.2.64.12 ---------- components: Installation files: pythonSecurityWarningESET.png messages: 119313 nosy: Mr.Collins priority: normal severity: normal status: open title: ESET Torgan Alert [python-3.1.2.amd64 ON Win7-64] type: security versions: Python 3.1 Added file: http://bugs.python.org/file19323/pythonSecurityWarningESET.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 18:06:55 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 21 Oct 2010 16:06:55 +0000 Subject: [issue10167] ESET Trojan Alert [python-3.1.2.amd64 ON Win7-64] In-Reply-To: <1287677105.85.0.830529518835.issue10167@psf.upfronthosting.co.za> Message-ID: <1287677215.03.0.606563913836.issue10167@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- title: ESET Torgan Alert [python-3.1.2.amd64 ON Win7-64] -> ESET Trojan Alert [python-3.1.2.amd64 ON Win7-64] _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 18:15:36 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 21 Oct 2010 16:15:36 +0000 Subject: [issue10167] ESET Trojan Alert [python-3.1.2.amd64 ON Win7-64] In-Reply-To: <1287677105.85.0.830529518835.issue10167@psf.upfronthosting.co.za> Message-ID: <1287677736.93.0.760596847334.issue10167@psf.upfronthosting.co.za> Brian Curtin added the comment: I just ran that installer on Windows 7 x64 with Sophos AV and got no such warning. FWIW, the checksum of the downloaded installer matched the one listed on http://www.python.org/download/releases/3.1.2/ ---------- components: +Windows nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 18:40:05 2010 From: report at bugs.python.org (Alexander Collins) Date: Thu, 21 Oct 2010 16:40:05 +0000 Subject: [issue10167] ESET Trojan Alert [python-3.1.2.amd64 ON Win7-64] In-Reply-To: <1287677105.85.0.830529518835.issue10167@psf.upfronthosting.co.za> Message-ID: <1287679205.29.0.451348865675.issue10167@psf.upfronthosting.co.za> Alexander Collins added the comment: Checksum matches. I am not sure why did it detect that. The AV report: ( I shoulda posted that earlier -_-') //- Report starts ... 10/21/2010 11:54:12 AM Real-time file system protection file C:\Windows\Installer\{D40AF016-506C-43FB-A738-BD54FA8C1E86}\python_icon.exe Win32/Agent.RRQ trojan cleaned by deleting - quarantined NT AUTHORITY\SYSTEM Event occurred on a new file created by the application: C:\Windows\System32\msiexec.exe //- Report ends ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 18:44:29 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 21 Oct 2010 16:44:29 +0000 Subject: [issue10168] tkinter.Canvas.coords should return a list, not a map In-Reply-To: <1287679469.77.0.585032581167.issue10168@psf.upfronthosting.co.za> Message-ID: <1287679469.77.0.585032581167.issue10168@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Apparently a 2.x to 3.x migration artifact. Canvas.coords() is documented as returning a list: def coords(self, *args): """Return a list of coordinates for the item given in ARGS.""" but in 3.x it returns a map object. Attached patch fixes that. ---------- components: Tkinter files: canvas-coords.diff keywords: patch messages: 119316 nosy: belopolsky priority: normal severity: normal stage: unit test needed status: open title: tkinter.Canvas.coords should return a list, not a map type: behavior versions: Python 3.1, Python 3.2 Added file: http://bugs.python.org/file19324/canvas-coords.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 18:45:26 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 21 Oct 2010 16:45:26 +0000 Subject: [issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python In-Reply-To: <1273861312.32.0.0344970613986.issue8716@psf.upfronthosting.co.za> Message-ID: <1287679526.25.0.502296479511.issue8716@psf.upfronthosting.co.za> R. David Murray added the comment: Only OSX 10.4.0 I can run test_tk: rdmurray at buddy:~/python/py3k>./python.exe -m test.regrtest -uall test_tk [1/1] test_tk Thu Oct 21 12:41:16 buddy.home.bitdance.com python.exe[93560] : kCGErrorFailure: Set a breakpoint @ CGErrorBreakpoint() to catch errors as they are logged. _RegisterApplication(), FAILED TO establish the default connection to the WindowServer, _CGSDefaultConnection() is NULL. 1 test OK. But test_ttk_guionly crashes with the abort trace after printing the above. I presume this means test_ttk_guionly was factored out at some point after this issue was raised, but it is interesting that test_tk produces the warning about the window connection but only _guionly crashes. ---------- title: test_tk fails on OS X if run from buildbot slave daemon -- crashes Python -> test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python versions: -Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 18:48:12 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 21 Oct 2010 16:48:12 +0000 Subject: [issue5120] Disabling test_ttk_guionly on mac In-Reply-To: <1233437150.39.0.445953575427.issue5120@psf.upfronthosting.co.za> Message-ID: <1287679692.93.0.0124115277811.issue5120@psf.upfronthosting.co.za> R. David Murray added the comment: Presumably this is the same issue 8716. That issue contains additional details and a patch from Ronald, so I'm not closing it as a duplicate. I don't know if the patch on this issue would actually address the issue. I tried to apply it to py3k but it did not apply cleanly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 18:48:43 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 21 Oct 2010 16:48:43 +0000 Subject: [issue8716] test_tk/test_tkk_guionly fails on OS X if run from buildbot slave daemon -- crashes Python In-Reply-To: <1273861312.32.0.0344970613986.issue8716@psf.upfronthosting.co.za> Message-ID: <1287679723.88.0.972103627462.issue8716@psf.upfronthosting.co.za> R. David Murray added the comment: See also issue 5120. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 19:11:27 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 21 Oct 2010 17:11:27 +0000 Subject: [issue3356] some tests fail with 'make EXTRA_CFLAGS="-DPy_DEBUG"' (test_distutils, test_set) In-Reply-To: <1216070128.91.0.762620118024.issue3356@psf.upfronthosting.co.za> Message-ID: <1287681087.45.0.649896218164.issue3356@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 19:16:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 21 Oct 2010 17:16:49 +0000 Subject: [issue10153] Memory leak in pythonrun.c In-Reply-To: <1287572976.12.0.192446732245.issue10153@psf.upfronthosting.co.za> Message-ID: <1287681409.64.0.264343271967.issue10153@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 19:22:08 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Thu, 21 Oct 2010 17:22:08 +0000 Subject: [issue10169] socket.sendto raises incorrect exception when passed incorrect types In-Reply-To: <1287681728.0.0.651147678785.issue10169@psf.upfronthosting.co.za> Message-ID: <1287681728.0.0.651147678785.issue10169@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : >>> s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) >>> s.bind(('', 0)) >>> s.sendto(u'hell?', s.getsockname()) Traceback (most recent call last): File "", line 1, in TypeError: sendto() takes exactly 3 arguments (2 given) >>> s.sendto(3, s.getsockname()) Traceback (most recent call last): File "", line 1, in TypeError: sendto() takes exactly 3 arguments (2 given) >>> s.sendto('hello', s.getsockname()) 5 The TypeError gives the wrong explanation for what's wrong. ---------- components: Library (Lib) messages: 119320 nosy: exarkun priority: normal severity: normal status: open title: socket.sendto raises incorrect exception when passed incorrect types type: behavior versions: Python 2.6, Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 19:23:04 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 17:23:04 +0000 Subject: [issue8999] Add Mercurial support to patchcheck In-Reply-To: <1276593572.4.0.720668123002.issue8999@psf.upfronthosting.co.za> Message-ID: <1287681784.81.0.622805194322.issue8999@psf.upfronthosting.co.za> ?ric Araujo added the comment: Great, thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 19:30:58 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 17:30:58 +0000 Subject: [issue10168] tkinter.Canvas.coords should return a list, not a map In-Reply-To: <1287679469.77.0.585032581167.issue10168@psf.upfronthosting.co.za> Message-ID: <1287682258.76.0.268592828384.issue10168@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> duplicate stage: unit test needed -> committed/rejected status: open -> closed superseder: -> changed return type from tkinter.Canvas.coords _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 19:31:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 17:31:52 +0000 Subject: [issue6878] changed return type from tkinter.Canvas.coords In-Reply-To: <1252603508.57.0.591042976978.issue6878@psf.upfronthosting.co.za> Message-ID: <1287682312.83.0.535003369008.issue6878@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +belopolsky versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 19:48:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 21 Oct 2010 17:48:15 +0000 Subject: [issue6878] changed return type from tkinter.Canvas.coords In-Reply-To: <1252603508.57.0.591042976978.issue6878@psf.upfronthosting.co.za> Message-ID: <1287683295.57.0.150515965917.issue6878@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Searching through tkinter for map() calls reveals many other places where map object is returned instead of a list. For example: def keys(self): """Return a list of all resource names of this widget.""" return map(lambda x: x[0][1:], .. def pack_slaves(self): """Return a list of all slaves of this widget in its packing order.""" return map(self._nametowidget, .. def place_slaves(self): """Return a list of all slaves of this widget in its packing order.""" return map(self._nametowidget, .. def wm_colormapwindows(self, *wlist): ... Return current list of widgets if WLIST is empty.""" return map(.. While in some cases it may be arguable that returning an iterable is more appropriate for 3.x, I believe preserving backward compatible API is more important. API changes should also be accompanied with 2to3 fixes, so some action is required in any case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 20:02:46 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 21 Oct 2010 18:02:46 +0000 Subject: [issue6878] changed return type from tkinter.Canvas.coords In-Reply-To: <1252603508.57.0.591042976978.issue6878@psf.upfronthosting.co.za> Message-ID: <1287684166.68.0.212180087071.issue6878@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Attached patch fixes other uses of map() in tkinter. ---------- Added file: http://bugs.python.org/file19325/issue6878.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 20:03:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 18:03:25 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1287684205.0.0.673774060736.issue7061@psf.upfronthosting.co.za> ?ric Araujo added the comment: >From your commit: -Excursus about the use of compound shapes +Compound shapes ----------------------------------------- Having more hyphens than title characters is not an error for reST, but it?s not done in the rest of the document. I suggest ?fixing? that when you do further changes in the file (it?s not worth a commit in itself). Cheers! ---------- assignee: georg.brandl -> docs at python nosy: +docs at python, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 20:05:56 2010 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Thu, 21 Oct 2010 18:05:56 +0000 Subject: [issue5017] import suds help( suds ) fails In-Reply-To: <1232501801.2.0.242744979679.issue5017@psf.upfronthosting.co.za> Message-ID: <1287684356.45.0.236307703275.issue5017@psf.upfronthosting.co.za> Changes by Andreas St?hrk : ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 20:10:04 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 21 Oct 2010 18:10:04 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287684604.28.0.52507917705.issue10126@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Hi ?ric, what's the status on the backport? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 20:12:22 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 21 Oct 2010 18:12:22 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1287684205.0.0.673774060736.issue7061@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Oct 21, 2010 at 2:03 PM, ?ric Araujo wrote: .. > Having more hyphens than title characters is not an error for reST, but it?s not done in the rest of the document. > ?I suggest ?fixing? that when you do further changes in the file (it?s not worth a commit in itself). ?Cheers! There are other ReST imperfections in turtle doc. For example, :class: tag is often missing on class names. (Search for "Turtle" with capital 'T'.) The hyphen fix, however seems easier to commit than to remember. I'll do it now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 20:16:31 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 21 Oct 2010 18:16:31 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: Message-ID: Alexander Belopolsky added the comment: On Thu, Oct 21, 2010 at 2:12 PM, Alexander Belopolsky wrote: > The hyphen fix, however seems easier to commit than to > remember. ? I'll do it now. > Committed in r85778. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 20:54:02 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 18:54:02 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287687242.01.0.61338525917.issue10126@psf.upfronthosting.co.za> ?ric Araujo added the comment: Done in r85779 and r85780, please test. ---------- components: +Distutils nosy: +Canfield, matejcik, sandro.tosi, valeo resolution: -> fixed stage: needs patch -> committed/rejected versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 20:58:09 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 21 Oct 2010 18:58:09 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1287687489.95.0.88716780852.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I also wonder if the title should be changed from "Turtle graphics for Tk" to simply "Turtle graphics". As explained in issue3884, msg73465 turtle's use of Tk is an implementation detail and the title may be confusing to the target audience. Presumably turtle module is targeted towards young and novice users who don't know and don need to know about Tk. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 21:00:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 19:00:44 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1287687644.14.0.10462557389.issue7061@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1. BTW, aren?t the fixes relevant for 2.7 too? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 21:01:52 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 21 Oct 2010 19:01:52 +0000 Subject: [issue10167] ESET Trojan Alert [python-3.1.2.amd64 ON Win7-64] In-Reply-To: <1287677105.85.0.830529518835.issue10167@psf.upfronthosting.co.za> Message-ID: <1287687712.15.0.487566809267.issue10167@psf.upfronthosting.co.za> Brian Curtin added the comment: I'm not really sure if there's anything we can or should do here. Martin, has this happened before, and if so is there anything to be done by us? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 21:33:25 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 21 Oct 2010 19:33:25 +0000 Subject: [issue10153] Memory leak in pythonrun.c In-Reply-To: <1287572976.12.0.192446732245.issue10153@psf.upfronthosting.co.za> Message-ID: <1287689605.49.0.328282509503.issue10153@psf.upfronthosting.co.za> Changes by Stefan Krah : Removed file: http://bugs.python.org/file19294/pythonrun.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 21:34:19 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 21 Oct 2010 19:34:19 +0000 Subject: [issue10153] Memory leak in pythonrun.c In-Reply-To: <1287572976.12.0.192446732245.issue10153@psf.upfronthosting.co.za> Message-ID: <1287689659.24.0.672296060311.issue10153@psf.upfronthosting.co.za> Stefan Krah added the comment: There is actually a second refleak of the same kind. New patch attached. ---------- Added file: http://bugs.python.org/file19326/pythonrun2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 21:48:19 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 21 Oct 2010 19:48:19 +0000 Subject: [issue10157] Memory leak (r70152) In-Reply-To: <1287596001.72.0.908968504513.issue10157@psf.upfronthosting.co.za> Message-ID: <1287690499.04.0.253928247411.issue10157@psf.upfronthosting.co.za> Stefan Krah added the comment: Hirokazu, the patch looks good to me. Unfortunately Valgrind still reports the leak. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 22:20:11 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 21 Oct 2010 20:20:11 +0000 Subject: [issue10170] Relationship between turtle speed setting and actual speed is not documented In-Reply-To: <1287692411.21.0.472855700629.issue10170@psf.upfronthosting.co.za> Message-ID: <1287692411.21.0.472855700629.issue10170@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : As Terry J. Reedy mentioned in his comment on issue 7061, turtle documentation is lacking information on how speed "codes" 0-10 translate into actual turtle speed. Attached script measures the speed of the two primitive operations that form the basis of turtle functionality at various speed settings. The results below show highly irregular pattern. The columns are: the speed code, time to draw a 200 unit line, time to complete a 360 degrees turn and the ratio of the two times. 0: 0.01 0.01 0.83 1: 1.04 2.05 0.51 2: 0.49 1.06 0.46 3: 0.30 0.72 0.42 4: 0.23 0.54 0.44 5: 0.17 0.44 0.38 6: 0.13 0.39 0.35 7: 0.08 0.32 0.26 8: 0.08 0.28 0.30 9: 0.10 0.27 0.37 10: 0.08 0.23 0.36 >From the source code, it appears that the on-screen speed is controlled by the number of animation steps while each step takes approximately time controlled by the "delay" setting that defaults to 10 milliseconds. The number of steps is determined by somewhat peculiar computations. For a rotation by angle of a degrees at speed setting s, the number of steps is n = 2 + int(a / (3 * s)) and for drawing a line of length d, n = 1 + int(d / (3 * 1.1**s * s)) I am not sure what was the reason for these choices, but I think it would be better if numeric speed code had a more direct relationship to the apparent speed. ---------- assignee: docs at python components: Demos and Tools, Documentation messages: 119334 nosy: belopolsky, docs at python, eric.araujo, georg.brandl, gregorlingl, terry.reedy priority: normal severity: normal status: open title: Relationship between turtle speed setting and actual speed is not documented versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 22:35:06 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 21 Oct 2010 20:35:06 +0000 Subject: [issue4117] missing update() in _Screen.setup() of Lib/turtle.py In-Reply-To: <1223938964.4.0.025382695872.issue4117@psf.upfronthosting.co.za> Message-ID: <1287693306.22.0.768511884228.issue4117@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: See also "turtle.py update for 3.1" post on python-dev specifically mentioning this bug as fixed. http://mail.python.org/pipermail/python-dev/2009-May/089383.html ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 22:46:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 21 Oct 2010 20:46:40 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1287687644.14.0.10462557389.issue7061@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Oct 21, 2010 at 3:00 PM, ?ric Araujo wrote: .. > +1. [remove reference to Tk from title] > If we do that, I think we should move turtle documentation out of the "Graphical User Interfaces with Tk" chapter. It would be more appropriate to place it under "Program Frameworks". > BTW, aren?t the fixes relevant for 2.7 too? > They probably are, but for a purely educational module such as turtle, I don't see much value in improving it in 2.x releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 22:55:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 20:55:15 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1287694515.77.0.465580593476.issue7061@psf.upfronthosting.co.za> ?ric Araujo added the comment: Agreed that Program Frameworks is the most adequate section. For the backport, I don?t see that turtle should have different rules than other modules, but I?m not firmly attached to this, so do as you wish. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 22:55:59 2010 From: report at bugs.python.org (Alexander Collins) Date: Thu, 21 Oct 2010 20:55:59 +0000 Subject: [issue10167] ESET Trojan Alert [python-3.1.2.amd64 ON Win7-64] In-Reply-To: <1287677105.85.0.830529518835.issue10167@psf.upfronthosting.co.za> Message-ID: <1287694559.74.0.951725809839.issue10167@psf.upfronthosting.co.za> Alexander Collins added the comment: I'll attempt to contact my anti-virus provider and see what they have to say about that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 23:46:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 21:46:25 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287697585.73.0.310877315159.issue10126@psf.upfronthosting.co.za> ?ric Araujo added the comment: The backport fixed test_build_ext (the method) but not test_get_outputs. Barry and I are on it. ---------- resolution: fixed -> stage: committed/rejected -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 23:51:43 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 21 Oct 2010 21:51:43 +0000 Subject: [issue5639] Support TLS SNI extension in ssl module In-Reply-To: <1238567905.09.0.139467917453.issue5639@psf.upfronthosting.co.za> Message-ID: <1287697903.89.0.570736876924.issue5639@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch for py3k, including http.client and urllib support. ---------- Added file: http://bugs.python.org/file19327/sni.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 21 23:56:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 21:56:49 +0000 Subject: [issue10143] Update "os.pathconf" values In-Reply-To: <1287459031.95.0.424598520823.issue10143@psf.upfronthosting.co.za> Message-ID: <1287698209.19.0.932893176963.issue10143@psf.upfronthosting.co.za> ?ric Araujo added the comment: Can you produce a patch? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 00:02:21 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 22:02:21 +0000 Subject: [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1287698541.41.0.965673804613.issue10149@psf.upfronthosting.co.za> ?ric Araujo added the comment: Would you like to turn your suggestions (+ hinting at buffer_text someplace) into a patch for Doc/library/pyexpat.rst? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 00:05:43 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 22:05:43 +0000 Subject: [issue10076] Regex objects became uncopyable in 2.5 In-Reply-To: <1286916324.24.0.772801528988.issue10076@psf.upfronthosting.co.za> Message-ID: <1287698743.58.0.0195313337613.issue10076@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 00:08:55 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 21 Oct 2010 22:08:55 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287698935.13.0.468279513739.issue10126@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: It's possible the proposed patch for 2.7 should be used in python 3 also. Or as __ap__ suggestions in irc, os.path.dirname(sys.executable) ---------- Added file: http://bugs.python.org/file19328/10126-py27.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 00:13:56 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 21 Oct 2010 22:13:56 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287699236.73.0.217156720778.issue10126@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Fixed in 2.7 by r85784 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 00:27:34 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 22:27:34 +0000 Subject: [issue10060] python.exe crashes or hangs on help() modules when bad modules found In-Reply-To: <1286676227.2.0.62342583611.issue10060@psf.upfronthosting.co.za> Message-ID: <1287700054.3.0.180318227159.issue10060@psf.upfronthosting.co.za> ?ric Araujo added the comment: There are half a dozen duplicate bugs of this one, with various suggestions on each. They should be summed up and linked. I should be able to do it this week-end if no-one does it first. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 00:37:24 2010 From: report at bugs.python.org (David Watson) Date: Thu, 21 Oct 2010 22:37:24 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <4CC006D9.5030305@egenix.com> Message-ID: <20101021223714.GA3834@dbwatson.ukfsn.org> David Watson added the comment: > On other platforms, I guess we'll just have to do some trial > and error to see what works and what not. E.g. on Linux it is > possible to set the hostname to a non-ASCII value, but then > the resolver returns an error, so it's not very practical: > > # hostname l\303\266wis > # hostname > l?wis > # hostname -f > hostname: Resolver Error 0 (no error) > > Using the IDNA version doesn't help either: > > # hostname xn--lwis-5qa > # hostname > xn--lwis-5qa > # hostname -f > hostname: Resolver Error 0 (no error) I think what's happening here is that simply that you're setting the hostname to something which doesn't exist in the relevant name databases - the man page for Linux's hostname(1) says that "The FQDN is the name gethostbyname(2) returns for the host name returned by gethostname(2).". If the computer's usual name is "newton", that may be why it works and the others don't. It works for me if I add "127.0.0.9 l?wis.egenix.com l?wis" to /etc/hosts and then set the hostname to "l?wis" (all UTF-8): hostname -f prints "l?wis.egenix.com", and Python 2's socket.getfqdn() returns the corresponding bytes; non-UTF-8 names work too. (Note that the FQDN must appear before the bare hostname in the /etc/hosts entry, and I used the address 127.0.0.9 simply to avoid a collision with existing entries - by default, Ubuntu assigns the FQDN to 127.0.1.1.) ---------- title: socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names -> socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 00:46:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 22:46:31 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1287701191.98.0.575885024244.issue9807@psf.upfronthosting.co.za> ?ric Araujo added the comment: FTR, the ld bug with --enable-shared is tracked in #10126. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 00:49:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 22:49:07 +0000 Subject: [issue4359] at runtime, distutils uses buildtime files In-Reply-To: <1227138737.98.0.796971482315.issue4359@psf.upfronthosting.co.za> Message-ID: <1287701347.67.0.161623325168.issue4359@psf.upfronthosting.co.za> ?ric Araujo added the comment: ... and #9807 spawned #9878. ---------- superseder: deriving configuration information for different builds with the same prefix -> Avoid parsing pyconfig.h and Makefile by autogenerating extension module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 00:51:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 22:51:05 +0000 Subject: [issue10147] Python Documentation bugs In-Reply-To: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> Message-ID: <1287701465.77.0.122615919807.issue10147@psf.upfronthosting.co.za> ?ric Araujo added the comment: Adjectives require hyphens but nouns do not. ?thread-safety? should be reverted to ?thread safety?. I haven?t searched for a grammar reference, but you can take Wikipedia as an example: ?Thread safety is a computer programming concept applicable in the context of multi-threaded programs. A piece of code is thread-safe if it functions correctly during simultaneous execution by multiple threads.? ---------- nosy: +eric.araujo versions: -3rd party, Python 2.5, Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 00:52:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 22:52:35 +0000 Subject: [issue10169] socket.sendto raises incorrect exception when passed incorrect types In-Reply-To: <1287681728.0.0.651147678785.issue10169@psf.upfronthosting.co.za> Message-ID: <1287701555.87.0.121055671502.issue10169@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +pitrou versions: +Python 3.1 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 00:55:04 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 22:55:04 +0000 Subject: [issue6878] changed return type from tkinter.Canvas.coords In-Reply-To: <1252603508.57.0.591042976978.issue6878@psf.upfronthosting.co.za> Message-ID: <1287701704.46.0.731598742663.issue6878@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good. Would look better with tests, and even slightly better with consistent indentation :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 01:13:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 23:13:06 +0000 Subject: [issue9877] Expose sysconfig._get_makefile_filename() in public API In-Reply-To: <1284659465.24.0.827166007618.issue9877@psf.upfronthosting.co.za> Message-ID: <1287702786.99.0.614907326517.issue9877@psf.upfronthosting.co.za> ?ric Araujo added the comment: Committed in distutils2/_backport/sysconfig.py as [4ef3e9e41c10]. I?ll push this week-end. ---------- components: +Distutils2 status: pending -> closed versions: +3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 01:19:06 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 21 Oct 2010 23:19:06 +0000 Subject: [issue10147] Python Documentation bugs In-Reply-To: <1287701465.77.0.122615919807.issue10147@psf.upfronthosting.co.za> Message-ID: <4CC0CA66.6050104@egenix.com> Marc-Andre Lemburg added the comment: ?ric Araujo wrote: > > ?ric Araujo added the comment: > > Adjectives require hyphens but nouns do not. ?thread-safety? should be reverted to ?thread safety?. I haven?t searched for a grammar reference, but you can take Wikipedia as an example: ?Thread safety is a computer programming concept applicable in the context of multi-threaded programs. A piece of code is thread-safe if it functions correctly during simultaneous execution by multiple threads.? Are you sure ? http://en.wikipedia.org/wiki/English_compound#Types_of_compound_nouns This appears to be more a question of personal style than a grammar rule. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 01:43:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 23:43:10 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1287704590.28.0.761460512593.issue6011@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think it is: $ pwd /tmp/?ric $ LC_ALL=C ./python Fatal Python error: Py_Initialize: Unable to get the locale encoding SystemError: NULL result without error in PyObject_Call Abandon ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 01:44:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 23:44:15 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287704655.34.0.160146436304.issue10126@psf.upfronthosting.co.za> ?ric Araujo added the comment: Applied on py3k in r85784. I had no bug with 3.1, so I left things alone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 01:45:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 23:45:11 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287704711.39.0.57049922011.issue10126@psf.upfronthosting.co.za> ?ric Araujo added the comment: That was actually r85786. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 01:45:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 21 Oct 2010 23:45:35 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287704735.51.0.0655105264423.issue10126@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 02:03:32 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 22 Oct 2010 00:03:32 +0000 Subject: [issue10156] Memory leak (r70459) In-Reply-To: <1287595627.82.0.548953621137.issue10156@psf.upfronthosting.co.za> Message-ID: <1287705812.96.0.350985343924.issue10156@psf.upfronthosting.co.za> Stefan Krah added the comment: Re disabling interning in PyDict_SetItemString: A comment in unicodeobject.c says that globals should not be used before calling _PyUnicode_Init. But in Py_InitializeEx (pythonrun.c) _PyUnicode_Init is called after _Py_ReadyTypes, _PyFrame_Init, _PyLong_Init, PyByteArray_Init and _PyFloat_Init. In fact, when I move _PyUnicode_Init up, the error concerning _PyFloat_Init disappears. Problem is, PyType_Ready also uses PyDict_SetItemString, but I presume that _Py_ReadyTypes has to be called before anything else. In that case it would be unavoidable that PyDict_SetItemString is used before _PyUnicode_Init, and it might be a good idea to disable interning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 02:45:27 2010 From: report at bugs.python.org (Maciek J) Date: Fri, 22 Oct 2010 00:45:27 +0000 Subject: [issue10149] Data truncation in expat parser In-Reply-To: <1287539001.05.0.466094845115.issue10149@psf.upfronthosting.co.za> Message-ID: <1287708327.32.0.826524998411.issue10149@psf.upfronthosting.co.za> Maciek J added the comment: I'm not familiar with the rst format, but I hope this works. ---------- keywords: +patch Added file: http://bugs.python.org/file19329/pyexpat.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 03:03:10 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 22 Oct 2010 01:03:10 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1287709390.24.0.712161685757.issue9167@psf.upfronthosting.co.za> R. David Murray added the comment: rdmurray at buddy:~/python/py3k>uname -a Darwin buddy.home.bitdance.com 10.4.0 Darwin Kernel Version 10.4.0: Fri Apr 23 18:28:53 PDT 2010; root:xnu-1504.7.4~1/RELEASE_I386 i386 rdmurray at buddy:~/python/release31-maint>LC_ALL="C" ./python.exe Python 3.1.2 (release31-maint:85783, Oct 21 2010, 20:31:06) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os, sys >>> snowman = '\u2603' >>> os.system(sys.executable + " -c 'import sys; [print(a.encode(\"utf8\")) for a in sys.argv]' foo bar " + snowman) b'-c' b'foo' b'bar' b'\xc3\xa2\xc2\x98\xc2\x83' 0 rdmurray at buddy:~/python/py3k>LC_ALL="C" ./python.exe Python 3.2a3+ (py3k:85768, Oct 21 2010, 12:31:12) [GCC 4.2.1 (Apple Inc. build 5659)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import os, sys >>> snowman = '\u2603' >>> os.system(sys.executable + " -c 'import sys; [print(a.encode(\"utf8\")) for a in sys.argv]' foo bar " + snowman) b'-c' b'foo' b'bar' b'\xe2\x98\x83' 0 ---------- nosy: +r.david.murray resolution: -> fixed stage: unit test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 04:34:26 2010 From: report at bugs.python.org (Rafe Kettler) Date: Fri, 22 Oct 2010 02:34:26 +0000 Subject: [issue10171] Ugly buttons in some Tkinter objects in Windows In-Reply-To: <1287714866.92.0.753573590678.issue10171@psf.upfronthosting.co.za> Message-ID: <1287714866.92.0.753573590678.issue10171@psf.upfronthosting.co.za> New submission from Rafe Kettler : Some of the dialogs in Tkinter don't correctly show buttons in newer versions of Windows (XP, Vista, 7). Instead, they use square Win2000-and-before-type buttons. Here's some Python 2.7 code that illustrates this: import tkMessageBox tkMessageBox.showinfo() import tkColorChooser tkColorChooser.askcolor() I attached a screenshot as well, illustrating what is meant by "ugly buttons." I'm not sure if this is on the Tk or Tkinter side, but since the rest of Tkinter uses new-style buttons, these few objects should too (as far as I'm aware, these are the only objects that exhibit this behavior. ---------- components: Tkinter files: uglybuttons.png messages: 119359 nosy: rafe.kettler priority: normal severity: normal status: open title: Ugly buttons in some Tkinter objects in Windows versions: Python 2.7, Python 3.1 Added file: http://bugs.python.org/file19330/uglybuttons.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 04:38:43 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 22 Oct 2010 02:38:43 +0000 Subject: [issue10164] Add an assertBytesMultiLineEqual to unittest and use it for bytes assertEqual In-Reply-To: <1287665297.21.0.48545376383.issue10164@psf.upfronthosting.co.za> Message-ID: <1287715123.38.0.87162557324.issue10164@psf.upfronthosting.co.za> R. David Murray added the comment: After talking with Michael on #python-dev, I've revised the patch to make it a real assertBytesEqual method rather than a pretend-the-bytes-are-strings method. This version allows the byte strings to be split on an arbitrary byte string, which makes it more useful for getting diffs of structured binary data if that data has a convenient break point. And the default is no splitting, which is what assertEqual uses when comparing bytes. One of the tests is failing, and it's late and I can't figure out where the extra space is coming from. Maybe someone else will check it out and spot the problem before I get back to it. ---------- Added file: http://bugs.python.org/file19331/assertBytesEqual.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 05:04:22 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Oct 2010 03:04:22 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287000989.52.0.725529628819.issue10093@psf.upfronthosting.co.za> Message-ID: <1287716662.44.0.978166224301.issue10093@psf.upfronthosting.co.za> Brett Cannon added the comment: After thinking about what warning to go with, I take back my python-dev suggestion of ResourceWarning and switch to DebugWarning. It is in fact harder to add in DebugWarning as a superclass to ResourceWarning than the other way around, especially once people start doing custom filters and decide that DebugWarning should not be filtered as a whole but ResourceWarning should (or some such crazy thing). ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 08:11:07 2010 From: report at bugs.python.org (Vladimir Iofik) Date: Fri, 22 Oct 2010 06:11:07 +0000 Subject: [issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry In-Reply-To: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> Message-ID: <1287727867.68.0.136449898282.issue9291@psf.upfronthosting.co.za> Vladimir Iofik added the comment: Here is a better patch. ---------- nosy: +vj Added file: http://bugs.python.org/file19332/9291a.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 08:28:13 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 22 Oct 2010 06:28:13 +0000 Subject: [issue10166] maximum recursion depth exceeded in lib\pstats.py In-Reply-To: <1287676214.72.0.937902766344.issue10166@psf.upfronthosting.co.za> Message-ID: <1287728893.34.0.550252326183.issue10166@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r85787. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 08:43:12 2010 From: report at bugs.python.org (Vladimir Iofik) Date: Fri, 22 Oct 2010 06:43:12 +0000 Subject: [issue9291] mimetypes initialization fails on Windows because of non-Latin characters in registry In-Reply-To: <1279454095.41.0.733053669611.issue9291@psf.upfronthosting.co.za> Message-ID: <1287729792.57.0.434221828315.issue9291@psf.upfronthosting.co.za> Vladimir Iofik added the comment: UnicodeDecodeException is thrown because 'ctype' is already a string, so it is first implicitly decoded by default encoder (which is 'ascii') and then reencoded back. I see no reason in all these actions, so I simply removed them. I think Antoine Pitrou (who is the author of these lines) can shed some light on this, but I guess it's just a copy-paste of the code below. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 10:01:52 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Fri, 22 Oct 2010 08:01:52 +0000 Subject: [issue10147] Python Documentation bugs In-Reply-To: <4CC0CA66.6050104@egenix.com> Message-ID: Bo??tjan Mejak added the comment: All the words that Georg Brandl fixed for this issue are okay as they stand. Please leave them as they are written. Thank you. On Fri, Oct 22, 2010 at 1:19 AM, Marc-Andre Lemburg wrote: > > Marc-Andre Lemburg added the comment: > > ??ric Araujo wrote: > > > > ??ric Araujo added the comment: > > > > Adjectives require hyphens but nouns do not. ???thread-safety??? should be > reverted to ???thread safety???. I haven???t searched for a grammar reference, > but you can take Wikipedia as an example: ???Thread safety is a computer > programming concept applicable in the context of multi-threaded programs. A > piece of code is thread-safe if it functions correctly during simultaneous > execution by multiple threads.??? > > Are you sure ? > > http://en.wikipedia.org/wiki/English_compound#Types_of_compound_nouns > > This appears to be more a question of personal style than a > grammar rule. > > ---------- > nosy: +lemburg > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19333/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- All the words that Georg Brandl fixed for this issue are okay as they stand. Please leave them as they are written. Thank you.

On Fri, Oct 22, 2010 at 1:19 AM, Marc-Andre Lemburg <report at bugs.python.org> wrote:

Marc-Andre Lemburg <mal at egenix.com> added the comment:

??ric Araujo wrote:
>
> ??ric Araujo <merwok at netwok.org> added the comment:
>
> Adjectives require hyphens but nouns do not. ?????thread-safety??? should be reverted to ???thread safety???. ??I haven???t searched for a grammar reference, but you can take Wikipedia as an example: ???Thread safety is a computer programming concept applicable in the context of multi-threaded programs. A piece of code is thread-safe if it functions correctly during simultaneous execution by multiple threads.???

Are you sure ?

http://en.wikipedia.org/wiki/English_compound#Types_of_compound_nouns

This appears to be more a question of personal style than a
grammar rule.

----------
nosy: +lemburg

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

From report at bugs.python.org Fri Oct 22 10:35:28 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 08:35:28 +0000 Subject: [issue3902] distutils does not create __init__.py for packages containing extension modules In-Reply-To: <1221761506.23.0.180859211428.issue3902@psf.upfronthosting.co.za> Message-ID: <1287736528.4.0.662038521665.issue3902@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. To the best of my knowledge, distutils never generates Python files, and the docs for ext_modules or ext_package don?t imply __init__.py will be generated. IOW, for ?pkg.foo?, you?re supposed to have pkg/__init__.py and pkg/foo.c. I think this bug is invalid, or is a request for a small doc improvement. Do you agree? ---------- assignee: tarek -> eric.araujo nosy: +eric.araujo -terry.reedy title: distutils does not correctly create packages for compiled extensions -> distutils does not create __init__.py for packages containing extension modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 10:35:33 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 08:35:33 +0000 Subject: [issue3902] distutils does not create __init__.py for packages containing extension modules In-Reply-To: <1221761506.23.0.180859211428.issue3902@psf.upfronthosting.co.za> Message-ID: <1287736533.24.0.591725087545.issue3902@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- Removed message: http://bugs.python.org/msg113049 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 10:45:41 2010 From: report at bugs.python.org (Christoph Gohlke) Date: Fri, 22 Oct 2010 08:45:41 +0000 Subject: [issue7639] bdist_msi fails on files with long names In-Reply-To: <1262718207.72.0.84290104112.issue7639@psf.upfronthosting.co.za> Message-ID: <1287737141.55.0.204823590229.issue7639@psf.upfronthosting.co.za> Christoph Gohlke added the comment: Creating bdist_msi installers with files such as 'aixc++' (containing '+'), '.buildinfo' (starting with '.'), and 'py.~1.5.~' (containing '~') currently also fails, even with the proposed patch. The revised patch should fix these cases and further improves the make_short function to generate short names compatible with NTFS. ---------- Added file: http://bugs.python.org/file19334/msilib.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 10:51:54 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Oct 2010 08:51:54 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1287737514.93.0.225020148311.issue6011@psf.upfronthosting.co.za> STINNER Victor added the comment: > $ LC_ALL=C ./python > Fatal Python error: Py_Initialize: Unable to get the locale encoding > SystemError: NULL result without error in PyObject_Call > Abandon What is your Python version? I fixed Python 3.2, but I don't plan to fix Python 3.1 for this problem (Python doesn't work if it is installed in a non-ascii directory). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 10:54:20 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 08:54:20 +0000 Subject: [issue7726] Remove required metadata warnings for sdist In-Reply-To: <1263748397.28.0.736883943174.issue7726@psf.upfronthosting.co.za> Message-ID: <1287737660.42.0.316049878057.issue7726@psf.upfronthosting.co.za> ?ric Araujo added the comment: I don?t think warnings should be removed, at least not by default. They?re warnings, not errors, which is IMO a nice compromise between accepting anything and requiring that rules be followed. We could add an option like --no-warnings in distutils2, but I?m worried people could just disable it globally instead of fixing the actual problems. I?m inclined to reject this report. Tarek, opinion? Since the warnings go to stderr, you can suppress them with shell redirection, although I wouldn?t advise that since you could miss unrelated warnings or errors. Does that cover your need? *musing* Maybe we could revamp the required fields. Name and version are required by various distutils[2] and pkgutil APIs, so not setting them will screw up queries or uninstallation for example. We could make distutils2 fail when they?re not present. But then, why not fail if a distribution to be installed has the same name+version that an already present distribution? What I?m saying is that it?s better to do no checks than incomplete checks, and this is the realm of a distribution manager, not the underlying library, but then again, distutils2 provides a simple distribution manager too, so I?m not sure this should be in or out of it, and at which level (lib/command/manager). (Removing Terry from nosy at his request in private email.) ---------- nosy: +eric.araujo -terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 10:54:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 08:54:25 +0000 Subject: [issue7726] Remove required metadata warnings for sdist In-Reply-To: <1263748397.28.0.736883943174.issue7726@psf.upfronthosting.co.za> Message-ID: <1287737665.99.0.919342756028.issue7726@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- Removed message: http://bugs.python.org/msg113019 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 10:56:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 08:56:30 +0000 Subject: [issue1274324] 'setup.py install' fail on linux from read-only storage Message-ID: <1287737790.05.0.218557210596.issue1274324@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> eric.araujo nosy: -terry.reedy versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 10:58:24 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 22 Oct 2010 08:58:24 +0000 Subject: [issue9167] argv double encoding on OSX In-Reply-To: <1278346074.17.0.914375109611.issue9167@psf.upfronthosting.co.za> Message-ID: <1287737904.5.0.87055353585.issue9167@psf.upfronthosting.co.za> STINNER Victor added the comment: FYI, you should use ascii() instead of a.encode(\"utf8\") to dump arguments. It's easier to check '\u2603' than b'\xe2\x98\x83' for me :-) So the bug is fixed in Python 3.2, great! I was thinking that we need a test for that, but then I remembered that I already wrote such test :-) My test checks 3 unicode characters: \xe9, \u20ac, \U0010ffff; but also invalid byte sequences: text = ( b'\xff' # invalid byte b'\xc3\xa9' # valid utf-8 character b'\xc3\xff' # invalid byte sequence b'\xed\xa0\x80' # lone surrogate character (invalid) ) And it should be enough :-) See test_osx_utf8() of test_cmd_line to see the whole test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 11:02:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 09:02:09 +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: <1287738129.62.0.779597419702.issue4032@psf.upfronthosting.co.za> ?ric Araujo added the comment: Can you produce a patch? (Removing Terry from nosy at his request) ---------- components: +Distutils2 nosy: +eric.araujo -terry.reedy versions: +3rd party, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 11:02:18 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 09:02:18 +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: <1287738138.57.0.934542132926.issue4032@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- Removed message: http://bugs.python.org/msg113008 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 11:06:43 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 09:06:43 +0000 Subject: [issue5926] bdist_msi - add support for minimum Python version for pure Python packages In-Reply-To: <1241465384.5.0.639061880588.issue5926@psf.upfronthosting.co.za> Message-ID: <1287738403.89.0.184737891516.issue5926@psf.upfronthosting.co.za> ?ric Araujo added the comment: distutils is frozen, new features land into distutils2 (http://bitbucket.org/tarek/distutils2/). Do you want to work on a patch? ---------- components: +Distutils2 -Distutils nosy: +eric.araujo stage: -> needs patch versions: +3rd party -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 11:10:28 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 09:10:28 +0000 Subject: [issue5936] Add MSI suport for uninstalling individual versions In-Reply-To: <1241490601.47.0.970158126843.issue5936@psf.upfronthosting.co.za> Message-ID: <1287738628.42.0.489200817055.issue5936@psf.upfronthosting.co.za> ?ric Araujo added the comment: ?For example, if you installed a new version of Python, this would allow you to add your already installed pure Python modules to this Python installation by just going to Add/Remove Programs and selecting the feature for the new version.? Would you have to do this for every installed distribution? Seems cumbersome. distutils being feature-frozen, I?m reassigning to distutils2. I?m willing to review a patch and test MSIs, and may even try to implement it myself to learn about MSI, but not before next year. ---------- assignee: -> tarek components: +Distutils2 -Distutils nosy: +loewis -terry.reedy versions: +3rd party -Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 11:19:02 2010 From: report at bugs.python.org (Christoph Gohlke) Date: Fri, 22 Oct 2010 09:19:02 +0000 Subject: [issue1128] msilib.Directory.make_short only handles file names with a single dot in them In-Reply-To: <1189179520.92.0.794860414513.issue1128@psf.upfronthosting.co.za> Message-ID: <1287739142.85.0.660119827482.issue1128@psf.upfronthosting.co.za> Christoph Gohlke added the comment: The revised patch for issue7639 now generates better short names for file names containing spaces, '+', and leading '.'. http://bugs.python.org/file19334/msilib.diff Test cases that could be added to MsilibTest.test_makeshort(): TEST : test TES~1.T : t.e.s.t TEST~1 : .test TESTTEST : testtest TESTTE~1 : .testtest TESTTE~2 : test test TESTTE~3 : test test test AFILE~1.DOC : A file.doc THISIS~1.TXT : This is a really long filename.123.456.789.txt THISIS~1.789 : This is a really long filename.123.456.7890 TEST__~1 : test++ TE____~1 : te++++++ TEST~1.__ : test.++ TEST.123 : test.123 TEST~1.123 : test.1234 TEXT~1.123 : text.1234 TESTTE~1.__ : testtest.++ FOO.TXT : foo.txt FOO2~1.TXT : foo.2.txt SOMELO~1.TXT : someLongName.txt SOMELO~2.TXT : someLongerName.txt PY~15~1.~ : py.~1.5.~ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 11:43:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 09:43:10 +0000 Subject: [issue1371826] distutils is silent about multiple -I/-L/-R Message-ID: <1287740590.69.0.45232120503.issue1371826@psf.upfronthosting.co.za> ?ric Araujo added the comment: Skip, do you agree with my proposal (no behavior change in d1, better behavior in d2) or do you think it could be confusing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 11:58:56 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Oct 2010 09:58:56 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287741536.81.0.548650073736.issue10126@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You broke many 2.7, 3.1 and 3.x buildbots. ---------- priority: high -> critical resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 11:59:13 2010 From: report at bugs.python.org (Steven Bethard) Date: Fri, 22 Oct 2010 09:59:13 +0000 Subject: [issue5936] Add MSI suport for uninstalling individual versions In-Reply-To: <1241490601.47.0.970158126843.issue5936@psf.upfronthosting.co.za> Message-ID: <1287741553.59.0.163820601817.issue5936@psf.upfronthosting.co.za> Steven Bethard added the comment: > Would you have to do this for every installed distribution? > Seems cumbersome. Well, the feature not being implemented yet, it's hard to tell what it would do. ;-) But I think the simplest approach would actually yield a dialog where you simply check off the versions of Python that you want the module installed to. (In MSI terminology, you'd be adding or removing "features".) So you *would* have to do this for every module you installed, but *not* for every (module, version) combination. Now let's just hope that someone implements it in distutils2. ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 12:51:55 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 22 Oct 2010 10:51:55 +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: <1287744715.55.0.246255086838.issue4032@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I used to create the patch http://bugs.python.org/file11597/experimental_distutils.patch in #1706863, but cygwin guys wanted this code implemented in CCygwinCompiler class (See #2445). I think #2445 should be resolved before. ---------- dependencies: +Use The CygwinCCompiler Under Cygwin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 12:57:16 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 22 Oct 2010 10:57:16 +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: <1287745036.4.0.750375186086.issue4032@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Can you port that patch? I don't have cygwin installed now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 13:12:37 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 22 Oct 2010 11:12:37 +0000 Subject: [issue10027] os.lstat/os.stat don't set st_nlink on Windows In-Reply-To: <1286289327.29.0.159315245099.issue10027@psf.upfronthosting.co.za> Message-ID: <1287745957.7.0.257164546961.issue10027@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I created test branch "branches/py3k-stat-on-windows" and committed the new patch in r85789. This achieves msg119108. I tested this on Windows7 buildbot where symlink support exists, it seems working correct. http://www.python.org/dev/buildbot/all/builders/x86%20Windows7%203.x/builds/1840 ---------- Added file: http://bugs.python.org/file19335/py3k_posixpath_traverse_via_DeviceIoControl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 14:03:55 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Fri, 22 Oct 2010 12:03:55 +0000 Subject: [issue9289] test_long_key(test_winreg) fails on win2k + py2.x In-Reply-To: <1279414134.03.0.595847788627.issue9289@psf.upfronthosting.co.za> Message-ID: <1287749035.24.0.5726030466.issue9289@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I committed in r85790(release27-maint). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed title: Skip test_long_key(test_winreg) on win2k + py2.x -> test_long_key(test_winreg) fails on win2k + py2.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 14:14:06 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 22 Oct 2010 12:14:06 +0000 Subject: [issue10164] Add an assertBytesEqual to unittest and use it for bytes assertEqual In-Reply-To: <1287665297.21.0.48545376383.issue10164@psf.upfronthosting.co.za> Message-ID: <1287749646.67.0.747732871566.issue10164@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: Add an assertBytesMultiLineEqual to unittest and use it for bytes assertEqual -> Add an assertBytesEqual to unittest and use it for bytes assertEqual _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 14:28:51 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 22 Oct 2010 12:28:51 +0000 Subject: [issue10171] Ugly buttons in some Tkinter objects in Windows In-Reply-To: <1287714866.92.0.753573590678.issue10171@psf.upfronthosting.co.za> Message-ID: <1287750531.94.0.366204149945.issue10171@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 15:38:05 2010 From: report at bugs.python.org (Winston C. Yang) Date: Fri, 22 Oct 2010 13:38:05 +0000 Subject: [issue10172] code block has no syntax coloring In-Reply-To: <1287754685.88.0.964365557653.issue10172@psf.upfronthosting.co.za> Message-ID: <1287754685.88.0.964365557653.issue10172@psf.upfronthosting.co.za> New submission from Winston C. Yang : The following code block in http://docs.python.org/tutorial/errors.html has no syntax coloring: import sys try: f = open('myfile.txt') s = f.readline() i = int(s.strip()) except IOError as (errno, strerror): print "I/O error({0}): {1}".format(errno, strerror) except ValueError: print "Could not convert data to an integer." except: print "Unexpected error:", sys.exc_info()[0] raise ---------- assignee: docs at python components: Documentation messages: 119382 nosy: docs at python, wcyang priority: normal severity: normal status: open title: code block has no syntax coloring type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 16:23:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 14:23:13 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1287757393.81.0.0690040091627.issue6011@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m trying to build py3k on posix in a subdir called sep-build-dir-?ric, with locale set to C. I get these errors: gcc [...] -DSVNVERSION="\"`LC_ALL=C svnversion ..`\"" -o Modules/getbuildinfo.o ../Modules/getbuildinfo.c svn: Error converting entry in directory '..' to UTF-8 svn: Can't convert string from native encoding to 'UTF-8': svn: sep-build-dir-?\195?\169ric [...] gcc -pthread -Xlinker -export-dynamic -o python Modules/python.o libpython3.2m.a -lpthread -ldl -lutil -lm Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Fatal Python error: Py_Initialize: Unable to get the locale encoding SystemError: NULL result without error in PyObject_Call Aborted make: *** [sharedmods] Error 134 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 16:26:27 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 14:26:27 +0000 Subject: [issue9912] Fail when vsvarsall.bat produces stderr In-Reply-To: <1285082676.18.0.058541871992.issue9912@psf.upfronthosting.co.za> Message-ID: <1287757587.19.0.148465137676.issue9912@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?d replace ?created stderr? with ?printed on stderr?, but otherwise msvc9_log.diff looks good. distutils is feature-frozen, but I think any changes that help debugging are good. Tarek, do you agree? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 16:27:09 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 14:27:09 +0000 Subject: [issue9912] Fail when vsvarsall.bat produces stderr In-Reply-To: <1285082676.18.0.058541871992.issue9912@psf.upfronthosting.co.za> Message-ID: <1287757629.68.0.941704023988.issue9912@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Distutils2 stage: needs patch -> patch review versions: +3rd party -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 16:31:45 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 22 Oct 2010 14:31:45 +0000 Subject: [issue9912] Fail when vsvarsall.bat produces stderr In-Reply-To: <1287757587.19.0.148465137676.issue9912@psf.upfronthosting.co.za> Message-ID: <4CC1A04E.6060107@egenix.com> Marc-Andre Lemburg added the comment: ?ric Araujo wrote: > > ?ric Araujo added the comment: > > I?d replace ?created stderr? with ?printed on stderr?, but otherwise msvc9_log.diff looks good. > > distutils is feature-frozen, but I think any changes that help debugging are good. Tarek, do you agree? I hear you saying that a lot. Could you provide a reference to where this was decided ? ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 16:39:12 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 22 Oct 2010 14:39:12 +0000 Subject: [issue10156] Initialization of globals in unicodeobject.c In-Reply-To: <1287595627.82.0.548953621137.issue10156@psf.upfronthosting.co.za> Message-ID: <1287758352.38.0.41673734899.issue10156@psf.upfronthosting.co.za> Stefan Krah added the comment: I've verified the leak manually. The cause is that global variables in unicodeobject.c, e.g. free_list, are used before _PyUnicode_Init() is called. Later on _PyUnicode_Init() sets these variables to NULL, losing the allocated memory. Here is an example of the earliest use of free_list during _Py_ReadyTypes (), well before _PyUnicode_Init(): Breakpoint 1, unicode_dealloc (unicode=0x1b044c0) at Objects/unicodeobject.c:392 392 switch (PyUnicode_CHECK_INTERNED(unicode)) { (gdb) bt #0 unicode_dealloc (unicode=0x1b044c0) at Objects/unicodeobject.c:392 #1 0x000000000044fc69 in PyUnicode_InternInPlace (p=0x7fff303852b8) at Objects/unicodeobject.c:9991 #2 0x000000000044fed3 in PyUnicode_InternFromString (cp=0x568861 "__len__") at Objects/unicodeobject.c:10025 #3 0x00000000004344d0 in init_slotdefs () at Objects/typeobject.c:5751 #4 0x0000000000434840 in add_operators (type=0x7be260) at Objects/typeobject.c:5905 #5 0x000000000042eec8 in PyType_Ready (type=0x7be260) at Objects/typeobject.c:3810 #6 0x000000000042edfc in PyType_Ready (type=0x7bde60) at Objects/typeobject.c:3774 #7 0x000000000041aa5f in _Py_ReadyTypes () at Objects/object.c:1514 #8 0x00000000004992ff in Py_InitializeEx (install_sigs=1) at Python/pythonrun.c:232 #9 0x000000000049957f in Py_Initialize () at Python/pythonrun.c:321 #10 0x00000000004b289f in Py_Main (argc=1, argv=0x1afa010) at Modules/main.c:590 #11 0x0000000000417dcc in main (argc=1, argv=0x7fff30385758) at ./Modules/python.c:59 (gdb) n 411 if (PyUnicode_CheckExact(unicode) && (gdb) 414 if (unicode->length >= KEEPALIVE_SIZE_LIMIT) { (gdb) 419 if (unicode->defenc) { (gdb) 423 *(PyUnicodeObject **)unicode = free_list; (gdb) n 424 free_list = unicode; (gdb) n 425 numfree++; (gdb) n 411 if (PyUnicode_CheckExact(unicode) && A possible fix could be to initialize the globals right at the start in main.c. Note that there are still several Unicode API functions in main.c before PyType_Ready has been called on the Unicode type. With the patch, Valgrind does not show the leak any longer. ---------- keywords: +patch priority: normal -> high stage: -> patch review title: Memory leak (r70459) -> Initialization of globals in unicodeobject.c Added file: http://bugs.python.org/file19336/unicode_init_globals.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 16:40:03 2010 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 22 Oct 2010 14:40:03 +0000 Subject: [issue1371826] distutils is silent about multiple -I/-L/-R Message-ID: <1287758403.95.0.759813653943.issue1371826@psf.upfronthosting.co.za> Skip Montanaro added the comment: I would prefer the gcc-like behavior. I realize there are constraints on making changes in distutils1, so what you propose sounds fine to me. ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 16:40:21 2010 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 22 Oct 2010 14:40:21 +0000 Subject: [issue1371826] distutils is silent about multiple -I/-L/-R Message-ID: <1287758421.78.0.950071149612.issue1371826@psf.upfronthosting.co.za> Changes by Skip Montanaro : ---------- nosy: -skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 16:55:38 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 14:55:38 +0000 Subject: [issue5342] distutils removing old files, deleting unneeded old files from installed location. In-Reply-To: <1235256230.9.0.667035234316.issue5342@psf.upfronthosting.co.za> Message-ID: <1287759338.84.0.591750314861.issue5342@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Distutils2 -Distutils nosy: +eric.araujo versions: +3rd party -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 16:55:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 14:55:51 +0000 Subject: [issue4673] Distutils should provide an uninstall command In-Reply-To: <1229380134.57.0.765808366709.issue4673@psf.upfronthosting.co.za> Message-ID: <1287759351.58.0.391133967005.issue4673@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- dependencies: +distutils removing old files, deleting unneeded old files from installed location. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 16:58:27 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 14:58:27 +0000 Subject: [issue1692592] Stripping debugging symbols from compiled C extensions Message-ID: <1287759507.55.0.42626680925.issue1692592@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- assignee: -> tarek components: +Distutils2 -Distutils nosy: +eric.araujo, tarek stage: unit test needed -> patch review versions: +3rd party -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 17:12:24 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 15:12:24 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1287760344.16.0.826469196202.issue6011@psf.upfronthosting.co.za> ?ric Araujo added the comment: Building in the same directory works. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 17:14:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 15:14:12 +0000 Subject: [issue4459] bdist_rpm should enable --fix-python by default In-Reply-To: <1227969751.28.0.990351219395.issue4459@psf.upfronthosting.co.za> Message-ID: <1287760452.53.0.580785789147.issue4459@psf.upfronthosting.co.za> ?ric Araujo added the comment: FYI, this is fixed in the new bdist_rpm2 command: https://bitbucket.org/tarek/pypi2rpm/changeset/ce6626df0225 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 17:16:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 15:16:01 +0000 Subject: [issue808129] Change --changelog to accept files Message-ID: <1287760561.93.0.194033216033.issue808129@psf.upfronthosting.co.za> ?ric Araujo added the comment: The feature freeze does apply. Tarek has started a standalone project to build RPMs; I suggest you transfer this bug to https://bitbucket.org/tarek/pypi2rpm/ Happy hacking! ---------- resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 17:31:21 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 22 Oct 2010 15:31:21 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287761481.07.0.480954751882.issue10126@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: eric.araujo -> barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 17:48:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 15:48:08 +0000 Subject: [issue1649329] Support for non-filesystem-based catalogs in gettext Message-ID: <1287762488.08.0.7420548647.issue1649329@psf.upfronthosting.co.za> ?ric Araujo added the comment: The specific problem of gettext+eggs seems to be solved by this project: https://pypi.python.org/pypi/EggTranslations/ Since the egg format is not retained in distutils2, I don?t think any support for it should be added in the stdlib. FWIW, I like the use of file-like objects to build Translation instances. It?s easier to specify than a VFS and very versatile. ---------- components: -Distutils stage: unit test needed -> patch review title: gettext.py incompatible with eggs -> Support for non-filesystem-based catalogs in gettext versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 18:43:19 2010 From: report at bugs.python.org (Rafe Kettler) Date: Fri, 22 Oct 2010 16:43:19 +0000 Subject: [issue10171] Ugly buttons in some Tkinter objects in Windows In-Reply-To: <1287714866.92.0.753573590678.issue10171@psf.upfronthosting.co.za> Message-ID: <1287765799.88.0.487798701722.issue10171@psf.upfronthosting.co.za> Changes by Rafe Kettler : ---------- components: +Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 19:21:11 2010 From: report at bugs.python.org (S S) Date: Fri, 22 Oct 2010 17:21:11 +0000 Subject: [issue10106] missing packages In-Reply-To: <1287074140.25.0.416505470052.issue10106@psf.upfronthosting.co.za> Message-ID: <1287768071.11.0.339224276365.issue10106@psf.upfronthosting.co.za> S S added the comment: finally was able to figure it out. i had another product installed, which uses python 2.4 that product during installation put PYTHONHOME into system variable environment. as soon as i either change that PYTHONHOME to my latest python path c:\python26 everything starts working. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 19:36:11 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 22 Oct 2010 17:36:11 +0000 Subject: [issue10126] test_distutils failure with --enable-shared In-Reply-To: <1287260751.98.0.49456572991.issue10126@psf.upfronthosting.co.za> Message-ID: <1287768971.94.0.613089670743.issue10126@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I believe all known failures in 2.7, 3.1, and 3.2 both with and without --enable-shared are now fixed. Let's see what the buildbots say. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 19:37:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 17:37:08 +0000 Subject: [issue10090] python -m locale fails on OSX In-Reply-To: <1286998392.83.0.0924618610068.issue10090@psf.upfronthosting.co.za> Message-ID: <1287769028.89.0.216931385048.issue10090@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- dependencies: +locale.normalize strips "-" from UTF-8, which fails on Mac _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 19:40:24 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 22 Oct 2010 17:40:24 +0000 Subject: [issue10155] Add fixups for encoding problems to wsgiref In-Reply-To: <1287591822.31.0.50492787235.issue10155@psf.upfronthosting.co.za> Message-ID: <1287769224.85.0.917483581767.issue10155@psf.upfronthosting.co.za> ?ric Araujo added the comment: Your patch adds a new handler, which is arguably a new feature that has to be rejected in a bugfix branch. ---------- nosy: +eric.araujo versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 20:04:52 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 22 Oct 2010 18:04:52 +0000 Subject: [issue10156] Initialization of globals in unicodeobject.c In-Reply-To: <1287595627.82.0.548953621137.issue10156@psf.upfronthosting.co.za> Message-ID: <1287770692.78.0.43937561904.issue10156@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: About the patch: why should _PyUnicode_Init() try to call _PyUnicode_InitGlobals() again? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 20:20:06 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Oct 2010 18:20:06 +0000 Subject: [issue5639] Support TLS SNI extension in ssl module In-Reply-To: <1238567905.09.0.139467917453.issue5639@psf.upfronthosting.co.za> Message-ID: <1287771606.51.0.735813735282.issue5639@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed with docs in r85793. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 20:45:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Oct 2010 18:45:47 +0000 Subject: [issue10115] Support accept4() for atomic setting of flags at socket creation In-Reply-To: <1287149004.76.0.643231504051.issue10115@psf.upfronthosting.co.za> Message-ID: <1287773147.37.0.706053775928.issue10115@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've removed the accept4() call in the meantime (in r85796), so that this issue can be re-classified as a feature request. ---------- priority: critical -> normal title: accept4 can fail with errno 90 -> Support accept4() for atomic setting of flags at socket creation type: behavior -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 21:02:09 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 22 Oct 2010 19:02:09 +0000 Subject: [issue5936] Add MSI suport for uninstalling individual versions In-Reply-To: <1241490601.47.0.970158126843.issue5936@psf.upfronthosting.co.za> Message-ID: <1287774129.03.0.737073009047.issue5936@psf.upfronthosting.co.za> Martin v. L?wis added the comment: It possible to script MSI, so that one could write a tool that manages all MSI files that have the multi-version feature, and add and remove them to Python installation in batches. Alternatively, it would also be possible to integrate this into the Python installer, so that installation offers you to add a list of packages, and uninstallation removes all installations from the version (so that PythonXY could end up empty and get removed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 21:45:30 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Oct 2010 19:45:30 +0000 Subject: [issue9935] Faster pickling of instances In-Reply-To: <1285290424.33.0.0824621979691.issue9935@psf.upfronthosting.co.za> Message-ID: <1287776730.28.0.269134606081.issue9935@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r85797. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 21:49:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Oct 2010 19:49:57 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287000989.52.0.725529628819.issue10093@psf.upfronthosting.co.za> Message-ID: <1287776997.87.0.743075126003.issue10093@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > After thinking about what warning to go with, I take back my python-dev > suggestion of ResourceWarning and switch to DebugWarning. So what is your advice now? I've thought about the DebugWarning name myself and I think it's a rather bad name, because many warnings are debug-related in practice. I'd just say stick with ResourceWarning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 22:01:13 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Oct 2010 20:01:13 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287776997.87.0.743075126003.issue10093@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Fri, Oct 22, 2010 at 12:49, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> After thinking about what warning to go with, I take back my python-dev >> suggestion of ResourceWarning and switch to DebugWarning. > > So what is your advice now? > I've thought about the DebugWarning name myself and I think it's a rather bad name, because many warnings are debug-related in practice. I'd just say stick with ResourceWarning. That's true. And the warning hierarchy is rather shallow anyway. I'm fine with ResourceWarning then. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 22 23:38:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Oct 2010 21:38:01 +0000 Subject: [issue9935] Faster pickling of instances In-Reply-To: <1285290424.33.0.0824621979691.issue9935@psf.upfronthosting.co.za> Message-ID: <1287783481.03.0.268066579322.issue9935@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The commit broke the Windows buildbots because (un)pickling a TextIOWrapper now raises an exception: >>> f = open("LICENSE") >>> pickle.dumps(f) b'\x80\x03c_io\nTextIOWrapper\nq\x00)\x81q\x01}q\x02X\x04\x00\x00\x00modeq\x03X\x01\x00\x00\x00rq\x04sb.' >>> g = pickle.loads(pickle.dumps(f)) Traceback (most recent call last): File "", line 1, in AttributeError: '_io.TextIOWrapper' object has no attribute '__dict__' It should be noted that it didn't work before, but no exception was raised. The result was just nonsensical: >>> f = open("LICENSE") >>> pickle.dumps(f) b'\x80\x03c_io\nTextIOWrapper\nq\x00)\x81q\x01.' >>> g = pickle.loads(pickle.dumps(f)) >>> g Traceback (most recent call last): File "", line 1, in ValueError: I/O operation on uninitialized object The very fact that test_multiprocessing tries to pickle a file object is unfortunate, and is probably a bug in itself. test_multiprocessing is known for pickling lots of things, since it generally transfers a whole TestCase instance... ---------- assignee: -> pitrou nosy: +jnoller status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 00:02:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Oct 2010 22:02:49 +0000 Subject: [issue9935] Faster pickling of instances In-Reply-To: <1285290424.33.0.0824621979691.issue9935@psf.upfronthosting.co.za> Message-ID: <1287784969.67.0.0665364702615.issue9935@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The difference has to do with the result of __reduce__: With the patch: >>> open("LICENSE").__reduce_ex__(3) (, (,), {'mode': 'r'}, None, None) Without: >>> open("LICENSE").__reduce_ex__(3) (, (,), None, None, None) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 00:13:57 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 22 Oct 2010 22:13:57 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287000989.52.0.725529628819.issue10093@psf.upfronthosting.co.za> Message-ID: <1287785637.48.0.657862834659.issue10093@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: I wonder why you think a warning is needed if files aren't closed explicitly. The fact that they get closed on garbage collection is one of the nice features of Python and has made programming easy for years. Explicitly having to close files may have some benefits w/r to resource management, but in most cases is not needed. I disagree that we should discourage not explicitly closing files. After all, this is Python, not C. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 00:17:33 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 22 Oct 2010 22:17:33 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287000989.52.0.725529628819.issue10093@psf.upfronthosting.co.za> Message-ID: <1287785853.06.0.999498237481.issue10093@psf.upfronthosting.co.za> Brett Cannon added the comment: But this is meant to be an optional warning; users will never see it. Me as a developer, I would like to know when I leave a file open as that is a waste of resources, plus with no guarantee of everything being flushed to disk. Besides, the context manager for files makes the chance of leaving a file open a much more blaring mistake. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 00:36:33 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Oct 2010 22:36:33 +0000 Subject: [issue10173] Don't pickle TestCase instances in test_multiprocessing In-Reply-To: <1287786993.14.0.756780399794.issue10173@psf.upfronthosting.co.za> Message-ID: <1287786993.14.0.756780399794.issue10173@psf.upfronthosting.co.za> New submission from Antoine Pitrou : unittest.TestCase instances aren't supposed to be picklable, but test_multiprocessing does it anyway (under Windows). Here is a patch. ---------- components: Tests files: tmp.patch keywords: patch messages: 119407 nosy: asksol, jnoller, pitrou priority: normal severity: normal stage: patch review status: open title: Don't pickle TestCase instances in test_multiprocessing type: behavior versions: Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file19337/tmp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 00:41:42 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Oct 2010 22:41:42 +0000 Subject: [issue10173] Don't pickle TestCase instances in test_multiprocessing In-Reply-To: <1287786993.14.0.756780399794.issue10173@psf.upfronthosting.co.za> Message-ID: <1287787302.36.0.960096729284.issue10173@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 00:52:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 22 Oct 2010 22:52:01 +0000 Subject: [issue10143] Update "os.pathconf" values In-Reply-To: <1287459031.95.0.424598520823.issue10143@psf.upfronthosting.co.za> Message-ID: <1287787921.01.0.57836160716.issue10143@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 01:22:19 2010 From: report at bugs.python.org (Simon de Vlieger) Date: Fri, 22 Oct 2010 23:22:19 +0000 Subject: [issue10174] multiprocessing expects sys.stdout to have a fileno/close method. In-Reply-To: <1287789739.18.0.21420008091.issue10174@psf.upfronthosting.co.za> Message-ID: <1287789739.18.0.21420008091.issue10174@psf.upfronthosting.co.za> New submission from Simon de Vlieger : When I have replaced sys.stdin with my own file-like object and I try to do a multiprocessing.Pool(processes=x) I get errors about sys.stdin not having a fileno or close method. For at least fileno it is described in the docs (http://docs.python.org/library/stdtypes.html#file-objects) that if your object is not a real file you should not implement it. This happens to me on Mac OS X, I will add the traceback a bit later as I am currently not on my Mac. ---------- components: None messages: 119408 nosy: ikanobori priority: normal severity: normal status: open title: multiprocessing expects sys.stdout to have a fileno/close method. versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 02:13:55 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Oct 2010 00:13:55 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1287792835.68.0.232151933463.issue6011@psf.upfronthosting.co.za> STINNER Victor added the comment: > I?m trying to build py3k on posix in a subdir called > sep-build-dir-?ric, with locale set to C. Ah yes, this particular use case doesn't work: r85800 should fix it. Please retry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 02:42:19 2010 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Sat, 23 Oct 2010 00:42:19 +0000 Subject: [issue10174] multiprocessing expects sys.stdout to have a fileno/close method. In-Reply-To: <1287789739.18.0.21420008091.issue10174@psf.upfronthosting.co.za> Message-ID: <1287794539.81.0.168985537448.issue10174@psf.upfronthosting.co.za> Changes by Andreas St?hrk : ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 03:02:24 2010 From: report at bugs.python.org (Tom Fogal) Date: Sat, 23 Oct 2010 01:02:24 +0000 Subject: [issue10175] vs version for win32 compilation of extension modules is undocumented. In-Reply-To: <1287795744.75.0.288699311556.issue10175@psf.upfronthosting.co.za> Message-ID: <1287795744.75.0.288699311556.issue10175@psf.upfronthosting.co.za> New submission from Tom Fogal : I have recently attempted to install a couple third party packages (zope.interface and dulwech, FWIW) and encountered great difficulties. In particular, the setup complained that it could not find "vcvarsall.bat". Even running these setup scripts from a VC++ 2010 Express command shell gave the error. Through browsing this bug database, specifically bugs 5235, 7511, and 2513, I have determined that the 'official' python.org binary is built with either VS 2008 or VS 2008 Express, I'm not sure which yet, but it does not really matter. Setting DISTUTILS_USE_SDK and MSSdk to 1 and manually running the script, as suggested in one of the bug reports, does get by the issue of finding "vcvarsall.bat". As one might guess, this only results in a confusing error message during compilation (c1010070, "Failed to load and parse the manifest"), presumably because vs2008 binaries are not compatible with vs2010 output files. This bug isn't so much about the incompatibility as to the difficulty in diagnosing the issue. It seems that trying to figure out which VS was used to compile a particular version of python is stored within a puzzle of bug reports. Could this be listed on the download page, e.g.: http://www.python.org/download/releases/2.6.6/ ? Of course, it would be ideal if multiple binaries existed, so that someone in my position could say, "Oh, I don't even have 2008 installed; I should go with the 2010-compiled version", or vice-versa. In the absence of that, simply knowing which version I'll need for extension modules is nice. ---------- components: Extension Modules messages: 119410 nosy: tfogal priority: normal severity: normal status: open title: vs version for win32 compilation of extension modules is undocumented. type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 03:15:45 2010 From: report at bugs.python.org (Jeremy Kloth) Date: Sat, 23 Oct 2010 01:15:45 +0000 Subject: [issue10175] vs version for win32 compilation of extension modules is undocumented. In-Reply-To: <1287795744.75.0.288699311556.issue10175@psf.upfronthosting.co.za> Message-ID: <1287796545.22.0.92965336685.issue10175@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 04:10:00 2010 From: report at bugs.python.org (Case Van Horsen) Date: Sat, 23 Oct 2010 02:10:00 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287799800.31.0.075762814459.issue9778@psf.upfronthosting.co.za> Case Van Horsen added the comment: I maintain gmpy and it needs to calculate hash values for integers, floats, and rationals. I converted my hash calculations to use Py_ssize_t in a 64-bit Windows enviroment. All my tests pass when I build Python with my previous patch. In hindsight, I think I made a mistake in my previous patch by eliminating Py_hash_t and using Py_ssize_t/size_t. I ended up defining Py_hash_t and Py_uhash_t in gmpy to simplify the code and to easily support older versions of Python. I will work on a patch that defines Py_hash_t and Py_uhash_t and upload it later this evening. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 04:44:48 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 23 Oct 2010 02:44:48 +0000 Subject: [issue10175] vs version for win32 compilation of extension modules is undocumented. In-Reply-To: <1287795744.75.0.288699311556.issue10175@psf.upfronthosting.co.za> Message-ID: <1287801888.05.0.692868695161.issue10175@psf.upfronthosting.co.za> R. David Murray added the comment: If I understand correctly (I'm not a windows user or developer myself), knowing the bits necessary to compile extension modules is not something very many people need to know. If an extension module supports Windows, there will generally be an installer package containing the binaries available. If there isn't, chances are the extension module doesn't support Windows. That said, improvements in the documentation is rarely a bad idea ;) ---------- assignee: -> docs at python components: +Documentation -Extension Modules nosy: +docs at python, r.david.murray type: compile error -> feature request versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 05:01:35 2010 From: report at bugs.python.org (Jeremy Kloth) Date: Sat, 23 Oct 2010 03:01:35 +0000 Subject: [issue10175] vs version for win32 compilation of extension modules is undocumented. In-Reply-To: <1287795744.75.0.288699311556.issue10175@psf.upfronthosting.co.za> Message-ID: <1287802895.09.0.741994349358.issue10175@psf.upfronthosting.co.za> Jeremy Kloth added the comment: A quick look with Dependency Walker gives me the following: Python 2.4,2.5 -- MSVC .NET 2003 (7.1) Python 2.6,2.7,3.0,3.1 -- MSVC 2008 (9.0) Note these are only for the official python.org builds. Each version can also be built using other MSVC versions. To the best of my knowledge Python 3.2 will also be built using MSVC 2008 as 2010 support hasn't been discussed yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 05:06:04 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sat, 23 Oct 2010 03:06:04 +0000 Subject: [issue6639] turtle: _tkinter.TclError: invalid command name ".10170160" In-Reply-To: <1249344565.24.0.634557720335.issue6639@psf.upfronthosting.co.za> Message-ID: <1287803164.24.0.667624457574.issue6639@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I have come across the same bug. To reproduce, run Demo/turtle/tdemo_round_dance.py and kill the Tk window before the "dance" stops. The mysterious command name ".10170160" is simply the generated name for the canvas widget - '.' + repr(id(self)). See BaseWidget.__init__ in tkinter. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 05:35:40 2010 From: report at bugs.python.org (Case Van Horsen) Date: Sat, 23 Oct 2010 03:35:40 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287804940.89.0.155001814526.issue9778@psf.upfronthosting.co.za> Case Van Horsen added the comment: I've uploaded a patch against the current svn trunk that: 1) Defines a Py_uhash_t as equivalent to size_t. 2) Correctly defines _PyHASH_MODULUS on Win64. 3) Replaces several PyLong_FromLong with PyLong_FromSsize_t. 4) Change typeobject/wrap_hashfunc to use Py_hash_t instead of long. 5) Change tupleobject/tuplehash to use Py_hast_t instead of long. 6) Change long/double/complex hash functions to use Py_uhash_t instead of unsigned long. ---------- Added file: http://bugs.python.org/file19338/Py_uhash_t_patch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 06:09:07 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 Oct 2010 04:09:07 +0000 Subject: [issue10118] Tkinter does not find font In-Reply-To: <1287192630.89.0.924571330725.issue10118@psf.upfronthosting.co.za> Message-ID: <1287806947.18.0.623771472262.issue10118@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 2.7 is in security-fix only mode. I am assuming that this is still a problem in 2.7 (and possibly 3.x). It would be good to confirm this. ---------- nosy: +terry.reedy versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 06:17:41 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 Oct 2010 04:17:41 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287807461.6.0.205307870253.issue10160@psf.upfronthosting.co.za> Terry J. Reedy added the comment: >I am not sure whether I should attach a zip/tar file with both the attachments (the sample benchmark and the diff); so I'll attach the diff in a further comment. Uploading separate files with .py, .diff extensions that can be viewed in a browser is indeed the right thing to do.\ ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 06:24:49 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 23 Oct 2010 04:24:49 +0000 Subject: [issue10172] code block has no syntax coloring In-Reply-To: <1287754685.88.0.964365557653.issue10172@psf.upfronthosting.co.za> Message-ID: <1287807889.13.0.545935519007.issue10172@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 2.7 only (verified); 3.1 and 3.2 are fine. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 08:41:17 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Sat, 23 Oct 2010 06:41:17 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1287816077.83.0.656699651921.issue10160@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: A newer version of the patch with the following changes: - single loop in the ag->attr setup phase of attrgetter_new; interning of the stored attribute names - added two more tests of invalid attrgetter parameters (".attr", "attr.") ---------- Added file: http://bugs.python.org/file19339/issue10160-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 10:30:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 23 Oct 2010 08:30:31 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1287822631.01.0.0388226797093.issue6011@psf.upfronthosting.co.za> ?ric Araujo added the comment: Same errors. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 10:50:56 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Oct 2010 08:50:56 +0000 Subject: [issue10077] Python 3.1: site error is not logged In-Reply-To: <1286923679.0.0.360055889779.issue10077@psf.upfronthosting.co.za> Message-ID: <1287823856.12.0.945280920581.issue10077@psf.upfronthosting.co.za> STINNER Victor added the comment: Commited to Python 3.1 (r85802). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 11:56:14 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 09:56:14 +0000 Subject: [issue10174] multiprocessing expects sys.stdout to have a fileno/close method. In-Reply-To: <1287789739.18.0.21420008091.issue10174@psf.upfronthosting.co.za> Message-ID: <1287827774.72.0.0675020077358.issue10174@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- components: +Library (Lib) -None nosy: +asksol, jnoller versions: +Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 12:29:54 2010 From: report at bugs.python.org (Ask Solem) Date: Sat, 23 Oct 2010 10:29:54 +0000 Subject: [issue10174] multiprocessing expects sys.stdout to have a fileno/close method. In-Reply-To: <1287789739.18.0.21420008091.issue10174@psf.upfronthosting.co.za> Message-ID: <1287829794.43.0.684308368756.issue10174@psf.upfronthosting.co.za> Ask Solem added the comment: Please add the traceback, I can't seem to find any obvious places where this would happen now. Also, what version are you currently using? I agree with the fileno, but I'd say close is a reasonable method to implement, especially for stdin/stdout/stderr ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 12:31:26 2010 From: report at bugs.python.org (ptz) Date: Sat, 23 Oct 2010 10:31:26 +0000 Subject: [issue10176] telnetlib.Telnet.read_very_eager() performance In-Reply-To: <1287829886.22.0.155091946841.issue10176@psf.upfronthosting.co.za> Message-ID: <1287829886.22.0.155091946841.issue10176@psf.upfronthosting.co.za> New submission from ptz : In Python 2.4, Assuming we've imported telnetlib, the following works: >>> f = telnetlib.Telnet("some_text_based_server") >>> f.read_very_eager() The last call outputs the text that the server outputs upon connection (e.g. "login: "). However, if we put this inside a function it does not work: >>> def g(): ... f = telnetlib.Telnet("server") ... data = f.read_very_eager() ... print data ... >>> g() This returns the empty string. I believe this indicates that the data from the server isn't cooked. Note that if we use read_until() instead of read_very_eager(), everything works as expected, further supporting the hypothesis that data doesn't cook properly when the functions are called as above. So why the difference? ---------- components: Library (Lib) messages: 119423 nosy: ptz priority: normal severity: normal status: open title: telnetlib.Telnet.read_very_eager() performance type: behavior versions: 3rd party _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 14:21:38 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 23 Oct 2010 12:21:38 +0000 Subject: [issue10177] PyUnicode_AsWideCharString and PyMem_Free In-Reply-To: <1287836498.58.0.900203329868.issue10177@psf.upfronthosting.co.za> Message-ID: <1287836498.58.0.900203329868.issue10177@psf.upfronthosting.co.za> New submission from Hirokazu Yamamoto : Hello. I found several codes using PyMem_Free to free allocated memory via PyUnicode_AsWideCharString. In PyUnicode_AsWideCharString, memory is allocated with PyMem_MALLOC. Is it OK to use PyMem_Free not PyMem_FREE? Thank you. ---------- keywords: easy messages: 119424 nosy: ocean-city priority: normal severity: normal status: open title: PyUnicode_AsWideCharString and PyMem_Free type: resource usage versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 14:49:31 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 23 Oct 2010 12:49:31 +0000 Subject: [issue10176] telnetlib.Telnet.read_very_eager() performance In-Reply-To: <1287829886.22.0.155091946841.issue10176@psf.upfronthosting.co.za> Message-ID: <1287838171.46.0.776697174055.issue10176@psf.upfronthosting.co.za> R. David Murray added the comment: Presumably the difference is that there is a pause between the two statement executions at the interactive prompt (even if you cut and paste) that does not exist in the function. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 14:56:42 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 23 Oct 2010 12:56:42 +0000 Subject: [issue10118] Tkinter does not find font In-Reply-To: <1287192630.89.0.924571330725.issue10118@psf.upfronthosting.co.za> Message-ID: <1287838602.68.0.773888432725.issue10118@psf.upfronthosting.co.za> R. David Murray added the comment: Terry meant 2.6 is in security fix only mode. 2.7 will get bug fixes for an extended period. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 16:05:25 2010 From: report at bugs.python.org (samwyse) Date: Sat, 23 Oct 2010 14:05:25 +0000 Subject: [issue10178] PEP 378 uses replace where translate may work better In-Reply-To: <1287842725.3.0.632950856337.issue10178@psf.upfronthosting.co.za> Message-ID: <1287842725.3.0.632950856337.issue10178@psf.upfronthosting.co.za> New submission from samwyse : PEP 378 states; format(n, "6,f").replace(",", "X").replace(".", ",").replace("X", ".") This is complex and relatively slow. A better technique, which IMHO the proposal should high-lighted, would be: swap_commas_and_periods = bytes.maketrans(b',.', b'.,') format(n, "6,f").translate(swap_commas_and_periods) While performing the maketrans each time a string is formatted is slower than the triple replace, calling it once and caching the result is faster. I have tested with with the 3.1 interpreter; example timings follow. >>> Timer(""" '1,234,567.89'.replace(',', 'X').replace('.', ',').replace('X', '.') """).timeit() 3.0645400462908015 >>> Timer(""" '1,234,567.89'.translate(swap_commas_and_periods) """, """ swap_commas_and_periods = bytes.maketrans(b',.', b'.,') """).timeit() 2.276630409730846 >>> Timer(""" '1,234,567.89'.translate(bytes.maketrans(b',.', b'.,')) """).timeit() 3.760715677551161 ---------- assignee: docs at python components: Documentation messages: 119427 nosy: docs at python, samwyse priority: normal severity: normal status: open title: PEP 378 uses replace where translate may work better type: behavior versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 16:16:42 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 23 Oct 2010 14:16:42 +0000 Subject: [issue7761] telnetlib Telnet.interact fails on Windows but not Linux In-Reply-To: <1264212900.62.0.226780855818.issue7761@psf.upfronthosting.co.za> Message-ID: <1287843402.08.0.84875964725.issue7761@psf.upfronthosting.co.za> R. David Murray added the comment: The attached patch should fix the problem. It replicates the bytes/string changes made for the unix branch in the windows branch. It would be nice to come up with a unit test for this, but in this case that's a lot more complicated than figuring out the fix :) ---------- keywords: +patch nosy: +r.david.murray Added file: http://bugs.python.org/file19340/telnetlib_windows.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 16:30:26 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 23 Oct 2010 14:30:26 +0000 Subject: [issue10178] PEP 378 uses replace where translate may work better In-Reply-To: <1287842725.3.0.632950856337.issue10178@psf.upfronthosting.co.za> Message-ID: <1287844226.63.0.798539777719.issue10178@psf.upfronthosting.co.za> R. David Murray added the comment: The text in question is talking about 'replace' as a general mechanism for 'fixing' the separator character, and as such I don't think introducing translate would enhance the exposition. I suppose it could be added in a footnote. ---------- nosy: +eric.smith, ncoghlan, r.david.murray, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 16:52:04 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 14:52:04 +0000 Subject: [issue10179] os.stat fails on mapped network drive In-Reply-To: <1287845524.9.0.573963701431.issue10179@psf.upfronthosting.co.za> Message-ID: <1287845524.9.0.573963701431.issue10179@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This network drive is actually mapped through the VirtualBox guest additions. Under Python 2.7 (official 64-bit MSI installer), this works fine: >>> s = 'Z:\\__svn__\\Lib\\test\\keycert.pem' >>> os.stat(s) nt.stat_result(st_mode=33206, st_ino=0L, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=1783L, st_atime=1287771307L, st_mtime=1286578916L, st_ctime=1286578916L) Under a freshly compiled 32-bit py3k, though, it fails with a rather strange error message: >>> s = 'Z:\\__svn__\\Lib\\test\\keycert.pem' >>> os.stat(s) Traceback (most recent call last): File "", line 1, in WindowsError: [Error 1] Incorrect function: 'Z:\\__svn__\\Lib\\test\\keycert.pem' >>> errno.errorcode[1] 'EPERM' While a local directory works fine: >>> os.stat('c:\\Windows') nt.stat_result(st_mode=16895, st_ino=0, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=16384, st_atime=1287843075, st_mtime=1287843075, st_ctime=1247541608) ---------- components: Extension Modules messages: 119430 nosy: brian.curtin, ocean-city, pitrou, tim.golden priority: critical severity: normal status: open title: os.stat fails on mapped network drive type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 16:59:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 14:59:31 +0000 Subject: [issue10179] os.stat fails on mapped network drive In-Reply-To: <1287845524.9.0.573963701431.issue10179@psf.upfronthosting.co.za> Message-ID: <1287845971.19.0.759855638866.issue10179@psf.upfronthosting.co.za> Antoine Pitrou added the comment: And 3.1 works fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 17:09:59 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 15:09:59 +0000 Subject: [issue10179] os.stat fails on mapped network drive In-Reply-To: <1287845524.9.0.573963701431.issue10179@psf.upfronthosting.co.za> Message-ID: <1287846599.01.0.627107716718.issue10179@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hmm, it looks like this is actually VirtualBox-specific. It works with another network drive mapped on Y: >>> os.stat(r"y:") nt.stat_result(st_mode=16895, st_ino=0, st_dev=0, st_nlink=0, st_uid=0, st_gid=0, st_size=0, st_atime=1287784175, st_mtime=1281439296, st_ctime=1281439296) >>> os.stat(r"z:") Traceback (most recent call last): File "", line 1, in WindowsError: [Error 1] Incorrect function: 'z:' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 17:27:32 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 23 Oct 2010 15:27:32 +0000 Subject: [issue6668] locale.py: can't parse sr_RS@latin locale In-Reply-To: <1249655674.35.0.635015975428.issue6668@psf.upfronthosting.co.za> Message-ID: <1287847652.31.0.933563246569.issue6668@psf.upfronthosting.co.za> R. David Murray added the comment: Python 3.2a3+ (py3k:85670:85675M, Oct 17 2010, 20:27:19) [GCC 4.4.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.setlocale(locale.LC_ALL) 'LC_CTYPE=sr_RS at latin;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C' rdmurray at hey:~/maestro/python/release31-maint>LC_ALL="sr_RS at latin" ./python Python 3.1.2 (release31-maint:85675M, Oct 17 2010, 20:16:54) [GCC 4.4.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.setlocale(locale.LC_ALL) 'LC_CTYPE=sr_RS at latin;LC_NUMERIC=C;LC_TIME=C;LC_COLLATE=C;LC_MONETARY=C;LC_MESSAGES=C;LC_PAPER=C;LC_NAME=C;LC_ADDRESS=C;LC_TELEPHONE=C;LC_MEASUREMENT=C;LC_IDENTIFICATION=C' rdmurray at hey:~/maestro/python/release27-maint>LC_ALL="sr_RS at latin" ./python Python 2.7.0+ (release27-maint:85802, Oct 23 2010, 11:15:26) [GCC 4.4.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.setlocale(locale.LC_ALL) 'C' >>> locale.setlocale(locale.LC_ALL, 'sr_RS at latin') 'sr_RS at latin' ---------- nosy: +r.david.murray resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 17:39:19 2010 From: report at bugs.python.org (ptz) Date: Sat, 23 Oct 2010 15:39:19 +0000 Subject: [issue10176] telnetlib.Telnet.read_very_eager() performance In-Reply-To: <1287829886.22.0.155091946841.issue10176@psf.upfronthosting.co.za> Message-ID: <1287848359.31.0.474074163769.issue10176@psf.upfronthosting.co.za> ptz added the comment: Strange. I was certain that I tried inserting a time.sleep() in the function and it still didn't work, but I tried it just now and it does work as expected. Sorry, and thanks for your answer, at least I learned something. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 17:41:42 2010 From: report at bugs.python.org (Stefan Krah) Date: Sat, 23 Oct 2010 15:41:42 +0000 Subject: [issue10157] Refleaks in pythonrun.c In-Reply-To: <1287596001.72.0.908968504513.issue10157@psf.upfronthosting.co.za> Message-ID: <1287848502.7.0.861468926575.issue10157@psf.upfronthosting.co.za> Stefan Krah added the comment: After taking the scenic route through half of the tree[1], I finally found another leak in pythonrun.c. I'm closing #10153, merging those two leaks into the new patch. Does it look ok? [1] Valgrind stack traces should be approached with caution. ---------- stage: -> patch review title: Memory leak (r70152) -> Refleaks in pythonrun.c Added file: http://bugs.python.org/file19341/pythonrun3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 17:43:37 2010 From: report at bugs.python.org (Stefan Krah) Date: Sat, 23 Oct 2010 15:43:37 +0000 Subject: [issue10153] Memory leak in pythonrun.c In-Reply-To: <1287572976.12.0.192446732245.issue10153@psf.upfronthosting.co.za> Message-ID: <1287848617.54.0.527019476832.issue10153@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed superseder: -> Refleaks in pythonrun.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 17:52:38 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 23 Oct 2010 15:52:38 +0000 Subject: [issue10176] telnetlib.Telnet.read_very_eager() performance In-Reply-To: <1287829886.22.0.155091946841.issue10176@psf.upfronthosting.co.za> Message-ID: <1287849158.37.0.297624931167.issue10176@psf.upfronthosting.co.za> R. David Murray added the comment: Well, perhaps when you ran the test with the sleep the target server had an unusually long startup delay. If you are going to use read_very_eager you are going to have to deal with the possibility of not getting back what you expected, so it doesn't really matter what it's "performance" is :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 17:56:17 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Oct 2010 15:56:17 +0000 Subject: [issue10179] os.stat fails on mapped network drive In-Reply-To: <1287845524.9.0.573963701431.issue10179@psf.upfronthosting.co.za> Message-ID: <1287849377.29.0.945108208436.issue10179@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Let me guess: It's GetFinalPathNameByHandle that is failing. Put some debug output right after the call to verify. Why is this critical? Not being able to stat VirtualBox folders doesn't sound that critical to me. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 17:58:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 15:58:01 +0000 Subject: [issue10179] os.stat fails on mapped network drive In-Reply-To: <1287845524.9.0.573963701431.issue10179@psf.upfronthosting.co.za> Message-ID: <1287849481.76.0.546862903371.issue10179@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Yes, indeed. It was critical before I found out that it's VirtualBox-specific. ---------- priority: critical -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 18:08:56 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 16:08:56 +0000 Subject: [issue10179] os.stat fails on mapped network drive In-Reply-To: <1287845524.9.0.573963701431.issue10179@psf.upfronthosting.co.za> Message-ID: <1287850136.8.0.10683542158.issue10179@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This patch seems to do the trick, although I'm not sure it warrants including in Python. ---------- keywords: +patch Added file: http://bugs.python.org/file19342/osstat.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 18:10:56 2010 From: report at bugs.python.org (David-Sarah Hopwood) Date: Sat, 23 Oct 2010 16:10:56 +0000 Subject: [issue6058] Add cp65001 to encodings/aliases.py In-Reply-To: <1242692494.35.0.391765957832.issue6058@psf.upfronthosting.co.za> Message-ID: <1287850256.78.0.141134426252.issue6058@psf.upfronthosting.co.za> David-Sarah Hopwood added the comment: This problem causes {{{os.getcwdu()}}} to fail when the console code page is set to 65001 (always, I think): {{{ t:\>ver Microsoft Windows [Version 6.0.6002] t:\>chcp Active code page: 65001 t:\>python -c "import os; print os.getcwdu()" Traceback (most recent call last): File "", line 1, in LookupError: unknown encoding: cp65001 t:\>chcp 1252 Active code page: 1252 t:\>python -c "import os; print os.getcwdu()" t:\ }}} Incidentally, I don't agree that this codepage needs to be distinguished from UTF-8. The deviations in the Microsoft codec are just their bugs. There is only one correct way to encode/decode UTF-8, and cp65001 is supposed to be UTF-8 according to Microsoft (e.g. http://msdn.microsoft.com/en-us/library/86hf4sb8%28en-US,VS.80%29.aspx ). ---------- nosy: +davidsarah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 18:13:09 2010 From: report at bugs.python.org (David-Sarah Hopwood) Date: Sat, 23 Oct 2010 16:13:09 +0000 Subject: [issue6058] Add cp65001 to encodings/aliases.py In-Reply-To: <1242692494.35.0.391765957832.issue6058@psf.upfronthosting.co.za> Message-ID: <1287850389.05.0.249417140058.issue6058@psf.upfronthosting.co.za> David-Sarah Hopwood added the comment: I said: "There is only one correct way to encode/decode UTF-8". This is true modulo differences in the treatment of initial byte order marks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 18:21:02 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 23 Oct 2010 16:21:02 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287850862.85.0.839565545942.issue9778@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Thank you. Applied in r85803. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 18:23:35 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 16:23:35 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287851015.83.0.0947346145268.issue9778@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Case's patch fixes test_builtin and test_complex failures on Windows 7 64-bit. But there's still a failure in test_dictviews: ====================================================================== FAIL: test_items_set_operations (test.test_dictviews.DictSetTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "Z:\__svn__\lib\test\test_dictviews.py", line 153, in test_items_set_operations {('a', 1), ('b', 2)}) AssertionError: Items in the first set but not the second: ('a', 1) ('b', 2) ---------------------------------------------------------------------- Which boils down to the following issue: >>> d1 = {'a': 1, 'b': 2} >>> d1.items() dict_items([('a', 1), ('b', 2)]) >>> set(d1.items()) {('a', 1), ('b', 2)} >>> d1.items() | set(d1.items()) {('a', 1), ('a', 1), ('b', 2), ('b', 2)} There are also a bunch of possibly related failures in test_weakset: ====================================================================== FAIL: test_inplace_on_self (test.test_weakset.TestWeakSet) ---------------------------------------------------------------------- Traceback (most recent call last): File "Y:\py3k\__svn__\lib\test\test_weakset.py", line 293, in test_inplace_on_ self self.assertEqual(t, self.s) AssertionError: <_weakrefset.WeakSet object at 0x000000000283CDC0> != <_weakrefs et.WeakSet object at 0x000000000283B2C8> ====================================================================== FAIL: test_or (test.test_weakset.TestWeakSet) ---------------------------------------------------------------------- Traceback (most recent call last): File "Y:\py3k\__svn__\lib\test\test_weakset.py", line 72, in test_or self.assertEqual(self.s | set(self.items2), i) AssertionError: <_weakrefset.WeakSet object at 0x000000000285B400> != <_weakrefs et.WeakSet object at 0x000000000285B260> ====================================================================== FAIL: test_symmetric_difference (test.test_weakset.TestWeakSet) ---------------------------------------------------------------------- Traceback (most recent call last): File "Y:\py3k\__svn__\lib\test\test_weakset.py", line 110, in test_symmetric_d ifference self.assertEqual(c in i, (c in self.d) ^ (c in self.items2)) AssertionError: False != True ====================================================================== FAIL: test_union (test.test_weakset.TestWeakSet) ---------------------------------------------------------------------- Traceback (most recent call last): File "Y:\py3k\__svn__\lib\test\test_weakset.py", line 61, in test_union self.assertEqual(c in u, c in self.d or c in self.items2) AssertionError: False != True ====================================================================== FAIL: test_xor (test.test_weakset.TestWeakSet) ---------------------------------------------------------------------- Traceback (most recent call last): File "Y:\py3k\__svn__\lib\test\test_weakset.py", line 117, in test_xor self.assertEqual(self.s ^ set(self.items2), i) AssertionError: <_weakrefset.WeakSet object at 0x000000000292CA18> != <_weakrefs et.WeakSet object at 0x000000000292C878> Another bunch of test_pyclbr failures: ====================================================================== FAIL: test_decorators (test.test_pyclbr.PyclbrTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 152, in test_decorators self.checkModule('test.pyclbr_input', ignore=['om']) File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 101, in checkModule self.assertListEq(real_bases, pyclbr_bases, ignore) File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 28, in assertListEq self.fail("%r missing" % missing.pop()) AssertionError: 'object' missing ====================================================================== FAIL: test_easy (test.test_pyclbr.PyclbrTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 142, in test_easy self.checkModule('pyclbr') File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 101, in checkModule self.assertListEq(real_bases, pyclbr_bases, ignore) File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 28, in assertListEq self.fail("%r missing" % missing.pop()) AssertionError: 'object' missing ====================================================================== FAIL: test_others (test.test_pyclbr.PyclbrTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 158, in test_others cm('random', ignore=('Random',)) # from _random import Random as CoreGenera tor File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 101, in checkModule self.assertListEq(real_bases, pyclbr_bases, ignore) File "Y:\py3k\__svn__\lib\test\test_pyclbr.py", line 28, in assertListEq self.fail("%r missing" % missing.pop()) AssertionError: 'Random' missing And a test_sys failure which is probably easy to fix: File "Z:\__svn__\lib\test\test_sys.py", line 831, in test_objecttypes check(s, basicsize) File "Z:\__svn__\lib\test\test_sys.py", line 601, in check_sizeof self.assertEqual(result, size, msg) AssertionError: wrong size for : got 74, expected 66 All these tests pass in 32-bit mode. Case, you can run the regression test suite with: python.exe -m test.regrtest and invidual tests with e.g.: python.exe -m test.regrtest -v test_dictviews ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 18:23:42 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 16:23:42 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287851022.01.0.726465355005.issue9778@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 18:25:11 2010 From: report at bugs.python.org (David-Sarah Hopwood) Date: Sat, 23 Oct 2010 16:25:11 +0000 Subject: [issue6058] Add cp65001 to encodings/aliases.py In-Reply-To: <1242692494.35.0.391765957832.issue6058@psf.upfronthosting.co.za> Message-ID: <1287851111.13.0.00901058697738.issue6058@psf.upfronthosting.co.za> David-Sarah Hopwood added the comment: I meant to say that the os.getcwdu() test in msg119440 was done with Windows native Python 2.6.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 18:32:44 2010 From: report at bugs.python.org (Stefan Krah) Date: Sat, 23 Oct 2010 16:32:44 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287851564.63.0.612571355416.issue9778@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 18:35:50 2010 From: report at bugs.python.org (samwyse) Date: Sat, 23 Oct 2010 16:35:50 +0000 Subject: [issue10178] PEP 378 uses replace where translate may work better In-Reply-To: <1287842725.3.0.632950856337.issue10178@psf.upfronthosting.co.za> Message-ID: <1287851750.42.0.697699051713.issue10178@psf.upfronthosting.co.za> samwyse added the comment: The text in question is also talking about the problems with using 'replace' to swap pairs of characters, so a better, alternate, process would be valuable, especially for anyone unaware of the translate method. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 18:40:37 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 16:40:37 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287852037.09.0.400118268354.issue9778@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This patch seems to fix all aforementioned failures. ---------- Added file: http://bugs.python.org/file19343/hashw64.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 18:40:50 2010 From: report at bugs.python.org (David-Sarah Hopwood) Date: Sat, 23 Oct 2010 16:40:50 +0000 Subject: [issue6058] Add cp65001 to encodings/aliases.py In-Reply-To: <1242692494.35.0.391765957832.issue6058@psf.upfronthosting.co.za> Message-ID: <1287852050.14.0.135475447604.issue6058@psf.upfronthosting.co.za> David-Sarah Hopwood added the comment: Oops, false alarm. python -c "import os; print repr(os.getcwdu())" works as expected, so the exception is part of issue 1602. (My command about there being no need to distinguish this codepage from UTF-8 stands.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 18:51:20 2010 From: report at bugs.python.org (Stefan Krah) Date: Sat, 23 Oct 2010 16:51:20 +0000 Subject: [issue7761] telnetlib Telnet.interact fails on Windows but not Linux In-Reply-To: <1264212900.62.0.226780855818.issue7761@psf.upfronthosting.co.za> Message-ID: <1287852680.78.0.370279201228.issue7761@psf.upfronthosting.co.za> Stefan Krah added the comment: The patch works. I agree that no test is needed, since no one will attempt to revert this. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 19:04:23 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 23 Oct 2010 17:04:23 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1287853463.44.0.492949143938.issue6011@psf.upfronthosting.co.za> STINNER Victor added the comment: > Same errors. Please describe exactly how you reproduced the error (write each command). r85805 fixes another bug related to this problem. Is it a better fix than distutils_makefile_encoding.patch: use surrogateescape error handler to decode the Makefile file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 19:19:27 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 17:19:27 +0000 Subject: [issue10180] File objects should not pickleable In-Reply-To: <1287854367.84.0.526587779087.issue10180@psf.upfronthosting.co.za> Message-ID: <1287854367.84.0.526587779087.issue10180@psf.upfronthosting.co.za> New submission from Antoine Pitrou : In Python 3, pickle accepts to serialize a file object, but the result is nonsensical when unpickled. I think we should explicitly forbid pickling of FileIO, Buffered{Reader,Writer} and TextIOWrapper objects. ---------- components: IO, Library (Lib) messages: 119450 nosy: alexandre.vassalotti, amaury.forgeotdarc, benjamin.peterson, pitrou priority: normal severity: normal status: open title: File objects should not pickleable type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 19:31:59 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 23 Oct 2010 17:31:59 +0000 Subject: [issue6518] Enable 'with' statement in ossaudiodev module In-Reply-To: <1247965666.73.0.755368316919.issue6518@psf.upfronthosting.co.za> Message-ID: <1287855119.47.0.328569696693.issue6518@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied (with new test, and docs) in r85807. I also removed the AttributeError catch. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 19:33:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 23 Oct 2010 17:33:25 +0000 Subject: [issue5178] Add context manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1287855205.09.0.232404670199.issue5178@psf.upfronthosting.co.za> Georg Brandl added the comment: Ping... soon it's too late for 3.2 too :) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 19:34:12 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Oct 2010 17:34:12 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287855252.77.0.283414466695.issue9778@psf.upfronthosting.co.za> Martin v. L?wis added the comment: These changes also look all reasonable to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 19:36:27 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 23 Oct 2010 17:36:27 +0000 Subject: [issue8777] Add threading.Barrier In-Reply-To: <1274375262.53.0.647489735751.issue8777@psf.upfronthosting.co.za> Message-ID: <1287855387.62.0.948426079808.issue8777@psf.upfronthosting.co.za> Georg Brandl added the comment: Ping -- is this something you want in 3.2, Kristjan? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 19:38:07 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Oct 2010 17:38:07 +0000 Subject: [issue10179] os.stat fails on mapped network drive In-Reply-To: <1287845524.9.0.573963701431.issue10179@psf.upfronthosting.co.za> Message-ID: <1287855487.57.0.813451628454.issue10179@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think something like this is worth adding. I'd like to see two changes implemented: - GetLastError should be checked for the "not implemented or some such" error that you got, and the fallback only performed if its this error - a comment explaining the motivation for this fallback should be added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 19:38:56 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 17:38:56 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287855536.13.0.198989981106.issue9778@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I've committed them in r85808. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 19:50:27 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 23 Oct 2010 17:50:27 +0000 Subject: [issue10180] File objects should not pickleable In-Reply-To: <1287854367.84.0.526587779087.issue10180@psf.upfronthosting.co.za> Message-ID: <1287856227.25.0.397877918945.issue10180@psf.upfronthosting.co.za> Georg Brandl added the comment: Sounds like a good idea to me. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 20:07:33 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 23 Oct 2010 18:07:33 +0000 Subject: [issue10179] os.stat fails on mapped network drive In-Reply-To: <1287845524.9.0.573963701431.issue10179@psf.upfronthosting.co.za> Message-ID: <1287857253.28.0.199693443808.issue10179@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Can you try my patch in #10027? Does this also fail? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 20:10:52 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 18:10:52 +0000 Subject: [issue10180] File objects should not pickleable In-Reply-To: <1287854367.84.0.526587779087.issue10180@psf.upfronthosting.co.za> Message-ID: <1287857452.64.0.178527972527.issue10180@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a patch, but issue10173 must probably be fixed first. ---------- dependencies: +Don't pickle TestCase instances in test_multiprocessing keywords: +patch Added file: http://bugs.python.org/file19344/pickleio.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 20:22:39 2010 From: report at bugs.python.org (Roger Upole) Date: Sat, 23 Oct 2010 18:22:39 +0000 Subject: [issue10181] get_shape0 in memoryobject.c not checked for error return In-Reply-To: <1287858158.95.0.0752296181045.issue10181@psf.upfronthosting.co.za> Message-ID: <1287858158.95.0.0752296181045.issue10181@psf.upfronthosting.co.za> New submission from Roger Upole : There are a number of places in memoryobject.c where get_shape0 is used without the return value being checked. If it fails, this leads to hanging exceptions and crashes. ---------- components: Interpreter Core messages: 119460 nosy: rupole priority: normal severity: normal status: open title: get_shape0 in memoryobject.c not checked for error return type: crash versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 20:22:53 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 18:22:53 +0000 Subject: [issue10179] os.stat fails on mapped network drive In-Reply-To: <1287857253.28.0.199693443808.issue10179@psf.upfronthosting.co.za> Message-ID: <1287858169.3611.10.camel@localhost.localdomain> Antoine Pitrou added the comment: > Can you try my patch in #10027? Does this also fail? No, your patch seems to fix the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 20:37:51 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Oct 2010 18:37:51 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> New submission from Martin v. L?wis : _sre.c:match_start currently uses Py_BuildValue("i") to return the start index, which itself is of type Py_ssize_t. This will get truncated on x64 Windows if the start is > 2**31. PyInt_FromSsize_t should be used instead. Other usages of Py_BuildValue should be reviewed as well. ---------- messages: 119462 nosy: loewis priority: normal severity: normal status: open title: match_start truncates large values versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 20:41:08 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 23 Oct 2010 18:41:08 +0000 Subject: [issue5178] Add context manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1287859268.03.0.797078375005.issue5178@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Personally I would like to have a unique tempfile.mkdtemp which can be used as both a function and a context manager, as it happens for open() and others. Not sure how to do that though, unless tempfile.mkdtemp gets turned into a class. There would be objections against doing that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 20:41:39 2010 From: report at bugs.python.org (Case Van Horsen) Date: Sat, 23 Oct 2010 18:41:39 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287859299.74.0.444787776557.issue9778@psf.upfronthosting.co.za> Case Van Horsen added the comment: On Win64, I get two unexpected failures: I terminated test_capi after a Windows exception box popped up. [ 37/349] test_capi test test_capi failed -- Traceback (most recent call last): File "C:\svn\py3k\lib\test\test_capi.py", line 50, in test_no_FatalError_infinite_loop b'Fatal Python error:' AssertionError: b"Fatal Python error: PyThreadState_Get: no current thread\r\n\r\nThis application has requested the Runtime to term inate it in an unusual way.\nPlease contact the application's support team for more information." != b'Fatal Python error: PyThreadS tate_Get: no current thread' [ 67/349] test_concurrent_futures test test_concurrent_futures failed -- Traceback (most recent call last): File "C:\svn\py3k\lib\test\test_concurrent_futures.py", line 442, in test_timeout future1]), finished) AssertionError: Items in the second set but not the first: The dictviews test passes successfully. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 20:44:00 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sat, 23 Oct 2010 18:44:00 +0000 Subject: [issue10169] socket.sendto raises incorrect exception when passed incorrect types In-Reply-To: <1287681728.0.0.651147678785.issue10169@psf.upfronthosting.co.za> Message-ID: <1287859440.49.0.17219194727.issue10169@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 20:52:35 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 18:52:35 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287859955.92.0.964446842818.issue9778@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The test_capi problem is not 64-bit-specific (see issue9116). As for test_concurrent_futures, I also have a failure (not the same one) in both 32-bit and 64-bit builds here. I'm gonna open a separate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 20:54:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 18:54:11 +0000 Subject: [issue10183] test_concurrent_futures failure on Windows In-Reply-To: <1287860051.06.0.49357269827.issue10183@psf.upfronthosting.co.za> Message-ID: <1287860051.06.0.49357269827.issue10183@psf.upfronthosting.co.za> New submission from Antoine Pitrou : I get this failure quite reliably on a Windows 7 VM, in both 32-bit and 64-bit builds: ====================================================================== FAIL: test_map_timeout (test.test_concurrent_futures.ProcessPoolExecutorTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "Y:\py3k\__svn__\lib\test\test_concurrent_futures.py", line 572, in test_map_timeout self.assertEquals([42, 42], results) AssertionError: Lists differ: [42, 42] != [] First list contains 2 additional elements. First extra element 0: 42 - [42, 42] + [] ---------- assignee: bquinlan components: Library (Lib) messages: 119466 nosy: bquinlan, pitrou priority: normal severity: normal status: open title: test_concurrent_futures failure on Windows type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 21:06:40 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Oct 2010 19:06:40 +0000 Subject: [issue10184] tarfile touches directories twice In-Reply-To: <1287860800.8.0.977653393639.issue10184@psf.upfronthosting.co.za> Message-ID: <1287860800.8.0.977653393639.issue10184@psf.upfronthosting.co.za> New submission from Martin v. L?wis : When extracting, the time stamps of directories are modified twice: once when creating the directories, and then once in reverse order when done. The first utimes call is redundant; it also causes issues with a buggy NFS server, see http://www.python.org/dev/buildbot/3.1/builders/AMD64%20debian%20parallel%203.1/builds/147/steps/test/logs/stdio (specifically, touching a file twice with the same second-resolution time stamp will increase the microsecond counter). The attached patch works around the issue; regardless of the NFS bug, I think that the redundant call should be eliminated. ---------- assignee: ghaering files: tarfile.diff keywords: patch messages: 119467 nosy: ghaering, loewis priority: normal severity: normal status: open title: tarfile touches directories twice Added file: http://bugs.python.org/file19345/tarfile.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 21:09:17 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 23 Oct 2010 19:09:17 +0000 Subject: [issue9778] Make hash values the same width as a pointer (or Py_ssize_t) In-Reply-To: <1283638291.76.0.407786717056.issue9778@psf.upfronthosting.co.za> Message-ID: <1287860957.22.0.635448731962.issue9778@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I recommend to declare this issue closed, and keep it closed unless somebody wants to propose to revert the change (widening the hash type) completely. Any remaining issues that people want to attribute to this change (correctly or incorrectly) should be reported as separate issues. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 21:32:15 2010 From: report at bugs.python.org (Case Van Horsen) Date: Sat, 23 Oct 2010 19:32:15 +0000 Subject: [issue10185] Py_hash_t declaration needed in _testcapimodule In-Reply-To: <1287862335.94.0.457424318631.issue10185@psf.upfronthosting.co.za> Message-ID: <1287862335.94.0.457424318631.issue10185@psf.upfronthosting.co.za> New submission from Case Van Horsen : While researching errors in issue 9778, I found a variable in _testcapimodule.c that should be declared Py_hash_t instead of long. Patch is attached. ---------- components: Interpreter Core files: py_hash_t_testcapimodule.diff keywords: patch messages: 119469 nosy: casevh priority: normal severity: normal status: open title: Py_hash_t declaration needed in _testcapimodule versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file19346/py_hash_t_testcapimodule.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 21:37:39 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 23 Oct 2010 19:37:39 +0000 Subject: [issue10180] File objects should not pickleable In-Reply-To: <1287854367.84.0.526587779087.issue10180@psf.upfronthosting.co.za> Message-ID: <1287862659.1.0.918949222312.issue10180@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The patch modifies _io.TextIOWrapper, but not _pyio.TextIOWrapper. Is there a reason? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 21:41:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 19:41:47 +0000 Subject: [issue10180] File objects should not pickleable In-Reply-To: <1287854367.84.0.526587779087.issue10180@psf.upfronthosting.co.za> Message-ID: <1287862907.08.0.418441727031.issue10180@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The patch modifies _io.TextIOWrapper, but not _pyio.TextIOWrapper. Is > there a reason? Yes, two of them: - modifying _pyio.Buffered* is enough to trigger the TypeError - _pyio.StringIO inherits from TextIOWrapper, and it must be pickleable ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 21:43:14 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 19:43:14 +0000 Subject: [issue10185] Py_hash_t declaration needed in _testcapimodule In-Reply-To: <1287862335.94.0.457424318631.issue10185@psf.upfronthosting.co.za> Message-ID: <1287862994.63.0.0540156149765.issue10185@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r85810, thank you. ---------- nosy: +pitrou resolution: -> fixed status: open -> closed versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 22:39:21 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 23 Oct 2010 20:39:21 +0000 Subject: [issue9967] encoded_word regular expression in email.header.decode_header() In-Reply-To: <1285639066.52.0.877288279278.issue9967@psf.upfronthosting.co.za> Message-ID: <1287866361.72.0.988126697775.issue9967@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- assignee: -> r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 22:58:32 2010 From: report at bugs.python.org (Alex) Date: Sat, 23 Oct 2010 20:58:32 +0000 Subject: [issue10180] File objects should not pickleable In-Reply-To: <1287854367.84.0.526587779087.issue10180@psf.upfronthosting.co.za> Message-ID: <1287867512.63.0.820204442525.issue10180@psf.upfronthosting.co.za> Alex added the comment: I don't see why Buffered or TextIO's shouldn't be pickleable, ISTM their pickleability should be based on what the underlying file obj is. ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 23:09:06 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 23 Oct 2010 21:09:06 +0000 Subject: [issue10180] File objects should not pickleable In-Reply-To: <1287854367.84.0.526587779087.issue10180@psf.upfronthosting.co.za> Message-ID: <1287868146.93.0.358488222134.issue10180@psf.upfronthosting.co.za> Georg Brandl added the comment: What would be the use case for that? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 23:11:23 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 23 Oct 2010 21:11:23 +0000 Subject: [issue10180] File objects should not pickleable In-Reply-To: <1287867512.63.0.820204442525.issue10180@psf.upfronthosting.co.za> Message-ID: <1287868278.3611.14.camel@localhost.localdomain> Antoine Pitrou added the comment: > I don't see why Buffered or TextIO's shouldn't be pickleable, ISTM > their pickleability should be based on what the underlying file obj > is. That could be. Right now, though, pickling them gives nonsensical results and I think it would be better to give an explicit error message. (a problem with making them pickleable is that, by exposing details of the internal structure in the pickle, you're limiting what implementation changes you can do in the future) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 23:22:11 2010 From: report at bugs.python.org (Shashank) Date: Sat, 23 Oct 2010 21:22:11 +0000 Subject: [issue10030] Patch for zip decryption speedup In-Reply-To: <1286309331.81.0.797536492786.issue10030@psf.upfronthosting.co.za> Message-ID: <1287868931.75.0.801766819192.issue10030@psf.upfronthosting.co.za> Shashank added the comment: >the C module should be private and therefore called _zipdecrypt done >if you want to avoid API mismatch, you could give a tp_call to your C >decrypter object, rather than a "decrypt" method done >- you can put all initialization code in zipdecrypt_new and avoid the >need for zipdecrypt_init keeping this similar to the existing _ZipDecrypter class in ZipFile (all initialization in init rather than new), which was probably to allow re-init and re-use of one instance >it's better to use the "y*" code in PyArg_ParseTuple, rather than "s#" y* does not seem to be available in 2.7, using s* instead >you should define your module as PY_SSIZE_T_CLEAN and use Py_ssize_t >as length variables (rather than int) done >you *mustn't* change the contents of the buffer which is given you by >"s#" or "y*", since that buffer is read-only (it can be a bytes >object); instead, create a new bytes object using >PyBytes_FromStringAndSize(NULL, length) and write into that; or, if >you want a read-write buffer, use the "w*" code corrected, not altering the input buffer, reading input buffer as s* ---------- Added file: http://bugs.python.org/file19347/zipdecrypt.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 23 23:55:10 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 23 Oct 2010 21:55:10 +0000 Subject: [issue10178] PEP 378 uses replace where translate may work better In-Reply-To: <1287842725.3.0.632950856337.issue10178@psf.upfronthosting.co.za> Message-ID: <1287870910.6.0.995110762573.issue10178@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, the text needs to stand as-is. It is supposed to be a hint of what can be done, nothing more. The technique of t=x; x=y; y=t is somewhat basic and has general applicability -- there's nothing "complex" about it. Also, for short strings such as the one in the example, the translate approach is slower unless the used in a loop where the translation table is already built. BTW, the PEP itself is not primary documentation for users. It is meant to document the design discussion only. Feel free to post your recipe on ASPN or on the newsgroup. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 00:22:48 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 23 Oct 2010 22:22:48 +0000 Subject: [issue1349106] email.Generator does not separate headers with "\r\n" Message-ID: <1287872568.74.0.527070419621.issue1349106@psf.upfronthosting.co.za> R. David Murray added the comment: Committed in r85811. ---------- resolution: -> accepted stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 01:42:05 2010 From: report at bugs.python.org (Alex) Date: Sat, 23 Oct 2010 23:42:05 +0000 Subject: [issue10186] Invalid SyntaxError pointer offset In-Reply-To: <1287877325.31.0.208364473897.issue10186@psf.upfronthosting.co.za> Message-ID: <1287877325.31.0.208364473897.issue10186@psf.upfronthosting.co.za> New submission from Alex : Builtin SyntaxError formatter does never point to char before last in wrong source line. traceback.format_exception() is not affected. *** Example: >>> raise SyntaxError('', ('', 0, 3, 'hello')) ... hello ^ SyntaxError: test >>> raise SyntaxError('', ('', 0, 4, 'hello')) ... hello ^ SyntaxError: test >>> raise SyntaxError('', ('', 0, 5, 'hello')) ... hello # <-- note that it's not "o" ^ SyntaxError: test >>> raise SyntaxError('', ('', 0, 6, 'hello')) ... hello ^ SyntaxError: test ---------- components: Interpreter Core messages: 119479 nosy: mwizard priority: normal severity: normal status: open title: Invalid SyntaxError pointer offset versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 01:48:22 2010 From: report at bugs.python.org (And Clover) Date: Sat, 23 Oct 2010 23:48:22 +0000 Subject: [issue10155] Add fixups for encoding problems to wsgiref In-Reply-To: <1287591822.31.0.50492787235.issue10155@psf.upfronthosting.co.za> Message-ID: <1287877702.55.0.861641527937.issue10155@psf.upfronthosting.co.za> Changes by And Clover : Removed file: http://bugs.python.org/file19303/wsgiref-patches-3.2a3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 01:55:24 2010 From: report at bugs.python.org (Alex) Date: Sat, 23 Oct 2010 23:55:24 +0000 Subject: [issue10186] Invalid SyntaxError pointer offset In-Reply-To: <1287877325.31.0.208364473897.issue10186@psf.upfronthosting.co.za> Message-ID: <1287878124.59.0.562156715752.issue10186@psf.upfronthosting.co.za> Changes by Alex : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 02:06:50 2010 From: report at bugs.python.org (And Clover) Date: Sun, 24 Oct 2010 00:06:50 +0000 Subject: [issue10155] Add fixups for encoding problems to wsgiref In-Reply-To: <1287591822.31.0.50492787235.issue10155@psf.upfronthosting.co.za> Message-ID: <1287878810.41.0.153465992171.issue10155@psf.upfronthosting.co.za> And Clover added the comment: Ah, sorry, submitted wrong patch against 3.2, disregard. Here's the 'proper' version (the functionality isn't changed, just the former patch had an unused and-Falsed out clause for reading environb, which in the end I decided not to use as the surrogateescape approach already covers it just as well for values). @?ric: yes. Actually the whole patch is pretty much new functionality, which should not be considered for a 2.7.x bugfix release. I've submitted a patch against 2.7 for completeness and for the use of a separately-maintained post-2.7 wsgiref, but unless there is ever a Python 2.8 it should never hit stdlib. The status quo wrt Unicode in environ is broken and inconsistent, which an accepted PEP 3333 would finally clear up. But there may be webapps deployed that rely on their particular server's current inconsistent environ, and those shouldn't be broken by a bugfix 2.7 or 3.1 release. ---------- versions: -Python 3.1 Added file: http://bugs.python.org/file19348/wsgiref-patches-3.2a3.proper.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 04:52:57 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 24 Oct 2010 02:52:57 +0000 Subject: [issue10186] Invalid SyntaxError pointer offset In-Reply-To: <1287877325.31.0.208364473897.issue10186@psf.upfronthosting.co.za> Message-ID: <1287888777.77.0.445254357509.issue10186@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r85814 ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 05:04:46 2010 From: report at bugs.python.org (wjm251) Date: Sun, 24 Oct 2010 03:04:46 +0000 Subject: [issue10187] exec encode unicode to utf-8 str automatically in GBK environment In-Reply-To: <1287889486.79.0.122222504002.issue10187@psf.upfronthosting.co.za> Message-ID: <1287889486.79.0.122222504002.issue10187@psf.upfronthosting.co.za> New submission from wjm251 : windows Xp chinese version see the attached file, the header was set to GBK,and the file is GBK encoded, but why the output was '\xe5\xa4\xa7'(it is utf-8 encoded of Chinese character "?") ---------- components: Library (Lib) files: test.py messages: 119482 nosy: wjm251 priority: normal severity: normal status: open title: exec encode unicode to utf-8 str automatically in GBK environment type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file19349/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 05:24:25 2010 From: report at bugs.python.org (wjm251) Date: Sun, 24 Oct 2010 03:24:25 +0000 Subject: [issue10187] exec encode unicode to utf-8 str automatically in GBK environment In-Reply-To: <1287889486.79.0.122222504002.issue10187@psf.upfronthosting.co.za> Message-ID: <1287890665.91.0.309175606068.issue10187@psf.upfronthosting.co.za> wjm251 added the comment: in windows English Version and ubuntu 10.04(locale is utf-8) all have the same the behavior, am I wrong? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 06:57:23 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 24 Oct 2010 04:57:23 +0000 Subject: [issue10164] Add an assertBytesEqual to unittest and use it for bytes assertEqual In-Reply-To: <1287665297.21.0.48545376383.issue10164@psf.upfronthosting.co.za> Message-ID: <1287896243.28.0.213028533072.issue10164@psf.upfronthosting.co.za> R. David Murray added the comment: My best guess currently is that the failing test is a bug in difflib, but I haven't dug into that code yet to prove it. It's still possible it's something stupid in my code, but as far as I can see there's no character over where that - is in the difflib output (that is, the two lines that it says are different appear identical when viewed with cat -A). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 07:14:20 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 24 Oct 2010 05:14:20 +0000 Subject: [issue9228] Make changes in the path and pathext on installation In-Reply-To: <1278892287.6.0.671523214632.issue9228@psf.upfronthosting.co.za> Message-ID: <1287897260.84.0.272531871664.issue9228@psf.upfronthosting.co.za> R. David Murray added the comment: Modifying the path has be definitely rejected by python-dev. I don't know enough about windows to comment on the other two, but I suspect that everything that it is reasonable to do automatically is already being done. ---------- nosy: +loewis, r.david.murray resolution: -> rejected stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 07:17:41 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 24 Oct 2010 05:17:41 +0000 Subject: [issue7696] Improve Memoryview/Buffer documentation In-Reply-To: <1263418431.81.0.407262013758.issue7696@psf.upfronthosting.co.za> Message-ID: <1287897461.89.0.826117073463.issue7696@psf.upfronthosting.co.za> R. David Murray added the comment: Antoine, is there more that remains to be done on this, or can it be closed? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 08:38:43 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 24 Oct 2010 06:38:43 +0000 Subject: [issue10187] exec encode unicode to utf-8 str automatically in GBK environment In-Reply-To: <1287889486.79.0.122222504002.issue10187@psf.upfronthosting.co.za> Message-ID: <1287902323.29.0.362505859757.issue10187@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is not a bug, but intentional. a is a Unicode string; it does not have an encoding internally (not GBK, not UTF-8). Then, the string being exec'ed also becomes a Unicode string. exec'ing Unicode strings is confusing; try to avoid this. The semantics of exec'ing a Unicode string is that all str (but not unicode) literals get encoded as UTF-8. To see the result you expect, write a = "??" ---------- nosy: +loewis resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 08:42:42 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 24 Oct 2010 06:42:42 +0000 Subject: [issue10187] exec encode unicode to utf-8 str automatically in GBK environment In-Reply-To: <1287889486.79.0.122222504002.issue10187@psf.upfronthosting.co.za> Message-ID: <1287902562.92.0.242904384423.issue10187@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Oops, I meant a = "?" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 08:44:52 2010 From: report at bugs.python.org (wjm251) Date: Sun, 24 Oct 2010 06:44:52 +0000 Subject: [issue10187] exec encode unicode to utf-8 str automatically in GBK environment In-Reply-To: <1287889486.79.0.122222504002.issue10187@psf.upfronthosting.co.za> Message-ID: <1287902692.07.0.436732869163.issue10187@psf.upfronthosting.co.za> wjm251 added the comment: but why it is forced to encoded to utf-8, I think it should be encoded by the locale related encodings,not always utf-8, for example,in GBK locale,it should use GBK to encode the unicode object,right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 08:55:56 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 24 Oct 2010 06:55:56 +0000 Subject: [issue10187] exec encode unicode to utf-8 str automatically in GBK environment In-Reply-To: <1287902692.07.0.436732869163.issue10187@psf.upfronthosting.co.za> Message-ID: <4CC3D879.5070503@v.loewis.de> Martin v. L?wis added the comment: > but why it is forced to encoded to utf-8, > I think it should be encoded by the locale related encodings,not always utf-8, > for example,in GBK locale,it should use GBK to encode the unicode object,right? Wrong. Exec'ing Unicode strings has been specified to encode all strings as UTF-8. This cannot be changed anymore. Even if this was possible to change, it should *not* use the locale encoding. The source encoding and the locale encoding are independent; the source encoding is normally determined from PEP 263 declarations. So if anything, exec'ing Unicode strings should use an encoding declaration that you have in that string. However, you don't have one, and they are unsupported for Unicode strings, anyway. ---------- title: exec encode unicode to utf-8 str automatically in GBK environment -> exec encode unicode to utf-8 str automatically in GBK environment _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 09:01:55 2010 From: report at bugs.python.org (wjm251) Date: Sun, 24 Oct 2010 07:01:55 +0000 Subject: [issue10187] exec encode unicode to utf-8 str automatically in GBK environment In-Reply-To: <1287889486.79.0.122222504002.issue10187@psf.upfronthosting.co.za> Message-ID: <1287903715.2.0.324412665877.issue10187@psf.upfronthosting.co.za> wjm251 added the comment: oh,you mentioned the PEP 263 but I already set a header like this,you can see the attached test.py #coding=GBK why exec choose to use utf-8 not GBK? GBK is a valid Chinese character set in python26 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 09:15:05 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 24 Oct 2010 07:15:05 +0000 Subject: [issue10187] exec encode unicode to utf-8 str automatically in GBK environment In-Reply-To: <1287903715.2.0.324412665877.issue10187@psf.upfronthosting.co.za> Message-ID: <4CC3DCF6.6080107@v.loewis.de> Martin v. L?wis added the comment: > oh,you mentioned the PEP 263 > but I already set a header like this,you can see the attached test.py > #coding=GBK You have that in test.py, but not in the string you are giving to exec. This is really a separate source code. So you could have written exec '''#coding:GBK print hi('%s') ''' % a You didn't, hence the code you pass to exec has no declared source encoding. > why exec choose to use utf-8 not GBK? exec always choses UTF-8 when exec'ing Unicode strings. The source encoding of the file that has the exec statement must be irrelevant: the string being exec'ed may have been received from a different source file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 09:38:37 2010 From: report at bugs.python.org (wjm251) Date: Sun, 24 Oct 2010 07:38:37 +0000 Subject: [issue10187] exec encode unicode to utf-8 str automatically in GBK environment In-Reply-To: <1287889486.79.0.122222504002.issue10187@psf.upfronthosting.co.za> Message-ID: <1287905917.98.0.273289902713.issue10187@psf.upfronthosting.co.za> wjm251 added the comment: Got that , thank you ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 09:47:48 2010 From: report at bugs.python.org (Ask Solem) Date: Sun, 24 Oct 2010 07:47:48 +0000 Subject: [issue4999] multiprocessing.Queue does not order objects In-Reply-To: <1232369845.16.0.0391307501892.issue4999@psf.upfronthosting.co.za> Message-ID: <1287906468.53.0.521702488263.issue4999@psf.upfronthosting.co.za> Ask Solem added the comment: Updated doc patch ---------- nosy: +asksol Added file: http://bugs.python.org/file19350/issue-4999.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 10:19:04 2010 From: report at bugs.python.org (Ask Solem) Date: Sun, 24 Oct 2010 08:19:04 +0000 Subject: [issue8037] multiprocessing.Queue's put() not atomic thread wise In-Reply-To: <1267482006.55.0.281200221208.issue8037@psf.upfronthosting.co.za> Message-ID: <1287908344.92.0.408100644547.issue8037@psf.upfronthosting.co.za> Ask Solem added the comment: AFAICS the object will be pickled twice with this patch. See Modules/_multiprocessing/connection.h: connection_send_obj. ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 10:22:07 2010 From: report at bugs.python.org (Ask Solem) Date: Sun, 24 Oct 2010 08:22:07 +0000 Subject: [issue8037] multiprocessing.Queue's put() not atomic thread wise In-Reply-To: <1267482006.55.0.281200221208.issue8037@psf.upfronthosting.co.za> Message-ID: <1287908527.59.0.913345726536.issue8037@psf.upfronthosting.co.za> Ask Solem added the comment: aha, no. I see now you use connection.send_bytes instead. Then I can't think of any issues with this patch, but I don't know why it was done this way in the first place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 10:22:58 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 24 Oct 2010 08:22:58 +0000 Subject: [issue4999] multiprocessing.Queue does not order objects In-Reply-To: <1232369845.16.0.0391307501892.issue4999@psf.upfronthosting.co.za> Message-ID: <1287908578.38.0.616935685119.issue4999@psf.upfronthosting.co.za> Georg Brandl added the comment: Are you sure this needs to be a warning? We try to use them very sparingly. (Also note the 3-space indent for reStructuredText markup.) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 10:29:49 2010 From: report at bugs.python.org (Ask Solem) Date: Sun, 24 Oct 2010 08:29:49 +0000 Subject: [issue7200] multiprocessing deadlock on Mac OS X when queue collected before process terminates In-Reply-To: <1256425837.07.0.628633816678.issue7200@psf.upfronthosting.co.za> Message-ID: <1287908989.37.0.125196922629.issue7200@psf.upfronthosting.co.za> Ask Solem added the comment: Queue uses multiprocessing.util.Finalize, which uses weakrefs to track when the object is out of scope, so this is actually expected behavior. IMHO it is not a very good approach, but changing the API to use explicit close methods is a little late at this point, I guess. ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 10:44:41 2010 From: report at bugs.python.org (Ask Solem) Date: Sun, 24 Oct 2010 08:44:41 +0000 Subject: [issue6407] multiprocessing Pool should allow custom task queue In-Reply-To: <1246627398.56.0.0568609724018.issue6407@psf.upfronthosting.co.za> Message-ID: <1287909881.34.0.465162541642.issue6407@psf.upfronthosting.co.za> Ask Solem added the comment: Matthew, would you be willing to write tests + documentation for this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 10:58:26 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 24 Oct 2010 08:58:26 +0000 Subject: [issue8777] Add threading.Barrier In-Reply-To: <1274375262.53.0.647489735751.issue8777@psf.upfronthosting.co.za> Message-ID: <1287910706.4.0.14018811361.issue8777@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Hi, I had forgotten about this. I went back to the drawing board and had almost completed a new version. Looking at the Java barrier shows how one can go overboard with stuff. My though with the barrier is to provide a simple synchronization primitive that works well for example in the unittests, without trying too hard to over design it in terms of failure modes. Anyway, I?ll get my act together. Same with RWLock, that is almost ready ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 10:59:50 2010 From: report at bugs.python.org (Ask Solem) Date: Sun, 24 Oct 2010 08:59:50 +0000 Subject: [issue7474] multiprocessing.managers.SyncManager managed object creation fails when started outside of invoked file In-Reply-To: <1260477184.12.0.729093197155.issue7474@psf.upfronthosting.co.za> Message-ID: <1287910790.12.0.539820746271.issue7474@psf.upfronthosting.co.za> Ask Solem added the comment: I can't seem to reproduce this on trunk... ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 11:09:44 2010 From: report at bugs.python.org (Ask Solem) Date: Sun, 24 Oct 2010 09:09:44 +0000 Subject: [issue5573] multiprocessing Pipe poll() and recv() semantics. In-Reply-To: <1238096312.97.0.564685442594.issue5573@psf.upfronthosting.co.za> Message-ID: <1287911384.76.0.504487345043.issue5573@psf.upfronthosting.co.za> Ask Solem added the comment: I don't know about the socket internals, but I find the behavior acceptable. It may not be feasible to change it now anyway, as there may be people already depending on it (e.g. not handling errors occurring at poll) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 11:21:11 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Oct 2010 09:21:11 +0000 Subject: [issue5178] Add context manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1287912071.66.0.601078651518.issue5178@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 11:22:15 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Oct 2010 09:22:15 +0000 Subject: [issue8202] sys.argv[0] and python -m package In-Reply-To: <1269289306.17.0.0782561601798.issue8202@psf.upfronthosting.co.za> Message-ID: <1287912135.28.0.292173134079.issue8202@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 12:21:45 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 24 Oct 2010 10:21:45 +0000 Subject: [issue10156] Initialization of globals in unicodeobject.c In-Reply-To: <1287595627.82.0.548953621137.issue10156@psf.upfronthosting.co.za> Message-ID: <1287915705.68.0.697586370956.issue10156@psf.upfronthosting.co.za> Stefan Krah added the comment: > why should _PyUnicode_Init() try to call _PyUnicode_InitGlobals() again? For the embedding scenario (when only Py_Initialize() is called) I wanted to preserve the old behavior of _PyUnicode_Init(). But this is not really enough. I wrote a new patch that also calls _PyUnicode_InitGlobals() at the beginning of Py_Initialize(). I don't like the fact that even more clutter is added to Py_Main(). Perhaps Py_Initialize() could be moved up or the Unicode functions could be moved down. ---------- Added file: http://bugs.python.org/file19351/unicode_init_globals2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 12:38:15 2010 From: report at bugs.python.org (Vilnis Termanis) Date: Sun, 24 Oct 2010 10:38:15 +0000 Subject: [issue8037] multiprocessing.Queue's put() not atomic thread wise In-Reply-To: <1267482006.55.0.281200221208.issue8037@psf.upfronthosting.co.za> Message-ID: <1287916695.01.0.382628641553.issue8037@psf.upfronthosting.co.za> Vilnis Termanis added the comment: The idea is to pickle the object immediately (i.e. when added) instead of when requested (dequeued). This means that any operations (even deletion) performed on the original object do not make changes to the item in the queue, before it has been dequeued. Whether this is an acceptable solution I don't know.. it's just my proposal. The attached queue_example.py script illustrates what I mean. Regards, VT ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 12:53:00 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Oct 2010 10:53:00 +0000 Subject: [issue10188] tempfile.TemporaryDirectory may throw errors at shutdown In-Reply-To: <1287917580.57.0.982180579105.issue10188@psf.upfronthosting.co.za> Message-ID: <1287917580.57.0.982180579105.issue10188@psf.upfronthosting.co.za> New submission from Nick Coghlan : During interpreter shutdown, modules can become unusable as module globals are set to None. This is a problem for tempfile.TemporaryDirectory, as it needs working os, os.path and stat modules in order to clean up the filesystem. The class makes a valiant attempt at reducing the frequency of these errors, but it is ultimately useless, since the three modules internally rely on their various globals remaining valid. Issue #812369 may be a possible solution to this problem, or perhaps even an explicit list of essential modules that are nulled out only after all other modules have been destroyed. ---------- messages: 119505 nosy: ncoghlan priority: normal severity: normal status: open title: tempfile.TemporaryDirectory may throw errors at shutdown _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 13:10:33 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 24 Oct 2010 11:10:33 +0000 Subject: [issue9408] curses: Link against libncursesw instead of libncurses In-Reply-To: <1280360992.02.0.384889308435.issue9408@psf.upfronthosting.co.za> Message-ID: <1287918633.02.0.471002345837.issue9408@psf.upfronthosting.co.za> Stefan Krah added the comment: There are two issues here: (1) If libreadline is already linked against ncurses, there is no way that the readline module should be linked against ncursesw. This was the direct cause of the FreeBSD segfault, so this configuration is also prohibited in 2.6/3.1. (2) Interaction between the readline and curses modules: 2.6/3.1 still allow readline+ncurses with curses+ncursesw. To be on the safe side, 2.7/3.2 enforce all ncurses or all ncursesw. (1) implies that if your readline module is linked against ncurses in 3.1, you should find that libreadline is also linked against ncurses. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 13:15:01 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Oct 2010 11:15:01 +0000 Subject: [issue10188] tempfile.TemporaryDirectory may throw errors at shutdown In-Reply-To: <1287917580.57.0.982180579105.issue10188@psf.upfronthosting.co.za> Message-ID: <1287918901.21.0.835897486457.issue10188@psf.upfronthosting.co.za> Nick Coghlan added the comment: Cleanup of sys and __builtin__ is already delayed - this particular issue could be fixed by delaying cleanup of a few more modules, along with the proposed change to GC invocation in issue #1545463. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 13:16:49 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 24 Oct 2010 11:16:49 +0000 Subject: [issue9408] curses: Link against libncursesw instead of libncurses In-Reply-To: <1280360992.02.0.384889308435.issue9408@psf.upfronthosting.co.za> Message-ID: <1287919009.07.0.117427537019.issue9408@psf.upfronthosting.co.za> Stefan Krah added the comment: Hmm, I understood that your ldd lines implied that things don't work as intended in 3.1, hence the explanation. Perhaps this wasn't the case. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 13:23:57 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Oct 2010 11:23:57 +0000 Subject: [issue5178] Add context manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1287919437.69.0.197907076599.issue5178@psf.upfronthosting.co.za> Nick Coghlan added the comment: Committed (with enhanced tests and a few fixes) in r85818 And credit where it's due to test___all__ for picking up a typo in my adjustment to tempfile.__all__ :) I created issue #10188 to track the shutdown problem. I'm considering taking out the code that attempts to allow the __del__ method to work at shutdown though, since it isn't actually achieving anything (I wanted a record of it in the main repository, which is why I kept it for the initial checkin). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 13:24:09 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Oct 2010 11:24:09 +0000 Subject: [issue5178] Add context manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1287919449.6.0.685508092612.issue5178@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 14:32:09 2010 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Sun, 24 Oct 2010 12:32:09 +0000 Subject: [issue10184] tarfile touches directories twice In-Reply-To: <1287860800.8.0.977653393639.issue10184@psf.upfronthosting.co.za> Message-ID: <1287923529.43.0.218246124269.issue10184@psf.upfronthosting.co.za> Lars Gust?bel added the comment: The patch goes a bit too far. Though it solves this particular problem with the way TarFile.extractall() works, it breaks TarFile.extract(). Running the testsuite does not expose this, simply because there's no testcase :-( Please see the attached testcase I just wrote which illustrates the problem. ---------- nosy: +lars.gustaebel Added file: http://bugs.python.org/file19352/tarfile-extract-directory-test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 15:09:56 2010 From: report at bugs.python.org (Matthew Leon Grinshpun) Date: Sun, 24 Oct 2010 13:09:56 +0000 Subject: [issue6407] multiprocessing Pool should allow custom task queue In-Reply-To: <1246627398.56.0.0568609724018.issue6407@psf.upfronthosting.co.za> Message-ID: <1287925796.41.0.538284367747.issue6407@psf.upfronthosting.co.za> Matthew Leon Grinshpun added the comment: I should be able to do this in November. For the moment I'm a bit busy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 15:42:52 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Oct 2010 13:42:52 +0000 Subject: [issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally In-Reply-To: <1284643512.64.0.708677047597.issue9873@psf.upfronthosting.co.za> Message-ID: <1287927772.79.0.561294114733.issue9873@psf.upfronthosting.co.za> Nick Coghlan added the comment: Attached a second version of the patch. Notable features: - uses a coercion-to-str-and-back strategy (using ascii-strict) - a significantly more comprehensive pass through the urlparse test suite. I'm happy that the test suite mods are complete with this pass. The actual coercion-to-str technique I used standardises the type consistency check for the attributes and also returns a callable that handles the necessary coercion of any results. The parsed/split result objects gain encode/decode methods to allow that all to be handled polymorphically (although I think the decode methods may actually be redundant in practice). There's a deliberate loophole in the type consistency checking to allow the empty string to be type-neutral. Without that, the scheme='' default argument to urlsplit and urlparse becomes painful (as do the urljoin shortcuts for base or url being the empty string). Implementing this was night and day when compared to the initial attempt that tried to actually manipulate bytes input as bytes. With that patch, it took me multiple runs of the test suite to get everything working. This time, the only things I had to fix were typos and bugs in the additional test suite enhancements. The actual code logic for the type coercions worked first time. ---------- Added file: http://bugs.python.org/file19353/issue9873_coercion_to_str.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 15:48:02 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Oct 2010 13:48:02 +0000 Subject: [issue9873] urllib.parse: Allow bytes in some APIs that use string literals internally In-Reply-To: <1284643512.64.0.708677047597.issue9873@psf.upfronthosting.co.za> Message-ID: <1287928082.39.0.533597243986.issue9873@psf.upfronthosting.co.za> Nick Coghlan added the comment: Unless I hear some reasonable objections within the next week or so, I'm going to document and commit the ascii-strict coercion approach for beta 1. The difference in code clarity is such that I'm not even going to try to benchmark the two approaches against each other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 15:52:36 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Oct 2010 13:52:36 +0000 Subject: [issue10049] Add a "no-op" (null) context manager to contextlib In-Reply-To: <1286536426.03.0.247784217987.issue10049@psf.upfronthosting.co.za> Message-ID: <1287928356.64.0.0706920190396.issue10049@psf.upfronthosting.co.za> Nick Coghlan added the comment: I find Raymond's perspective persuasive in this case. Feel free to post either the original idea or my later variant as an ASPN cookbook recipe. (you could actually combine the two, and use NullContext as an implementation detail of an optional_cm() function) ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 15:57:47 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Oct 2010 13:57:47 +0000 Subject: [issue2690] Precompute range length In-Reply-To: <1209137521.96.0.492875701205.issue2690@psf.upfronthosting.co.za> Message-ID: <1287928667.56.0.934451381614.issue2690@psf.upfronthosting.co.za> Nick Coghlan added the comment: I'd still like to have another look at this before beta 1, but can't promise I'll get to it. Unassigning in case someone else has some roundtuits to spare over the next few weeks. ---------- assignee: ncoghlan -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 16:01:26 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Oct 2010 14:01:26 +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: <1287928886.75.0.529851134015.issue5251@psf.upfronthosting.co.za> Nick Coghlan added the comment: R.I.P contextlib.nested (it is gone in 3.2 following the deprecation in 3.1). The issue is obscure enough that I don't see much value in updating the documentation for the versions that still contain it in deprecated form. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 16:05:05 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 24 Oct 2010 14:05:05 +0000 Subject: [issue9517] Make test.script_helper more comprehensive, and use it in the test suite In-Reply-To: <1280962247.74.0.724550733964.issue9517@psf.upfronthosting.co.za> Message-ID: <1287929105.93.0.866361036776.issue9517@psf.upfronthosting.co.za> Nick Coghlan added the comment: I still think this is a good idea, I'm just not actively working on it. It might make a good project for someone wanting to get to know the process of working on CPython without having to deal with anything that is particularly tricky to understand. ---------- assignee: ncoghlan -> keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 17:23:48 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 24 Oct 2010 15:23:48 +0000 Subject: [issue9437] can't build extensions with non-default ldflags (e.g. -m32) In-Reply-To: <1280591712.46.0.151463924195.issue9437@psf.upfronthosting.co.za> Message-ID: <1287933828.66.0.733230699912.issue9437@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: These changes cause some regressions: - distutils builds third-party extensions with LDFLAGS, which were used to build CPython. (This is more important regression.) This problem concerns Python 2.7 and 3.2. - distutils builds third-party extensions with LDFLAGS environment variable passed twice to compiler (distutils uses LDSHARED, which now contains $(LDFLAGS), and uses LDFLAGS). This problem concerns Python 3.2. Example for 3.2: x86_64-pc-linux-gnu-gcc -pthread -shared ${LDFLAGS_from_CPython} ${LDFLAGS_from_current_environment} ${LDFLAGS_from_current_environment} ${CFLAGS} ${object_files} -L/usr/lib64 -lpython3.2mu -o ${extension_module} ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 17:42:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Oct 2010 15:42:57 +0000 Subject: [issue9437] can't build extensions with non-default ldflags (e.g. -m32) In-Reply-To: <1287933828.66.0.733230699912.issue9437@psf.upfronthosting.co.za> Message-ID: <1287934972.3587.4.camel@localhost.localdomain> Antoine Pitrou added the comment: > These changes cause some regressions: > - distutils builds third-party extensions with LDFLAGS, which were > used to build CPython. (This is more important regression.) > This problem concerns Python 2.7 and 3.2. Well, is this a problem? This sounds like the expected behaviour to me. Especially if Python was packaged was someone else and you don't want the user to manually set LDFLAGS each time they run a setup.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 17:44:14 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 24 Oct 2010 15:44:14 +0000 Subject: [issue7696] Improve Memoryview/Buffer documentation In-Reply-To: <1287897461.89.0.826117073463.issue7696@psf.upfronthosting.co.za> Message-ID: <1287935050.3587.5.camel@localhost.localdomain> Antoine Pitrou added the comment: > Antoine, is there more that remains to be done on this, or can it be closed? I don't know really. I have done what I thought necessary on memoryview/buffer maintenance, and I don't really want to go any further. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 17:57:59 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 24 Oct 2010 15:57:59 +0000 Subject: [issue7696] Improve Memoryview/Buffer documentation In-Reply-To: <1263418431.81.0.407262013758.issue7696@psf.upfronthosting.co.za> Message-ID: <1287935879.42.0.984651013636.issue7696@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Let's close then. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 19:30:32 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 24 Oct 2010 17:30:32 +0000 Subject: [issue10000] mark more tests as CPython specific In-Reply-To: <1285861695.5.0.301447830736.issue10000@psf.upfronthosting.co.za> Message-ID: <1287941432.14.0.453142867204.issue10000@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Tests nosy: +eric.araujo stage: -> needs patch type: -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 19:32:26 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 24 Oct 2010 17:32:26 +0000 Subject: [issue10002] Installer doesn't install on Windows Server 2008 DataCenter R2 In-Reply-To: <1285882629.62.0.145594356076.issue10002@psf.upfronthosting.co.za> Message-ID: <1287941546.12.0.807161335083.issue10002@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 19:34:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 24 Oct 2010 17:34:12 +0000 Subject: [issue10006] non-Pythonic fate of __abstractmethods__ In-Reply-To: <1285940853.14.0.546762707016.issue10006@psf.upfronthosting.co.za> Message-ID: <1287941652.91.0.178861192313.issue10006@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 19:35:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 24 Oct 2010 17:35:15 +0000 Subject: [issue10188] tempfile.TemporaryDirectory may throw errors at shutdown In-Reply-To: <1287917580.57.0.982180579105.issue10188@psf.upfronthosting.co.za> Message-ID: <1287941715.88.0.349030841045.issue10188@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 19:37:06 2010 From: report at bugs.python.org (Brian Curtin) Date: Sun, 24 Oct 2010 17:37:06 +0000 Subject: [issue10002] Installer doesn't install on Windows Server 2008 DataCenter R2 In-Reply-To: <1285882629.62.0.145594356076.issue10002@psf.upfronthosting.co.za> Message-ID: <1287941826.63.0.897963232225.issue10002@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 19:50:23 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 24 Oct 2010 17:50:23 +0000 Subject: [issue10171] Ugly buttons in some Tkinter objects in Windows In-Reply-To: <1287714866.92.0.753573590678.issue10171@psf.upfronthosting.co.za> Message-ID: <1287942623.21.0.536109730255.issue10171@psf.upfronthosting.co.za> ?ric Araujo added the comment: In my GTK desktop environment, your two examples produce windows that don?t respect my theme. Can you give me an example that uses correct buttons for you so that I can see what I should expect? I?m not sure this is a bug or a feature request. ---------- components: -Windows nosy: +eric.araujo versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 20:23:03 2010 From: report at bugs.python.org (Rafe Kettler) Date: Sun, 24 Oct 2010 18:23:03 +0000 Subject: [issue10171] Ugly buttons in some Tkinter objects in Windows In-Reply-To: <1287714866.92.0.753573590678.issue10171@psf.upfronthosting.co.za> Message-ID: <1287944583.4.0.410193027434.issue10171@psf.upfronthosting.co.za> Rafe Kettler added the comment: If you were to create a FileDialog, you should see proper buttons (at least I do in Windows): import tkFileDialog tkFileDialog.askopenfile() I think that this goes more along the lines of a bug, because I know that Tkinter has the ability to properly show buttons. So, it would seem to be a bug that for two types of dialogs, the buttons aren't displayed correctly and rather reflect an old-style button. I'm not sure if this is on the Python or Tcl side of the problem, but I really have no way of testing the Tcl/Tk implementation of these dialogs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 20:25:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 24 Oct 2010 18:25:13 +0000 Subject: [issue10019] json.dumps with indent = 0 not adding newlines In-Reply-To: <1286122957.24.0.240376565719.issue10019@psf.upfronthosting.co.za> Message-ID: <1287944713.64.0.687492127236.issue10019@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 20:41:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 24 Oct 2010 18:41:36 +0000 Subject: =?utf-8?q?=5Bissue10013=5D_fix_=60=2E/libpython2=2E6=2Eso=3A_undefined_re?= =?utf-8?q?ference_to_=60=5FPyParser=5FGrammar=C2=B4=60_in_parallel_builds?= In-Reply-To: <1286018023.44.0.511102577172.issue10013@psf.upfronthosting.co.za> Message-ID: <1287945696.14.0.175407800969.issue10013@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 20:45:40 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 24 Oct 2010 18:45:40 +0000 Subject: [issue10002] Installer doesn't install on Windows Server 2008 DataCenter R2 In-Reply-To: <1285882629.62.0.145594356076.issue10002@psf.upfronthosting.co.za> Message-ID: <1287945940.2.0.779621914502.issue10002@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: -r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 21:11:33 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 24 Oct 2010 19:11:33 +0000 Subject: [issue10184] tarfile touches directories twice In-Reply-To: <1287860800.8.0.977653393639.issue10184@psf.upfronthosting.co.za> Message-ID: <1287947493.05.0.297005115059.issue10184@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I see. Here is an updated version that makes the touch operations optional. ---------- assignee: ghaering -> lars.gustaebel nosy: -ghaering Added file: http://bugs.python.org/file19354/tarfile2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 21:16:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 24 Oct 2010 19:16:15 +0000 Subject: [issue10171] Ugly buttons in some Tkinter objects in Windows In-Reply-To: <1287714866.92.0.753573590678.issue10171@psf.upfronthosting.co.za> Message-ID: <1287947775.33.0.641607207612.issue10171@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks, I tested the file dialog example and it does not respect my theme either. Re-adding the Windows component. I suspect the bug is in Python. Like you said, Tcl/Tk and Tkinter do have the ability to use new shiny buttons, it?s just two modules that are not consistent with the rest. If you could look into the Python code and make suggestions or maybe a patch, it would help gpolo fix this. ---------- components: +Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 21:22:07 2010 From: report at bugs.python.org (Alex) Date: Sun, 24 Oct 2010 19:22:07 +0000 Subject: [issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback In-Reply-To: <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za> Message-ID: <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za> New submission from Alex : Given the code: def f(): def g(): nonlocal a a = 3 Running it produces: alex at alex-laptop:/tmp$ python3.1 test.py SyntaxError: no binding for nonlocal 'a' found Compared to a different SyntaxError: alex at alex-laptop:/tmp$ python3.1 test.py File "test.py", line 1 print a ^ SyntaxError: invalid syntax ---------- components: Interpreter Core messages: 119527 nosy: alex priority: normal severity: normal status: open title: SyntaxError: no binding for nonlocal doesn't contain a useful traceback versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 22:36:45 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Oct 2010 20:36:45 +0000 Subject: [issue8776] Bytes version of sys.argv In-Reply-To: <1274357456.02.0.0768864678422.issue8776@psf.upfronthosting.co.za> Message-ID: <1287952605.11.0.511011044974.issue8776@psf.upfronthosting.co.za> STINNER Victor added the comment: Prototype (in Python) of argvb.py. Try it with: ./python -i argvb.py. It's not possible to create sys.argvb in Python in a module loaded by Py_Initialize(), because sys.argv is created after Py_Initialize(). ---------- Added file: http://bugs.python.org/file19355/argvb.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 22:39:06 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Oct 2010 20:39:06 +0000 Subject: [issue8761] PyUnicode_CompareWithASCIIString name is not mangled (UCS2, UCS4) In-Reply-To: <1274226622.99.0.33307621938.issue8761@psf.upfronthosting.co.za> Message-ID: <1287952746.12.0.333646115491.issue8761@psf.upfronthosting.co.za> STINNER Victor added the comment: Fixed by r85827. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 22:53:32 2010 From: report at bugs.python.org (Rafe Kettler) Date: Sun, 24 Oct 2010 20:53:32 +0000 Subject: [issue10171] Ugly buttons in some Tkinter objects in Windows In-Reply-To: <1287714866.92.0.753573590678.issue10171@psf.upfronthosting.co.za> Message-ID: <1287953612.17.0.0100653900591.issue10171@psf.upfronthosting.co.za> Rafe Kettler added the comment: I haven't had a chance to look too deeply into the source, but it appears (at least in Python 2.7) that the problem has something to do with the commands that the classes in tkMessageBox and tkColorChooser pass to tk.call(). The Message class in tkMessageBox, the Chooser class in tkColorChooser, and the various dialog classes in tkFileDialog all subclass Dialog, which is defined in tkCommonDialog. Since the dialogs in tkFileDialog have the right buttons, there's probably nothing wrong with the Dialog superclass. However, Chooser and Message both define their own command variables (tk_chooseColor and tk_messageBox, respectively) that are then passed to a Frame's tk.call method. So, when I get an extra minute I'll go in and see what might be going on with tk_chooseColor and tk_messageBox. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 24 23:05:51 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 24 Oct 2010 21:05:51 +0000 Subject: [issue10161] unittest: use ascii() instead of repr() to display values on error In-Reply-To: <1287620045.08.0.616475344874.issue10161@psf.upfronthosting.co.za> Message-ID: <1287954351.35.0.237649020249.issue10161@psf.upfronthosting.co.za> STINNER Victor added the comment: Closed with r85829: patch test_pep277 instead of unittest. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 00:52:22 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 24 Oct 2010 22:52:22 +0000 Subject: [issue1542677] compile(): IDLE shell gives different len() of unicode strings compared to Python shell Message-ID: <1287960742.61.0.0906169371087.issue1542677@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Unicode nosy: +eric.araujo, lemburg, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 03:11:35 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 25 Oct 2010 01:11:35 +0000 Subject: [issue10161] unittest: use ascii() instead of repr() to display values on error In-Reply-To: <1287620045.08.0.616475344874.issue10161@psf.upfronthosting.co.za> Message-ID: <1287969095.87.0.732297624055.issue10161@psf.upfronthosting.co.za> Michael Foord added the comment: Although this is still a real issue for other users of unittest. If I get time to think about it properly I may reopen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 04:01:56 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Oct 2010 02:01:56 +0000 Subject: [issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback In-Reply-To: <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za> Message-ID: <1287972116.99.0.832503237323.issue10189@psf.upfronthosting.co.za> R. David Murray added the comment: There are a number of such symbol resolution error messages for nonlocal that don't provide location information in symtable.c. I'm not very experienced with hacking the C code, but a naive addition of location information based on similar calls that do provide it results in error messages that point to the "wrong" line(*). So my guess is that the person who implemented this code just didn't get around to dealing with that localization issue. It would appear from svn log like the person in question is Jeremy Hylton, so I'm adding him as nosy. (*) I put wrong in quotes because it's not wrong from the point of view of the code generating the error, because that code is looking at blocks, not lines. But it's wrong from the point of view of the user reading the message.... ---------- nosy: +jhylton, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 04:09:20 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Oct 2010 02:09:20 +0000 Subject: [issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback In-Reply-To: <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za> Message-ID: <1287972560.98.0.189210391403.issue10189@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. Just to clarify, the commit message on the code in question specifically said that the implementation of nonlocal was not complete with that commit, and Jeremy wasn't the only one working on it. So this detail may have simply been overlooked. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 04:24:48 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Oct 2010 02:24:48 +0000 Subject: [issue1610654] cgi.py multipart/form-data Message-ID: <1287973488.37.0.241838755116.issue1610654@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think it was appropriate to close this issue. ---------- nosy: +r.david.murray -BreamoreBoy resolution: wont fix -> stage: unit test needed -> patch review status: closed -> open versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 04:35:59 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 25 Oct 2010 02:35:59 +0000 Subject: [issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback In-Reply-To: <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za> Message-ID: <1287974159.81.0.571438026754.issue10189@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Technically, it's because the syntax errors come from a latter part of the compiling phase when the origin of names isn't known. Fixing this would involve attaching line numbers and offsets to names somehow. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 04:36:21 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Oct 2010 02:36:21 +0000 Subject: [issue3196] Option in pydoc to show docs from private methods In-Reply-To: <1214386355.64.0.670337337662.issue3196@psf.upfronthosting.co.za> Message-ID: <1287974181.18.0.0301300003652.issue3196@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 04:47:07 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Oct 2010 02:47:07 +0000 Subject: [issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback In-Reply-To: <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za> Message-ID: <1287974827.83.0.361741262682.issue10189@psf.upfronthosting.co.za> R. David Murray added the comment: I figured it was something like that, from looking at the code. I wonder if it would be worthwhile to return the line info that is known (which I think is the start of the block containing the problematic symbol). In a complex program that would at least get one close to the problem code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 05:27:51 2010 From: report at bugs.python.org (Jack Diederich) Date: Mon, 25 Oct 2010 03:27:51 +0000 Subject: [issue7761] telnetlib Telnet.interact fails on Windows but not Linux In-Reply-To: <1264212900.62.0.226780855818.issue7761@psf.upfronthosting.co.za> Message-ID: <1287977271.82.0.257386107765.issue7761@psf.upfronthosting.co.za> Jack Diederich added the comment: Thanks David, do you want to apply? Looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 06:44:48 2010 From: report at bugs.python.org (Dariusz Suchojad) Date: Mon, 25 Oct 2010 04:44:48 +0000 Subject: [issue10190] Can argparse._AttributeHolder._get_kwargs become a public API? In-Reply-To: <1287981887.42.0.335099838745.issue10190@psf.upfronthosting.co.za> Message-ID: <1287981887.42.0.335099838745.issue10190@psf.upfronthosting.co.za> New submission from Dariusz Suchojad : Hello, I was wondering if it were possible for the argparse._AttributeHolder._get_kwargs to become a part of the public API. Using this method is a very convenient way to get a hold of the arguments provided by the user and it would be shame to keep it private, I for one use it in several places even though I clearly know the name starts with an underscore, it's just that reimplementing it in my code seems counter-productive, would be very nice if '_get_kwargs' became 'get_kwargs' in some future release. Thanks for considering it! ---------- assignee: docs at python components: Documentation, Library (Lib) messages: 119539 nosy: bethard, docs at python, dsuch priority: normal severity: normal status: open title: Can argparse._AttributeHolder._get_kwargs become a public API? type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 08:29:18 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 25 Oct 2010 06:29:18 +0000 Subject: [issue1542677] compile(): IDLE shell gives different len() of unicode strings compared to Python shell Message-ID: <1287988158.56.0.50382887459.issue1542677@psf.upfronthosting.co.za> Martin v. L?wis added the comment: As indicated in msg59954, it works fine on 3.x, so removing these versions. ---------- versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 08:48:58 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 25 Oct 2010 06:48:58 +0000 Subject: [issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell Message-ID: <1287989338.05.0.315536342922.issue1542677@psf.upfronthosting.co.za> Martin v. L?wis added the comment: For 2.7, I don't think it's possible to really fix this. I see the following options: A. current status. Byte strings are compiled correctly, Unicode strings are not. B. compile source as a Unicode string, as proposed in msg85886. Unicode strings are compiled propertly, byte strings are not (they get compiled as UTF-8, when they should get compiled in the locale encoding) C. prefix source with encoding declaration, as proposed in msg85882. Both Unicode strings and byte strings get compiled correctly, but line numbers in tracebacks are wrong. Given that it's not possible to fix this without breaking something else, and given that it's fixed in Python 3, I propose to declare this as "won't fix" for Python 2.7. In any case, the bug is certainly not in compile(), which is behaving exactly as specified, so I revert the title change. ---------- title: compile(): IDLE shell gives different len() of unicode strings compared to Python shell -> IDLE shell gives different len() of unicode strings compared to Python shell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 09:34:53 2010 From: report at bugs.python.org (Steven Bethard) Date: Mon, 25 Oct 2010 07:34:53 +0000 Subject: [issue10190] Can argparse._AttributeHolder._get_kwargs become a public API? In-Reply-To: <1287981887.42.0.335099838745.issue10190@psf.upfronthosting.co.za> Message-ID: <1287992093.19.0.318259102545.issue10190@psf.upfronthosting.co.za> Steven Bethard added the comment: Could you elaborate a little on what you use it for? The argparse module only uses this for pretty __repr__ on the various objects. (And in fact, it looks like it's gotten a little out of sync - "required" is missing from Action, and a number of things are missing from ArgumentParser.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 11:30:15 2010 From: report at bugs.python.org (Dariusz Suchojad) Date: Mon, 25 Oct 2010 09:30:15 +0000 Subject: [issue10190] Can argparse._AttributeHolder._get_kwargs become a public API? In-Reply-To: <1287981887.42.0.335099838745.issue10190@psf.upfronthosting.co.za> Message-ID: <1287999015.89.0.172516432177.issue10190@psf.upfronthosting.co.za> Dariusz Suchojad added the comment: I find that _AttributeHolder is a handy way for passing the command line options around the application. What is lacks though is a documented API for actually fetching the attributes in batches, like .items() or something similar that could be used for iterating over all command line arguments. That's why I thought '_get_kwargs' would be a good candidate particularly because it does exactly what I need in my code, returns a sorted list of key/value parameters. But I'm not really saying that it must be '_get_kwargs', could as well be _AttributeHolder's __dict__ attribute as long as the docs say that it's a part of the public API so that I'm sure I'm not using something that may silently break between releases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 11:34:52 2010 From: report at bugs.python.org (Tim Golden) Date: Mon, 25 Oct 2010 09:34:52 +0000 Subject: [issue10190] Can argparse._AttributeHolder._get_kwargs become a public API? In-Reply-To: <1287981887.42.0.335099838745.issue10190@psf.upfronthosting.co.za> Message-ID: <1287999292.31.0.607014972003.issue10190@psf.upfronthosting.co.za> Tim Golden added the comment: Removing docs unless this actually becomes a doc issue ---------- nosy: +tim.golden -docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 11:34:57 2010 From: report at bugs.python.org (Tim Golden) Date: Mon, 25 Oct 2010 09:34:57 +0000 Subject: [issue10190] Can argparse._AttributeHolder._get_kwargs become a public API? In-Reply-To: <1287981887.42.0.335099838745.issue10190@psf.upfronthosting.co.za> Message-ID: <1287999297.9.0.497288732013.issue10190@psf.upfronthosting.co.za> Changes by Tim Golden : ---------- assignee: docs at python -> bethard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 11:38:33 2010 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Mon, 25 Oct 2010 09:38:33 +0000 Subject: [issue1542677] IDLE shell gives different len() of unicode strings compared to Python shell Message-ID: <1287999513.77.0.237596690691.issue1542677@psf.upfronthosting.co.za> Changes by Andreas St?hrk : ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 13:05:38 2010 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Mon, 25 Oct 2010 11:05:38 +0000 Subject: [issue10184] tarfile touches directories twice In-Reply-To: <1287860800.8.0.977653393639.issue10184@psf.upfronthosting.co.za> Message-ID: <1288004738.16.0.171824581032.issue10184@psf.upfronthosting.co.za> Lars Gust?bel added the comment: I'm not entirely happy with the name of the "touch" argument. Apart from it being nice and short, I think it's a little too unix-y and might be misleading because it is not only about setting the modification time as the name implies, but also owner and mode. My proposal would be "restore_attrs" or "set_attrs" which isn't half as nice as "touch", but sums up better what's actually done. I leave this up to you. I think the testcase wouldn't work on Windows the way it is now, would it? Apart from these minor issues the patch gets my blessing, go ahead ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 14:34:47 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 25 Oct 2010 12:34:47 +0000 Subject: [issue10190] Can argparse._AttributeHolder._get_kwargs become a public API? In-Reply-To: <1287981887.42.0.335099838745.issue10190@psf.upfronthosting.co.za> Message-ID: <1288010087.64.0.169613840644.issue10190@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: -Documentation nosy: +eric.araujo versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 14:52:22 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 25 Oct 2010 12:52:22 +0000 Subject: [issue5178] Add context manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1288011142.15.0.680861881172.issue5178@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Nick, could you comment about my last proposal? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 15:00:07 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Mon, 25 Oct 2010 13:00:07 +0000 Subject: [issue10157] Refleaks in pythonrun.c In-Reply-To: <1287596001.72.0.908968504513.issue10157@psf.upfronthosting.co.za> Message-ID: <1288011607.21.0.167890673776.issue10157@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: I think your patch looks good. ---------- assignee: -> ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 15:05:56 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 25 Oct 2010 13:05:56 +0000 Subject: [issue10143] Update "os.pathconf" values In-Reply-To: <1287459031.95.0.424598520823.issue10143@psf.upfronthosting.co.za> Message-ID: <1288011956.33.0.700027142698.issue10143@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Committed in r85834. Solaris 10 now shows 25 names available, instead of 14. ---------- resolution: -> accepted stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 15:06:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 25 Oct 2010 13:06:31 +0000 Subject: [issue1054967] bdist_deb - Debian packager Message-ID: <1288011991.69.0.679407316831.issue1054967@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> rejected stage: -> committed/rejected versions: +3rd party -Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 15:54:32 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 25 Oct 2010 13:54:32 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1288014872.5.0.496411911686.issue10142@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I attach patch. I have reviewed the IO module and I think we don't need to do any change there, since values over 2 are not touched. The patch is trivial. My plan was to leave this patch for a novice :-). Please, review. But let me do the final commit (I have commit privileges). ---------- stage: needs patch -> commit review Added file: http://bugs.python.org/file19356/z _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 15:55:47 2010 From: report at bugs.python.org (Atsushi Odagiri) Date: Mon, 25 Oct 2010 13:55:47 +0000 Subject: [issue10191] scripts files are not RECORDed. In-Reply-To: <1288014947.33.0.874343051999.issue10191@psf.upfronthosting.co.za> Message-ID: <1288014947.33.0.874343051999.issue10191@psf.upfronthosting.co.za> New submission from Atsushi Odagiri : I wrote setup.py includes scripts with distutils2, and ran `setup.py install`. scripts were installed in scripts directory, but not recorded in .dist-info/RECORD. I think that `distutils2._backport.shutil:copytree` should return copied filenames. ---------- assignee: tarek components: Distutils2 files: hello.zip messages: 119550 nosy: Atsushi.Odagiri, eric.araujo, tarek priority: normal severity: normal status: open title: scripts files are not RECORDed. type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file19357/hello.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 15:57:49 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 25 Oct 2010 13:57:49 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1288015069.81.0.114793808368.issue10142@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: [jcea at babylon5 py3k]$ ./python Python 3.2a3+ (py3k:85834M, Oct 25 2010, 15:37:04) [GCC 4.5.1] on sunos5 Type "help", "copyright", "credits" or "license" for more information. >>> import os >>> os.SEEK_DATA 3 >>> os.SEEK_HOLE 4 >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 16:08:18 2010 From: report at bugs.python.org (Jesse Noller) Date: Mon, 25 Oct 2010 14:08:18 +0000 Subject: [issue9935] Faster pickling of instances In-Reply-To: <1285290424.33.0.0824621979691.issue9935@psf.upfronthosting.co.za> Message-ID: <1288015698.27.0.923928255792.issue9935@psf.upfronthosting.co.za> Jesse Noller added the comment: I doubt I, or Ask will have the time to rewrite the entire multiprocessing test suite right now to work around the change Antoine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 16:17:24 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Oct 2010 14:17:24 +0000 Subject: [issue9935] Faster pickling of instances In-Reply-To: <1285290424.33.0.0824621979691.issue9935@psf.upfronthosting.co.za> Message-ID: <1288016244.42.0.748446045905.issue9935@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I doubt I, or Ask will have the time to rewrite the entire > multiprocessing test suite right now to work around the change > Antoine. Well, I'm not asking anyone to rewrite the entire multiprocessing test suite; and, besides, I've provided a patch myself to improve it in that respect ;) (in issue10173) Of course, it also means the present pickle patch is imperfect, though the result of __reduce__ in this case looks more like a side-effect of an implementation detail than documented behaviour (since the result isn't usable anyway). I may try to come up with a better patch before the 3.2 beta but it's not sure I will find enough time/motivation. ---------- resolution: fixed -> stage: committed/rejected -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 16:18:42 2010 From: report at bugs.python.org (Jesse Noller) Date: Mon, 25 Oct 2010 14:18:42 +0000 Subject: [issue6645] multiprocessing build fails on AIX - /dev/urandom (or equivalent) not found In-Reply-To: <1249414053.16.0.904107656211.issue6645@psf.upfronthosting.co.za> Message-ID: <1288016322.82.0.259154688958.issue6645@psf.upfronthosting.co.za> Jesse Noller added the comment: Sridhar can you confirm if this is still a problem on 3.2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 16:20:42 2010 From: report at bugs.python.org (Jesse Noller) Date: Mon, 25 Oct 2010 14:20:42 +0000 Subject: [issue6269] threading documentation makes no mention of the GIL In-Reply-To: <1244752636.53.0.230892071938.issue6269@psf.upfronthosting.co.za> Message-ID: <1288016442.16.0.547580881382.issue6269@psf.upfronthosting.co.za> Changes by Jesse Noller : ---------- assignee: jnoller -> nobody keywords: +easy nosy: +nobody priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 16:23:39 2010 From: report at bugs.python.org (Jesse Noller) Date: Mon, 25 Oct 2010 14:23:39 +0000 Subject: [issue9935] Faster pickling of instances In-Reply-To: <1288016244.42.0.748446045905.issue9935@psf.upfronthosting.co.za> Message-ID: Jesse Noller added the comment: On Mon, Oct 25, 2010 at 10:17 AM, Antoine Pitrou wrote: > Well, I'm not asking anyone to rewrite the entire multiprocessing test suite; and, besides, I've provided a patch myself to improve it in that respect ;) (in issue10173) I just saw that one - I'll poke at that next > Of course, it also means the present pickle patch is imperfect, though the result of __reduce__ in this case looks more like a side-effect of an implementation detail than documented behaviour (since the result isn't usable anyway). I may try to come up with a better patch before the 3.2 beta but it's not sure I will find enough time/motivation. Okie doke. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 16:36:48 2010 From: report at bugs.python.org (Andrew Boettcher) Date: Mon, 25 Oct 2010 14:36:48 +0000 Subject: [issue1191964] asynchronous Subprocess Message-ID: <1288017408.21.0.561221797233.issue1191964@psf.upfronthosting.co.za> Changes by Andrew Boettcher : ---------- nosy: +Andrew.Boettcher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 18:03:06 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 25 Oct 2010 16:03:06 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288022586.34.0.216868175839.issue4111@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I am trying to review this for 3.2, but I am having some issues. For instance, "include/pydtrace.d" is not present in the last patch. Please, post a patch with all the required changes in the same (patch) file. Hurry, we are still on track for 3.2. :-). Another question: I am not able to decide between Sun/Apple style, or breaking dtrace scripts compatibility completely. Anybody has an opinion about this?. Is this actually important?. Are there so many legacy dtrace scripts out there?. ---------- assignee: -> dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 18:15:52 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 25 Oct 2010 16:15:52 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1288022586.34.0.216868175839.issue4111@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: 2010/10/25 Jes?s Cea Avi?n : .. > Another question: I am not able to decide between Sun/Apple style, or breaking dtrace scripts > compatibility completely. Anybody has an opinion about this?. Is this actually important?. Are > there so many legacy dtrace scripts out there?. > I would say compatibility with Sun/Apple probes should not stand in the way of implementing this in cpython. Of course familiarity to existing users is a consideration, but in cases where self-consistency can be improved, I don't think we should be overly concerned about legacy scripts. I would estimate that 90% of future users will never have used either Sun or Apple probes, 9% will have used Apple and 1% Sun. (This is completely unscientific guess, of course.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 18:26:19 2010 From: report at bugs.python.org (hhas) Date: Mon, 25 Oct 2010 16:26:19 +0000 Subject: [issue10192] 'from urllib.parse import *' does not import urlencode function In-Reply-To: <1288023979.78.0.403326103088.issue10192@psf.upfronthosting.co.za> Message-ID: <1288023979.78.0.403326103088.issue10192@psf.upfronthosting.co.za> New submission from hhas : Problem: The following statement fails to import the public urlencode function into the current namespace: from urllib.parse import * Solution: Add 'urlencode' to urllib.parse.__all__. ---------- components: Library (Lib) messages: 119558 nosy: hhas priority: normal severity: normal status: open title: 'from urllib.parse import *' does not import urlencode function type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 18:27:58 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 25 Oct 2010 16:27:58 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288024078.65.0.619239571319.issue4111@psf.upfronthosting.co.za> Dave Malcolm added the comment: Updated version of the patch; this ought to contain Include/pydtrace.d: $ diffstat /tmp/py3k-add-systemtap-2010-10-25.patch Include/pydtrace.d | 10 Lib/test/test_systemtap.py | 89 ++++++ Makefile.pre.in | 10 Python/ceval.c | 75 +++++ configure | 576 +++++++++++++++++++++++---------------------- configure.in | 34 ++ pyconfig.h.in | 3 7 files changed, 522 insertions(+), 275 deletions(-) Patch contains FIXMEs (sorry), which clearly need addressing. As for the objectives, do folks here agree with the "Performance" notes in http://bugs.python.org/issue4111#msg100173 ? ---------- Added file: http://bugs.python.org/file19358/py3k-add-systemtap-2010-10-25.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 18:37:01 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 25 Oct 2010 16:37:01 +0000 Subject: [issue10192] 'from urllib.parse import *' does not import urlencode function In-Reply-To: <1288023979.78.0.403326103088.issue10192@psf.upfronthosting.co.za> Message-ID: <1288024621.87.0.993051345139.issue10192@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in revision 85837. ---------- assignee: -> orsenthil nosy: +orsenthil resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 18:54:11 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 25 Oct 2010 16:54:11 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288025651.75.0.376071418714.issue4111@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Malcolm, does your last patch address the performance issue?. Ideally, dtrace support should be compiled in by default, so performance issues are important. Idealy, performance difference between compiling dtrace or not should be negligible. Until you actually use it, of course. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 18:54:57 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 25 Oct 2010 16:54:57 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288025697.23.0.13748675867.issue4111@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: -giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 19:00:09 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 25 Oct 2010 17:00:09 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288026009.12.0.722333495684.issue4111@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: We need some documentation, too. Maybe a new chapter, or a new section in the debug chapter. Better the first, since this is not only for debugging, but for performance study too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 19:02:08 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 25 Oct 2010 17:02:08 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288026128.99.0.0222834439127.issue4111@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Compiling the code WITHOUT dtrace support gives an error: """ Undefined first referenced symbol in file __dtrace_python___function__entry ./libpython3.2m.so __dtraceenabled_python___function__return ./libpython3.2m.so __dtrace_python___function__return ./libpython3.2m.so __dtraceenabled_python___function__entry ./libpython3.2m.so ld: fatal: Symbol referencing errors. No output written to python collect2: ld returned 1 exit status """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 19:12:20 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 25 Oct 2010 17:12:20 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288026740.13.0.0319015307415.issue4111@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Compiling WITH dtrace... shows the same error :-???? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 19:17:18 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 25 Oct 2010 17:17:18 +0000 Subject: [issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback In-Reply-To: <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za> Message-ID: <1288027038.44.0.852341595489.issue10189@psf.upfronthosting.co.za> Georg Brandl added the comment: +1 for adding at least the info the symtable knows (this is already done in one of the branches in that function that raises a SyntaxError). ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 19:27:05 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 25 Oct 2010 17:27:05 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288027625.31.0.820491272764.issue4111@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I am using Solaris 10, but the configure script detects "apple" implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 19:30:25 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 25 Oct 2010 17:30:25 +0000 Subject: [issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback In-Reply-To: <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za> Message-ID: <1288027825.47.0.465421996189.issue10189@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 19:37:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 25 Oct 2010 17:37:05 +0000 Subject: [issue10184] tarfile touches directories twice In-Reply-To: <1287860800.8.0.977653393639.issue10184@psf.upfronthosting.co.za> Message-ID: <1288028225.67.0.481153754187.issue10184@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 19:50:34 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 25 Oct 2010 17:50:34 +0000 Subject: [issue3018] tkinter demos fixed In-Reply-To: <1212241760.64.0.0978196091903.issue3018@psf.upfronthosting.co.za> Message-ID: <1288029034.03.0.353991658429.issue3018@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed remaining changes from patch in r85840. Thanks! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 19:56:06 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 25 Oct 2010 17:56:06 +0000 Subject: [issue1772788] chr(128) in u'only ascii' -> TypeError with misleading msg Message-ID: <1288029366.46.0.00126277492295.issue1772788@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think we'll do anything about this message in 2.x -- in 3.x you get a clear TypeError anyway if you mix str and bytes. ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 19:56:39 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 25 Oct 2010 17:56:39 +0000 Subject: [issue4402] os.getenv('PATH') return different result between 2.5 and 3.0rc3 In-Reply-To: <1227493261.31.0.743303269102.issue4402@psf.upfronthosting.co.za> Message-ID: <1288029399.84.0.390410845393.issue4402@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- Removed message: http://bugs.python.org/msg76444 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 20:48:47 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 25 Oct 2010 18:48:47 +0000 Subject: [issue10193] Simplify instrospection used by turtle module In-Reply-To: <1288032526.99.0.352179918003.issue10193@psf.upfronthosting.co.za> Message-ID: <1288032526.99.0.352179918003.issue10193@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : The turtle module uses introspection in order to generate module level functions. Attached patch streamlines the introspection code by using inspect module function instead of direct access to cod object attributes. ---------- components: Library (Lib) files: turtle-inspect.diff keywords: patch messages: 119569 nosy: belopolsky priority: normal severity: normal status: open title: Simplify instrospection used by turtle module versions: Python 3.2 Added file: http://bugs.python.org/file19359/turtle-inspect.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 21:16:42 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 25 Oct 2010 19:16:42 +0000 Subject: [issue1772788] chr(128) in u'only ascii' -> TypeError with misleading msg Message-ID: <1288034202.36.0.422349174341.issue1772788@psf.upfronthosting.co.za> R. David Murray added the comment: I'm not sure that I'd consider: >>> 'abc' in b'abcde' Traceback (most recent call last): File "", line 1, in TypeError: Type str doesn't support the buffer API a clear error message :) It certainly isn't as bad as the 2.x message, though. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 21:30:07 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 25 Oct 2010 19:30:07 +0000 Subject: [issue10094] test_urllib.py fails in py3k r85440 with RuntimeError In-Reply-To: <1287009982.88.0.0149254747743.issue10094@psf.upfronthosting.co.za> Message-ID: <1288035007.57.0.587628195052.issue10094@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: This was already backported but the issue wasn't closed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 21:33:28 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 25 Oct 2010 19:33:28 +0000 Subject: [issue9762] PEP 3149 related build failures In-Reply-To: <1283542817.2.0.95523590272.issue9762@psf.upfronthosting.co.za> Message-ID: <1288035208.7.0.0298441386285.issue9762@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Closing this because I can't think of anything better than your workaround (plus, I was apparently unable to reproduce it). ---------- resolution: -> fixed status: open -> closed title: build failures -> PEP 3149 related build failures _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 21:34:20 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 25 Oct 2010 19:34:20 +0000 Subject: [issue1288056] pygettext: extract translators comments Message-ID: <1288035260.04.0.925659995697.issue1288056@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: barry -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 21:34:57 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 25 Oct 2010 19:34:57 +0000 Subject: [issue8409] gettext should honor $LOCPATH environment variable In-Reply-To: <1271341694.43.0.480005164083.issue8409@psf.upfronthosting.co.za> Message-ID: <1288035297.82.0.963583667017.issue8409@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: barry -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 21:35:22 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 25 Oct 2010 19:35:22 +0000 Subject: [issue8769] Straightforward usage of email package fails to round-trip In-Reply-To: <1274302519.83.0.146401120937.issue8769@psf.upfronthosting.co.za> Message-ID: <1288035322.57.0.797837579307.issue8769@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: barry -> r.david.murray nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 21:49:33 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 25 Oct 2010 19:49:33 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1288036173.97.0.0461014998192.issue10142@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch lacks a documentation change. Otherwise, it looks fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 21:53:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Oct 2010 19:53:57 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1288036437.32.0.698065017705.issue10142@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think the docs should also make it clear that these flags are only supported by os.lseek() (unless you have tested the IO lib to work properly, that is, but in this case it would be nice to add unit tests). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 22:10:34 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 25 Oct 2010 20:10:34 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1287458119.59.0.0883351132174.issue10142@psf.upfronthosting.co.za> Message-ID: <1288037434.81.0.213177498037.issue10142@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I will update documentation. Antoine, it is difficult to write a testcase when I can only test under a system with ZFS. I don't think we have a buildbot with Solaris/*BSD and ZFS. Any suggestion?. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 22:23:39 2010 From: report at bugs.python.org (Danek Duvall) Date: Mon, 25 Oct 2010 20:23:39 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288038219.31.0.814276822812.issue4111@psf.upfronthosting.co.za> Changes by Danek Duvall : ---------- nosy: +dhduvall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 22:25:02 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Oct 2010 20:25:02 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1288037434.81.0.213177498037.issue10142@psf.upfronthosting.co.za> Message-ID: <1288038298.3589.11.camel@localhost.localdomain> Antoine Pitrou added the comment: > I will update documentation. > > Antoine, it is difficult to write a testcase when I can only test > under a system with ZFS. I don't think we have a buildbot with > Solaris/*BSD and ZFS. If you ascertain yourself that the test works under ZFS then I think it is enough. Of course, it would be better if a buildbot ran that test, but we can live without it (IMHO). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 22:33:52 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 25 Oct 2010 20:33:52 +0000 Subject: [issue10142] Support for SEEK_HOLE/SEEK_DATA In-Reply-To: <1288038298.3589.11.camel@localhost.localdomain> Message-ID: <4CC5E9AD.2060907@v.loewis.de> Martin v. L?wis added the comment: > If you ascertain yourself that the test works under ZFS then I think it > is enough. Of course, it would be better if a buildbot ran that test, > but we can live without it (IMHO). I agree. I trust that the patch is correct, and we really don't need to test whether ZFS works correctly (but trust that Oracle will). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 22:39:40 2010 From: report at bugs.python.org (Frank Ch. Eigler) Date: Mon, 25 Oct 2010 20:39:40 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288039180.5.0.252399168468.issue4111@psf.upfronthosting.co.za> Frank Ch. Eigler added the comment: I believe the problem jcea is experiencing is with the solaris (/linux?) branch of the configure.in: if dtrace -G -o /dev/null -s $srcdir/Include/pydtrace.d 2>/dev/null It seems solaris doesn't like the -o /dev/null part. Try specifying some real temporary file name instead. ---------- nosy: +fche _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 23:20:53 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 25 Oct 2010 21:20:53 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288041653.29.0.548287791975.issue4111@psf.upfronthosting.co.za> Dave Malcolm added the comment: Updated patch, removing the FIXMEs, and slightly reworking the test code. I've wrapped the whole of get_frame_marker_info with a PyErr_Fetch/PyErr_Restore pair: the PyUnicode_AsUTF8String calls could fail with a MemoryError, and we don't want to confuse the regular exception handling within ceval. I'm not sure how to write a unit test to test for this: perhaps we could corrupt the __code__ instance so that co_filename is not a PyUnicodeObject, leading to a TypeError within the function, but that's a readonly attribute. Any ideas? I've also added a unit test for a non-ASCII script (Lib/test/systemtap_sample_?.py), containing a non-ASCII identifier (????). The non-ASCII script name (Lib/test/systemtap_sample_?.py) may be controversial: do we have anything like that in the source tree yet? Is there any risk of messing up the build across platforms, or of impacting the Hg migration? Still to-do: - address the "Undefined symbol" issues seen by jcea. - documentation - doublecheck performance ---------- Added file: http://bugs.python.org/file19360/py3k-add-systemtap-2010-10-25-002.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 23:42:35 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Oct 2010 21:42:35 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1288041653.29.0.548287791975.issue4111@psf.upfronthosting.co.za> Message-ID: <1288042950.3589.18.camel@localhost.localdomain> Antoine Pitrou added the comment: > I've wrapped the whole of get_frame_marker_info with a > PyErr_Fetch/PyErr_Restore pair: the PyUnicode_AsUTF8String calls could > fail with a MemoryError, and we don't want to confuse the regular > exception handling within ceval. If PyUnicode_AsUTF8String() is meant to encode a filename, you should use PyUnicode_EncodeFSDefault() instead. > The non-ASCII script name (Lib/test/systemtap_sample_?.py) may be > controversial: do we have anything like that in the source tree yet? > Is there any risk of messing up the build across platforms, or of > impacting the Hg migration? It would be better to generate the sample dynamically, so that users with an incompatible locale or filesystem aren't prevented from checking out the source. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 23:45:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 25 Oct 2010 21:45:25 +0000 Subject: [issue1772788] chr(128) in u'only ascii' -> TypeError with misleading msg Message-ID: <1288043125.57.0.518125505714.issue1772788@psf.upfronthosting.co.za> Georg Brandl added the comment: Ah. I tried the other combination :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 23:48:14 2010 From: report at bugs.python.org (Peter Ingebretson) Date: Mon, 25 Oct 2010 21:48:14 +0000 Subject: [issue10194] Add gc.remap() function to the gc module. In-Reply-To: <1288043293.98.0.0362084529098.issue10194@psf.upfronthosting.co.za> Message-ID: <1288043293.98.0.0362084529098.issue10194@psf.upfronthosting.co.za> New submission from Peter Ingebretson : This patch implements the gc.remap() function as described in the following document: http://doublestar.org/in-place-python-reloading/ The intended use is an enhanced module reloading mechanism, a prototype of which is described here: http://doublestar.org/python-hot-loading-prototype/ The patch includes unit tests for gc.remap as well as documentation. The NEWS has a TODO where the issue number would be, which needs to be updated. The unit test suite has been run on Ubuntu 10.10 and Windows XP. ---------- components: Extension Modules files: python_remap.diff keywords: patch messages: 119582 nosy: pingebretson priority: normal severity: normal status: open title: Add gc.remap() function to the gc module. type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file19361/python_remap.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Oct 25 23:56:57 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 25 Oct 2010 21:56:57 +0000 Subject: [issue9807] deriving configuration information for different builds with the same prefix In-Reply-To: <1283995465.51.0.237120332009.issue9807@psf.upfronthosting.co.za> Message-ID: <1288043817.65.0.125905157317.issue9807@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- assignee: -> barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 00:13:41 2010 From: report at bugs.python.org (Peter Ingebretson) Date: Mon, 25 Oct 2010 22:13:41 +0000 Subject: [issue10194] Add gc.remap() function to the gc module. In-Reply-To: <1288043293.98.0.0362084529098.issue10194@psf.upfronthosting.co.za> Message-ID: <1288044821.45.0.980007677963.issue10194@psf.upfronthosting.co.za> Changes by Peter Ingebretson : Added file: http://bugs.python.org/file19362/issue10194_gc_remap.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 00:14:06 2010 From: report at bugs.python.org (Peter Ingebretson) Date: Mon, 25 Oct 2010 22:14:06 +0000 Subject: [issue10194] Add gc.remap() function to the gc module. In-Reply-To: <1288043293.98.0.0362084529098.issue10194@psf.upfronthosting.co.za> Message-ID: <1288044846.29.0.845538835119.issue10194@psf.upfronthosting.co.za> Changes by Peter Ingebretson : Removed file: http://bugs.python.org/file19361/python_remap.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 00:52:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 25 Oct 2010 22:52:01 +0000 Subject: [issue6269] threading documentation makes no mention of the GIL In-Reply-To: <1244752636.53.0.230892071938.issue6269@psf.upfronthosting.co.za> Message-ID: <1288047121.21.0.239070577343.issue6269@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: nobody -> docs at python nosy: +docs at python versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 00:52:37 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 25 Oct 2010 22:52:37 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288047157.06.0.8904525696.issue4111@psf.upfronthosting.co.za> Dave Malcolm added the comment: > It would be better to generate the sample dynamically, so that users > with an incompatible locale or filesystem aren't prevented from checking > out the source. Thanks: am attaching updated patch: I've removed Lib/test/systemtap_sample_?.py, and now generate a similarly-named file during the test, using test.support.TEST_FN and unlink Still TODO: - address pitrou's concerns about PyUnicode_AsUTF8String from msg119580 - address the "Undefined symbol" issues seen by jcea (msg119563 onwards) - documentation - doublecheck performance - perhaps add a systemtap "tapset", and demo code using it (like I did in Fedora's python3 RPMs) - anything else I've missed :) ---------- Added file: http://bugs.python.org/file19363/py3k-add-systemtap-2010-10-25-003.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 01:05:46 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 25 Oct 2010 23:05:46 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288047946.76.0.604930549263.issue4111@psf.upfronthosting.co.za> Dave Malcolm added the comment: I should note that I've only ever been testing this with SystemTap, on Linux. I don't have a box with DTrace, and I've never directly used it. I wouldn't today be able to diagnose a buildbot failure related to DTrace (I believe I would with systemtap, fwiw). Are there any DTrace experts around who would be willing to handle the DTrace side of this? If not, would it be reasonable to make this issue be only explicitly about "systemtap"? (e.g. perhaps change the "configure" argument accordingly?) Alternatively, given that this bug originally started as an RFE about DTrace, should we split out systemtap as a separate RFE? I'm sorry if I've "muddied the waters" by doing this. For example, the only test coverage I've written (test_systemtap.py) checks for the presence of a "stap" executable, and skips the tests if it's not found. I'm not familiar enough with DTrace to create the same for DTrace. FWIW (in response to IRC question): "thread_indent" is documented here: http://sourceware.org/systemtap/SystemTap_Beginners_Guide/systemtapscript-handler.html#thread_indent It looks like it may be systemtap-specific; however the only usage is within test_systemtap.py, guarded by the presence of a "stap" binary, skipping the tests if it is not found. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 01:45:58 2010 From: report at bugs.python.org (Bobby Impollonia) Date: Mon, 25 Oct 2010 23:45:58 +0000 Subject: [issue775964] fix test_grp failing when NIS entries present Message-ID: <1288050358.52.0.539210558191.issue775964@psf.upfronthosting.co.za> Bobby Impollonia added the comment: I am encountering this issue with py3k on a Debian machine. test_grp consistently fails due to a line with a plus sign in /etc/group I believe that the previous patch attached to this bug is not correct due to the issues others have raised: It only handles lines with a plus sign as the name (not any name starting with '+' or '-') and it breaks out of the loop when it finds one, silently discarding any remaining lines. I've attached a new patch which preserves the functionality of getgrall but updates its docstring to document that any group names starting with '+' or '-' represent NIS-related entries. The patch fixes the test itself so that it skips over NIS-related entries rather than attempting to look them up with grp.getgrnam. With this patch applied (to the py3k branch HEAD), all regression tests pass on my machine. ---------- nosy: +bobbyi title: fix test_grp failing on RedHat 6.2 -> fix test_grp failing when NIS entries present versions: +Python 3.2, Python 3.3 Added file: http://bugs.python.org/file19364/test_grp.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 02:23:49 2010 From: report at bugs.python.org (Dave Malcolm) Date: Tue, 26 Oct 2010 00:23:49 +0000 Subject: [issue10195] Memory allocation fault-injection? In-Reply-To: <1288052629.43.0.603183515135.issue10195@psf.upfronthosting.co.za> Message-ID: <1288052629.43.0.603183515135.issue10195@psf.upfronthosting.co.za> New submission from Dave Malcolm : We were chatting on #python-dev on possible ways of testing the correct handling of "MemoryError". Attached is one idea: adding a sys._inject_malloc_failure() hook, letting you inject a memory-allocation (or reallocation) failure some number of allocations in the future: >>> import sys [52733 refs] >>> 2 + 2 4 [52733 refs] >>> sys._inject_malloc_failure(50) [52733 refs] >>> 2 + 2 MemoryError [52747 refs] >>> 2 + 2 4 [52747 refs] I'm not sure how to make this useful; perhaps it could instead compare with the "serialno" in Objects/obmalloc.c so that you could set up a specific numbered allocation and have it fail (or perhaps a range of serial numbers, and expose "serialno" within the "sys" module?) Another idea might be to randomly have some proportion of allocations fail. Perhaps the test suite could have an option where it runs each set of tests in a separate subprocess, and sets a command-line switch to inject "random" malloc failures? (storing the seed, so that they're reproducible, on one machine at least). ---------- components: Tests files: py3k-inject-malloc-failure.txt messages: 119586 nosy: dmalcolm, pitrou priority: normal severity: normal status: open title: Memory allocation fault-injection? type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file19365/py3k-inject-malloc-failure.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 04:40:29 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 26 Oct 2010 02:40:29 +0000 Subject: [issue10194] Add gc.remap() function to the gc module. In-Reply-To: <1288043293.98.0.0362084529098.issue10194@psf.upfronthosting.co.za> Message-ID: <1288060829.77.0.636655786318.issue10194@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +pitrou stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 05:30:48 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 26 Oct 2010 03:30:48 +0000 Subject: [issue10194] Add gc.remap() function to the gc module. In-Reply-To: <1288043293.98.0.0362084529098.issue10194@psf.upfronthosting.co.za> Message-ID: <1288063848.95.0.254157055554.issue10194@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think you need to bring this up on python-ideas/python-dev. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 05:42:50 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 26 Oct 2010 03:42:50 +0000 Subject: [issue10195] Memory allocation fault-injection? In-Reply-To: <1288052629.43.0.603183515135.issue10195@psf.upfronthosting.co.za> Message-ID: <1288064570.92.0.467473396723.issue10195@psf.upfronthosting.co.za> Benjamin Peterson added the comment: We should do something like SQLite: http://sqlite.org/testing.html ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 06:37:13 2010 From: report at bugs.python.org (Jack Diederich) Date: Tue, 26 Oct 2010 04:37:13 +0000 Subject: [issue10176] telnetlib.Telnet.read_very_eager() performance In-Reply-To: <1287829886.22.0.155091946841.issue10176@psf.upfronthosting.co.za> Message-ID: <1288067833.3.0.781874256259.issue10176@psf.upfronthosting.co.za> Jack Diederich added the comment: There was no test suite for telnetlib prior to 2.7/3.1 so it is easily possible that this is a regression. If you can post a test case that fails or - even better - a patch that passes where the current code fails I'd be very appreciative. ---------- nosy: +jackdied _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 07:33:18 2010 From: report at bugs.python.org (Bruce Sherwood) Date: Tue, 26 Oct 2010 05:33:18 +0000 Subject: [issue10196] distutils.get_python_lib() returns /usr/local/python3/dist-packages on Ubuntu 10.10 In-Reply-To: <1288071198.84.0.0625228182395.issue10196@psf.upfronthosting.co.za> Message-ID: <1288071198.84.0.0625228182395.issue10196@psf.upfronthosting.co.za> New submission from Bruce Sherwood : Using Python 3.1 installed on Ubuntu 10.10 from the package manager, distutils.get_python_lib() returns the nonexistent location /usr/local/python3/dist-packages instead of the correct location /usr/local/python3.1/dist-packages. This subversion bug is not present in distutils.get_python_inc(), which correctly returns /usr/include/python3.1. ---------- assignee: tarek components: Distutils messages: 119590 nosy: Bruce.Sherwood, eric.araujo, tarek priority: normal severity: normal status: open title: distutils.get_python_lib() returns /usr/local/python3/dist-packages on Ubuntu 10.10 type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 07:35:13 2010 From: report at bugs.python.org (Jon Parise) Date: Tue, 26 Oct 2010 05:35:13 +0000 Subject: [issue10194] Add gc.remap() function to the gc module. In-Reply-To: <1288043293.98.0.0362084529098.issue10194@psf.upfronthosting.co.za> Message-ID: <1288071313.51.0.204850890288.issue10194@psf.upfronthosting.co.za> Changes by Jon Parise : ---------- nosy: +jon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 07:44:03 2010 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 26 Oct 2010 05:44:03 +0000 Subject: [issue10194] Add gc.remap() function to the gc module. In-Reply-To: <1288043293.98.0.0362084529098.issue10194@psf.upfronthosting.co.za> Message-ID: <1288071843.26.0.915320000842.issue10194@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 08:11:23 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 26 Oct 2010 06:11:23 +0000 Subject: [issue10107] Quitting IDLE on Mac doesn't save unsaved code In-Reply-To: <1287076967.07.0.270311596559.issue10107@psf.upfronthosting.co.za> Message-ID: <1288073483.15.0.183098322325.issue10107@psf.upfronthosting.co.za> Ned Deily added the comment: The attached patches implement an "exit" callback for IDLE on OS X that ensures IDLE will not terminate from an application Quit command without giving the opportunity to save files. ---------- assignee: ned.deily -> ronaldoussoren components: +Macintosh keywords: +patch priority: normal -> high stage: needs patch -> patch review Added file: http://bugs.python.org/file19366/issue10107-py3k-31.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 08:12:09 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 26 Oct 2010 06:12:09 +0000 Subject: [issue10107] Quitting IDLE on Mac doesn't save unsaved code In-Reply-To: <1287076967.07.0.270311596559.issue10107@psf.upfronthosting.co.za> Message-ID: <1288073529.7.0.61371412558.issue10107@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file19367/issue10107-27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 08:21:26 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 26 Oct 2010 06:21:26 +0000 Subject: [issue10107] Quitting IDLE on Mac doesn't save unsaved code In-Reply-To: <1287076967.07.0.270311596559.issue10107@psf.upfronthosting.co.za> Message-ID: <1288074086.58.0.995248642829.issue10107@psf.upfronthosting.co.za> Ned Deily added the comment: BTW, the patched IDLEs were tested on 2.7 and py3k (3.2a3+) on 10.4, 10.5, and 10.6 with the Apple-supplied Tk 8.4 (all), the Apple-supplied Tk 8.5 (available only in 10.6), ActiveState Tk 8.4 (all), and ActiveState 8.5 (all). And the patches have no affect nor are needed when linked with an X11-based Tk on OS X. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 10:39:54 2010 From: report at bugs.python.org (ptz) Date: Tue, 26 Oct 2010 08:39:54 +0000 Subject: [issue10176] telnetlib.Telnet.read_very_eager() performance In-Reply-To: <1287829886.22.0.155091946841.issue10176@psf.upfronthosting.co.za> Message-ID: <1288082394.63.0.829203242338.issue10176@psf.upfronthosting.co.za> ptz added the comment: As David suggested, it indeed seems to be a case of timing. When telnetlib.Telnet(...) returns, the server still doesn't have the data cooked, and read_very_eager() fetches nothing. So nothing here fails as such, it's just that my 0 experience in network programming showed. Either way, some things you could do to get the function g() above to fetch the data the server usually returns upon connection are: a) insert a time.sleep(t) line after creating the socket. But I don't think there is one answer as to what the value of t should be. b) if one knows the format of the data that will be received, one could use read_until("expected string") c) one could write something like >>> def g(): ... f = telnetlib.Telnet("chessclub.com") ... data = '' ... while not data: ... data = f.read_some() ... print data,f.read_very_eager() ... >>> This simply loops until the server has some cooked data available, then fetches it. Tested, works, and is probably the way to do it. Either way, like David wisely said, this isn't an issue with either Python or telnetlib. However, it may be a good idea to add a warning to the documentation to the effect that by the time the Telnet constructor returns cooked data is typically not yet available from the server. To a beginner network programmer, this is far from obvious. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 10:46:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Oct 2010 08:46:31 +0000 Subject: [issue10194] Add gc.remap() function to the gc module. In-Reply-To: <1288043293.98.0.0362084529098.issue10194@psf.upfronthosting.co.za> Message-ID: <1288082791.75.0.429029370788.issue10194@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed with Benjamin. There is already a visible issue with the patch: it breaks compatibility because the Py_VISIT() argument must now be an lvalue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 10:47:46 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Oct 2010 08:47:46 +0000 Subject: [issue10195] Memory allocation fault-injection? In-Reply-To: <1288052629.43.0.603183515135.issue10195@psf.upfronthosting.co.za> Message-ID: <1288082866.21.0.962593822107.issue10195@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Unless we want to test manually each memory allocation in the interpreter, the only reasonable way seems to be some kind of fuzzing (perhaps using a reproducible random seed). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 11:12:21 2010 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 26 Oct 2010 09:12:21 +0000 Subject: [issue5178] Add context manager for temporary directory In-Reply-To: <1234029261.42.0.975383428204.issue5178@psf.upfronthosting.co.za> Message-ID: <1288084341.57.0.191339927906.issue5178@psf.upfronthosting.co.za> Nick Coghlan added the comment: Merging the interfaces for mkdtemp and TemporaryDirectory isn't going to happen. mkstemp/mkdtemp are for when the user wants to control the lifecycle of the filesystem entries themselves. (Note that context management on a regular file-like object only closes the file, it doesn't delete it from the filesystem). They're also intended as relatively thin wrappers around the corresponding C standard library functionality. The other objects in tempfile (TemporaryFile, TemporaryDirectory, etc) are for when the user wants the lifecycle of the Python object to correspond with the lifecycle of the underlying filesystem element. That said, TD itself can be used to create the temporary directory without having to use it as a context manager (the underlying directory is created in __init__, not __enter__). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 12:06:18 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 26 Oct 2010 10:06:18 +0000 Subject: [issue6269] threading documentation makes no mention of the GIL In-Reply-To: <1244752636.53.0.230892071938.issue6269@psf.upfronthosting.co.za> Message-ID: <1288087578.97.0.525331191674.issue6269@psf.upfronthosting.co.za> Ray.Allen added the comment: Agree with Jesse, the description in the patch is not quite correct. I think detailed description of the GIL has been given in C API documentation: http://docs.python.org/c-api/init.html#thread-state-and-the-global-interpreter-lock. How about just give this link in threading module documentation? ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 12:43:54 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Oct 2010 10:43:54 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1288089834.54.0.216157360492.issue2775@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Shouldn't this be closed? Most of this has been done and we can't do the rest anyway, without breaking backwards compatibility. ---------- nosy: +pitrou status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 12:44:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Oct 2010 10:44:57 +0000 Subject: [issue3362] locale.getpreferredencoding() gives bus error on Mac OS X 10.4.11 PPC In-Reply-To: <1216131750.8.0.934284197866.issue3362@psf.upfronthosting.co.za> Message-ID: <1288089897.54.0.6699523057.issue3362@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Is it still reproduceable with 2.7, 3.1 or 3.2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 13:50:15 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Oct 2010 11:50:15 +0000 Subject: [issue10195] Memory allocation fault-injection? In-Reply-To: <1288052629.43.0.603183515135.issue10195@psf.upfronthosting.co.za> Message-ID: <1288093815.97.0.183694833086.issue10195@psf.upfronthosting.co.za> STINNER Victor added the comment: Don't you know http://www.nongnu.org/failmalloc/? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 13:53:14 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Oct 2010 11:53:14 +0000 Subject: [issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback In-Reply-To: <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za> Message-ID: <1288093994.9.0.41522480052.issue10189@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, but in that particular case the exact line referenced is involved in the error, since it that error is that the symbol is both nonlocal and an argument, and the error points to the head of the block which is the 'def' statement. Attached is a patch that adds the available line number info to all of the error messages except the one for nonlocal at the global level. In that case the line number will always be zero, so that does not ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 13:53:24 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Oct 2010 11:53:24 +0000 Subject: [issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback In-Reply-To: <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za> Message-ID: <1288094004.06.0.27220845376.issue10189@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- Removed message: http://bugs.python.org/msg119601 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 13:58:51 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Oct 2010 11:58:51 +0000 Subject: [issue10195] Memory allocation fault-injection? In-Reply-To: <1288052629.43.0.603183515135.issue10195@psf.upfronthosting.co.za> Message-ID: <1288094331.68.0.957152652093.issue10195@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Don't you know http://www.nongnu.org/failmalloc/? This doesn't answer the question of what and how to test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 14:00:07 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Oct 2010 12:00:07 +0000 Subject: [issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback In-Reply-To: <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za> Message-ID: <1288094407.14.0.650582015449.issue10189@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, but in that particular case the exact line referenced is involved in the error, since it that error is that the symbol is both nonlocal and an argument, and the error points to the head of the block which is the 'def' statement. Attached is a patch that adds the available line info, and also modifies the 'nonlocal at global level' message to include the symbol name. I think this change is a good idea because without the patch this code: >cat temp import foo >cat foo.py def f(): def g(): nonlocal a gives this: >./python temp Traceback (most recent call last): File "temp", line 1, in import foo SyntaxError: no binding for nonlocal 'a' found which is even more confusing that not having any traceback at all. After the patch it will look like this: Traceback (most recent call last): File "temp", line 1, in import foo File "/home/rdmurray/python/py3k/foo.py", line 2 def g(): SyntaxError: no binding for nonlocal 'a' found ---------- keywords: +patch Added file: http://bugs.python.org/file19368/nonlocal-traceback.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 14:07:59 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Oct 2010 12:07:59 +0000 Subject: [issue10189] SyntaxError: no binding for nonlocal doesn't contain a useful traceback In-Reply-To: <1287948127.54.0.779100996642.issue10189@psf.upfronthosting.co.za> Message-ID: <1288094879.13.0.795394543535.issue10189@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I hadn't noticed Benjamin assigned this to himself when I submitted that patch. Well, maybe it will be marginally useful anyway :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 14:19:02 2010 From: report at bugs.python.org (jldm) Date: Tue, 26 Oct 2010 12:19:02 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> Message-ID: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> New submission from jldm : Hi, first of all sorry for my English. On windows XP SP3, the following code: import subprocess subprocess.getoutput("dir") returns '"{" is not recognized as an internal or external command,\noperable program or batch file.' I made a workaround by changing in the file Lib/subprocess.py the line 574 (I thin in 3.2a3 is 584) (in the getstatusoutput(cmd) function definition) from: pipe = os.popen('{ ' + cmd + '; } 2>&1', 'r') to: pipe = os.popen('( ' + cmd + '; ) 2>&1', 'r') I have tested it with: ActivePython 3.1.2.3 (ActiveState Software Inc.) based on Python 3.1.2 (r312:79147, Mar 22 2010, 12:20:29) [MSC v.1500 32 bit (Intel)] on win32 and Python 3.2a3 (r32a3:85355, Oct 10 2010, 17:11:45) [MSC v.1500 32 bit (Intel)] on win32 Regards from Spain. Jos? Luis Domenech ---------- messages: 119605 nosy: jldm priority: normal severity: normal status: open title: subprocess.getoutput fails on win32 type: behavior versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 14:48:05 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Oct 2010 12:48:05 +0000 Subject: [issue7761] telnetlib Telnet.interact fails on Windows but not Linux In-Reply-To: <1264212900.62.0.226780855818.issue7761@psf.upfronthosting.co.za> Message-ID: <1288097285.97.0.353952935174.issue7761@psf.upfronthosting.co.za> R. David Murray added the comment: Committed to py3k in r85846, 3.1 in r85847. ---------- resolution: -> fixed stage: unit test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 15:29:17 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Oct 2010 13:29:17 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> Message-ID: <1288099757.6.0.0611339323837.issue10197@psf.upfronthosting.co.za> R. David Murray added the comment: Oddly, the test suite skips getoutput and getstatusoutput on windows with the comment that the source says it is relevant only for posix, but the documentation does not have 'availability: unix' tags. (It is also odd that getoutput isn't documented, but that's a different issue.) Your workaround can't be used as a fix, since the semantics of {}s in the shell are different from those of ()s. It's not clear to me what the point of the {}s is, but I have a fear that eliminating them would introduce subtle changes in the behavior of getoutput calls. Perhaps not, though. It looks like this issue amounts to an RFE for support of getoutput/getstatusoutput on Windows, though the fact that it is not documented as unix-only may make it a bug instead :) The appropriate fix is probably to conditionalize the code based on platform. A complete patch will require unit test changes and documentation changes (since the docs currently mention the braces). All of that said, it also appears that the new check_output should be preferred to either getoutput or getstatusoutput. Perhaps those functions could be re-implemented in terms of check_output. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 16:06:10 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 26 Oct 2010 14:06:10 +0000 Subject: [issue10197] subprocess.getoutput fails on win32 In-Reply-To: <1288095541.88.0.426506052882.issue10197@psf.upfronthosting.co.za> Message-ID: <1288101970.11.0.272470327543.issue10197@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- components: +Windows nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 17:27:01 2010 From: report at bugs.python.org (Peter Ingebretson) Date: Tue, 26 Oct 2010 15:27:01 +0000 Subject: [issue10194] Add gc.remap() function to the gc module. In-Reply-To: <1288043293.98.0.0362084529098.issue10194@psf.upfronthosting.co.za> Message-ID: <1288106821.99.0.974959269099.issue10194@psf.upfronthosting.co.za> Peter Ingebretson added the comment: Thanks, I've started a thread on python-dev to discuss the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 17:35:37 2010 From: report at bugs.python.org (David Barnett) Date: Tue, 26 Oct 2010 15:35:37 +0000 Subject: [issue10198] wave module writes corrupt wav file for zero-length writeframes In-Reply-To: <1288107337.09.0.986719080657.issue10198@psf.upfronthosting.co.za> Message-ID: <1288107337.09.0.986719080657.issue10198@psf.upfronthosting.co.za> New submission from David Barnett : If the first call to writeframes happens to take an empty string as the data to write, then the next call to writeframes writes a 2nd header into the file, and forever after fails to patch the data length correctly. ---------- components: Library (Lib) messages: 119609 nosy: mu_mind priority: normal severity: normal status: open title: wave module writes corrupt wav file for zero-length writeframes type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 17:38:32 2010 From: report at bugs.python.org (David Barnett) Date: Tue, 26 Oct 2010 15:38:32 +0000 Subject: [issue10198] wave module writes corrupt wav file for zero-length writeframes In-Reply-To: <1288107337.09.0.986719080657.issue10198@psf.upfronthosting.co.za> Message-ID: <1288107512.69.0.115547041522.issue10198@psf.upfronthosting.co.za> David Barnett added the comment: This patch against the python 2.6 version fixes the problem for me. ---------- keywords: +patch Added file: http://bugs.python.org/file19369/fix_double_header.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 17:47:12 2010 From: report at bugs.python.org (Bruce Sherwood) Date: Tue, 26 Oct 2010 15:47:12 +0000 Subject: [issue10196] distutils.get_python_lib() returns /usr/local/python3/dist-packages on Ubuntu 10.10 In-Reply-To: <1288071198.84.0.0625228182395.issue10196@psf.upfronthosting.co.za> Message-ID: <1288108032.78.0.359565137699.issue10196@psf.upfronthosting.co.za> Bruce Sherwood added the comment: Correction: distutils.get_python_lib() returns /usr/lib/python3/dist-packages (which does exist), while distutils.get_python_inc() returns /usr/include/python3.1. I don't understand the shadowy existence of some python3 files that are parallel to python3.1 files. But in any case, get_python_lib() and get_python_inc() are inconsistent with each other. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 17:48:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 26 Oct 2010 15:48:56 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : On Tue, Oct 26, 2010 at 11:18 AM, Guido van Rossum wrote: > On Tue, Oct 26, 2010 at 8:13 AM, Alexander Belopolsky > wrote: >> The one demo that I want to find a better place for is Demo/turtle. > > Sure, go for it. It is a special case because the turtle module is > also in the stdlib and these are intended for a particular novice > audience. Anything we can do to make things easier for those people to > get start with is probably worth it. Ideally they could just double > click some file and the demo would fire up, with a command-line > alternative (for the geeks among them) e.g. "python -m turtledemo" . > > -- > --Guido van Rossum (python.org/~guido) > -- "Move Demo scripts under Lib" http://mail.python.org/pipermail/python-ideas/2010-October/008397.html Before I prepare a patch, I would like to get an agreement on the location of the demo package. In the order of my preference: 1. turtle.demo Pro: obvious relationship to turtle. Cons: require converting turtle.py to a package. 2. turtledemo Pro: BDFL's suggestion; "Flat is better than nested". Cons: relationship to turtle module is less obvious than in #1; stdlib namespace pollution. (Turtle invasion! :-) 3. demo.turtle - probably not a good idea if not as a part of a general Demo reorganization. Note that while I listed conversion of turtle.py to a package as a cons, it may not be a bad idea on its own. For example, toolkit abstraction naturally belongs to submodules and procedural interface belongs to package level while OOP classes may be separated into submodules. While I am not proposing any such changes as a part of this ticket, it may not be a bad idea to take the first step and rename turtle.py to turtle/__init__.py. ---------- assignee: belopolsky components: Demos and Tools messages: 119612 nosy: belopolsky priority: normal severity: normal status: open title: Move Demo/turtle under Lib/ type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 18:00:14 2010 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 26 Oct 2010 16:00:14 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288108814.85.0.487929496399.issue10199@psf.upfronthosting.co.za> Guido van Rossum added the comment: IMO converting turtle.py into a package, unless that's already planned anyway, is not a good project to undertake right now. (OTOH the demo itself already is a package, less an __init__.py file.) Note that the turtle module already runs some demo when invoked as a script -- maybe this can be made to fire up the demo viewer instead? ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 18:21:31 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 26 Oct 2010 16:21:31 +0000 Subject: [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: New submission from Bo??tjan Mejak : There's a bug in the docs at http://docs.python.org/library/locale.html#access-to-message-catalogs in a statement before the last. "A known exception to this rule are applications that >>link use<< additional C libraries which internally invoke gettext() or dcgettext(). " Either use the word "link" or "use" in that statement. ---------- files: unnamed messages: 119614 nosy: Retro priority: normal severity: normal status: open title: Documentation: "link use"? Added file: http://bugs.python.org/file19370/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- There's a bug in the docs at??http://docs.python.org/library/locale.html#access-to-message-catalogs??in a statement before the last. "A known exception to this rule are applications that >>link use<< additional C libraries which internally invoke??gettext()??or??dcgettext().??"

Either use the word "link" or "use" in that statement.
From report at bugs.python.org Tue Oct 26 18:22:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Oct 2010 16:22:49 +0000 Subject: [issue10201] Fix building of socket module under Solaris In-Reply-To: <1288110169.62.0.573070204064.issue10201@psf.upfronthosting.co.za> Message-ID: <1288110169.62.0.573070204064.issue10201@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Sun/Oracle uses the following patch to fix building of the socket module, since on Solaris "netpacket/packet.h" is incompatible with its Linux counterpart. Otherwise, it fails with the following messages: /home/antoine/py3k/gcc/Modules/socketmodule.c: In function ?makesockaddr?: /home/antoine/py3k/gcc/Modules/socketmodule.c:1150: error: ?struct ifreq? has no member named ?ifr_ifindex? /home/antoine/py3k/gcc/Modules/socketmodule.c:1151: error: ?SIOCGIFNAME? undeclared (first use in this function) /home/antoine/py3k/gcc/Modules/socketmodule.c:1151: error: (Each undeclared identifier is reported only once /home/antoine/py3k/gcc/Modules/socketmodule.c:1151: error: for each function it appears in.) /home/antoine/py3k/gcc/Modules/socketmodule.c: In function ?getsockaddrarg?: /home/antoine/py3k/gcc/Modules/socketmodule.c:1484: error: ?SIOCGIFINDEX? undeclared (first use in this function) /home/antoine/py3k/gcc/Modules/socketmodule.c:1502: error: ?struct ifreq? has no member named ?ifr_ifindex? /home/antoine/py3k/gcc/Modules/socketmodule.c: In function ?PyInit__socket?: /home/antoine/py3k/gcc/Modules/socketmodule.c:4580: error: ?PACKET_LOOPBACK? undeclared (first use in this function) /home/antoine/py3k/gcc/Modules/socketmodule.c:4581: error: ?PACKET_FASTROUTE? undeclared (first use in this function) $ cat ~/spec-files/patches/Python26-17-netpacket-packet-h.diff --- Python-2.6.2/Modules/socketmodule.c.packet 2009-04-01 07:20:48.000000000 +1300 +++ Python-2.6.2/Modules/socketmodule.c 2009-12-01 21:25:04.133257645 +1300 @@ -81,6 +81,14 @@ */ +#ifdef HAVE_NETPACKET_PACKET_H +#ifdef sun +#define USE_NETPACKET_PACKET_H 0 +#else +#define USE_NETPACKET_PACKET_H 1 +#endif +#endif + #ifdef __APPLE__ /* * inet_aton is not available on OSX 10.3, yet we want to use a binary @@ -1092,7 +1100,7 @@ } #endif -#ifdef HAVE_NETPACKET_PACKET_H +#if USE_NETPACKET_PACKET_H case AF_PACKET: { struct sockaddr_ll *a = (struct sockaddr_ll *)addr; @@ -1382,7 +1390,7 @@ } #endif -#ifdef HAVE_NETPACKET_PACKET_H +#if USE_NETPACKET_PACKET_H case AF_PACKET: { struct sockaddr_ll* addr; @@ -1559,7 +1567,7 @@ } #endif -#ifdef HAVE_NETPACKET_PACKET_H +#if USE_NETPACKET_PACKET_H case AF_PACKET: { *len_ret = sizeof (struct sockaddr_ll); @@ -4575,7 +4583,7 @@ PyModule_AddStringConstant(m, "BDADDR_LOCAL", "00:00:00:FF:FF:FF"); #endif -#ifdef HAVE_NETPACKET_PACKET_H +#if USE_NETPACKET_PACKET_H PyModule_AddIntConstant(m, "AF_PACKET", AF_PACKET); PyModule_AddIntConstant(m, "PF_PACKET", PF_PACKET); PyModule_AddIntConstant(m, "PACKET_HOST", PACKET_HOST); ---------- components: Build messages: 119615 nosy: jcea, loewis, movement, pitrou priority: normal severity: normal stage: patch review status: open title: Fix building of socket module under Solaris type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 18:25:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 26 Oct 2010 16:25:59 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108814.85.0.487929496399.issue10199@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Oct 26, 2010 at 12:00 PM, Guido van Rossum wrote: .. > IMO converting turtle.py into a package, unless that's already planned anyway, is not a good project > to undertake right now. What are your reasons? I don't necessarily disagree, but want to weight pros and cons. It does not seem like a hard thing to do: rename turtle.py to turtle/__init__.py and add __main__.py. As I said, I don't intend to anything more than that in the first step. > ?(OTOH the demo itself already is a package, less an __init__.py file.) Unfortunately it also relies on being run from directory containing the main script, so converting it into a proper package is a bit more involved than renaming the directory and adding an empty __init__.py file. Still it is not that hard. > ?Note that the turtle module already runs some demo when invoked as a script > -- maybe this can be made to fire up the demo viewer instead? Yes, I wanted to do that as well. Note that in this case, it would be natural to move turtleDemo.py code into turtle/__main__.py. I would also like to be able to run individual tdemo_* scripts without the demo viewer or with an alternative viewer. Some naming decisions have to be made for that as well: $ python -m turtle.tdemo_chaos $ python -m turtle.demo.chaos $ python -m turtledemo.tdemo_chaos ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 18:31:32 2010 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 26 Oct 2010 16:31:32 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288110692.31.0.0560369831336.issue10199@psf.upfronthosting.co.za> Guido van Rossum added the comment: I would like Gregor Lingl's approval of turning turtle.py into a package. It might make some things harder for novices, e.g. trackebacks and just browsing the source code. Also many people don't expect to find any code in a file named __init__.py (and most of the time I agree with this). But the alternative isn't so great either, assuming we'll want strict backwards compatibility (I wouldn't want the instructions in Gregor's or anyone's book to start failing because of this). You can't rename turtle to turtle/turtle.py either, because then there'd be horrible confusion between turtle/ and turtle.py. IOW, yes, flat still seems better than nested here! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 18:31:58 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 26 Oct 2010 16:31:58 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288110718.86.0.050619824565.issue10199@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 18:32:25 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 26 Oct 2010 16:32:25 +0000 Subject: [issue10193] Simplify instrospection used by turtle module In-Reply-To: <1288032526.99.0.352179918003.issue10193@psf.upfronthosting.co.za> Message-ID: <1288110745.88.0.0288161902663.issue10193@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> belopolsky resolution: -> accepted stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 18:38:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 26 Oct 2010 16:38:32 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288111112.43.0.88436077025.issue10199@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +glingl, gregorlingl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 18:46:58 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Oct 2010 16:46:58 +0000 Subject: [issue10201] Fix building of socket module under Solaris In-Reply-To: <1288110169.62.0.573070204064.issue10201@psf.upfronthosting.co.za> Message-ID: <1288111618.59.0.45904346243.issue10201@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a working patch for py3k. Tested under OpenSolaris with both gcc and Sun C. ---------- keywords: +patch nosy: +laca Added file: http://bugs.python.org/file19371/buildsocket.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 19:05:54 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 26 Oct 2010 17:05:54 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288110692.31.0.0560369831336.issue10199@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Oct 26, 2010 at 12:31 PM, Guido van Rossum wrote: .. > I would like Gregor Lingl's approval of turning turtle.py into a package. Me too. :-) I added him to the "nosy list". > ?It might make some things harder for novices, e.g. trackebacks and just browsing the source code. If better tracebacks were the goal, I would start with removing eval-generated module level functions: Traceback (most recent call last): File "", line 1, in File "", line 1, in forward .. TypeError: can't multiply sequence by non-int of type 'float' Browsing source code may indeed be complicated by the package structure. For example, I often find it difficult to navigate unittest code once it became a package in the recent versions. However, simple renaming of turtle.py to turtle/__init__.py is probably a non-event since novice-oriented environments such as IDEs are likely to take the user directly to turtle/__init__.py when he or she clicks on "turtle". > Also many people don't expect to find any code in a file named __init__.py (and most of the time I > agree with this). Well, logging, tkinter, and ctypes are clearly counterexamples to this rule. > ?But the alternative isn't so great either, assuming we'll want strict backwards compatibility (I > wouldn't want the instructions in Gregor's or anyone's book to start failing because of this). Backwards compatibility can be restored by use of relative imports as necessary. This is the unittest approach where backward compatibility is paramount. > You can't rename turtle to turtle/turtle.py either, because then there'd be horrible confusion > between turtle/ and turtle.py. Agree. We have too many turtles already. :-) On the other hand, moving turtle object definitions into turtle/pen.py in some distant future may not be a horrible idea. (Note that "pen" end "turtle" are already mostly synonymous.) > IOW, yes, flat still seems better than nested here! For a six year old, turtledemo is still nested - just without a dot. :-) PS: My six year old loves the turtle! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 19:12:41 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 26 Oct 2010 17:12:41 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288113161.14.0.708708590581.issue10199@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I thought this email-to-roundup bug was fixed some time ago. The mangled sample session was: >>> turtle.forward('5 miles') Traceback (most recent call last): File "", line 1, in File "", line 1, in forward .. TypeError: can't multiply sequence by non-int of type 'float' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 19:29:13 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Oct 2010 17:29:13 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288114153.06.0.281556269601.issue4111@psf.upfronthosting.co.za> Antoine Pitrou added the comment: For the record, replacing /dev/null with conftest.out in the configure test solves the detection problem (and allows Python to build cleanly). However, there is then a problem in test_systemtap (even when replacing "stap" with "dtrace") since the syntax for scripts doesn't seem compatible. In any case, the trivial fix for configure: diff -r 777b171a63ae -r 1784ac25b52e configure --- a/configure Tue Oct 26 18:50:46 2010 +0200 +++ b/configure Tue Oct 26 18:54:09 2010 +0200 @@ -9178,7 +9178,7 @@ $as_echo "$with_dtrace" >&6; } if test ! -z "$with_dtrace" then - if dtrace -G -o /dev/null -s $srcdir/Include/pydtrace.d 2>/dev/null + if dtrace -G -o conftest.out -s $srcdir/Include/pydtrace.d 2>/dev/null then $as_echo "#define WITH_DTRACE 1" >>confdefs.h diff -r 777b171a63ae -r 1784ac25b52e configure.in --- a/configure.in Tue Oct 26 18:50:46 2010 +0200 +++ b/configure.in Tue Oct 26 18:54:09 2010 +0200 @@ -2466,7 +2466,7 @@ AC_MSG_RESULT([$with_dtrace]) if test ! -z "$with_dtrace" then - if dtrace -G -o /dev/null -s $srcdir/Include/pydtrace.d 2>/dev/null + if dtrace -G -o conftest.out -s $srcdir/Include/pydtrace.d 2>/dev/null then AC_DEFINE(WITH_DTRACE, 1, [Define if you want to compile in Dtrace support]) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 19:29:56 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Oct 2010 17:29:56 +0000 Subject: [issue4111] Add Systemtap/DTrace probes In-Reply-To: <1223827695.04.0.0893695004368.issue4111@psf.upfronthosting.co.za> Message-ID: <1288114196.36.0.02522781043.issue4111@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (my last message was about building on OpenSolaris) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 19:31:49 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 26 Oct 2010 17:31:49 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288114309.92.0.831668257833.issue10199@psf.upfronthosting.co.za> Ned Deily added the comment: Just an FYI: the python.org installers for Mac OS X install the demos including the turtle demo (which is probably the most useful of the bunch these days) in /Applications/Python m.n/Extras/Demo. Depending on the default application association for ".py" files (something the user can change using the OS X Finder), double-clicking on the demo files will generally launch them in IDLE.app or with Python Launcher.app. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 19:48:42 2010 From: report at bugs.python.org (Brett Cannon) Date: Tue, 26 Oct 2010 17:48:42 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1288115322.34.0.554856846755.issue2775@psf.upfronthosting.co.za> Brett Cannon added the comment: profile and cProfile could still conceivably be merged, even if it is under a new name if someone found the time to do the compatibility work. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 19:50:52 2010 From: report at bugs.python.org (Dave Malcolm) Date: Tue, 26 Oct 2010 17:50:52 +0000 Subject: [issue10195] Memory allocation fault-injection? In-Reply-To: <1288052629.43.0.603183515135.issue10195@psf.upfronthosting.co.za> Message-ID: <1288115452.7.0.29693282788.issue10195@psf.upfronthosting.co.za> Dave Malcolm added the comment: Attached is a new approach to doing this, based on "Out-Of-Memory Testing" within http://sqlite.org/testing.html This reads environment variables, and injects a fault at the given value of "serialno", and (optionally) ongoing failures afterwards. I used this to find a specific bug in Python/pythonrun.c (fix is the first hunk of the patch): if moduleName is NULL, then Py_DECREF will read through NULL. Potentially this gives the low-level machinery to support adding SQLite's approach to be added to regrtest. Doing so would imply running each test many tens of thousands of times, so perhaps we could run "-c pass" to establish at what serialno the interpreter has fully started up, then use that as a starting point when testing other scripts/modules. I implemented a toy version of this as Lib/test/test_malloc_fault.py, which sits in an infinite loop injecting individual allocation failures when starting up sys.executable as a subprocess. For low numbers, this throws up segfaults within _Py_ReadyTypes' call to PyType_Ready(&PyType_Type), where PyExc_MemoryError is set but has not yet been initialized (its ob_type is NULL): /* this will probably fail since there's no memory and hee, hee, we have to instantiate this class */ Running this interactively with a large value for PYTHONMALLOCINJECTFAULTSAT leads to an interesting failure mode within PyRun_InteractiveLoopFlags(): every call to PyRun_InteractiveOneFlags immediately returns (the PyUnicode_FromString("stdin") in within PySys_GetObject() fails to allocate memory); this leads to a tight loop sending the total refcount to stderr: [52812 refs] [52812 refs] [52812 refs] (etc) ---------- Added file: http://bugs.python.org/file19372/py3k-inject-malloc-failure-002.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 19:58:46 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 26 Oct 2010 17:58:46 +0000 Subject: [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288115926.82.0.731263120655.issue10200@psf.upfronthosting.co.za> Changes by Bo?tjan Mejak : Removed file: http://bugs.python.org/file19370/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 19:59:20 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 26 Oct 2010 17:59:20 +0000 Subject: [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288115960.54.0.618358649062.issue10200@psf.upfronthosting.co.za> Changes by Bo?tjan Mejak : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python versions: +3rd party, Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:12:41 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 26 Oct 2010 18:12:41 +0000 Subject: [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288116761.07.0.737233123128.issue10200@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: ...Also, please fix a typo here: http://docs.python.org/library/string.html#string.Formatter.parse "This is used by vformat() to break the string >>in to<< either literal text, or replacement fields." Please fix "in to" to "into". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:16:59 2010 From: report at bugs.python.org (Ned Deily) Date: Tue, 26 Oct 2010 18:16:59 +0000 Subject: [issue3362] locale.getpreferredencoding() gives bus error on Mac OS X 10.4.11 PPC In-Reply-To: <1216131750.8.0.934284197866.issue3362@psf.upfronthosting.co.za> Message-ID: <1288117019.79.0.245627728668.issue3362@psf.upfronthosting.co.za> Ned Deily added the comment: This was fixed by the changes for Issue6202: 2.7 (r73270) and 3.1 (r73268). They removed the use of the obsolete MacOS encoding APIs and now use standard POSIX detection. ---------- nosy: +ned.deily resolution: -> duplicate status: open -> closed superseder: -> Obsolete default file encoding "mac-roman" on OS X, not influenced by locale env variables _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:17:08 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 26 Oct 2010 18:17:08 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288117028.77.0.612635498933.issue10199@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Various comments: I usually expect things in stdlib to be usefully importable. Idlelib is clearly an exception. >> Also many people don't expect to find any code in a file named >> __init__.py (and most of the time I agree with this). > Well, logging, tkinter, and ctypes are clearly counterexamples > to this rule. I think it a mistake that tkinter.__init__ is huge, about as big as the other 13 modules added together. It makes it really hard to dive into the code. I think turtledemo would be fine, separate from turtle, if one could import and run things (one at a time) from within the interactive interpreter. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:18:52 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Tue, 26 Oct 2010 18:18:52 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288117132.35.0.473899563652.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Attached patch, issue7061.diff, drops "for Tk" from turtle module title and move its doc section under frameworks. I also fixed a couple of markup issues that affected TOC rendering. ---------- keywords: +patch stage: -> commit review Added file: http://bugs.python.org/file19373/issue7061.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:25:22 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 26 Oct 2010 18:25:22 +0000 Subject: [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288117522.99.0.73885238479.issue10200@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: There's also a possible typo here: http://docs.python.org/library/string.html#format-specification-mini-language format_spec ::= >>>[<<<[fill>>>]<<>>|<< _______________________________________ From report at bugs.python.org Tue Oct 26 20:25:47 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 26 Oct 2010 18:25:47 +0000 Subject: [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288117547.85.0.409242359878.issue10200@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: Please fix all of those things. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:28:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 26 Oct 2010 18:28:40 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288117720.17.0.767820923646.issue7061@psf.upfronthosting.co.za> ?ric Araujo added the comment: Looks good. Remember to adjust the number of signs making the reST title markup. Nice that you?re fixing the ToC; I noticed a handful of issues some days ago and thought about making a patch in a week or two. I?d open another report for them and backport the fixes to 2.7 too. ---------- _______________________________________ Python tracker _______________________________________ From raymond.hettinger at gmail.com Tue Oct 26 19:48:01 2010 From: raymond.hettinger at gmail.com (Raymond Hettinger) Date: Tue, 26 Oct 2010 10:48:01 -0700 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: References: Message-ID: On Oct 26, 2010, at 10:05 AM, Alexander Belopolsky wrote: > > Alexander Belopolsky added the comment: > > On Tue, Oct 26, 2010 at 12:31 PM, Guido van Rossum >> Also many people don't expect to find any code in a file named __init__.py (and most of the time I >> agree with this). > > Well, logging, tkinter, and ctypes are clearly counterexamples to this rule. Those are not in the same league. Guido's point is that there are some disadvantages to making a package (i.e. the __init__.py files are an acquired taste), so we typically only do it when there are significant offsetting advantages. Just because a successful case for packaging was made for tkinter, doesn't mean that it is the right thing to do for the turtle module. As a general rule, *most* of the time a package is not the preferred solution. Raymond From report at bugs.python.org Tue Oct 26 20:35:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 26 Oct 2010 18:35:49 +0000 Subject: [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288118149.34.0.520002114721.issue10200@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hi Bo?tjan, thanks for the reports and suggestions. A tip about versions. This field is used to mark the versions in which the bug will be fixed, not all versions where the bug is found. 2.5 and 2.6 only get security fixes; 2.7 and 3.1, the current stable versions, also get bug (including doc) fixes; 3.2, the next stable version, also gets new features; 3.3 is used to mean ?won?t happen in 3.2, remind us later?; 3rd party means, well, third-party, for example distutils2 which is managed outside of the standard library and thus does not affect the status of Python releases. Finally, you can send email to docs at python.org for such small typos instead of opening bug reports, as you please. (Another tip: ?please fix? messages don?t really add to the discussion and don?t make the developers have more time. Don?t worry, someone will get to your reports in time.) ---------- keywords: +patch nosy: +eric.araujo versions: -3rd party, Python 2.5, Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:42:46 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 26 Oct 2010 18:42:46 +0000 Subject: [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288118566.6.0.28087203317.issue10200@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: I am terribly sorry for the red alarm. I didn't mean to. But since the typos are all listed here, I don't want to copy&paste the reports to docs at python.org. Just please fix them. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:46:25 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Oct 2010 18:46:25 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288118785.71.0.107855272409.issue10199@psf.upfronthosting.co.za> R. David Murray added the comment: Yeah, I wish unittest hadn't been split up, and I really dislike the organization of the email package, though I think I understand how it came about historically. So I vote for flat :) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:49:56 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Oct 2010 18:49:56 +0000 Subject: [issue10195] Memory allocation fault-injection? In-Reply-To: <1288115452.7.0.29693282788.issue10195@psf.upfronthosting.co.za> Message-ID: <1288118991.3547.17.camel@localhost.localdomain> Antoine Pitrou added the comment: > Doing so would imply running each test many tens of thousands of > times, so perhaps we could run "-c pass" to establish at what serialno > the interpreter has fully started up, then use that as a starting > point when testing other scripts/modules. Well, this seems to suggest it's not an optimal approach. IMHO, your sys._inject_malloc_failure() proposal sounded better. (I don't think running "-c pass" is an appropriate solution; it's not obvious that the number of memory allocations at startup is totally deterministic - it could depend on e.g. I/O conditions -, and I don't think we want to ensure it is) > Running this interactively with a large value for > PYTHONMALLOCINJECTFAULTSAT I don't think an env variable is useful for this, since you probably don't want to set it permanently or even semi-permanently (and "PYTHONLONGUNAMBIGUOUSVARIABLENAME"s are always painful :-)). The new -X option support could be used instead, if a sys function isn't enough. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 20:50:58 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Tue, 26 Oct 2010 18:50:58 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288119058.38.0.859072462269.issue10199@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > I think it a mistake that tkinter.__init__ is huge, > about as big as the other 13 modules added together. > It makes it really hard to dive into the code That is certainly *not* a best practice. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 21:04:50 2010 From: report at bugs.python.org (John Nagle) Date: Tue, 26 Oct 2010 19:04:50 +0000 Subject: [issue10202] ftplib doesn't check close status after sending file In-Reply-To: <1288119890.05.0.476969255522.issue10202@psf.upfronthosting.co.za> Message-ID: <1288119890.05.0.476969255522.issue10202@psf.upfronthosting.co.za> New submission from John Nagle : "ftplib" doesn't check the status on socket close after writing. This can lead to silently truncated files when sending files with "ftplib". A report of truncated files on comp.lang.python led me to check the source code. The "ftplib" module does sending by calling sock_sendall in "socketmodule.c". That does an OS-level "send", and once everything has been sent, returns. But an OS-level socket send returns when the data is queued for sending, not when it is delivered. Only when the socket is closed, and the close status checked, do you know if the data was delivered. There's a final TCP close handshake that occurs when close has been called at both ends, and only when it completes successfully do you know that the data has been delivered. At the socket level, this is performed by "shutdown" (which closes the connection and returns the proper network status information), or by "close". Look at sock_close in "socketmodule.c". Note that it ignores the return status on close, always returns None, and never raises an exception. As the Linux manual page for "close" says: "Not checking the return value of close() is a common but nevertheless serious programming error. It is quite possible that errors on a previous write(2) operation are first reported at the final close(). Not checking the return value when closing the file may lead to silent loss of data." "ftplib", in "storlines" and "storbinary", calls "close" without checking the status or calling "shutdown" first. So if the other end disconnects after all data has been queued locally but not sent, received and acknowledged, the sender will never know. ---------- components: Library (Lib) messages: 119638 nosy: nagle priority: normal severity: normal status: open title: ftplib doesn't check close status after sending file type: behavior versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 21:11:34 2010 From: report at bugs.python.org (Paul Sokolovsky) Date: Tue, 26 Oct 2010 19:11:34 +0000 Subject: [issue10203] sqlite3.Row doesn't support sequence protocol In-Reply-To: <1288120293.93.0.799619941752.issue10203@psf.upfronthosting.co.za> Message-ID: <1288120293.93.0.799619941752.issue10203@psf.upfronthosting.co.za> New submission from Paul Sokolovsky : sqlite.Row class doesn't implement sequence protocol, which is rather unfortunate, because it is described and expected to work like a tuple, with extra mapping-like functionality. Specific issue I hit: Adding rows to PyGTK ListStore, model = gtk.ListStore(*db.getSchema()) for r in listGen(): model.append(r) I get: TypeError: expecting a sequence Looking at PyGTK sources, append() method uses PySequence Check() on the argument. Looking at Python 2.6.5 abstract.c: int PySequence_Check(PyObject *s) { if (s && PyInstance_Check(s)) return PyObject_HasAttrString(s, "__getitem__"); if (PyObject_IsInstance(s, (PyObject *)&PyDict_Type)) return 0; return s != NULL && s->ob_type->tp_as_sequence && s->ob_type->tp_as_sequence->sq_item != NULL; } And sqlite3.Row doesn't set ob_type->tp_as_sequence as of Py 2.6.5 or 2.7. ---------- components: Library (Lib) messages: 119639 nosy: pfalcon priority: normal severity: normal status: open title: sqlite3.Row doesn't support sequence protocol type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 21:16:05 2010 From: report at bugs.python.org (Paul Sokolovsky) Date: Tue, 26 Oct 2010 19:16:05 +0000 Subject: [issue10203] sqlite3.Row doesn't support sequence protocol In-Reply-To: <1288120293.93.0.799619941752.issue10203@psf.upfronthosting.co.za> Message-ID: <1288120565.4.0.00893646023715.issue10203@psf.upfronthosting.co.za> Changes by Paul Sokolovsky : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 21:21:19 2010 From: report at bugs.python.org (Eric Promislow) Date: Tue, 26 Oct 2010 19:21:19 +0000 Subject: [issue10204] exec string fails with trailing whitespace In-Reply-To: <1288120878.97.0.786929493479.issue10204@psf.upfronthosting.co.za> Message-ID: <1288120878.97.0.786929493479.issue10204@psf.upfronthosting.co.za> New submission from Eric Promislow : The following code throws an exception in Python 3.1 (and 3.2 alpha), but runs with 2.x: >>> exec('if True:\n print("Hello")\n \n ') Traceback (most recent call last): File "", line 1, in File "", line 4 SyntaxError: invalid syntax >>> This is with Python 3.1.1.2, but I can repro it with a 3.2 alpha as well. Ref Komodo bug http://bugs.activestate.com/show_bug.cgi?id=88566 ---------- components: Interpreter Core messages: 119640 nosy: ericp priority: normal severity: normal status: open title: exec string fails with trailing whitespace versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 21:27:21 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Oct 2010 19:27:21 +0000 Subject: [issue2775] Implement PEP 3108 In-Reply-To: <1210097469.77.0.880435072777.issue2775@psf.upfronthosting.co.za> Message-ID: <1288121241.77.0.526978697408.issue2775@psf.upfronthosting.co.za> Georg Brandl added the comment: I will have a go at the profiler situation. I imagine the following: deprecate the cProfile module, and provide both profiler classes from the profile module -- e.g. as PythonProfile and CProfile, and provide Profile = PythonProfile. (From cProfile.py, obviously Profile = CProfile). A lot of the interface (module-level helpers and script entry) are near duplicated anyway. In 3.3, the default Profile could then be reassigned to CProfile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 21:29:43 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Oct 2010 19:29:43 +0000 Subject: [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288121383.09.0.0220596856805.issue10200@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 21:32:48 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Oct 2010 19:32:48 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288121568.1.0.392879967985.issue7061@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM, if you verified that the label "debugger" is not in use at the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 21:40:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89tienne_BERSAC?=) Date: Tue, 26 Oct 2010 19:40:49 +0000 Subject: [issue10205] Can't have two tags with the same QName In-Reply-To: <1288122049.66.0.916624044666.issue10205@psf.upfronthosting.co.za> Message-ID: <1288122049.66.0.916624044666.issue10205@psf.upfronthosting.co.za> New submission from ?tienne BERSAC : Hi, Here is the code to reproduce and the unexcpected behaviour?: 21:37:41 bersace at st-francois-de-sales:~/Bureau/$ cat bug.py from xml.etree.ElementTree import QName, ElementTree, Element, SubElement import sys head = Element(QName('http://www.w3.org/1999/xhtml', 'html')) SubElement(head, QName('http://www.w3.org/1999/xhtml', 'meta')) SubElement(head, QName('http://www.w3.org/1999/xhtml', 'meta')) tree = ElementTree(head) tree.write(sys.stdout, encoding="utf-8", xml_declaration=True, default_namespace='http://www.w3.org/1999/xhtml') 21:38:00 bersace at st-francois-de-sales:~/Bureau/$ python2.7 bug.py Traceback (most recent call last): File "bug.py", line 10, in default_namespace='http://www.w3.org/1999/xhtml') File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 812, in write self._root, encoding, default_namespace File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 880, in _namespaces _raise_serialization_error(tag) File "/usr/lib/python2.7/xml/etree/ElementTree.py", line 1046, in _raise_serialization_error "cannot serialize %r (type %s)" % (text, type(text).__name__) TypeError: cannot serialize (type QName) 21:38:01 bersace at st-francois-de-sales:~/Bureau/$ Patch is attached. Regards, ?tienne ---------- components: XML files: python2.7-fix-qname-already-registered.patch keywords: patch messages: 119643 nosy: bersace priority: normal severity: normal status: open title: Can't have two tags with the same QName versions: Python 2.7 Added file: http://bugs.python.org/file19374/python2.7-fix-qname-already-registered.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 21:49:37 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Oct 2010 19:49:37 +0000 Subject: [issue10204] exec string fails with trailing whitespace In-Reply-To: <1288120878.97.0.786929493479.issue10204@psf.upfronthosting.co.za> Message-ID: <1288122577.01.0.635197488952.issue10204@psf.upfronthosting.co.za> R. David Murray added the comment: I can reproduce this on 3.1 but not py3k trunk. ---------- nosy: +benjamin.peterson, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 21:58:28 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Oct 2010 19:58:28 +0000 Subject: [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288123108.59.0.85071744005.issue10200@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r85849, r85850, and the third one isn't a typo. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 22:01:28 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Oct 2010 20:01:28 +0000 Subject: [issue10206] python program starting with unmatched quote spews spaces to stdout In-Reply-To: <1288123288.86.0.422520379457.issue10206@psf.upfronthosting.co.za> Message-ID: <1288123288.86.0.422520379457.issue10206@psf.upfronthosting.co.za> New submission from R. David Murray : To reproduce: python -c "'" (Hint: don't do this on a slow terminal) ---------- messages: 119646 nosy: r.david.murray priority: critical severity: normal stage: needs patch status: open title: python program starting with unmatched quote spews spaces to stdout type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 22:09:00 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Oct 2010 20:09:00 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288123740.65.0.53612457965.issue10199@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 22:33:39 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 26 Oct 2010 20:33:39 +0000 Subject: [issue10204] exec string fails with trailing whitespace In-Reply-To: <1288120878.97.0.786929493479.issue10204@psf.upfronthosting.co.za> Message-ID: <1288125219.22.0.980185302116.issue10204@psf.upfronthosting.co.za> Benjamin Peterson added the comment: That's because it's fixed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 22:35:53 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Tue, 26 Oct 2010 20:35:53 +0000 Subject: [issue10200] Documentation: "link use"? In-Reply-To: <1288123108.59.0.85071744005.issue10200@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: I forgot to mention to remove the comma in the text "This is used by vformat() to break the string into either literal text, or replacement fields." found at http://docs.python.org/library/string.html#string.Formatter.parse. to be "This is used by vformat() to break the string into either literal text or replacement fields." Please revisit this and remove the comma. On Tue, Oct 26, 2010 at 9:58 PM, Georg Brandl wrote: > > Georg Brandl added the comment: > > Fixed in r85849, r85850, and the third one isn't a typo. > > ---------- > nosy: +georg.brandl > resolution: -> fixed > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19375/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- I forgot to mention to remove the comma in the text "This is used by??vformat()??to break the string into either literal text, or replacement fields." found at??http://docs.python.org/library/string.html#string.Formatter.parse. to be "This is used by??vformat()??to break the string into either literal text or replacement fields." Please revisit this and remove the comma.


On Tue, Oct 26, 2010 at 9:58 PM, Georg Brandl <report at bugs.python.org> wrote:

Georg Brandl <georg at python.org> added the comment:

Fixed in r85849, r85850, and the third one isn't a typo.

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

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

From report at bugs.python.org Tue Oct 26 22:36:04 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Oct 2010 20:36:04 +0000 Subject: [issue10202] ftplib doesn't check close status after sending file In-Reply-To: <1288119890.05.0.476969255522.issue10202@psf.upfronthosting.co.za> Message-ID: <1288125364.29.0.734765432924.issue10202@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +giampaolo.rodola stage: -> unit test needed versions: -Python 2.5, Python 2.6, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 23:01:54 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 26 Oct 2010 21:01:54 +0000 Subject: [issue10200] Documentation: "link use"? In-Reply-To: Message-ID: <1288126914.08.0.80009218368.issue10200@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think that comma is an error; it's more a stylistic issue. You could write it with and without, and both are correct. (Remember that TOOWTDI does absolutely not apply to natural languages.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 23:04:35 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 26 Oct 2010 21:04:35 +0000 Subject: [issue10204] exec string fails with trailing whitespace In-Reply-To: <1288120878.97.0.786929493479.issue10204@psf.upfronthosting.co.za> Message-ID: <1288127075.76.0.145209708474.issue10204@psf.upfronthosting.co.za> R. David Murray added the comment: The fix is not something that can be backported to 3.1? (This is a regression relative to 2.x). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 23:07:53 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 26 Oct 2010 21:07:53 +0000 Subject: [issue10195] Memory allocation fault-injection? In-Reply-To: <1288052629.43.0.603183515135.issue10195@psf.upfronthosting.co.za> Message-ID: <1288127273.22.0.725704630329.issue10195@psf.upfronthosting.co.za> STINNER Victor added the comment: > ... every call to PyRun_InteractiveOneFlags immediately returns >(the PyUnicode_FromString("stdin") in within PySys_GetObject() fails > to allocate memory); this leads to a tight loop sending the total > refcount to stderr: I think that it is the issue #8070. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 23:59:16 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Oct 2010 21:59:16 +0000 Subject: [issue10202] ftplib doesn't check close status after sending file In-Reply-To: <1288119890.05.0.476969255522.issue10202@psf.upfronthosting.co.za> Message-ID: <1288130356.59.0.93271863019.issue10202@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It sounds more like an issue in socket.close(), right? ---------- nosy: +exarkun, loewis, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Oct 26 23:59:44 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 26 Oct 2010 21:59:44 +0000 Subject: [issue10204] exec string fails with trailing whitespace In-Reply-To: <1288127075.76.0.145209708474.issue10204@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: 2010/10/26 R. David Murray : > > R. David Murray added the comment: > > The fix is not something that can be backported to 3.1? ?(This is a regression relative to 2.x). No, it's not. The fix was a bit of "feature", so it was in 2.7 and py3k. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 00:06:42 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Tue, 26 Oct 2010 22:06:42 +0000 Subject: [issue9047] Python 2.7rc2 includes -isysroot twice on each gcc command line In-Reply-To: <1287586765.29.0.693620018902.issue9047@psf.upfronthosting.co.za> Message-ID: <4CC750EE.2080303@egenix.com> Marc-Andre Lemburg added the comment: Ronald Oussoren wrote: > > Ronald Oussoren added the comment: > > Marc-Andre: does the current HEAD of the 2.7 and 3.2 branches work for you? > > The build still has duplicate flags, but that doesn't seem to cause problems on my machines. If it also doesn't cause problems on your machines I'd prefer to close this issue as won't fixed because cleaning up the duplicate flags is non-trivial. I'll give this a try tomorrow. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 00:20:25 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Oct 2010 22:20:25 +0000 Subject: [issue10207] test_file2k crashes under Windows In-Reply-To: <1288131625.06.0.246375636536.issue10207@psf.upfronthosting.co.za> Message-ID: <1288131625.06.0.246375636536.issue10207@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This recurrent crash appeared recently under the XP-4 buildbot, between r85816 and r85819. But none of these revisions looks related to potential file issues. Each time the test just finishes with: [...] test_file2k program finished with exit code -1073741819 (which according to Google means access violation) See http://www.python.org/dev/buildbot/builders/x86%20XP-4%202.7/ for test logs. ---------- components: Tests, Windows keywords: buildbot messages: 119655 nosy: brian.curtin, db3l, loewis, ocean-city, pitrou priority: normal severity: normal status: open title: test_file2k crashes under Windows type: crash versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 00:21:58 2010 From: report at bugs.python.org (Kevin Chen) Date: Tue, 26 Oct 2010 22:21:58 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1288131718.79.0.410912505814.issue7978@psf.upfronthosting.co.za> Changes by Kevin Chen : ---------- nosy: +kchen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 00:48:38 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 26 Oct 2010 22:48:38 +0000 Subject: [issue10201] Fix building of socket module under Solaris In-Reply-To: <1288110169.62.0.573070204064.issue10201@psf.upfronthosting.co.za> Message-ID: <1288133318.81.0.252296294095.issue10201@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: This is not a problem under Solaris 10. I guess it is a problem with OpenSolaris/OpenIndiana/Illumos. Can you confirm?. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 01:05:38 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 26 Oct 2010 23:05:38 +0000 Subject: [issue10201] Fix building of socket module under Solaris In-Reply-To: <1288133318.81.0.252296294095.issue10201@psf.upfronthosting.co.za> Message-ID: <1288134334.3547.36.camel@localhost.localdomain> Antoine Pitrou added the comment: > This is not a problem under Solaris 10. I guess it is a problem with > OpenSolaris/OpenIndiana/Illumos. > > Can you confirm?. It's with the most recent OpenSolaris development build (build 134). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 01:18:10 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 26 Oct 2010 23:18:10 +0000 Subject: [issue10202] ftplib doesn't check close status after sending file In-Reply-To: <1288119890.05.0.476969255522.issue10202@psf.upfronthosting.co.za> Message-ID: <1288135090.66.0.181611372593.issue10202@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't quite understand the problem. How exactly do you manage to lose data? The ftp server should send a 226 status code to indicate success over the control connection, and presumably it will do so only after receiving the proper TCP shutdown from its operating system. So regardless of any error handling that ftplib or .close() may fail to perform, I doubt that the problem can actually arise. As for error checking in close(): I think this is a minor issue for this discussion. Usually, close() will succeed *without* sending all data to the remote system. So looking at the close() status will *not* tell you whether all data has been delivered. You would have to use the SO_LINGER socket option for that. Even with SO_LINGER turned on, it's pretty pointless to check the close status. While we would be able to tell whether the data has arrived at the remote system, we can't know whether the ftp server has actually read them out of the socket, and written them to disk. So we absolutely need the ftp protocol status to determine the outcome of a STOR (say). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 01:50:04 2010 From: report at bugs.python.org (Peter Ingebretson) Date: Tue, 26 Oct 2010 23:50:04 +0000 Subject: [issue10194] Add gc.remap() function to the gc module. In-Reply-To: <1288043293.98.0.0362084529098.issue10194@psf.upfronthosting.co.za> Message-ID: <1288137004.27.0.573809010831.issue10194@psf.upfronthosting.co.za> Peter Ingebretson added the comment: Closing due to general lack of support on python-dev. Some portion of this implementation may come back as part of a PEP reference implementation. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 02:05:46 2010 From: report at bugs.python.org (Piotr Matuszewski) Date: Wed, 27 Oct 2010 00:05:46 +0000 Subject: [issue10208] add mazovia.py to encodings/ In-Reply-To: <1288137946.29.0.185771065626.issue10208@psf.upfronthosting.co.za> Message-ID: <1288137946.29.0.185771065626.issue10208@psf.upfronthosting.co.za> New submission from Piotr Matuszewski : mazovia is an old encoding for Polish language, it's modified cp437 (more info at http://en.wikipedia.org/wiki/Mazovia_encoding and (in Polish, but tables are useful anyway) http://pl.wikipedia.org/wiki/Mazovia_(kod) ) ---------- components: Library (Lib), Unicode files: mazovia.py messages: 119660 nosy: matusz priority: normal severity: normal status: open title: add mazovia.py to encodings/ type: feature request Added file: http://bugs.python.org/file19376/mazovia.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 02:19:19 2010 From: report at bugs.python.org (David Bolen) Date: Wed, 27 Oct 2010 00:19:19 +0000 Subject: [issue10207] test_file2k crashes under Windows In-Reply-To: <1288131625.06.0.246375636536.issue10207@psf.upfronthosting.co.za> Message-ID: <1288138759.52.0.26139972612.issue10207@psf.upfronthosting.co.za> David Bolen added the comment: Can't really say why it's just hitting now more consistently but the failure is an internal CRT exception during a file close, when it is handed what appears to be an invalid FILE * (the internal structure has bad data). I think it's more chance that it appears to be in the 86819-85819 change. I've been able to generate the same error in 85816 with 4-5 test runs. In all cases it's sporadic, but can trigger just by running test_file2k so doesn't require any other tests to have run. With a local build and the VS debugger, the failure point is the CRT during an internal flush as part of fclose(). The FILE * structure looks like it became corrupted prior to that point. The tail end of the failure traceback is: msvcr90d.dll!_write_nolock(int fh=3, const void * buf=0x00f4e008, unsigned int cnt=1) Line 322 + 0x6 bytes msvcr90d.dll!_write(int fh=3, const void * buf=0x00f4e008, unsigned int cnt=1) Line 75 + 0x11 bytes msvcr90d.dll!_flush(_iobuf * str=0x10311448) Line 154 + 0x1d bytes msvcr90d.dll!_fclose_nolock(_iobuf * str=0x10311448) Line 105 + 0x9 bytes msvcr90d.dll!fclose(_iobuf * stream=0x10311448) Line 57 + 0x9 bytes python27_d.dll!close_the_file(PyFileObject * f=0x00bef5d8) Line 451 + 0x7 bytes python27_d.dll!file_close(PyFileObject * f=0x00bef5d8) Line 651 + 0x9 bytes python27_d.dll!call_function(_object * * * pp_stack=0x0145f228, int oparg=12514776) Line 3996 + 0x10 bytes The last Python runtime code is in the close_the_file frame (fileobject.c, line 451), it's the line: sts = (*local_close)(local_fp) and local_fp has bad pointers inside its structure: local_fp 0x10311448 _iobuf * _ptr 0x00f4e009 char * _cnt 16383 int _base 0x00f4e008 char * _flag 34178 int _file 3 int _charbuf 0 int _bufsiz 16384 int _tmpfname 0x00000000 char * I've also seem some cases where _ptr isn't explicitly flagged as a Bad Ptr (e.g., value 0x00e56031 with r85816) but is still invalid to access. The local_close code runs outside the GIL, so maybe some sort of race condition with the parent Python file object, though the file object internal file point is NULL'd before releasing the GIL so I don't know if that seems plausible. I'm not sure of the best way to trace back across the C/Python interpreter boundary - the trace above this is really just a lot of PyEval_EvalFrameEx/fast_function/call_function entry points with Python objects that are fairly opaque to the VS debugger. One thing I do find interesting is that sometimes after continuing past the failure point the tests actually run to completion. Not sure if that means the issue might be more in test wrapper code than the tests themselves, or just that continuing past the flush failure in the debugger is something the test can't detect. I'll try to break down the test module later tonight when I have some more time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 02:36:36 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Oct 2010 00:36:36 +0000 Subject: [issue10209] Mac OS X: Decompose filenames on encode, and precompose filenames on decode In-Reply-To: <1288139796.38.0.381630346424.issue10209@psf.upfronthosting.co.za> Message-ID: <1288139796.38.0.381630346424.issue10209@psf.upfronthosting.co.za> New submission from STINNER Victor : PyUnicode_EncodeFSDefault() and os.fsencode() should decompose the filename (NFD) before encoding it to utf-8. PyUnicode_DecodeFSDefault(AndSize)() and os.fsdecode() should precompose the filename (NFC) after decoding it from utf-8. Qt library does this on Mac: see locale_encode()/locale_decode() (filename encoder/decoder) functions in src/corelib/io/qfile.cpp. It should fix some issues of test_pep277 on Mac OS X (see #8423). I'm not completly sure that we should do that :-) (I used the nosy list from issues #4388 and #8423). -- Technical Q&A QA1173, Text Encodings in VFS: http://developer.apple.com/mac/library/qa/qa2001/qa1173.html Q: I'm writing a file system (VFS) plug-in for Mac OS X. How do I handle text encodings correctly? A: In Mac OS X's VFS API file names are, by definition, canonically decomposed Unicode, encoded using UTF-8. This raises a number of interesting issues. (...) ---------- assignee: ronaldoussoren components: Interpreter Core, Macintosh, Unicode messages: 119662 nosy: MrJean1, amaury.forgeotdarc, db3l, flox, haypo, ixokai, loewis, mark.dickinson, michael.foord, ned.deily, piro, pitrou, ronaldoussoren, rpetrov, skip.montanaro, slmnhq priority: normal severity: normal status: open title: Mac OS X: Decompose filenames on encode, and precompose filenames on decode versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 02:37:34 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Oct 2010 00:37:34 +0000 Subject: [issue8423] tiger buildbot: test_pep277 failures In-Reply-To: <1271435749.81.0.011008649482.issue8423@psf.upfronthosting.co.za> Message-ID: <1288139854.76.0.515114392293.issue8423@psf.upfronthosting.co.za> STINNER Victor added the comment: I opened the issue #10209: "Mac OS X: Decompose filenames on encode, and precompose filenames on decode". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 02:39:07 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 27 Oct 2010 00:39:07 +0000 Subject: [issue10201] Fix building of socket module under Solaris In-Reply-To: <1288110169.62.0.573070204064.issue10201@psf.upfronthosting.co.za> Message-ID: <1288139947.07.0.814649498309.issue10201@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Could this to be considered a bug in OpenSolaris?. If not, I think this fix should be backported to 2.5/2.6/2.7/3.1. Just for the record, I am asking for help to get a buildbot under OpenIndiana: http://openindiana.org/pipermail/openindiana-discuss/2010-October/000974.html . Hope somebody can help out. We need it. ---------- versions: +Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 02:51:26 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Oct 2010 00:51:26 +0000 Subject: [issue10209] Mac OS X: Decompose filenames on encode, and precompose filenames on decode In-Reply-To: <1288139796.38.0.381630346424.issue10209@psf.upfronthosting.co.za> Message-ID: <1288140686.04.0.212440512202.issue10209@psf.upfronthosting.co.za> STINNER Victor added the comment: Patch for os.fsencode/fsdecode importing unicodedata in the function (instead of a global import). unicodedata module is not builtin and is dynamically loaded. We should maybe ignore ImportError if the module is not available? With a warning? For PyUnicode_EncodeFSDefault() and PyUnicode_DecodeFSDefault(AndSize)() (C implementation), we can maybe use a hook (eg. implemented as as configurable callback) and set the hook after loading the unicodedata module. It would be easier if unicodedata would be builtin module :-) ---------- keywords: +patch Added file: http://bugs.python.org/file19377/10209.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 02:58:06 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Oct 2010 00:58:06 +0000 Subject: [issue10210] os.get_exec_path() should not produce any warning In-Reply-To: <1288141086.46.0.441985990964.issue10210@psf.upfronthosting.co.za> Message-ID: <1288141086.46.0.441985990964.issue10210@psf.upfronthosting.co.za> New submission from STINNER Victor : Using -b command line option, os.get_exec_path() always produce a warning. Example: $ ./python -b >>> import os: os.get_exec_path({'PATH': ''}) .../Lib/os.py:395: BytesWarning: Comparison between bytes and string path_listb = env[b'PATH'] [''] You can see such warning on some buildbots. This function should make this warning quiet because it is expected: it is not possible to check that a dict contains 'PATH' and b'PATH' keys without emiting a BytesWarning (see issue #9636). Attached patch fixes this bug. It imports the warnings module in get_exec_path() function because os is a core module and it should not import too much modules. But... I'm not sure that it's the right way to fix this issue. ---------- components: Library (Lib), Unicode files: get_exec_path_byteswarning.patch keywords: patch messages: 119666 nosy: haypo priority: normal severity: normal status: open title: os.get_exec_path() should not produce any warning versions: Python 3.2 Added file: http://bugs.python.org/file19378/get_exec_path_byteswarning.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 03:06:24 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 27 Oct 2010 01:06:24 +0000 Subject: [issue8777] Add threading.Barrier In-Reply-To: <1274375262.53.0.647489735751.issue8777@psf.upfronthosting.co.za> Message-ID: <1288141584.59.0.324890152682.issue8777@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Okay, here is a new submission. I've redesigned it to be more reminiscent of the Java version, by allowing the barrier to have a "Broken" state and raising a BrokenBarrierError. I've also redesigned the mechanism from a simple perpetually increasing index of "entered" and "released" into a proper two-state machine which is either "filling" or "draining". There is also a rather comprehensive set of tests. What is missing is documentation, somethign I shall add if this gets a positive response. Note how, in the tests, I sometimes create a "barrier2" object to facilitate external synchronization. This demonstrates the simplicity of using this primitive. Another note: In order to implement "timeout" behaviour, I changed Condition.wait() to return True in case it returns due to a timeout occurring. I folded this into this patch, but if such a change is not accepted, or we want it separately, then I'll have to remove the timeout functionality from the Barrier. I don't want to have complicated logic in there to measure time. Also, I do think that locking primitives that time out should be able to provide an indication to that fact to their callers, so condition.wait() really should do that. ---------- Added file: http://bugs.python.org/file19379/barrier3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 03:31:23 2010 From: report at bugs.python.org (David Bolen) Date: Wed, 27 Oct 2010 01:31:23 +0000 Subject: [issue10207] test_file2k crashes under Windows In-Reply-To: <1288131625.06.0.246375636536.issue10207@psf.upfronthosting.co.za> Message-ID: <1288143083.98.0.721991702985.issue10207@psf.upfronthosting.co.za> David Bolen added the comment: Ok, when it fails, the failure always appears to be one of the FileThreadingTests tests, with the affected close() call occurring within _close_file, called from _close_and_reopen_file, called from _test_close_open_io. It seems tough to backtrace the VS traces to the exact parent test due to the threading involved, but so far I've only been able to see the problem (with some debugging output added) while in test_close_open_print_buffered. It's a little tough to be positive, but I can seem to influence the odds of failure a bit with host I/O load, and I have yet to see a failure if I remove that test, while limiting the FileThreadingTests class to just that test fails with about the same frequency as the original full class did. So even if the issue is more general, that test seems the best way to exercise/analyze it. So there does seem to likely be a real race condition somewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 03:39:02 2010 From: report at bugs.python.org (John Nagle) Date: Wed, 27 Oct 2010 01:39:02 +0000 Subject: [issue10202] ftplib doesn't check close status after sending file In-Reply-To: <1288119890.05.0.476969255522.issue10202@psf.upfronthosting.co.za> Message-ID: <1288143542.6.0.0120996379651.issue10202@psf.upfronthosting.co.za> John Nagle added the comment: Proper behavior for ftplib when sending is to send all desired data, then call "sock.shutdown(socket.SHUT_RDWR)". This indicates that no more data will be sent, and blocks until the receiver has acknowledged all their data. "socketmodule.c" handles this right. "shutdown" is called on the socket, and the return value is checked. If the return value is negative, an error handler is returned. Compare the handling in "close". FTP send is one of the few situations where this matters, because FTP uses the close of the data connection to indicate EOF. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 04:28:22 2010 From: report at bugs.python.org (mark saaltink) Date: Wed, 27 Oct 2010 02:28:22 +0000 Subject: [issue10118] Tkinter does not find font In-Reply-To: <1287192630.89.0.924571330725.issue10118@psf.upfronthosting.co.za> Message-ID: <1288146502.29.0.471163546526.issue10118@psf.upfronthosting.co.za> mark saaltink added the comment: I built the latest 2.7, with tk/tcl 8.5, and see the same problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 04:49:12 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 27 Oct 2010 02:49:12 +0000 Subject: [issue10204] exec string fails with trailing whitespace In-Reply-To: <1288120878.97.0.786929493479.issue10204@psf.upfronthosting.co.za> Message-ID: <1288147752.86.0.055674463684.issue10204@psf.upfronthosting.co.za> R. David Murray added the comment: I thought I tested this on 2.6, but I forgot that my system has now made 2.7 the default python. And now that you mention it, I vaguely remember this feature getting added. Sorry for the noise. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 04:56:18 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 27 Oct 2010 02:56:18 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1288121568.1.0.392879967985.issue7061@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Tue, Oct 26, 2010 at 3:32 PM, Georg Brandl wrote: .. > LGTM, if you verified that the label "debugger" is not in use at the moment. Good point. I naively hoped that Sphinx would warn me about a reference to an undefined label. Grep found a reference in sys.rst. I will replace that with a :mod:`pdb` reference which seems to be a better fit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 05:14:28 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 27 Oct 2010 03:14:28 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288149268.89.0.0104872799727.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed in revision 85853. Terry, please chime in if I missed anything that you would consider part of this issue. Note that the speed vs. delay may not be just a doc issue. I opened issue 10170 for that. ---------- resolution: -> accepted stage: commit review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 05:32:28 2010 From: report at bugs.python.org (Gregor Lingl) Date: Wed, 27 Oct 2010 03:32:28 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288150348.98.0.913199834375.issue10199@psf.upfronthosting.co.za> Gregor Lingl added the comment: First of all: I'd not like to see turtle.py converted into a package. I think with the turtle module things should be as simple as possible and I don't see any need to put approx. 100kB of code into an __init__.py and be it only because there are hundreds of them and on cannot see from the name what's in there. I do not expect the avarage turtle user to look at the code, but certainly some teachers and instructors do even if they are not python specialists accustomed to the use of packages. As far as I understood from the discussion the MAIN POINT is to make the turtleDemo accessible as easyly as possible. So at first this needs a decision to put the demo code into the Windows-Distribution. The next question is where to put it. In my opinion there are two possibilities. 1) The one mentioned by Alexander in msg119612: a turtledemo directory in Lib. 2) To put a turtledemo directory into the Tools directory (in some sense the demoViewer is sort of a tool, isn't it.) I quickly prepared a 'prototypical' collection with a modified viewer, which accounts for some of the arguments which came up in the current discussion. It contains a turtledemo package. Please download it and have a look. Each demo can be run by doubleclicking, as a standalone script, as well as from the turtledemo.viewer If from the above options 1) were chosen or the package is somewhere else in the search path, on can - at the interactive prompt - do things like: >>> from turtledemo import bytedesign >>> bytedesign.main() and also: >>> from turtledemo import viewer >>> viewer.run() Morover one can load the examples into Idle and start them via the run-command. So one has a look at the code and moreover the possibility to make changes and try out, what happens. I have renamed the sample scripts, omitting the tdemo_ - prefix, as this looks nicer (at least for me). The previous version turtleDemo recognized scripts with this suffix as belonging to the demo-suite and added it to the examples menu. This was necessary because of a script, which cannot be demonstrated in the demo_viewer (two canvases). I changed this in my proposition in the following way: scripts that are in the demodirectory and should not appear in the DemoViewer's example-Menu, should end with _.py or some other extension. To make the demo_viewer importable creates a special problem: the demos are imported by the demoViewer via the __import__ function, so everyone can add his own demos to the demo-directory and they will show up in the viewer. The original version (and even this one) can do this also for demos in subdirectories when started directly. (I've included as an example the geometry directory). This does't work yet for importing the viewer, I only provided a very clumsy quick and dirty solution and I hope that someone has a better, more bright idea to do this more elegantly and correctly. Now for something completely different: how to make it easily accessible. 1) Put remarks (and links) into the documentation, near the head of the turtle module's docs. (Referring to 24.5.7) 2) Put a hint into the commentary/docstring of the file turtle.py itself. 3) I do not consider it a good idea to put the viewer.py into the if __name__ == "__main__" - part of turtle.py thus replacing the current demo. I think this part should demonstrate the possibilities of the module without recurring to extra use of Tkinter (as the demo viewer does). (I must also confess, that the quality of the code of the viewer, which I programmed back in 2006, does not reach the standards I tried to achieve for turtle.py) 4) BUT I'd find it useful to change this final demo code of turtle.py, so it - in the end - displays a message where to find more demos (i. e. turtledemo) or even to put there a question like ("Do you want to see more demos?") and two "turtle-generated" "buttons": "YES" and "NO". If one chooses "Yes", the turtledemo.viewer would pop up in a separate process. Please consider this to be a proposal or a contribution. I'm very interested in discussing it further and bringing it to a quick and easy solution for Python 3.2. Unfortunately I'm currently involved in a project (also python-related) with very severe time constraints for the next four to five month. So ideas for enhancing the demoviewer and probably turtle.py have to wait until then and possibly will be an issue for Python 3.3 Best regards, Gregor ---------- Added file: http://bugs.python.org/file19380/turtledemo32.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 08:45:30 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 27 Oct 2010 06:45:30 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288161930.03.0.379784153684.issue7061@psf.upfronthosting.co.za> Georg Brandl added the comment: If you do a full build, you'll get a warning; however, currently documents that reference a label will not be recognized as out of date when that label changes or is removed. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 09:06:13 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 27 Oct 2010 07:06:13 +0000 Subject: [issue5688] inability to ignore multiline warnings -- request to add re.DOTALL to re.compile In-Reply-To: <1238858961.61.0.698895898394.issue5688@psf.upfronthosting.co.za> Message-ID: <1288163173.65.0.928345038012.issue5688@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 09:09:56 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 27 Oct 2010 07:09:56 +0000 Subject: [issue2703] SimpleXMLRPCDispatcher.__init__ is not python2.4-backward-compatible In-Reply-To: <1209290195.97.0.404790617339.issue2703@psf.upfronthosting.co.za> Message-ID: <1288163396.49.0.0178190046733.issue2703@psf.upfronthosting.co.za> Georg Brandl added the comment: Seems to have been changed in 2.6 and 2.7 already. ---------- nosy: +georg.brandl status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 09:10:57 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 27 Oct 2010 07:10:57 +0000 Subject: [issue4828] patch suggestion for webbrowser In-Reply-To: <1231063999.69.0.0846570539702.issue4828@psf.upfronthosting.co.za> Message-ID: <1288163457.97.0.507929689528.issue4828@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 09:21:06 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 27 Oct 2010 07:21:06 +0000 Subject: [issue4828] patch suggestion for webbrowser In-Reply-To: <1231063999.69.0.0846570539702.issue4828@psf.upfronthosting.co.za> Message-ID: <1288164066.55.0.703522634769.issue4828@psf.upfronthosting.co.za> anatoly techtonik added the comment: Any explanations? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 09:27:24 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 27 Oct 2010 07:27:24 +0000 Subject: [issue5975] csv unix file format ('\n' line terminator) In-Reply-To: <1241821870.32.0.544896440632.issue5975@psf.upfronthosting.co.za> Message-ID: <1288164444.94.0.93200703336.issue5975@psf.upfronthosting.co.za> Georg Brandl added the comment: Added in r85856. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 09:29:23 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 27 Oct 2010 07:29:23 +0000 Subject: [issue7167] Smarter FTP passive mode In-Reply-To: <1255900945.2.0.567216991168.issue7167@psf.upfronthosting.co.za> Message-ID: <1288164563.75.0.604021960425.issue7167@psf.upfronthosting.co.za> Georg Brandl added the comment: Closing following Giampaolo's suggestion. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 09:30:32 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 27 Oct 2010 07:30:32 +0000 Subject: [issue4828] patch suggestion for webbrowser In-Reply-To: <1231063999.69.0.0846570539702.issue4828@psf.upfronthosting.co.za> Message-ID: <1288164632.22.0.79745718412.issue4828@psf.upfronthosting.co.za> Georg Brandl added the comment: Oh, sorry. Shouldn't do too many things at once. Well, I think there aren't many webbrowsers that come as a .com file, for example. And as Amaury shows, the patch can't be applied as is anyway. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 09:31:40 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 27 Oct 2010 07:31:40 +0000 Subject: [issue7911] unittest.TestCase.longMessage should default to True in Python 3.2 In-Reply-To: <1265915317.63.0.548370408241.issue7911@psf.upfronthosting.co.za> Message-ID: <1288164700.36.0.94744932789.issue7911@psf.upfronthosting.co.za> Georg Brandl added the comment: Michael: ping? Will you do this before beta1? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 09:43:47 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 27 Oct 2010 07:43:47 +0000 Subject: [issue10208] add mazovia.py to encodings/ In-Reply-To: <1288137946.29.0.185771065626.issue10208@psf.upfronthosting.co.za> Message-ID: <4CC7D82F.9050400@egenix.com> Marc-Andre Lemburg added the comment: Piotr Matuszewski wrote: > > New submission from Piotr Matuszewski : > > mazovia is an old encoding for Polish language, it's modified cp437 (more info at http://en.wikipedia.org/wiki/Mazovia_encoding and (in Polish, but tables are useful anyway) http://pl.wikipedia.org/wiki/Mazovia_(kod) ) Is this still in common use ? The wikipedia pages suggest that it was used in the MS-DOS days, but those are long over. Please note that we don't want to add every single existing code page to Python, just because we can. If their use is marginal, it's better to maintain them externally. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 10:49:12 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 27 Oct 2010 08:49:12 +0000 Subject: [issue10211] BufferObject doesn't support new buffer interface In-Reply-To: <1288169352.49.0.219368546772.issue10211@psf.upfronthosting.co.za> Message-ID: <1288169352.49.0.219368546772.issue10211@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : The BufferObject in 2.7 doesn't support the new buffer interface. This makes it useless for use with the new memoryview object. This simple patch adds that support. ---------- components: Interpreter Core files: buffer_newbuf.patch keywords: easy, patch messages: 119683 nosy: krisvale priority: normal severity: normal status: open title: BufferObject doesn't support new buffer interface type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file19381/buffer_newbuf.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 12:09:28 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Oct 2010 10:09:28 +0000 Subject: [issue10201] Fix building of socket module under Solaris In-Reply-To: <1288139947.07.0.814649498309.issue10201@psf.upfronthosting.co.za> Message-ID: <1288174162.3533.3.camel@localhost.localdomain> Antoine Pitrou added the comment: > Jes?s Cea Avi?n added the comment: > > Could this to be considered a bug in OpenSolaris?. That's a good question. Perhaps Laca (who wrote the original patch) can chime in. > If not, I think this fix should be backported to 2.5/2.6/2.7/3.1. It's not a security fix, so I think 2.5 and 2.6 are not applicable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 12:23:29 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Wed, 27 Oct 2010 10:23:29 +0000 Subject: [issue10108] ExpatError not property wrapped In-Reply-To: <1287093270.3.0.510777453712.issue10108@psf.upfronthosting.co.za> Message-ID: <1288175009.37.0.6603479291.issue10108@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- nosy: +fdrake _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 12:26:33 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 27 Oct 2010 10:26:33 +0000 Subject: [issue10202] ftplib doesn't check close status after sending file In-Reply-To: <1288119890.05.0.476969255522.issue10202@psf.upfronthosting.co.za> Message-ID: <1288175193.95.0.109062787396.issue10202@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > Proper behavior for ftplib when sending is to send all desired data, > then call "sock.shutdown(socket.SHUT_RDWR)". This indicates that no > more data will be sent, and blocks until the receiver has acknowledged > all their data. I'm not sure about this. Such a requirement should be respected by both peers and AFAICR there's no FTP-related RFC which explicitly states that shutdown() should be used. http://www.rfc-archive.org/getrfc.php?rfc=4217 chapter 12.4 should reflect the same use case we're talking about: a client sending a file (STOR). In the example only close() is used, which perhaps should lead this discussion to question whether socket's close() method is implemented properly, as your linux man quote suggests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 12:30:25 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Wed, 27 Oct 2010 10:30:25 +0000 Subject: [issue1813] Codec lookup failing under turkish locale In-Reply-To: <1200150013.57.0.828744211276.issue1813@psf.upfronthosting.co.za> Message-ID: <1288175425.49.0.0114388336643.issue1813@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: We've included this patch in Gentoo for about two years now. Can we get some discussion going on doing something like this? ---------- nosy: +djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 12:36:53 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 27 Oct 2010 10:36:53 +0000 Subject: [issue10212] struct.unpack and cStringIO.StringIO don't support new buffer In-Reply-To: <1288175813.33.0.0310491559114.issue10212@psf.upfronthosting.co.za> Message-ID: <1288175813.33.0.0310491559114.issue10212@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : When doing socket IO, it is beneficial to use a bytearra() and then using sock.recv_into() to avoid moving data about. However, many useful functions still don't accept new style buffers, such as the bytearray and memoryview. In particular, the struct module cannot unpack from them, and the StringIO doesn't accept them as input. The attached patch adds new-buffer support to the struct module and cStringIO. ---------- components: Interpreter Core files: newbuffer.patch keywords: needs review, patch messages: 119687 nosy: krisvale priority: normal severity: normal status: open title: struct.unpack and cStringIO.StringIO don't support new buffer type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file19382/newbuffer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 12:42:36 2010 From: report at bugs.python.org (John Levon) Date: Wed, 27 Oct 2010 10:42:36 +0000 Subject: [issue10201] Fix building of socket module under Solaris In-Reply-To: <1288110169.62.0.573070204064.issue10201@psf.upfronthosting.co.za> Message-ID: <1288176156.24.0.841312107798.issue10201@psf.upfronthosting.co.za> John Levon added the comment: This is not a bug in Solaris - the interfaces Python is trying to use are not standardized. (It's a reasonable RFE for Solaris to fully support these, though - I'll follow up on that.) WRT the patch, at least the PACKET_* defined would be better done via a specific guard (#ifdef PACKET_LOOPBACK ...). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:11:58 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 27 Oct 2010 11:11:58 +0000 Subject: [issue8852] _socket fails to build on OpenSolaris x64 In-Reply-To: <1275143413.04.0.262553470749.issue8852@psf.upfronthosting.co.za> Message-ID: <1288177918.89.0.673693215196.issue8852@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:13:29 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Oct 2010 11:13:29 +0000 Subject: [issue10212] struct.unpack and cStringIO.StringIO don't support new buffer In-Reply-To: <1288175813.33.0.0310491559114.issue10212@psf.upfronthosting.co.za> Message-ID: <1288178009.94.0.651261113797.issue10212@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You can't add buffer protocol support to cStringIO in a bugfix release, since it would be a new feature. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:19:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 Oct 2010 11:19:01 +0000 Subject: [issue9913] Misc/SpecialBuilds.txt is out of date In-Reply-To: <1285084668.56.0.665403194927.issue9913@psf.upfronthosting.co.za> Message-ID: <1288178341.44.0.380775642484.issue9913@psf.upfronthosting.co.za> ?ric Araujo added the comment: Agreed the file needs updating. Can you do it? I?m not sure the contents of this file should be moved under Doc. There is no build/installation guide on docs.python.org, probably because most users don?t build themselves. Having advanced docs under Misc with a reference in the README seems okay to me. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:23:55 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 Oct 2010 11:23:55 +0000 Subject: [issue10212] struct.unpack and cStringIO.StringIO don't support new buffer In-Reply-To: <1288175813.33.0.0310491559114.issue10212@psf.upfronthosting.co.za> Message-ID: <1288178635.92.0.178020256651.issue10212@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- components: +Extension Modules -Interpreter Core nosy: +benjamin.peterson, eric.araujo status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:25:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 Oct 2010 11:25:11 +0000 Subject: [issue10211] BufferObject doesn't support new buffer interface In-Reply-To: <1288169352.49.0.219368546772.issue10211@psf.upfronthosting.co.za> Message-ID: <1288178711.54.0.442890262186.issue10211@psf.upfronthosting.co.za> ?ric Araujo added the comment: Unless there is a mismatch between the documentation and the code, I suspect this will be rejected by the release manager. ---------- nosy: +benjamin.peterson, eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:27:28 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 27 Oct 2010 11:27:28 +0000 Subject: [issue1813] Codec lookup failing under turkish locale In-Reply-To: <1200150013.57.0.828744211276.issue1813@psf.upfronthosting.co.za> Message-ID: <1288178848.38.0.994270596416.issue1813@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Looking at this again, I think we should change the codec registry C code to use Py_TOLOWER() and the encoding search function code to use the .translate() approach that Antoine suggested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:37:26 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Wed, 27 Oct 2010 11:37:26 +0000 Subject: [issue7247] test_fcntl_64_bit from test_fcntl.py fails in Python 2.6.4 In-Reply-To: <1257103206.04.0.134413608226.issue7247@psf.upfronthosting.co.za> Message-ID: <1288179446.22.0.204611919256.issue7247@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: I'm also unable to reproduce this. ---------- nosy: +djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:44:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 Oct 2010 11:44:52 +0000 Subject: [issue10205] Can't have two tags with the same QName In-Reply-To: <1288122049.66.0.916624044666.issue10205@psf.upfronthosting.co.za> Message-ID: <1288179892.27.0.78044150629.issue10205@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:46:19 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Oct 2010 11:46:19 +0000 Subject: [issue10201] Fix building of socket module under Solaris In-Reply-To: <1288110169.62.0.573070204064.issue10201@psf.upfronthosting.co.za> Message-ID: <1288179979.86.0.482307667031.issue10201@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Actually, there's a better patch in #8852. ---------- resolution: -> duplicate status: open -> closed superseder: -> _socket fails to build on OpenSolaris x64 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:47:22 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Oct 2010 11:47:22 +0000 Subject: [issue8852] _socket fails to build on OpenSolaris x64 In-Reply-To: <1275143413.04.0.262553470749.issue8852@psf.upfronthosting.co.za> Message-ID: <1288180042.88.0.355622528051.issue8852@psf.upfronthosting.co.za> Antoine Pitrou added the comment: David's patch works here (OpenSolaris build 134). ---------- components: +Build, Extension Modules nosy: +laca, movement, pitrou resolution: -> accepted stage: -> commit review versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:51:26 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Wed, 27 Oct 2010 11:51:26 +0000 Subject: [issue10213] tests shouldn't fail with unset timezone In-Reply-To: <1288180286.09.0.61662115749.issue10213@psf.upfronthosting.co.za> Message-ID: <1288180286.09.0.61662115749.issue10213@psf.upfronthosting.co.za> New submission from Dirkjan Ochtman : test_strptime in test_time fails when the timezone is not set: ====================================================================== FAIL: test_strptime (test.test_time.TimeTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/tmp/portage/dev-lang/python-2.6.4/work/Python-2.6.4/Lib/test/test_time.py", line 117, in test_strptime (format, strf_output)) AssertionError: conversion specifier '%Z' failed with 'Local time zone must be set--see zic manual page' input. ---------------------------------------------------------------------- Ran 14 tests in 1.206s Maybe something like this is good enough? Index: test_time.py =================================================================== --- test_time.py (revision 85856) +++ test_time.py (working copy) @@ -111,6 +111,8 @@ try: time.strptime(strf_output, format) except ValueError: + if 'Local time zone must be set' in strf_output: + continue self.fail("conversion specifier %r failed with '%s' input." % (format, strf_output)) ---------- components: Tests messages: 119696 nosy: belopolsky, djc priority: normal severity: normal status: open title: tests shouldn't fail with unset timezone versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:53:11 2010 From: report at bugs.python.org (John Levon) Date: Wed, 27 Oct 2010 11:53:11 +0000 Subject: [issue8852] _socket fails to build on OpenSolaris x64 In-Reply-To: <1275143413.04.0.262553470749.issue8852@psf.upfronthosting.co.za> Message-ID: <1288180391.38.0.802718720087.issue8852@psf.upfronthosting.co.za> John Levon added the comment: The posted patch: better if the PACKET_* tests were just at the two missing ones rather than removing all of the ones that are actually there like PACKET_OUTGOING. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:58:20 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 Oct 2010 11:58:20 +0000 Subject: [issue10203] sqlite3.Row doesn't support sequence protocol In-Reply-To: <1288120293.93.0.799619941752.issue10203@psf.upfronthosting.co.za> Message-ID: <1288180700.35.0.76122176983.issue10203@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hello Paul, thanks for the report. The doc only describe Row as a tuple-like object, but tuple does implement the Sequence ABC, so I?m inclined to agree with you this is a bug and not a feature request (my first reaction). Adding Georg, the maintainer of the module, to the nosy list (found his username in Misc/maintainers.rst). ---------- nosy: +eric.araujo, ghaering versions: +Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:58:54 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 Oct 2010 11:58:54 +0000 Subject: [issue10203] sqlite3.Row doesn't support sequence protocol In-Reply-To: <1288120293.93.0.799619941752.issue10203@psf.upfronthosting.co.za> Message-ID: <1288180734.5.0.709215624504.issue10203@psf.upfronthosting.co.za> ?ric Araujo added the comment: (Gerhard, sorry, not well awake :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 13:59:38 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 Oct 2010 11:59:38 +0000 Subject: [issue10210] os.get_exec_path() should not produce any warning In-Reply-To: <1288141086.46.0.441985990964.issue10210@psf.upfronthosting.co.za> Message-ID: <1288180778.13.0.462278275989.issue10210@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 14:10:29 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 Oct 2010 12:10:29 +0000 Subject: [issue10193] Simplify instrospection used by turtle module In-Reply-To: <1288032526.99.0.352179918003.issue10193@psf.upfronthosting.co.za> Message-ID: <1288181429.84.0.438942824387.issue10193@psf.upfronthosting.co.za> ?ric Araujo added the comment: +1. This is a small but nice improvement for the added readability and foremost for the removal of obscure code (testing for varargs is easier to understand than ?if co_flags & 0x4?). (?"=%r" % (name,)? reminds me I never remember to protect my RHS with %-formatting, good job :) I wonder about the name ?name?, since we?re looping other default values here.) ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 14:11:07 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Oct 2010 12:11:07 +0000 Subject: [issue8852] _socket fails to build on OpenSolaris x64 In-Reply-To: <1275143413.04.0.262553470749.issue8852@psf.upfronthosting.co.za> Message-ID: <1288181467.36.0.0927079034107.issue8852@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, here is an updated patch with finer-grained constants injection. ---------- Added file: http://bugs.python.org/file19383/buildsocket.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 14:13:47 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 27 Oct 2010 12:13:47 +0000 Subject: [issue10203] sqlite3.Row doesn't support sequence protocol In-Reply-To: <1288120293.93.0.799619941752.issue10203@psf.upfronthosting.co.za> Message-ID: <1288181627.23.0.455233351562.issue10203@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Just as data point: the DB-API 2.0 requires that the row objects returned by the various .fetch*() methods are sequences, i.e. they need to implement the sequence protocol. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 14:14:02 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Wed, 27 Oct 2010 12:14:02 +0000 Subject: [issue9281] Race condition in distutils.dir_util.mkpath() In-Reply-To: <1279342839.57.0.133468665449.issue9281@psf.upfronthosting.co.za> Message-ID: <1288181642.29.0.670385164616.issue9281@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: Still, shouldn't this also be fixed in 2.7? ---------- nosy: +djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 14:16:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 Oct 2010 12:16:16 +0000 Subject: [issue4769] b64decode should accept strings or bytes In-Reply-To: <1230572153.22.0.954048343235.issue4769@psf.upfronthosting.co.za> Message-ID: <1288181776.7.0.929729192304.issue4769@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 14:19:53 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Oct 2010 12:19:53 +0000 Subject: [issue949667] setblocking() method on file objects Message-ID: <1288181993.51.0.863020712391.issue949667@psf.upfronthosting.co.za> STINNER Victor added the comment: Prototype to test nonblocking file objet: - add getblocking() and setblocking() methods to _io._FileIO and all _pyio classes - fileio_setblocking() is implemented using fcntl(fd, F_SETFL, flags | O_NONBLOCK) (POSIX only?) - BufferedReader.read() uses read1() if the file is blocking Use test_process.py to test it: this script runs a Python interpreter in a subprocess. It uses select() to check if there is data or not. Eg. type '1+1\n' and then 'exit()\n'. Set PYIO_HAVE_BLOCKING constant to False (in test_process.py) to test the script without io_blocking.patch. I'm not sure that select() is required, but it doesn't work without it (read() blocks). ---------- keywords: +patch nosy: +haypo Added file: http://bugs.python.org/file19384/io_blocking.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 14:20:08 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 27 Oct 2010 12:20:08 +0000 Subject: [issue949667] setblocking() method on file objects Message-ID: <1288182008.7.0.0960729029909.issue949667@psf.upfronthosting.co.za> Changes by STINNER Victor : Added file: http://bugs.python.org/file19385/test_process.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 14:25:45 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 Oct 2010 12:25:45 +0000 Subject: [issue9939] Add a pipe type (FIFO) to the io module In-Reply-To: <1285341562.44.0.992846065146.issue9939@psf.upfronthosting.co.za> Message-ID: <1288182345.48.0.478152599113.issue9939@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 14:30:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 Oct 2010 12:30:17 +0000 Subject: [issue9916] errno module is missing some symbols In-Reply-To: <1285105452.83.0.807715545592.issue9916@psf.upfronthosting.co.za> Message-ID: <1288182617.99.0.951609513443.issue9916@psf.upfronthosting.co.za> ?ric Araujo added the comment: You could ask python-ideas about -m support. This test seems to reveal that runpy does not support extension modules: $ python -m sys /usr/bin/python: No code object available for sys This may be another bug or feature request to open. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 14:51:03 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Oct 2010 12:51:03 +0000 Subject: [issue10207] test_file2k crashes under Windows In-Reply-To: <1288131625.06.0.246375636536.issue10207@psf.upfronthosting.co.za> Message-ID: <1288183863.67.0.00242671782695.issue10207@psf.upfronthosting.co.za> Antoine Pitrou added the comment: There's a patch in issue9295 which might fix a similar problem ("test_close_open_print_buffered sometimes crashes"). Could you try it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 14:57:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 Oct 2010 12:57:12 +0000 Subject: [issue9281] Race condition in distutils.dir_util.mkpath() In-Reply-To: <1279342839.57.0.133468665449.issue9281@psf.upfronthosting.co.za> Message-ID: <1288184232.53.0.725880478416.issue9281@psf.upfronthosting.co.za> ?ric Araujo added the comment: Yes, it should, that?s why the versions field lists 2.7 too. I?ll get to this in some days. ---------- assignee: tarek -> eric.araujo status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 15:06:47 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 27 Oct 2010 13:06:47 +0000 Subject: [issue9916] errno module is missing some symbols In-Reply-To: <1285105452.83.0.807715545592.issue9916@psf.upfronthosting.co.za> Message-ID: <1288184807.67.0.155060850014.issue9916@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I'm not surprised -m doesn't work with extension modules. It would certainly be a new feature to implement such a thing, so it would only be possible for 3.2. It's not a priority for me to add this support. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 15:13:08 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 27 Oct 2010 13:13:08 +0000 Subject: [issue10214] Misc/python-mode.el is out of date. In-Reply-To: <1288185188.37.0.749151956354.issue10214@psf.upfronthosting.co.za> Message-ID: <1288185188.37.0.749151956354.issue10214@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : Misc/python-mode.el is pretty far out of date. http://launchpad.net/python-mode has the latest versions. Of course, there's also python.el that comes with GNU Emacs. I will replace Misc/python-mode.el with Misc/README.Emacs ---------- assignee: barry messages: 119709 nosy: barry priority: normal severity: normal status: open title: Misc/python-mode.el is out of date. versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 15:26:47 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 27 Oct 2010 13:26:47 +0000 Subject: [issue10193] Simplify instrospection used by turtle module In-Reply-To: <1288181429.84.0.438942824387.issue10193@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Wed, Oct 27, 2010 at 8:10 AM, ?ric Araujo wrote: .. > I wonder about the name ?name?, since we?re looping other default values here.) Good point. I changed that and committed in revision 85857. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 15:27:08 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 27 Oct 2010 13:27:08 +0000 Subject: [issue10193] Simplify instrospection used by turtle module In-Reply-To: <1288032526.99.0.352179918003.issue10193@psf.upfronthosting.co.za> Message-ID: <1288186028.8.0.100353529878.issue10193@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 15:33:40 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 27 Oct 2010 13:33:40 +0000 Subject: [issue6639] turtle: _tkinter.TclError: invalid command name ".10170160" In-Reply-To: <1249344565.24.0.634557720335.issue6639@psf.upfronthosting.co.za> Message-ID: <1288186420.93.0.419815357463.issue6639@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Same error occurs when the python -m turtle demo is interrupted by closing the window. I think the correct fix is to exit when the window is closed, but I cannot figure out the best way to achieve that. This probably should be done at the application/test level. ---------- nosy: +gregorlingl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 15:34:27 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 27 Oct 2010 13:34:27 +0000 Subject: [issue7074] Turtle module crashes python In-Reply-To: <1254872370.89.0.72942382773.issue7074@psf.upfronthosting.co.za> Message-ID: <1288186467.66.0.169908586509.issue7074@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +gregorlingl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 15:35:41 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 27 Oct 2010 13:35:41 +0000 Subject: [issue1702036] Make Turtle thread-safe so it does not crash Message-ID: <1288186541.72.0.999907146153.issue1702036@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +gregorlingl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 15:42:49 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 27 Oct 2010 13:42:49 +0000 Subject: [issue10214] Misc/python-mode.el is out of date. In-Reply-To: <1288185188.37.0.749151956354.issue10214@psf.upfronthosting.co.za> Message-ID: <1288186969.48.0.53943072117.issue10214@psf.upfronthosting.co.za> Georg Brandl added the comment: +1 ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 15:50:21 2010 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 27 Oct 2010 13:50:21 +0000 Subject: [issue2001] Pydoc interactive browsing enhancement In-Reply-To: <1201993553.04.0.86516199449.issue2001@psf.upfronthosting.co.za> Message-ID: <1288187421.87.0.247128908404.issue2001@psf.upfronthosting.co.za> Nick Coghlan added the comment: Unassigning from ping given the lack of comments - I should be able to have a look at this in time for beta 1 ---------- assignee: ping -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 16:40:03 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 27 Oct 2010 14:40:03 +0000 Subject: [issue10211] BufferObject doesn't support new buffer interface In-Reply-To: <1288169352.49.0.219368546772.issue10211@psf.upfronthosting.co.za> Message-ID: <1288190403.77.0.0925484090254.issue10211@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Well, we can always fix the documentation, then :) Seriously, having two different buffer interfaces in the interpreter core that can only communicate through weird middle men (like str()) should be considered a bug. There shouldn't be any surprises like this. Simple is better than complex. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 16:48:59 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 27 Oct 2010 14:48:59 +0000 Subject: [issue10213] tests shouldn't fail with unset timezone In-Reply-To: <1288180286.09.0.61662115749.issue10213@psf.upfronthosting.co.za> Message-ID: <1288190939.59.0.450104223274.issue10213@psf.upfronthosting.co.za> R. David Murray added the comment: My first reaction to this was the feeling that the error message was correct and appropriate :) But it is true that since it doesn't represent a failure in Python itself it shouldn't be reported as a failure. The test should be skipped, though, rather than just doing a continue, so that it appears as a skip in verbose test output. (You do that by raising a unittest.SkipTest exception.) ---------- nosy: +r.david.murray type: -> behavior versions: +Python 2.7, Python 3.1, Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 17:20:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 27 Oct 2010 15:20:56 +0000 Subject: [issue10213] tests shouldn't fail with unset timezone In-Reply-To: <1288190939.59.0.450104223274.issue10213@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Wed, Oct 27, 2010 at 10:48 AM, R. David Murray wrote: .. > My first reaction to this was the feeling that the error message was correct and appropriate :) > That was my first reaction as well. > But it is true that since it doesn't represent a failure in Python itself it shouldn't be reported as a failure. > ?The test should be skipped, though, rather than just doing a continue, so that it appears as a skip in verbose > test output. ?(You do that by raising a unittest.SkipTest exception.) I am not so sure about that. Changing fail to skip will pretty much disable the test. There is no assert in the test. Maybe we should replace the fail on ValueError with a real round-trip test? Now, if the test has prerequisites such as set timezone, it should be skipped entirely if prerequisites are not met and not after strptime fails. Is 'TZ' in os.environ a prerequisite on all system? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 17:35:22 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 27 Oct 2010 15:35:22 +0000 Subject: [issue10213] tests shouldn't fail with unset timezone In-Reply-To: <1288180286.09.0.61662115749.issue10213@psf.upfronthosting.co.za> Message-ID: <1288193722.14.0.042576208743.issue10213@psf.upfronthosting.co.za> R. David Murray added the comment: Just put the Z at the end, so the skip only happens if all of the others pass? What we really need, of course, is parameterized tests :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 17:38:25 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 27 Oct 2010 15:38:25 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288193905.41.0.90694187592.issue10199@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Attached patch, issue10199.diff is mostly a copy of Gregor's turtledemo32.zip, with the main difference being that viewer code is in turtledemo/__main__.py so it can be run with just $ python -m turtledemo I would like to commit this before any further improvements. Just as Gregor, I have many ideas on how to improve the demo, but implementing them would be a subject of a new ticket. Here is a quick list: 1. Add test_turtledemo to unittests. 2. Add means to run all examples in order without user input. 3. Prune the examples: do we need both "tree" and "forest"? 5. Turn the left panel to the expanded list of tests and add a "show source" button to display source in a separate window. 6. Improve names of examples. "I_dont_like_tiltdemo" is not really a good name. :-) ---------- keywords: +patch resolution: -> accepted stage: -> commit review Added file: http://bugs.python.org/file19386/issue10199.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 17:53:10 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Wed, 27 Oct 2010 15:53:10 +0000 Subject: [issue10213] tests shouldn't fail with unset timezone In-Reply-To: <1288193722.14.0.042576208743.issue10213@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Wed, Oct 27, 2010 at 11:35 AM, R. David Murray wrote: .. > Just put the Z at the end, so the skip only happens if all of the others pass? What if time.strptime('%Z', ..) fails because of a bug in python? We don't want that to be reported as a skipped test. BTW, where does 'Local time zone must be set--see zic manual page' error message come from? This does not look like a system message and time.strptime is implemented in python rather than as a wrapper around a libc call. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 19:04:16 2010 From: report at bugs.python.org (John Nagle) Date: Wed, 27 Oct 2010 17:04:16 +0000 Subject: [issue10202] ftplib doesn't check close status after sending file In-Reply-To: <1288119890.05.0.476969255522.issue10202@psf.upfronthosting.co.za> Message-ID: <1288199056.53.0.132535062708.issue10202@psf.upfronthosting.co.za> John Nagle added the comment: Re: "Such a requirement should be respected by both peers and AFAICR there's no FTP-related RFC which explicitly states that shutdown() should be used.". That's because the FTP spec (RFC 959) talks about TCP in reference to the TCP specification, not the Berkeley Sockets implementation. "shutdown" is a Berkeley Sockets interface feature, and isn't formally standardized. Which is why it isn't mentioned in RFCs. The issue here is that an FTP data connection send is one of the few places where 1) the sender is indicating an EOF by closing the connection, and 2) the sender cares about complete delivery to the receiver. (HTTP servers don't care if the client disconnects before transfer is complete.) The TCP spec (the original RFC 793) says "A TCP will reliably deliver all buffers SENT before the connection was CLOSED so a user who expects no data in return need only wait to hear the connection was CLOSED successfully to know that all his data was received at the destination TCP." That's the way it was supposed to work when the FTP spec was written. In other words, "close" is supposed to wait for completion of the TCP close handshake. Today, it's common to close connections to abandon them, in which case there's no need to wait for the close handshake to complete. This resulted in a split at the socket level - there's "close", "SO_LINGER" to affect the wait for the close handshake, and an optional timeout. Then there's "shutdown" for when you explicitly care about what's happening during close. Python's socket implementation is written with "close" as a "don't care" operation. Since many Python closes happen implicitly, when a reference count goes to 0, this is appropriate; raising an exception during deallocation generally surprises the user. So it's implicit in the Python interface that, if you're using connection close to signal EOF and care about delivery, you should use "shutdown". So I'd put a shutdown call in "ftplib" at the end of each data connection send. That will block at the end of the transfer and raise an exception (I think that's the way the socket library is coded) if the close handshake doesn't finish cleanly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 19:08:30 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 27 Oct 2010 17:08:30 +0000 Subject: [issue10211] BufferObject doesn't support new buffer interface In-Reply-To: <1288169352.49.0.219368546772.issue10211@psf.upfronthosting.co.za> Message-ID: <1288199310.98.0.598263439353.issue10211@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: The memoryview object was added to simplify porting applications to Python3. If that backport is incomplete in the sense that the memoryview object is not compatible with the standard Python2 object for such memory views, then I'd consider that a bug. Without compatibility to the buffer objects, there's no way to make other Python2 buffer interface compatible object compatible to memoryviews. Alternatively, the Python2 memoryview object implementation could also accept objects with the old buffer interface, much like "s*" does. Note that the patch needs to check the buffer flags - writing to such buffers is not allowed. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 19:14:48 2010 From: report at bugs.python.org (David Bolen) Date: Wed, 27 Oct 2010 17:14:48 +0000 Subject: [issue10207] test_file2k crashes under Windows In-Reply-To: <1288131625.06.0.246375636536.issue10207@psf.upfronthosting.co.za> Message-ID: <1288199688.39.0.222775818362.issue10207@psf.upfronthosting.co.za> David Bolen added the comment: Yes, the patch from issue9295 (py27_fix_threaded_file_close.patch) seems to do the trick. I managed to get pretty good (90%+ success) at tickling the issue - interestingly by interactively clicking away from the test console window just after starting the test - and have run the test dozens of times with the patch with no problem. Oddly, I couldn't seem to create the issue with other tests by adding buffering to them, which I had expected if it was a general threading issue with file buffering - only the print test was crashing. Maybe since print is internally less atomic (with separate I/O due to softspace) it's more susceptible to thread switching. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 19:46:07 2010 From: report at bugs.python.org (Eric Smith) Date: Wed, 27 Oct 2010 17:46:07 +0000 Subject: [issue10206] python program starting with unmatched quote spews spaces to stdout In-Reply-To: <1288123288.86.0.422520379457.issue10206@psf.upfronthosting.co.za> Message-ID: <1288201567.81.0.156143494432.issue10206@psf.upfronthosting.co.za> Eric Smith added the comment: This is caused by r85814. I've got a fix, as soon as I get it in a presentable state I'll post it. ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 20:29:03 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Oct 2010 18:29:03 +0000 Subject: [issue5027] xml namespace not understood by xml.sax.saxutils.XMLGenerator In-Reply-To: <1232571582.02.0.360824752482.issue5027@psf.upfronthosting.co.za> Message-ID: <1288204143.45.0.69783554715.issue5027@psf.upfronthosting.co.za> Antoine Pitrou added the comment: According to http://www.w3.org/TR/xml-names/: ?The prefix xml is by definition bound to the namespace name http://www.w3.org/XML/1998/namespace. It MAY, but need not, be declared, and MUST NOT be bound to any other namespace name. Other prefixes MUST NOT be bound to this namespace name, and it MUST NOT be declared as the default namespace.? The patch looks good to me. ---------- nosy: +pitrou resolution: -> accepted stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 20:37:41 2010 From: report at bugs.python.org (Gregor Lingl) Date: Wed, 27 Oct 2010 18:37:41 +0000 Subject: [issue10199] Move Demo/turtle under Lib/ In-Reply-To: <1288108136.2.0.449929547782.issue10199@psf.upfronthosting.co.za> Message-ID: <1288204661.42.0.184844735996.issue10199@psf.upfronthosting.co.za> Gregor Lingl added the comment: Imho it is very important to clarify the name convention for demoscripts to be added to the demo before committing (or at least before the apperance of beta1). It decides about adding scripts to the Examples Menu of the viewer. We all know, that things once they have found their way into Lib cannot be changed easily afterwards. Guidos argument on backwards compatibility applies. So now is the only point in time to decide about this. Should we - stick with the tdemo_ prefix or - change to another pre- or postfix (like eg. bytedesign_demo) - or should we allow for arbitrary *.py filenames with some exception (e.g. filenames that contain an underscore) to mark files that are not meant as demos for the viewer? Please note that there are other constraints also for demo_files anyway, like the size of the graphics window and the presence of a main()-function to be called by the viewer. I'd like this to be decided actively. What do you think? Best regards, Gregor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 20:52:37 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Oct 2010 18:52:37 +0000 Subject: [issue5027] xml namespace not understood by xml.sax.saxutils.XMLGenerator In-Reply-To: <1232571582.02.0.360824752482.issue5027@psf.upfronthosting.co.za> Message-ID: <1288205557.71.0.536882639341.issue5027@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r85858 (3.2), r85859 (3.1) and r85860 (2.7). Thank you! ---------- resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 21:04:08 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 27 Oct 2010 19:04:08 +0000 Subject: [issue10213] tests shouldn't fail with unset timezone In-Reply-To: <1288180286.09.0.61662115749.issue10213@psf.upfronthosting.co.za> Message-ID: <1288206248.08.0.138103880133.issue10213@psf.upfronthosting.co.za> R. David Murray added the comment: Well, djc's patch (turned into a skip) would only skip if the specific system error checked for was found. The message is a system message, you'll see it in the 'date' command output if the timezone isn't set. A little googling indicates that it is not Gentoo specific. (Oddly, if I rename my /etc/localtime file date falls back to UTC, but I know I've seen this error when initially installing Gentoo, before I've set /etc/localtime). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 21:47:42 2010 From: report at bugs.python.org (Ralph Gauges) Date: Wed, 27 Oct 2010 19:47:42 +0000 Subject: [issue5752] xml.dom.minidom does not escape CR, LF and TAB characters within attribute values In-Reply-To: <1239707588.77.0.33795755364.issue5752@psf.upfronthosting.co.za> Message-ID: <1288208862.43.0.0907762542107.issue5752@psf.upfronthosting.co.za> Ralph Gauges added the comment: I tried to apply the minidom.diff patch below, but it seems that removing the two lines that replace the "<" and ">" characters is not a good idea. It least in some files I now suddenly get "<" and ">" characters in text elements where there should be > and < At least the part with the tabs seems to work now and if I add the two lines with the replace calls that got deleted by the patch, everything seems fine. ---------- nosy: +gauges _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:06:33 2010 From: report at bugs.python.org (Konstantin Svist) Date: Wed, 27 Oct 2010 20:06:33 +0000 Subject: [issue9942] Allow memory sections to be OS MERGEABLE In-Reply-To: <1285350759.4.0.118127426287.issue9942@psf.upfronthosting.co.za> Message-ID: <1288209993.26.0.810003595522.issue9942@psf.upfronthosting.co.za> Konstantin Svist added the comment: This issue sounds very interesting to me for a somewhat different reason. My problem is that I'm trying to run multiple processes on separate CPUs/cores with os.fork(). In short, the data set is the same (~2GB) and the separate processes do whatever they need, although each fork treats the data set as read-only. Right after the fork, data is shared and fits in RAM nicely, but after a few minutes each child process runs over a bunch of the data set (thereby modifying the ref counters) and the data is copied for each process. RAM usage jumps from 15GB to 30GB and the advantage of a fork is gone. It would be great if there was an option to separate out the ref counters for specific data structures, since it's obviously a bad idea to turn it on by default for everything and everyone. ---------- nosy: +Fry-kun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:16:34 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Wed, 27 Oct 2010 20:16:34 +0000 Subject: =?utf-8?q?=5Bissue7351=5D_Documentation_typos_found_in_=22zipfile_?= =?utf-8?q?=E2=80=94_Work_with_ZIP_archives=22?= In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288210594.67.0.591442880839.issue7351@psf.upfronthosting.co.za> Bo?tjan Mejak added the comment: I'm reopening this and I am making it a feature request for Python 3.2 ---------- components: +Interpreter Core -Documentation resolution: wont fix -> status: closed -> open type: -> feature request versions: -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:33:33 2010 From: report at bugs.python.org (Georg Brandl) Date: Wed, 27 Oct 2010 20:33:33 +0000 Subject: =?utf-8?q?=5Bissue7351=5D_Documentation_typos_found_in_=22zipfile_?= =?utf-8?q?=E2=80=94_Work_with_ZIP_archives=22?= In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288211613.37.0.588906419846.issue7351@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:38:14 2010 From: report at bugs.python.org (Bruce Sherwood) Date: Wed, 27 Oct 2010 20:38:14 +0000 Subject: [issue10215] Mac Python 3.1 installer does less than earlier installers In-Reply-To: <1288211894.49.0.439153814714.issue10215@psf.upfronthosting.co.za> Message-ID: <1288211894.49.0.439153814714.issue10215@psf.upfronthosting.co.za> New submission from Bruce Sherwood : For Python 2.x on Macs, the installer added PATH code to .profile and switched /Library/Framework/Python.framework/Versions/Current to point to the newly installed version of Python. Neither of these actions is carried out by the 3.1.2 installer, and I wonder whether this is intentional or an oversight. Also, it's not clear to me what command one could issue in a terminal to execute the new Python (you can of course start the new Python from the Applications folder). ---------- components: Installation messages: 119731 nosy: Bruce.Sherwood priority: normal severity: normal status: open title: Mac Python 3.1 installer does less than earlier installers type: feature request versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:41:17 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 27 Oct 2010 20:41:17 +0000 Subject: [issue10216] json.loads() on str erroneously returns str In-Reply-To: <1288212077.55.0.987280574244.issue10216@psf.upfronthosting.co.za> Message-ID: <1288212077.55.0.987280574244.issue10216@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : json is defined as mapping the JSON string type into unicodes. This works as advertised in Python 2.6 and 3, but in Python 2.7 it returns a str. % python2.6 -c "import json; print json.loads('{\"foo\":\"bar\"}')" {u'foo': u'bar'} % python2.7 -c "import json; print json.loads('{\"foo\":\"bar\"}')" {'foo': 'bar'} Platform tested so far: Ubuntu 10.10 amd64. ---------- messages: 119732 nosy: barry priority: critical severity: normal status: open title: json.loads() on str erroneously returns str type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:42:18 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 27 Oct 2010 20:42:18 +0000 Subject: [issue10216] json.loads() on str erroneously returns str In-Reply-To: <1288212077.55.0.987280574244.issue10216@psf.upfronthosting.co.za> Message-ID: <1288212138.88.0.252181919289.issue10216@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: BTW, the workaround for Python 2.7 is to pass a unicode to json.loads(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:43:28 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 27 Oct 2010 20:43:28 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288212208.33.0.320624108331.issue7351@psf.upfronthosting.co.za> ?ric Araujo added the comment: Bo?tjan, you need to update your patch to add the missing alias to the old name, as well as docs and test updates. I?m +0 on the change. ---------- stage: committed/rejected -> patch review title: Documentation typos found in "zipfile ? Work with ZIP archives" -> Rename BadZipfile to BadZipFile for consistency _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:43:56 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Oct 2010 20:43:56 +0000 Subject: [issue10216] json.loads() on str erroneously returns str In-Reply-To: <1288212077.55.0.987280574244.issue10216@psf.upfronthosting.co.za> Message-ID: <1288212236.75.0.267671525734.issue10216@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Duplicate of issue10038. ---------- nosy: +pitrou resolution: -> duplicate status: open -> closed superseder: -> Returntype of json.loads() on strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:46:32 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Oct 2010 20:46:32 +0000 Subject: [issue8852] _socket fails to build on OpenSolaris x64 In-Reply-To: <1275143413.04.0.262553470749.issue8852@psf.upfronthosting.co.za> Message-ID: <1288212392.11.0.368825117458.issue8852@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r85868 (3.2), r85869 (3.1) and r85870 (2.7). Thank you. ---------- resolution: accepted -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:46:34 2010 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 27 Oct 2010 20:46:34 +0000 Subject: [issue9942] Allow memory sections to be OS MERGEABLE In-Reply-To: <1285350759.4.0.118127426287.issue9942@psf.upfronthosting.co.za> Message-ID: <1288212394.46.0.334872313166.issue9942@psf.upfronthosting.co.za> Dave Malcolm added the comment: One possible use for this: mark the "str" buffers of PyUnicodeObject instances when demarshalling docstrings from disk; in theory these ought not to change, and can be quite large: the bulk of the memory overhead is stored in a separate allocation from the object, and thus isn't subjected to the ob_refcnt twiddling. No idea if it's worth it though; the syscall overhead might slow down module import; also, KSM works at the level of 4K pages, and it's not clear that the allocations would line up nicely with pages. FWIW, various related ideas here: http://dmalcolm.livejournal.com/4183.html Again, no idea if these are worthwhile, this was a brainstorm on my blog, and some of the ideas would involve major surgery to CPython to implement. ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:49:54 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 27 Oct 2010 20:49:54 +0000 Subject: [issue10216] json.loads() on str erroneously returns str In-Reply-To: <1288212077.55.0.987280574244.issue10216@psf.upfronthosting.co.za> Message-ID: <1288212594.94.0.818061139302.issue10216@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Yay. I guess I have to submit a tracker bug now because searching for "json unicode" didn't turn up the original bug. ;/ Thanks for duping it __ap__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:57:24 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 27 Oct 2010 20:57:24 +0000 Subject: [issue10038] Returntype of json.loads() on strings In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288213044.84.0.729232909389.issue10038@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: I completely agree with Fred; this is a regression and a bug in Python 2.7 and should be fixed. I have a doctest in Mailman 3 for example that cannot pass in both Python 2.6 and 2.7 (without IMO ugly hackery). Not only that, but json is documented as converting JSON str to unicode, which it does fine in Python 2.6, 3.1 and 3.2. Why should Python 2.7 be different (and broken)? ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:59:23 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 27 Oct 2010 20:59:23 +0000 Subject: [issue10038] json.loads() on str erroneously returns str. should return unicode In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288213163.54.0.669692312041.issue10038@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- title: Returntype of json.loads() on strings -> json.loads() on str erroneously returns str. should return unicode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 22:59:44 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Wed, 27 Oct 2010 20:59:44 +0000 Subject: [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288213184.34.0.125946612054.issue10038@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- title: json.loads() on str erroneously returns str. should return unicode -> json.loads() on str should return unicode, not str _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 23:11:48 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Oct 2010 21:11:48 +0000 Subject: [issue10215] Mac Python 3.1 installer does less than earlier installers In-Reply-To: <1288211894.49.0.439153814714.issue10215@psf.upfronthosting.co.za> Message-ID: <1288213908.07.0.023365029603.issue10215@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> ronaldoussoren nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 23:20:54 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 27 Oct 2010 21:20:54 +0000 Subject: [issue10215] Mac Python 3.1 installer does less than earlier installers In-Reply-To: <1288211894.49.0.439153814714.issue10215@psf.upfronthosting.co.za> Message-ID: <1288214454.79.0.0127695961736.issue10215@psf.upfronthosting.co.za> R. David Murray added the comment: Yes this is deliberate. On linux, 'python' is Python2, and 'python3' is Python3. I'm not a mac user, so I don't know exactly how the naming conventions work there, but I certainly wouldn't expect the 'current version' of 'python' to change to python3. I think perhaps the command name you use from the terminal is the same as it is on linux: python3, but I'm not positive. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 23:24:06 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 27 Oct 2010 21:24:06 +0000 Subject: [issue10215] Mac Python 3.1 installer does less than earlier installers In-Reply-To: <1288211894.49.0.439153814714.issue10215@psf.upfronthosting.co.za> Message-ID: <1288214646.93.0.0241473849395.issue10215@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Oct 27 23:37:27 2010 From: report at bugs.python.org (Rodrigue Alcazar) Date: Wed, 27 Oct 2010 21:37:27 +0000 Subject: [issue9517] Make test.script_helper more comprehensive, and use it in the test suite In-Reply-To: <1280962247.74.0.724550733964.issue9517@psf.upfronthosting.co.za> Message-ID: <1288215447.44.0.071776244477.issue9517@psf.upfronthosting.co.za> Rodrigue Alcazar added the comment: > someone wanting to get to know the process of working on CPython without having to deal with anything that is particularly tricky to understand. That sounds exactly like me :) I can have a look at this ticket. ---------- nosy: +Rodrigue.Alcazar _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 00:30:56 2010 From: report at bugs.python.org (=?utf-8?q?Per_=C3=98yvind_Karlsen?=) Date: Wed, 27 Oct 2010 22:30:56 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288218656.75.0.941169915676.issue6715@psf.upfronthosting.co.za> Per ?yvind Karlsen added the comment: I've (finally) finalized the api and prepared pyliblzma to be ready for inclusion now. The code can be found in the 'py3k' branch referred to earlier. Someone else (don't remember who:p) volunteered for writing the PEP earlier, so I leave it up to that person to write the PEP, I won't be able to get around to do so myself in the near future.. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 00:46:10 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 27 Oct 2010 22:46:10 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288219570.76.0.784585048201.issue6715@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: +Python 3.3 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 01:40:43 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 27 Oct 2010 23:40:43 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288222843.13.0.608899648083.issue6715@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: As promised, here is a quick review of the module. https://code.launchpad.net/~proyvind/pyliblzma/py3k looks ready for a new entry in the PyPI, but for inclusion in core python it needs some cleanup: - I suppose that src/pyliblzma.c is the only interesting file. In CPython it will be named Modules/lzmamodule.c - There are some calls to malloc(), calloc() and free() that are incorrect (there is even a call to free() on a PyObject*!); in any case, functions like PyMem_Malloc() are preferred. - please don't use alloca (and it has another name on Windows) - snprintf is not available everywhere; use PyOS_snprintf instead. - The module does not compile on Windows: types like uint8_t don't exist, __attribute__((unused)) is GCC-specific. - Don't use PyBytesObject*; PyObject* is enough and avoids many casts. - PyLong_FromLong(LZMA_FILTER_LZMA1) truncates the value on 32bit platforms - You could use LZMA_VERSION_STRING to fill the version attribute. Also, I did not find any documentation. Otherwise the code follows CPython conventions and is easy to read. Good job! 3.2beta1 is scheduled for November 13, 2010, and no new feature will be accepted after. Do you think you can update it before the limit? otherwise the package could live in PyPI before it is shipped with Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 01:57:30 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Wed, 27 Oct 2010 23:57:30 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1288212208.33.0.320624108331.issue7351@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: I am -1 for the alias. I want that this gets renamed in Python 3.2, not aliased. I don't care about old pickles. Anyway, who has BadZipfile object pickled? Just incorporate my patch and fix the docs and any test cases/units. Thanks. On Wed, Oct 27, 2010 at 10:43 PM, ??ric Araujo wrote: > > ??ric Araujo added the comment: > > Bo??tjan, you need to update your patch to add the missing alias to the old > name, as well as docs and test updates. > > I???m +0 on the change. > > ---------- > stage: committed/rejected -> patch review > title: Documentation typos found in "zipfile ??? Work with ZIP archives" -> > Rename BadZipfile to BadZipFile for consistency > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19387/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- I am -1 for the alias. I want that this gets renamed in Python 3.2, not aliased. I don't care about old pickles. Anyway, who has BadZipfile object pickled? Just incorporate my patch and fix the docs and any test cases/units. Thanks.


On Wed, Oct 27, 2010 at 10:43 PM, ??ric Araujo <report at bugs.python.org> wrote:

??ric Araujo <merwok at netwok.org> added the comment:

Bo??tjan, you need to update your patch to add the missing alias to the old name, as well as docs and test updates.

I???m +0 on the change.

----------
stage: committed/rejected -> patch review
title: Documentation typos found in "zipfile ??? Work with ZIP archives" -> Rename BadZipfile to BadZipFile for consistency

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

From report at bugs.python.org Thu Oct 28 01:58:21 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Wed, 27 Oct 2010 23:58:21 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288223901.79.0.910368740905.issue7351@psf.upfronthosting.co.za> Changes by Bo?tjan Mejak : Removed file: http://bugs.python.org/file19387/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 02:11:43 2010 From: report at bugs.python.org (Stephen Hansen) Date: Thu, 28 Oct 2010 00:11:43 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288224703.73.0.483830847858.issue7351@psf.upfronthosting.co.za> Stephen Hansen added the comment: You may "not care" about backwards compatibility, but introducing a breaking change in 3.2 for mere style-conformity is not OK, IMO. If the patcher insists on it being a breaking change, it should be rejected. FWIW, this casing is sufficiently bizarre and inconsistent in the module itself, that it seems clearly wrong and likely to produce difficulties for people using it-- so although I'm not upgrading to Python3 anytime soon, I'd really like to change my code to be BadZipFile when I do, so I'd be +1 with an alias. :) ---------- nosy: +ixokai _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 02:29:56 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Thu, 28 Oct 2010 00:29:56 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1288224703.73.0.483830847858.issue7351@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: No alias. Be stubborn and let the stdlib die in inconsistency. On Thu, Oct 28, 2010 at 2:11 AM, Stephen Hansen wrote: > > Stephen Hansen > added the > comment: > > You may "not care" about backwards compatibility, but introducing a > breaking change in 3.2 for mere style-conformity is not OK, IMO. If the > patcher insists on it being a breaking change, it should be rejected. > > FWIW, this casing is sufficiently bizarre and inconsistent in the module > itself, that it seems clearly wrong and likely to produce difficulties for > people using it-- so although I'm not upgrading to Python3 anytime soon, I'd > really like to change my code to be BadZipFile when I do, so I'd be +1 with > an alias. :) > > ---------- > nosy: +ixokai > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19388/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- No alias. Be stubborn and let the stdlib die in inconsistency.

On Thu, Oct 28, 2010 at 2:11 AM, Stephen Hansen <report at bugs.python.org> wrote:

Stephen Hansen <me+python at ixokai.io> added the comment:

You may "not care" about backwards compatibility, but introducing a breaking change in 3.2 for mere style-conformity is not OK, IMO. If the patcher insists on it being a breaking change, it should be rejected.

FWIW, this casing is sufficiently bizarre and inconsistent in the module itself, that it seems clearly wrong and likely to produce difficulties for people using it-- so although I'm not upgrading to Python3 anytime soon, I'd really like to change my code to be BadZipFile when I do, so I'd be +1 with an alias. :)

----------
nosy: +ixokai

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

From report at bugs.python.org Thu Oct 28 03:04:45 2010 From: report at bugs.python.org (Stephen Hansen) Date: Thu, 28 Oct 2010 01:04:45 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288227885.97.0.852913821613.issue7351@psf.upfronthosting.co.za> Stephen Hansen added the comment: Considering I do use zipfiles a lot, I slightly care about this (at least, eventually)-- I'm attaching a new patch, with doc and test changes as well (and the compatibility alias). What convinced me was looking at test_zipfile, and noticing how often it actually confused the issue in comments at least, between typing BadZipfile and BadZipFile. Dunno if I worded the doc-change well, so you may want to adjust that. ---------- Added file: http://bugs.python.org/file19389/issue7351-complete.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 03:06:36 2010 From: report at bugs.python.org (Stephen Hansen) Date: Thu, 28 Oct 2010 01:06:36 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288227996.0.0.823424345661.issue7351@psf.upfronthosting.co.za> Stephen Hansen added the comment: Oh: and I tested it against branches/py3k in the head, it applies cleanly and builds, and test_zipfile runs without error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 03:12:24 2010 From: report at bugs.python.org (Ned Deily) Date: Thu, 28 Oct 2010 01:12:24 +0000 Subject: [issue6639] turtle: _tkinter.TclError: invalid command name ".10170160" In-Reply-To: <1249344565.24.0.634557720335.issue6639@psf.upfronthosting.co.za> Message-ID: <1288228344.45.0.0330844076797.issue6639@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +ned.deily -BreamoreBoy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 03:28:44 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 28 Oct 2010 01:28:44 +0000 Subject: [issue10211] BufferObject doesn't support new buffer interface In-Reply-To: <1288169352.49.0.219368546772.issue10211@psf.upfronthosting.co.za> Message-ID: <1288229324.55.0.59424294355.issue10211@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Do you mean that we should disable writing for the new style buffer interface? Currently the patch respects the Buffer object's read-only flag (self->b_readonly): static int buffer_getbuffer(PyBufferObject *self, Py_buffer *buf, int flags) { void *ptr; Py_ssize_t size; if (!get_buf(self, &ptr, &size, ANY_BUFFER)) return -1; return PyBuffer_FillInfo(buf, (PyObject*)self, ptr, size, self->b_readonly, flags); } ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 03:46:53 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 28 Oct 2010 01:46:53 +0000 Subject: [issue10212] struct.unpack and cStringIO.StringIO don't support new buffer In-Reply-To: <1288175813.33.0.0310491559114.issue10212@psf.upfronthosting.co.za> Message-ID: <1288230413.47.0.0692085021147.issue10212@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I disagree. It's not a new feature. We're merely completing an old feature (adding new-style buffers from 3.x to 2.7) that wasn't fully implemented. by the core. The new buffer isn't accepted in a lot of places where you'd expect it to be. The good alternative, of course, would be to add this to "trunk" but for some reason that is frowned upon. See also issue 10211 ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 03:52:51 2010 From: report at bugs.python.org (Stephen Hansen) Date: Thu, 28 Oct 2010 01:52:51 +0000 Subject: [issue10116] Sporadic failures in test_urllibnet In-Reply-To: <1287150282.16.0.127032822399.issue10116@psf.upfronthosting.co.za> Message-ID: <1288230771.94.0.873453946795.issue10116@psf.upfronthosting.co.za> Stephen Hansen added the comment: The attached patch wraps all the calls to the internet in support.transient_internet; I ran it against 3.x and it passed, and then I ran it for quite awhile with the -F option, and encountered one event that I believe would previously had resulted in one of these sporadic failures, and it resulted in a skipped 'resource not available' message. I left in the previous 'retry' code, just by virtue of changing as little as possible. I can adjust if its desired. I believe that transient_internet won't capture EBADF: so if that particular sporadic failure happens again, I'll post up a new issue about it. ---------- keywords: +patch Added file: http://bugs.python.org/file19390/issue10116.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 03:55:44 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 28 Oct 2010 01:55:44 +0000 Subject: [issue10038] Returntype of json.loads() on strings In-Reply-To: <1288213044.84.0.729232909389.issue10038@psf.upfronthosting.co.za> Message-ID: Fred L. Drake, Jr. added the comment: I'll note that it seems relevant that this package is not considered "externally maintained" by the terms of PEP 360: http://www.python.org/dev/peps/pep-0360/ Given the level of attention this has received from the originator of the code, we should not hesitate to commit technically acceptable changes to the Python repository, ---------- title: json.loads() on str should return unicode, not str -> Returntype of json.loads() on strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 04:58:26 2010 From: report at bugs.python.org (Manfred Bartz) Date: Thu, 28 Oct 2010 02:58:26 +0000 Subject: [issue10217] python-2.7.amd64.msi install fails In-Reply-To: <1288234706.92.0.436900381953.issue10217@psf.upfronthosting.co.za> Message-ID: <1288234706.92.0.436900381953.issue10217@psf.upfronthosting.co.za> New submission from Manfred Bartz : python-2.7.amd64.msi as well as python-2.6.6.amd64.msi fail to install on a Windows7-64 system. In both cases with: "An error occurred during the installation of assembly 'Microsoft.VC90.CRT,version=9.0.21022.8 ...'" See attached screen-cap. The installer succeeds with its automatic roll-back. python-2.7.msi (32bit installer) succeeds without any problems. ---------- components: Installation, Windows files: Python-64bit_on_Win7-64_install_fails.png messages: 119753 nosy: Manfred.Bartz priority: normal severity: normal status: open title: python-2.7.amd64.msi install fails type: crash versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file19391/Python-64bit_on_Win7-64_install_fails.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 05:02:34 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 28 Oct 2010 03:02:34 +0000 Subject: [issue10217] python-2.7.amd64.msi install fails In-Reply-To: <1288234706.92.0.436900381953.issue10217@psf.upfronthosting.co.za> Message-ID: <1288234954.77.0.471847133669.issue10217@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +brian.curtin type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 05:11:44 2010 From: report at bugs.python.org (Manfred Bartz) Date: Thu, 28 Oct 2010 03:11:44 +0000 Subject: [issue10217] python-2.7.amd64.msi install fails In-Reply-To: <1288234706.92.0.436900381953.issue10217@psf.upfronthosting.co.za> Message-ID: <1288235504.79.0.444177069374.issue10217@psf.upfronthosting.co.za> Manfred Bartz added the comment: since the error msg suggests that the installer detected a 32 bit system, I attached a partial screen cap of system properties -- it really is a Win7-64 system, Enterprise edition. ---------- Added file: http://bugs.python.org/file19392/Python-64bit_on_Win7-64_sysProperties.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 05:22:00 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 28 Oct 2010 03:22:00 +0000 Subject: [issue10217] python-2.7.amd64.msi install fails In-Reply-To: <1288234706.92.0.436900381953.issue10217@psf.upfronthosting.co.za> Message-ID: <1288236120.67.0.0443942749987.issue10217@psf.upfronthosting.co.za> Brian Curtin added the comment: The 2.6, 2.7, and 3.1 amd64 installers work on my 64-bit Windows 7 machines. Can you follow the steps in msg83923 on #4735? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 06:13:01 2010 From: report at bugs.python.org (Fred L. Drake, Jr.) Date: Thu, 28 Oct 2010 04:13:01 +0000 Subject: [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288239181.99.0.465032724988.issue10038@psf.upfronthosting.co.za> Changes by Fred L. Drake, Jr. : ---------- title: Returntype of json.loads() on strings -> json.loads() on str should return unicode, not str _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 08:26:25 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 28 Oct 2010 06:26:25 +0000 Subject: [issue8777] Add threading.Barrier In-Reply-To: <1274375262.53.0.647489735751.issue8777@psf.upfronthosting.co.za> Message-ID: <1288247185.32.0.368829847477.issue8777@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: ping? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 08:39:46 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 28 Oct 2010 06:39:46 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288247986.36.0.412776123921.issue7351@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied after review in r85873. (Please make sure your patches don't have trailing whitespace.) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 08:42:39 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 28 Oct 2010 06:42:39 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288248159.95.0.816775346336.issue7351@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- Removed message: http://bugs.python.org/msg119757 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 08:42:48 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 28 Oct 2010 06:42:48 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288248168.0.0.71876341517.issue7351@psf.upfronthosting.co.za> Georg Brandl added the comment: Applied after review in r85874. (Please make sure your patches don't have trailing whitespace.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 08:43:41 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 28 Oct 2010 06:43:41 +0000 Subject: [issue8777] Add threading.Barrier In-Reply-To: <1274375262.53.0.647489735751.issue8777@psf.upfronthosting.co.za> Message-ID: <1288248221.19.0.59283275125.issue8777@psf.upfronthosting.co.za> Georg Brandl added the comment: The tests pass for me, and the patch looks good except for a stray change to Condition objects. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 08:54:51 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 28 Oct 2010 06:54:51 +0000 Subject: [issue8777] Add threading.Barrier In-Reply-To: <1274375262.53.0.647489735751.issue8777@psf.upfronthosting.co.za> Message-ID: <1288248891.54.0.0181403590968.issue8777@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Right. The condition object change is necessary to have timeout work. I can remove that feature, and slate it for another day. Add a separate patch for a Condition.wait() return value. All of the other apis are able to let the caller know whether a timeout occurred or not, I think Condition.wait() should do the same. Actually, I can fudge the timeout with time.clock(), which is good enough. I'll write up some docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 08:57:25 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 28 Oct 2010 06:57:25 +0000 Subject: [issue8777] Add threading.Barrier In-Reply-To: <1274375262.53.0.647489735751.issue8777@psf.upfronthosting.co.za> Message-ID: <1288249045.61.0.570214381669.issue8777@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, that change would be fine by me, it was just not explained anywhere in the patch. So if it's going to be documented (with versionchanged etc.), just leave it in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 09:24:54 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Thu, 28 Oct 2010 07:24:54 +0000 Subject: [issue10213] tests shouldn't fail with unset timezone In-Reply-To: <1288180286.09.0.61662115749.issue10213@psf.upfronthosting.co.za> Message-ID: <1288250694.06.0.971095184729.issue10213@psf.upfronthosting.co.za> Dirkjan Ochtman added the comment: You can easily reproduce (at least on Gentoo) by copying /usr/share/zoneinfo/Factory to /etc/localtime. By checking for this exact message, I don't think the chance is very high that we're hiding a Python bug. I also think that Python tests should test Python; if we see this message, we know we can't reliably test Python, in which case I think a skipped test (hey, we can't test this!) is better than a failed test (implication that Python failed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 09:34:22 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 28 Oct 2010 07:34:22 +0000 Subject: [issue10218] Add a return value to threading.Condition.wait() In-Reply-To: <1288251262.79.0.658149458375.issue10218@psf.upfronthosting.co.za> Message-ID: <1288251262.79.0.658149458375.issue10218@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : Add a return value to Condition.wait() that can be used to tell if Condition.wait() returns due to a timeout effect. This mirrors other wait apis in threading.py ---------- components: Library (Lib) files: condwait.patch keywords: patch messages: 119763 nosy: georg.brandl, krisvale priority: normal severity: normal status: open title: Add a return value to threading.Condition.wait() type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file19393/condwait.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 10:21:16 2010 From: report at bugs.python.org (Ned Deily) Date: Thu, 28 Oct 2010 08:21:16 +0000 Subject: [issue8755] idle crash UnicodeDecodeError utf-8 codec In-Reply-To: <1274206913.48.0.235847350829.issue8755@psf.upfronthosting.co.za> Message-ID: <1288254076.64.0.996103042429.issue8755@psf.upfronthosting.co.za> Ned Deily added the comment: Duplicate of Issue1028. ---------- nosy: +ned.deily resolution: -> duplicate superseder: -> Tkinter binding involving Control-spacebar raises unicode error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 10:21:56 2010 From: report at bugs.python.org (Ned Deily) Date: Thu, 28 Oct 2010 08:21:56 +0000 Subject: [issue8755] idle crash UnicodeDecodeError utf-8 codec In-Reply-To: <1274206913.48.0.235847350829.issue8755@psf.upfronthosting.co.za> Message-ID: <1288254116.47.0.0154390607862.issue8755@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: -ned.deily status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 10:47:54 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 28 Oct 2010 08:47:54 +0000 Subject: [issue8777] Add threading.Barrier In-Reply-To: <1274375262.53.0.647489735751.issue8777@psf.upfronthosting.co.za> Message-ID: <1288255674.46.0.876710783625.issue8777@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Here is an updated patch. It contains documentation. ReStructured isn't my Forte, and I don't know how to verify that it is correct, so please review it for me. ---------- dependencies: +Add a return value to threading.Condition.wait() Added file: http://bugs.python.org/file19394/barrier4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 11:00:52 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 28 Oct 2010 09:00:52 +0000 Subject: [issue8777] Add threading.Barrier In-Reply-To: <1274375262.53.0.647489735751.issue8777@psf.upfronthosting.co.za> Message-ID: <1288256452.21.0.384007054763.issue8777@psf.upfronthosting.co.za> Georg Brandl added the comment: Two comments: * The return value of wait() isn't documented well. What is the significance of the returned index, i.e. what does distinguish it from a randomly selected one in range(parties)? * get_parties() and is_broken() should be properties (waiting, broken), to be consistent with other threading APIs (Thread.name etc). get_waiting() does "real" work (can it block?) and should remain a method. Don't worry about markup errors, I review doc changes routinely after they are committed. * ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 11:03:36 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 28 Oct 2010 09:03:36 +0000 Subject: [issue10218] Add a return value to threading.Condition.wait() In-Reply-To: <1288251262.79.0.658149458375.issue10218@psf.upfronthosting.co.za> Message-ID: <1288256616.84.0.680583483942.issue10218@psf.upfronthosting.co.za> Georg Brandl added the comment: Committed in r85876. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 11:08:06 2010 From: report at bugs.python.org (Ned Deily) Date: Thu, 28 Oct 2010 09:08:06 +0000 Subject: [issue6008] Idle should be installed as `idle3.1` and not `idle3` In-Reply-To: <1242175792.97.0.077794043098.issue6008@psf.upfronthosting.co.za> Message-ID: <1288256886.17.0.267538168025.issue6008@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: -BreamoreBoy resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 11:28:16 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 28 Oct 2010 09:28:16 +0000 Subject: [issue8777] Add threading.Barrier In-Reply-To: <1274375262.53.0.647489735751.issue8777@psf.upfronthosting.co.za> Message-ID: <1288258096.03.0.657585549761.issue8777@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Right. I've provided more text for the return value and provided an example. I?ve changed all three to properties, the locking wasn't really required for waiting(). I added some extra tests for the properties. ---------- Added file: http://bugs.python.org/file19395/barrier4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 11:36:24 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 28 Oct 2010 09:36:24 +0000 Subject: [issue8777] Add threading.Barrier In-Reply-To: <1274375262.53.0.647489735751.issue8777@psf.upfronthosting.co.za> Message-ID: <1288258584.01.0.167211147264.issue8777@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks good to me now, I think you can commit it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 11:45:07 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 28 Oct 2010 09:45:07 +0000 Subject: [issue8777] Add threading.Barrier In-Reply-To: <1274375262.53.0.647489735751.issue8777@psf.upfronthosting.co.za> Message-ID: <1288259107.0.0.294057055395.issue8777@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Committed as revision 85878 ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 12:56:15 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 10:56:15 +0000 Subject: [issue9981] let make_buildinfo use a temporary directory on windows In-Reply-To: <1285741718.07.0.0571419018875.issue9981@psf.upfronthosting.co.za> Message-ID: <1288263375.89.0.617379183933.issue9981@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 13:43:18 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 28 Oct 2010 11:43:18 +0000 Subject: [issue10219] BufferedReader.read1 does not check for closed file In-Reply-To: <1288266198.95.0.214499177882.issue10219@psf.upfronthosting.co.za> Message-ID: <1288266198.95.0.214499177882.issue10219@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc : The following snippet should raise ValueError (twice :-) f = open('foo', 'rb') print(f.read1(1)) # OK f.close() print(f.read1(5)) # expected ValueError("I/O operation on closed file") print(f.peek()) # expected ValueError("I/O operation on closed file") The _pyio implementation of BufferedReader.read() has the same issue. ---------- messages: 119771 nosy: amaury.forgeotdarc, pitrou priority: normal severity: normal status: open title: BufferedReader.read1 does not check for closed file _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 13:43:55 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 28 Oct 2010 11:43:55 +0000 Subject: [issue10206] python program starting with unmatched quote spews spaces to stdout In-Reply-To: <1288123288.86.0.422520379457.issue10206@psf.upfronthosting.co.za> Message-ID: <1288266235.51.0.533378857834.issue10206@psf.upfronthosting.co.za> Eric Smith added the comment: This patch fixes the issue, and makes print_error_text slightly more understandable (and efficient to boot, not that it matters). But I'm not convinced it's the correct solution. I think the real error might be the computation "offset" in the caller. I'm still looking at it. ---------- assignee: -> eric.smith components: +Interpreter Core keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file19396/issue10206.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 13:46:24 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 28 Oct 2010 11:46:24 +0000 Subject: [issue10206] python program starting with unmatched quote spews spaces to stdout In-Reply-To: <1288123288.86.0.422520379457.issue10206@psf.upfronthosting.co.za> Message-ID: <1288266384.59.0.38473010178.issue10206@psf.upfronthosting.co.za> Eric Smith added the comment: Now that I think about it some more, I think my patch (although it fixes this issue and passes all tests) doesn't do what the original code does in the presence of multiple newlines. I'm going to rework it some more. I'll have another patch shortly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 14:42:53 2010 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 28 Oct 2010 12:42:53 +0000 Subject: [issue10220] Make generator state easier to introspect In-Reply-To: <1288269773.83.0.431465195808.issue10220@psf.upfronthosting.co.za> Message-ID: <1288269773.83.0.431465195808.issue10220@psf.upfronthosting.co.za> New submission from Nick Coghlan : Generators can be in four different states that may be relevant to framework code making use of them (especially as coroutines). This state is all currently available from Python code, but is rather obscure and could be made readable. The four states are: Created: "g.gi_frame is not None and g.gi_frame.f_lasti == -1" (Frame exists, but no instructions have been executed yet) Currently executing: "g.gi_running" (This being true implies other things about the state as well, but this is all you need to check) Suspended at a yield point: "g.gi_frame is not None and g.gi_frame.f_lasti != -1 and not g.gi_running" Exhausted/closed: "g.gi_frame is None" My API proposal is to add the following to the inspect module: GEN_CREATED, GEN_RUNNING, GEN_SUSPENDED, GEN_CLOSED = range(4) def getgeneratorstate(g): if g.gi_running: return GEN_RUNNING if g.gi_frame is None: return GEN_CLOSED if g.gi_frame.f_lasti == -1: return GEN_CREATED return GEN_SUSPENDED (the lack of underscores in the function name follows the general style of the inspect module) ---------- components: Library (Lib) keywords: easy messages: 119774 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: Make generator state easier to introspect type: feature request versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 14:55:13 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 12:55:13 +0000 Subject: [issue10220] Make generator state easier to introspect In-Reply-To: <1288269773.83.0.431465195808.issue10220@psf.upfronthosting.co.za> Message-ID: <1288270513.75.0.411536303265.issue10220@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Is it CPython-specific? Does "currently executing" also include "currently closing"? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:05:10 2010 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 28 Oct 2010 13:05:10 +0000 Subject: [issue10220] Make generator state easier to introspect In-Reply-To: <1288270513.75.0.411536303265.issue10220@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: On Thu, Oct 28, 2010 at 10:55 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Is it CPython-specific? The states are not CPython-specific (they're logical states of the underlying generator), but I don't know if other implementations expose generator and frame details in the same way (all the more reason to put this in inspect - other implementations can provide the information without needing to exactly mimic gi_frame and f_lasti). > Does "currently executing" also include "currently closing"? "Currently executing" means the frame is being evaluated in a Python thread (the thread running it may be suspended in a multi-threaded environment, but the frame itself is in the middle of doing something, which may include processing a thrown in GeneratorExit) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:25:26 2010 From: report at bugs.python.org (=?utf-8?q?Per_=C3=98yvind_Karlsen?=) Date: Thu, 28 Oct 2010 13:25:26 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288272326.17.0.0137997619671.issue6715@psf.upfronthosting.co.za> Per ?yvind Karlsen added the comment: All fixed now. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:26:42 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Thu, 28 Oct 2010 13:26:42 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> Message-ID: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> New submission from Dirkjan Ochtman : djc at miles ~ $ python2.7 Python 2.7 (r27:82500, Oct 4 2010, 10:01:41) [GCC 4.3.4] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> {}.pop('a') Traceback (most recent call last): File "", line 1, in KeyError: 'pop(): dictionary is empty' >>> {'a': 'b'}.pop('c') Traceback (most recent call last): File "", line 1, in KeyError: 'c' IMO the former exception should be in line with normal KeyErrors. ---------- messages: 119778 nosy: djc priority: normal severity: normal status: open title: {}.pop('a') raises non-standard KeyError exception _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:27:04 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Thu, 28 Oct 2010 13:27:04 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> Message-ID: <1288272424.72.0.197140587354.issue10221@psf.upfronthosting.co.za> Changes by Dirkjan Ochtman : ---------- components: +Interpreter Core versions: +Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:37:18 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 13:37:18 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> Message-ID: <1288273038.34.0.244825369638.issue10221@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +rhettinger type: -> behavior versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:38:08 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 28 Oct 2010 13:38:08 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1288272326.17.0.0137997619671.issue6715@psf.upfronthosting.co.za> Message-ID: <4CC97CBC.3040804@v.loewis.de> Martin v. L?wis added the comment: > All fixed now. :) Does that refer to msg119743? Please provide this module as a patch for branches/py3k, otherwise it's difficult to see what exactly you are contributing. Also, please provide Doc/library/lzma.rst. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:49:03 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Thu, 28 Oct 2010 13:49:03 +0000 Subject: [issue6103] Static library (libpythonX.Y.a) installed in incorrect location In-Reply-To: <1243229174.04.0.856181043806.issue6103@psf.upfronthosting.co.za> Message-ID: <1288273743.14.0.0143288068001.issue6103@psf.upfronthosting.co.za> Changes by Dirkjan Ochtman : ---------- nosy: +djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:50:22 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 28 Oct 2010 13:50:22 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288273822.48.0.791725804438.issue7351@psf.upfronthosting.co.za> ?ric Araujo added the comment: A ?BadZipZile? in the patch made it to Subversion :) Fixed in r85891. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:50:24 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 13:50:24 +0000 Subject: [issue6103] Static library (libpythonX.Y.a) installed in incorrect location In-Reply-To: <1243229174.04.0.856181043806.issue6103@psf.upfronthosting.co.za> Message-ID: <1288273824.9.0.606803146177.issue6103@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +barry, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:52:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 28 Oct 2010 13:52:11 +0000 Subject: [issue10212] struct.unpack and cStringIO.StringIO don't support new buffer In-Reply-To: <1288175813.33.0.0310491559114.issue10212@psf.upfronthosting.co.za> Message-ID: <1288273931.59.0.425501771585.issue10212@psf.upfronthosting.co.za> ?ric Araujo added the comment: MAL?s viewpoint from msg119721: ?The memoryview object was added to simplify porting applications to Python3. If that backport is incomplete in the sense that the memoryview object is not compatible with the standard Python2 object for such memory views, then I'd consider that a bug. Without compatibility to the buffer objects, there's no way to make other Python2 buffer interface compatible object compatible to memoryviews. Alternatively, the Python2 memoryview object implementation could also accept objects with the old buffer interface, much like "s*" does. Note that the patch needs to check the buffer flags - writing to such buffers is not allowed.? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:53:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 28 Oct 2010 13:53:01 +0000 Subject: [issue10212] struct.unpack and cStringIO.StringIO don't support new buffer In-Reply-To: <1288175813.33.0.0310491559114.issue10212@psf.upfronthosting.co.za> Message-ID: <1288273981.68.0.873028527171.issue10212@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:53:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 28 Oct 2010 13:53:12 +0000 Subject: [issue10211] BufferObject doesn't support new buffer interface In-Reply-To: <1288169352.49.0.219368546772.issue10211@psf.upfronthosting.co.za> Message-ID: <1288273992.54.0.771064339195.issue10211@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:54:35 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Thu, 28 Oct 2010 13:54:35 +0000 Subject: [issue6731] Add option of non-zero exit status of setup.py when building of extensions has failed In-Reply-To: <1250634322.79.0.224296931911.issue6731@psf.upfronthosting.co.za> Message-ID: <1288274075.62.0.596962833867.issue6731@psf.upfronthosting.co.za> Changes by Dirkjan Ochtman : ---------- nosy: +djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:57:08 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 28 Oct 2010 13:57:08 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288274228.89.0.439024753285.issue7351@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks for the catch! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 15:59:00 2010 From: report at bugs.python.org (Dirkjan Ochtman) Date: Thu, 28 Oct 2010 13:59:00 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1288274340.28.0.946180894758.issue1222585@psf.upfronthosting.co.za> Changes by Dirkjan Ochtman : ---------- nosy: +djc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:00:08 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Thu, 28 Oct 2010 14:00:08 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1288248168.0.0.71876341517.issue7351@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: Is the trailing whitespace problem solved? Please make sure everything is correct and that no more typos occur for this issue. And I am the original patch author, so mention my name (Bo??tjan Mejak) in the NEWS file. Thanks. On Thu, Oct 28, 2010 at 8:42 AM, Georg Brandl wrote: > > Georg Brandl added the comment: > > Applied after review in r85874. (Please make sure your patches don't have > trailing whitespace.) > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19397/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Is the trailing whitespace problem solved? Please make sure everything is correct and that no more typos occur for this issue. And I am the original patch author, so mention my name (Bo??tjan Mejak) in the NEWS file. Thanks.


On Thu, Oct 28, 2010 at 8:42 AM, Georg Brandl <report at bugs.python.org> wrote:

Georg Brandl <georg at python.org> added the comment:

Applied after review in r85874. (Please make sure your patches don't have trailing whitespace.)

----------

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

From report at bugs.python.org Thu Oct 28 16:02:54 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 28 Oct 2010 14:02:54 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288274574.54.0.0290599148249.issue7351@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file19388/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:02:58 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 28 Oct 2010 14:02:58 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288274578.22.0.613422672619.issue7351@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file19397/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:05:47 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 28 Oct 2010 14:05:47 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288274747.79.0.467729606416.issue7351@psf.upfronthosting.co.za> Georg Brandl added the comment: a) I already removed the whitespace before committing. The pre-commit hook wouldn't even allow committing that. b) I don't think constant refusal to submit a patch in the way we request earns you a place in the acknowledgements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:05:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 28 Oct 2010 14:05:59 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288274759.03.0.174585792515.issue7351@psf.upfronthosting.co.za> ?ric Araujo added the comment: > Is the trailing whitespace problem solved? You can follow the link to the revision to see that it is. Georg?s message implied this, too. > Please make sure everything is correct and that no more typos occur for this issue. We do. > And I am the original patch author, so mention my name (Bo?tjan Mejak) in the NEWS file. Thanks. We don?t add names for very small patches like this one. (P.S. Would you be so kind as to follow some netiquette in the tracker? HTML email creates noisy unnamed attachments, and top-posting is redundant and hard to read. Thanks in advance.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:11:01 2010 From: report at bugs.python.org (Stephen Hansen) Date: Thu, 28 Oct 2010 14:11:01 +0000 Subject: [issue10116] Sporadic failures in test_urllibnet In-Reply-To: <1287150282.16.0.127032822399.issue10116@psf.upfronthosting.co.za> Message-ID: <1288275061.82.0.0467937594368.issue10116@psf.upfronthosting.co.za> Stephen Hansen added the comment: New patch, sans trailing whitespace. Ahem. ---------- Added file: http://bugs.python.org/file19398/issue10116-nowhitespace.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:11:07 2010 From: report at bugs.python.org (Stephen Hansen) Date: Thu, 28 Oct 2010 14:11:07 +0000 Subject: [issue10116] Sporadic failures in test_urllibnet In-Reply-To: <1287150282.16.0.127032822399.issue10116@psf.upfronthosting.co.za> Message-ID: <1288275067.85.0.539968333807.issue10116@psf.upfronthosting.co.za> Changes by Stephen Hansen : Removed file: http://bugs.python.org/file19390/issue10116.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:11:48 2010 From: report at bugs.python.org (=?utf-8?q?Bo=C5=A1tjan_Mejak?=) Date: Thu, 28 Oct 2010 14:11:48 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1288274759.03.0.174585792515.issue7351@psf.upfronthosting.co.za> Message-ID: Bo??tjan Mejak added the comment: Then disable the tracker's ability to post messages via POP/IMAP. Just block those protocols in the tracker and you won't see any gibberish anymore. ;) On Thu, Oct 28, 2010 at 4:05 PM, ??ric Araujo wrote: > > ??ric Araujo added the comment: > > > Is the trailing whitespace problem solved? > You can follow the link to the revision to see that it is. Georg???s message > implied this, too. > > > Please make sure everything is correct and that no more typos occur for > this issue. > We do. > > > And I am the original patch author, so mention my name (Bo??tjan Mejak) in > the NEWS file. Thanks. > We don???t add names for very small patches like this one. > > (P.S. Would you be so kind as to follow some netiquette in the tracker? > HTML email creates noisy unnamed attachments, and top-posting is redundant > and hard to read. Thanks in advance.) > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- Added file: http://bugs.python.org/file19399/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Then disable the tracker's ability to post messages via POP/IMAP. Just block those protocols in the tracker and you won't see any gibberish anymore. ;)


On Thu, Oct 28, 2010 at 4:05 PM, ??ric Araujo <report at bugs.python.org> wrote:

??ric Araujo <merwok at netwok.org> added the comment:

> Is the trailing whitespace problem solved?
You can follow the link to the revision to see that it is. ??Georg???s message implied this, too.

> Please make sure everything is correct and that no more typos occur for this issue.
We do.

> And I am the original patch author, so mention my name (Bo??tjan Mejak) in the NEWS file. Thanks.
We don???t add names for very small patches like this one.

(P.S. Would you be so kind as to follow some netiquette in the tracker? ??HTML email creates noisy unnamed attachments, and top-posting is redundant and hard to read. ??Thanks in advance.)

----------

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

From report at bugs.python.org Thu Oct 28 16:14:18 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 28 Oct 2010 14:14:18 +0000 Subject: [issue7351] Rename BadZipfile to BadZipFile for consistency In-Reply-To: <1258571555.95.0.0442517354263.issue7351@psf.upfronthosting.co.za> Message-ID: <1288275258.42.0.869710653444.issue7351@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file19399/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:14:35 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 28 Oct 2010 14:14:35 +0000 Subject: [issue10202] ftplib doesn't check close status after sending file In-Reply-To: <1288143542.6.0.0120996379651.issue10202@psf.upfronthosting.co.za> Message-ID: <4CC98545.6090401@v.loewis.de> Martin v. L?wis added the comment: > Proper behavior for ftplib when sending is to send all desired data, > then call "sock.shutdown(socket.SHUT_RDWR)". This indicates that no > more data will be sent, and blocks until the receiver has > acknowledged all their data. I think you misunderstand. Calling shutdown does *not* block until the receiver has acknowledged all data. It just put a FIN packet into the send queue. > FTP send is one of the few situations where this matters, because FTP > uses the close of the data connection to indicate EOF. Not only. It also uses the server response on the control connection to indicate that all data has been received. Relying on successful shutdown is both insufficient and unnecessary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:18:13 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 14:18:13 +0000 Subject: [issue10116] Sporadic failures in test_urllibnet In-Reply-To: <1287150282.16.0.127032822399.issue10116@psf.upfronthosting.co.za> Message-ID: <1288275493.24.0.280475171584.issue10116@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: committed/rejected -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:22:30 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Thu, 28 Oct 2010 14:22:30 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> Message-ID: <1288275750.42.0.304632160235.issue10221@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:32:05 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 28 Oct 2010 14:32:05 +0000 Subject: [issue10209] Mac OS X: Decompose filenames on encode, and precompose filenames on decode In-Reply-To: <1288139796.38.0.381630346424.issue10209@psf.upfronthosting.co.za> Message-ID: <1288276324.99.0.797654989898.issue10209@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'd like to see this patch reverted. I don't think it is useful. 1. encoding with NFD should not be necessary, as the system will do that, anyway. 2. decoding with NFC is incompatible with previous Python releases, and I can't see why NFC is conceptually better than NFD. To give an analogy: if we have a case-insensitive file system, we don't normalize into lower-case, either, do we? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:35:11 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 28 Oct 2010 14:35:11 +0000 Subject: [issue10213] tests shouldn't fail with unset timezone In-Reply-To: <1288180286.09.0.61662115749.issue10213@psf.upfronthosting.co.za> Message-ID: <1288276511.1.0.221317365469.issue10213@psf.upfronthosting.co.za> R. David Murray added the comment: Indeed, Factory is part of the standard tz (zoneinfo) database, as can be seen on this web page that makes the database browsable: http://twiki.org/cgi-bin/xtra/tzdatepick.html Whether or not a distribution uses Factory initially is of course a distribution decision, but for our purposes we can consider that message to be a constant provided by upstream that indicates there is no valid timezone to test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:47:04 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 28 Oct 2010 14:47:04 +0000 Subject: [issue9981] let make_buildinfo use a temporary directory on windows In-Reply-To: <1285741718.07.0.0571419018875.issue9981@psf.upfronthosting.co.za> Message-ID: <1288277224.6.0.603882794202.issue9981@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Why is the second parameter optional? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:53:26 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 14:53:26 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> Message-ID: <1288277606.4.0.111141908721.issue9295@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Hirokazu, I've committed your 2.7 patch in r85892. Let's see what the buildbots say. ---------- resolution: -> fixed status: open -> pending versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 16:55:31 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 28 Oct 2010 14:55:31 +0000 Subject: [issue10116] Sporadic failures in test_urllibnet In-Reply-To: <1287150282.16.0.127032822399.issue10116@psf.upfronthosting.co.za> Message-ID: <1288277731.89.0.724568252135.issue10116@psf.upfronthosting.co.za> Georg Brandl added the comment: Let's try with the patch. r85893. (I'm afraid the pre-commit hook still rejected the file after applying the patch.) ---------- nosy: +georg.brandl resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 17:01:56 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Oct 2010 15:01:56 +0000 Subject: [issue10209] Mac OS X: Decompose filenames on encode, and precompose filenames on decode In-Reply-To: <1288139796.38.0.381630346424.issue10209@psf.upfronthosting.co.za> Message-ID: <1288278116.28.0.203822885088.issue10209@psf.upfronthosting.co.za> STINNER Victor added the comment: > I'd like to see this patch reverted. I created a specific branch to test the patch (I also patched PyUnicode_EncodeFSDefault() and PyUnicode_DecodeFSDefaultAndSize()): issue10209. test_pep277 now pass in this branch! > encoding with NFD should not be necessary, as the system will > do that, anyway. Yes, but not exactly... Mac OS X NFD normalization is a little bit different than Python's normalization: see msg105669 and http://developer.apple.com/library/mac/#qa/qa2001/qa1173.html I don't understand why test_pep277 pass on issue10209 branch, but it works. I suppose that normalize the filename to NFD in Python avoids some Mac OS X normalization bugs? > decoding with NFC is incompatible with previous Python releases, > I can't see why NFC is conceptually better than NFD. I propose to normalize to NFC because Qt does that. On Linux, the keyboard uses NFC. Eg. press ? key writes U+00e9, not U+0065 U+0301. If you ask the user to write a filename, the filename will be stored in the same norm. So indirectly, Linux stores filenames as NFC. Which norm is used on Mac OS X, eg. for the keyboard? To display a filename, the norm is not important. With my patch, the norm is also no more important when accessing to the filesystem (no more strange Mac OS X normalization bug). So it's only important when comparing two filenames. If the two filenames are normalized in different norms (eg. NFC vs NFD), they will be seen as different even if they are the same name. -- Anyway, I think that os.fsencode(os.fsdecode(name)) should be equal to name. If it's different, "open(name, 'w').close(); name in listdir()" is False (on systems storing filenames as bytes). So if you change fsdecode(), fsencode() should also be changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 17:04:35 2010 From: report at bugs.python.org (Guido van Rossum) Date: Thu, 28 Oct 2010 15:04:35 +0000 Subject: [issue10220] Make generator state easier to introspect In-Reply-To: <1288269773.83.0.431465195808.issue10220@psf.upfronthosting.co.za> Message-ID: <1288278275.24.0.0982899252355.issue10220@psf.upfronthosting.co.za> Guido van Rossum added the comment: I could imagine separating the state into two parts: - a three-valued enum distinguishing created, active, or exhausted - a bool (only relevant in the active state) whether it is currently running or suspended The latter is just g.gi_running so we don't need a new API for this. :-) ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 17:44:28 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 28 Oct 2010 15:44:28 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> Message-ID: <1288280668.88.0.900832112461.issue10221@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: There have been several requests for KeyError to grow "key" attribute that will always contain the key that caused the error. See issue 1182143, for example. If this is done, I think it would be natural to unify the args as well for empty and non-empy case. Without adding key access API, however, I am at most -0 on changing the error message. Traditionally, the error messages are not considered part of language specification, so this is not a bug. ---------- nosy: +belopolsky type: behavior -> feature request versions: -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 17:52:09 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Oct 2010 15:52:09 +0000 Subject: [issue10209] Mac OS X: Decompose filenames on encode, and precompose filenames on decode In-Reply-To: <1288139796.38.0.381630346424.issue10209@psf.upfronthosting.co.za> Message-ID: <1288281129.53.0.273183543541.issue10209@psf.upfronthosting.co.za> STINNER Victor added the comment: Some pointers. "MacFUSE" http://code.google.com/p/macfuse/issues/detail?id=139#c2 "FILENAME_ENCODING_PROPOSAL" (MacFUSE) http://code.google.com/p/macfuse/wiki/FILENAME_ENCODING_PROPOSAL "Converting to Precomposed Unicode" http://developer.apple.com/library/mac/#qa/qa2001/qa1235.html "Unicode NFD and file attachment on Mac OS X" (filenames of email attachments) http://lists.w3.org/Archives/Public/www-international/2003OctDec/0079.html extract: " the applications dealing with these files names should convert it to NFC before sending it to the wire." "Bug: TWiki on Mac OS X server with I18N generates odd looking file names" http://twiki.org/cgi-bin/view/Codev/MacOSXFilesystemEncodingWithI18N (search "NFD" or "HFS+") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 18:11:42 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 28 Oct 2010 16:11:42 +0000 Subject: [issue10209] Mac OS X: Decompose filenames on encode, and precompose filenames on decode In-Reply-To: <1288278116.28.0.203822885088.issue10209@psf.upfronthosting.co.za> Message-ID: <4CC9A0BA.209@v.loewis.de> Martin v. L?wis added the comment: > Yes, but not exactly... Mac OS X NFD normalization is a little bit > different than Python's normalization: see msg105669 and > http://developer.apple.com/library/mac/#qa/qa2001/qa1173.html I see. This is one more reason not to convert strings into NFD, no? > I don't understand why test_pep277 pass on issue10209 branch, but it > works. I suppose that normalize the filename to NFD in Python avoids > some Mac OS X normalization bugs? My question is rather why it failed in the first place, when issue8207 had supposedly fixed it. > I propose to normalize to NFC because Qt does that. Hmm. I find that a weak argument - in particular given that the system will normalize then in turn anyway, and to a slightly different normalform. So what is Qt's motivation to normalize? > On Linux, the keyboard uses NFC. I think this is technically incorrect. When you press ?, then some scan code is generated. That goes through various mapping layers. The outcome will depend on how specifically these layers are configured. > Which norm is used on Mac OS X, eg. for the keyboard? Same reasoning: pressing a key initially does not generate any Unicode at all. My guess is that when eventually a character is generated (e.g. on the terminal), no normal form is used; instead, it most likely will always strive to generate a single character (even if that is not normalized). See http://developer.apple.com/library/mac/#qa/qa2001/qa1235.html which says "Macintosh keyboards generally produce precomposed Unicode" > Anyway, I think that os.fsencode(os.fsdecode(name)) should be equal > to name. I agree. and that is currently already the case. > If it's different, "open(name, 'w').close(); name in > listdir()" is False (on systems storing filenames as bytes). So if > you change fsdecode(), fsencode() should also be changed. I'm saying that fsdecode shouldn't change, either, the primary reason being backwards compatibility here. ---------- title: Mac OS X: Decompose filenames on encode, and precompose filenames on decode -> Mac OS X: Decompose filenames on encode, and precompose filenames on decode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 18:13:17 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 16:13:17 +0000 Subject: [issue9295] test_close_open_print_buffered(test_file) sometimes crashes In-Reply-To: <1279465176.3.0.233257918018.issue9295@psf.upfronthosting.co.za> Message-ID: <1288282397.79.0.357902686291.issue9295@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Apparently it's fixed! ---------- stage: needs patch -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 18:14:30 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 16:14:30 +0000 Subject: [issue10207] test_file2k crashes under Windows In-Reply-To: <1288131625.06.0.246375636536.issue10207@psf.upfronthosting.co.za> Message-ID: <1288282470.84.0.942775784429.issue10207@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed the aforementioned patch (r85892) and this seems to be fixed. Thank you! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 18:18:31 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Oct 2010 16:18:31 +0000 Subject: [issue10209] Mac OS X: Decompose filenames on encode, and precompose filenames on decode In-Reply-To: <1288139796.38.0.381630346424.issue10209@psf.upfronthosting.co.za> Message-ID: <1288282711.02.0.0737628258261.issue10209@psf.upfronthosting.co.za> STINNER Victor added the comment: > My question is rather why it failed in the first place, > when issue8207 had supposedly fixed it. r79426 (of #8207) only disabled some tests. The problem with test_normalize() and test_listdir() of test_pep277 is maybe that these tests are irrevelant on Mac OS X? I still don't understand exaclty why the tests fail and what the tests do check. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 18:37:52 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 28 Oct 2010 16:37:52 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> Message-ID: <1288283872.68.0.20059652253.issue10221@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I agree with the OP's request. d.pop(k) is conceptually equivalent to: r = d[k] # raises KeyError(k) del d[k] return r The current message was probably borrowed from dict.popitem(). But that is much different since the dict.pop(k) method is key-specific (instead of size related). This fix should be backported (as it doesn't change guaranteed behaviors but does improve the debugability). ---------- assignee: -> rhettinger stage: -> needs patch versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 18:38:09 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 28 Oct 2010 16:38:09 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> Message-ID: <1288283889.13.0.372920389564.issue10221@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 18:55:57 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 28 Oct 2010 16:55:57 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> Message-ID: <1288284957.49.0.117969237374.issue10221@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This is the case where fixing an issue is easier than arguing that it is not a bug. :-) (Changing to "behavior" not because I agree that it is a bug, but for consistency with targeting 2.7) A (1-line) patch attached. ---------- keywords: +patch stage: needs patch -> unit test needed type: feature request -> behavior Added file: http://bugs.python.org/file19400/issue10221.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 19:07:59 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 28 Oct 2010 17:07:59 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> Message-ID: <1288285679.75.0.994693088808.issue10221@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Attaching a patch with tests. ---------- keywords: +needs review resolution: -> accepted stage: unit test needed -> commit review Added file: http://bugs.python.org/file19401/issue10221-with-tests.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 19:21:24 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 28 Oct 2010 17:21:24 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> Message-ID: <1288286484.16.0.875129861744.issue10221@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I wonder if it would be worthwhile to unify missing key processing as in issue10221a-with-tests.diff. ---------- Added file: http://bugs.python.org/file19402/issue10221a-with-tests.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 19:41:35 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 17:41:35 +0000 Subject: [issue5437] Singleton MemoryError can hold traceback data and locals indefinitely In-Reply-To: <1236475192.44.0.322213447469.issue5437@psf.upfronthosting.co.za> Message-ID: <1288287695.33.0.0812127020185.issue5437@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch against py3k. ---------- Added file: http://bugs.python.org/file19403/memerror.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 19:58:29 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 17:58:29 +0000 Subject: [issue10038] json.loads() on str should return unicode, not str In-Reply-To: <1286379418.7.0.631387512608.issue10038@psf.upfronthosting.co.za> Message-ID: <1288288709.46.0.157026087341.issue10038@psf.upfronthosting.co.za> Antoine Pitrou added the comment: +1 for fixing this in-tree. We need a patch, though ;) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 21:19:28 2010 From: report at bugs.python.org (Sandro Tosi) Date: Thu, 28 Oct 2010 19:19:28 +0000 Subject: [issue8332] regrtest single TestClass/test_method In-Reply-To: <1270631958.05.0.652340331128.issue8332@psf.upfronthosting.co.za> Message-ID: <1288293568.43.0.305481513961.issue8332@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hello, as explained in msg108109 (of issue9028) you can actually call a single test, or a single TestClass: $ ./python -m unittest test.test_httpservers.BaseHTTPServerTestCase.test_handler . ---------------------------------------------------------------------- Ran 1 test in 0.168s OK $ ./python -m unittest test.test_httpservers.BaseHTTPServerTestCase .............. ---------------------------------------------------------------------- Ran 14 tests in 1.132s OK I'm closing this report, but feel free to reopen it if you think I'm missing something. Thanks, Sandro ---------- nosy: +sandro.tosi resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 21:44:14 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Thu, 28 Oct 2010 19:44:14 +0000 Subject: [issue10222] 3.2 on AIX - Unexpected text ',' encountered. In-Reply-To: <1288295054.95.0.251729908149.issue10222@psf.upfronthosting.co.za> Message-ID: <1288295054.95.0.251729908149.issue10222@psf.upfronthosting.co.za> New submission from Sridhar Ratnakumar : "Parser/tokenizer.h", line 18.17: 1506-275 (S) Unexpected text ',' encountered. http://svn.python.org/view/python/branches/py3k/Parser/tokenizer.h?annotate=76232#l16 Extra comma in the following line: STATE_NORMAL, /* have a codec associated with input */ Introduced by neil.schem in r58226 ---------- components: Build messages: 119809 nosy: nascheme, srid priority: normal severity: normal status: open title: 3.2 on AIX - Unexpected text ',' encountered. type: compile error versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 21:57:33 2010 From: report at bugs.python.org (Jeremy Kloth) Date: Thu, 28 Oct 2010 19:57:33 +0000 Subject: [issue10217] python-2.7.amd64.msi install fails In-Reply-To: <1288234706.92.0.436900381953.issue10217@psf.upfronthosting.co.za> Message-ID: <1288295853.43.0.273374949583.issue10217@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 22:08:53 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 28 Oct 2010 20:08:53 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> Message-ID: <1288296533.48.0.987809790561.issue10221@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: accepted -> stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 22:10:31 2010 From: report at bugs.python.org (Sandro Tosi) Date: Thu, 28 Oct 2010 20:10:31 +0000 Subject: [issue6661] Transient test_multiprocessing failure (test_active_children) In-Reply-To: <1249589448.92.0.976190766506.issue6661@psf.upfronthosting.co.za> Message-ID: <1288296631.01.0.855638844426.issue6661@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hello, what can we do with this issue? It doesn't seem it happened again after Antoine's report (or at least no-one had followed it up) and it doesn't happen nowdays (f.e. I exec'd test_multiprocessing in a loop for some time, and no error comes). What do you think about closing it as "sorry, unable to replicate it" and so mark it a glitch somehow? ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 22:11:41 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 28 Oct 2010 20:11:41 +0000 Subject: [issue10186] Invalid SyntaxError pointer offset In-Reply-To: <1287877325.31.0.208364473897.issue10186@psf.upfronthosting.co.za> Message-ID: <1288296701.07.0.655927369703.issue10186@psf.upfronthosting.co.za> Stefan Krah added the comment: Hi, I've problems with two recent commits (r85814 and r85817): Example: r85812 is ok: ============== Python 3.2a3+ (py3k:85812:85835M, Oct 28 2010, 22:02:19) [GCC 4.2.4 (Ubuntu 4.2.4-3ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> x = 5 | 4 | File "", line 1 x = 5 | 4 | ^ SyntaxError: invalid syntax >>> r85814 does not give the intended output: ========================================== Python 3.2a3+ (py3k:85814:85835M, Oct 28 2010, 22:03:06) [GCC 4.2.4 (Ubuntu 4.2.4-3ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> x = 5 | 4 | File "", line 1 ^ SyntaxError: invalid syntax >>> r85817 goes into an "infinite" loop. The last one is obvious; offset is 0, so the while loop does not stop. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 22:11:57 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 28 Oct 2010 20:11:57 +0000 Subject: [issue10186] Invalid SyntaxError pointer offset In-Reply-To: <1287877325.31.0.208364473897.issue10186@psf.upfronthosting.co.za> Message-ID: <1288296717.79.0.373458873659.issue10186@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 22:14:58 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 28 Oct 2010 20:14:58 +0000 Subject: [issue6661] Transient test_multiprocessing failure (test_active_children) In-Reply-To: <1249589448.92.0.976190766506.issue6661@psf.upfronthosting.co.za> Message-ID: <1288296898.85.0.748298766711.issue6661@psf.upfronthosting.co.za> Stefan Krah added the comment: I've seen that one as well, but very rarely. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 22:22:55 2010 From: report at bugs.python.org (Sandro Tosi) Date: Thu, 28 Oct 2010 20:22:55 +0000 Subject: [issue6661] Transient test_multiprocessing failure (test_active_children) In-Reply-To: <1249589448.92.0.976190766506.issue6661@psf.upfronthosting.co.za> Message-ID: <1288297375.54.0.256464491386.issue6661@psf.upfronthosting.co.za> Sandro Tosi added the comment: well, at least we have a confirmation it's still there :) any idea how we can try to debug it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 22:30:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 28 Oct 2010 20:30:55 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288297855.48.0.580918345272.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Attaching another small doc improvement: "gon" is better know as "grad" and even under that name requires an explanation. See issue7061a.diff ---------- Added file: http://bugs.python.org/file19404/issue7061a.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Oct 28 22:31:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 28 Oct 2010 20:31:15 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288297875.81.0.605780040381.issue7061@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- stage: committed/rejected -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 00:10:00 2010 From: report at bugs.python.org (=?utf-8?q?Per_=C3=98yvind_Karlsen?=) Date: Thu, 28 Oct 2010 22:10:00 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288303800.83.0.235702414183.issue6715@psf.upfronthosting.co.za> Per ?yvind Karlsen added the comment: Here's a patch with the latest code generated against py3k branch, it comes with Doc/library/lzma.rst as well now. ---------- keywords: +patch Added file: http://bugs.python.org/file19405/py3k-lzmamodule.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 00:10:51 2010 From: report at bugs.python.org (=?utf-8?q?Per_=C3=98yvind_Karlsen?=) Date: Thu, 28 Oct 2010 22:10:51 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288303851.75.0.0653932836942.issue6715@psf.upfronthosting.co.za> Per ?yvind Karlsen added the comment: here's Lib/test/teststring.lzma, required by the test suite. ---------- Added file: http://bugs.python.org/file19406/teststring.lzma _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 00:11:19 2010 From: report at bugs.python.org (=?utf-8?q?Per_=C3=98yvind_Karlsen?=) Date: Thu, 28 Oct 2010 22:11:19 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288303879.52.0.728090929249.issue6715@psf.upfronthosting.co.za> Per ?yvind Karlsen added the comment: here's Lib/test/teststring.xz, required by the test suite. ---------- Added file: http://bugs.python.org/file19407/teststring.xz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 00:13:09 2010 From: report at bugs.python.org (EcmaXp) Date: Thu, 28 Oct 2010 22:13:09 +0000 Subject: [issue10223] socket.gethostname() fail In-Reply-To: <1288303989.88.0.633861339057.issue10223@psf.upfronthosting.co.za> Message-ID: <1288303989.88.0.633861339057.issue10223@psf.upfronthosting.co.za> New submission from EcmaXp : C:\Users\PC-\Desktop>c:\python31\python Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32 Type ?help?, ?copyright?, ?credits? or ?license? for more information. >>> import socket >>> socket.gethostname() Traceback (most recent call last): File ??, line 1, in UnicodeDecodeError: ?utf8? codec can?t decode bytes in position 0-1: invalid data >>> socket.gethostname() fail when system name is korean on Window Vista [... ---------- components: Library (Lib) messages: 119818 nosy: EcmaXp priority: normal severity: normal status: open title: socket.gethostname() fail type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 00:16:42 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 28 Oct 2010 22:16:42 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : Opening a ticket to track the progress of getting python 3.x build its own documentation. So far I have installed Sphinx from http://bitbucket.org/birkenfeld/sphinx, but I get the following error: $ sphinx-build -b html -d Doc/build3/doctrees -D latex_paper_size= Doc Doc/build3/html There is a syntax error in your configuration file: invalid syntax (patchlevel.py, line 71) Did you change the syntax from 2.x to 3.x? ---------- messages: 119819 nosy: belopolsky priority: normal severity: normal status: open title: Build 3.x documentation using python3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 00:17:57 2010 From: report at bugs.python.org (EcmaXp) Date: Thu, 28 Oct 2010 22:17:57 +0000 Subject: [issue10223] socket.gethostname() fail In-Reply-To: <1288303989.88.0.633861339057.issue10223@psf.upfronthosting.co.za> Message-ID: <1288304277.48.0.549434109207.issue10223@psf.upfronthosting.co.za> EcmaXp added the comment: http://bugs.python.org/issue9377 ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 00:29:14 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 28 Oct 2010 22:29:14 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288304954.53.0.103811946905.issue10224@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +eric.araujo, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 00:29:53 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 28 Oct 2010 22:29:53 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288304993.21.0.125594867693.issue10224@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- assignee: -> docs at python components: +Build, Documentation nosy: +docs at python versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 00:39:07 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Thu, 28 Oct 2010 22:39:07 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288305547.24.0.704150467458.issue10224@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I had some success after running 2to3 on Doc/conf.py and Doc/tools. The build succeeded, but I have not compared the output yet. Running doctest, however, still reported lots of errors and hang in turtle.rst. $ sphinx-build -b doctest -d Doc/build3/doctrees -D latex_paper_size= Doc Doc/build3/html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 00:41:17 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 22:41:17 +0000 Subject: [issue5437] Singleton MemoryError can hold traceback data and locals indefinitely In-Reply-To: <1236475192.44.0.322213447469.issue5437@psf.upfronthosting.co.za> Message-ID: <1288305677.05.0.346288647945.issue5437@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I can't manage to reproduce the issue with PyExc_RecursionErrorInst. It seems this instance is only used in a very select condition, that is, when the recursion limit is hit when trying to "normalize" an exception. Therefore, I will add a test without "fixing" anything. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 01:07:27 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 23:07:27 +0000 Subject: [issue5437] Singleton MemoryError can hold traceback data and locals indefinitely In-Reply-To: <1236475192.44.0.322213447469.issue5437@psf.upfronthosting.co.za> Message-ID: <1288307247.56.0.0917116182389.issue5437@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patch with improved tests committed in r85896 (3.2) and r85898 (3.1). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 01:15:33 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 23:15:33 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287000989.52.0.725529628819.issue10093@psf.upfronthosting.co.za> Message-ID: <1288307733.86.0.779989564751.issue10093@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I would need opinions on one more thing. The current patch warns when a socket has not been explicitly closed. But it does so even when the socket isn't bound at all. e.g.: $ ./python -c "import socket; socket.socket()" -c:1: ResourceWarning: unclosed Perhaps we should be more discriminate and only warn when either bind(), listen() or connect() had been called previously? What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 01:18:16 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Oct 2010 23:18:16 +0000 Subject: [issue10209] Mac OS X: Decompose filenames on encode, and precompose filenames on decode In-Reply-To: <1288139796.38.0.381630346424.issue10209@psf.upfronthosting.co.za> Message-ID: <1288307896.16.0.210416858371.issue10209@psf.upfronthosting.co.za> STINNER Victor added the comment: > The problem with test_normalize() and test_listdir() of test_pep277 > is maybe that these tests are irrevelant on Mac OS X? I tried a different approach (different than my patch and the svn branch): - r85897 disables the filenames that are normalized differently by Python and by darwin - r85899 disables test_normalize and test_listdir tests Let's watch the buildbots... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 01:35:51 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 23:35:51 +0000 Subject: [issue10217] python-2.7.amd64.msi install fails In-Reply-To: <1288234706.92.0.436900381953.issue10217@psf.upfronthosting.co.za> Message-ID: <1288308951.99.0.722778961827.issue10217@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 01:36:12 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 23:36:12 +0000 Subject: [issue10222] 3.2 on AIX - Unexpected text ',' encountered. In-Reply-To: <1288295054.95.0.251729908149.issue10222@psf.upfronthosting.co.za> Message-ID: <1288308972.95.0.0354725233675.issue10222@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +sable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 01:37:54 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 28 Oct 2010 23:37:54 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288309074.61.0.821422803106.issue6715@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Could you upload the patch to http://codereview.appspot.com/? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 01:52:18 2010 From: report at bugs.python.org (STINNER Victor) Date: Thu, 28 Oct 2010 23:52:18 +0000 Subject: [issue10209] Mac OS X: Decompose filenames on encode, and precompose filenames on decode In-Reply-To: <1288139796.38.0.381630346424.issue10209@psf.upfronthosting.co.za> Message-ID: <1288309938.03.0.351953112684.issue10209@psf.upfronthosting.co.za> STINNER Victor added the comment: > - r85897 disables the filenames that are normalized differently by Python and by darwin > - r85899 disables test_normalize and test_listdir tests It looks like r85897 is enough to fix test_pep277 on "x86 Tiger 3.x" buildbot. But r85899 should not make the situation worse :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 02:06:51 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Oct 2010 00:06:51 +0000 Subject: [issue10209] Mac OS X: Decompose filenames on encode, and precompose filenames on decode In-Reply-To: <1288139796.38.0.381630346424.issue10209@psf.upfronthosting.co.za> Message-ID: <1288310811.69.0.675953325582.issue10209@psf.upfronthosting.co.za> STINNER Victor added the comment: I now agree with Martin: "Mac OS X: Decompose filenames on encode, and precompose filenames on decode" was a bad idea, fix the test is the right solution. test_pep277 now pass on "x86 Tiger 3.x" buildbot, and so I can close this issue and issue #8423. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 02:08:15 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Oct 2010 00:08:15 +0000 Subject: [issue8423] tiger buildbot: test_pep277 failures In-Reply-To: <1271435749.81.0.011008649482.issue8423@psf.upfronthosting.co.za> Message-ID: <1288310895.84.0.0158765515882.issue8423@psf.upfronthosting.co.za> STINNER Victor added the comment: > I opened the issue #10209: "Mac OS X: Decompose filenames on encode, > and precompose filenames on decode". It was a bad idea. I fixed test_pep277 instead with: - r85897 disables the filenames that are normalized differently by Python and by darwin - r85899 disables test_normalize and test_listdir tests And test_pep277 now pass on "x86 Tiger 3.x" buildbot, and so I can close this issue (and issue #10209). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 02:08:37 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Oct 2010 00:08:37 +0000 Subject: [issue10209] Mac OS X: Decompose filenames on encode, and precompose filenames on decode In-Reply-To: <1288139796.38.0.381630346424.issue10209@psf.upfronthosting.co.za> Message-ID: <1288310917.51.0.372847398929.issue10209@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 02:26:04 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 29 Oct 2010 00:26:04 +0000 Subject: [issue10220] Make generator state easier to introspect In-Reply-To: <1288269773.83.0.431465195808.issue10220@psf.upfronthosting.co.za> Message-ID: <1288311964.34.0.620278625513.issue10220@psf.upfronthosting.co.za> Nick Coghlan added the comment: So something like: GEN_CREATED, GEN_ACTIVE, GEN_CLOSED = range(3) def getgeneratorstate(g): """Get current state of a generator-iterator. Possible states are: GEN_CREATED: Created, waiting to start execution GEN_ACTIVE: Currently being executed (or suspended at yield) GEN_CLOSED: Execution has completed Use g.gi_running to determine if an active generator is running or is suspended at a yield expression. """ if g.gi_frame is None: return GEN_CLOSED if g.gi_frame.f_lasti == -1: return GEN_CREATED return GEN_ACTIVE Having 4 separate states actually makes the documentation a little easier to write: def getgeneratorstate(g): """Get current state of a generator-iterator. Possible states are: GEN_CREATED: Waiting to start execution GEN_RUNNING: Currently being executed by the interpreter GEN_SUSPENDED: Currently suspended at a yield expression GEN_CLOSED: Execution has completed """ Checking if the generator is active is then just a matter of checking "gen_state in (GEN_RUNNING, GEN_SUSPENDED)". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 02:26:48 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Oct 2010 00:26:48 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287000989.52.0.725529628819.issue10093@psf.upfronthosting.co.za> Message-ID: <1288312008.44.0.129775752502.issue10093@psf.upfronthosting.co.za> Brett Cannon added the comment: If a new, unbound socket uses some form of OS resource, then a warning is needed. Is their an equivalent limitation like there is with file descriptors as to how many an OS can possibly have open at once? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 02:29:43 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 00:29:43 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1288312008.44.0.129775752502.issue10093@psf.upfronthosting.co.za> Message-ID: <1288312178.3753.17.camel@localhost.localdomain> Antoine Pitrou added the comment: > If a new, unbound socket uses some form of OS resource, then a warning > is needed. Is their an equivalent limitation like there is with file > descriptors as to how many an OS can possibly have open at once? A socket *is* a file descriptor (under Unix), so, yes, there is a limit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 02:39:25 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Oct 2010 00:39:25 +0000 Subject: [issue10210] os.get_exec_path() should not produce any warning In-Reply-To: <1288141086.46.0.441985990964.issue10210@psf.upfronthosting.co.za> Message-ID: <1288312765.82.0.346537433761.issue10210@psf.upfronthosting.co.za> STINNER Victor added the comment: Fixed by r85902. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 02:43:03 2010 From: report at bugs.python.org (Guido van Rossum) Date: Fri, 29 Oct 2010 00:43:03 +0000 Subject: [issue10220] Make generator state easier to introspect In-Reply-To: <1288311964.34.0.620278625513.issue10220@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I take it back. The 4-value state looks better. My initial hesitance was that if you ever see GEN_RUNNING you are probably already in trouble, since you can't call send, next, throw or even close on a running generator (they all throw ValueError), so why are you looking at its state at all? But most reasons for looking at the state are obscure anyway, and from a different perspective it's a nice state machine. (Note that there's no transition from SUSPENDED to CLOSED -- you have to go through RUNNING to possibly handle GeneratorExit.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 02:54:21 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 29 Oct 2010 00:54:21 +0000 Subject: [issue9981] let make_buildinfo use a temporary directory on windows In-Reply-To: <1285741718.07.0.0571419018875.issue9981@psf.upfronthosting.co.za> Message-ID: <1288313661.88.0.316946392154.issue9981@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: For backwards compatibility, say with other build configurations (there is still rudimentary support for VS2005, 2003.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 03:04:28 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 29 Oct 2010 01:04:28 +0000 Subject: [issue8194] Incompatible API change in xmlrpclib.Transport.parse_response() of Python 2.7 and 3.2 In-Reply-To: <1269199462.82.0.615666977327.issue8194@psf.upfronthosting.co.za> Message-ID: <1288314268.12.0.309822559266.issue8194@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo, loewis, orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 03:28:40 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 29 Oct 2010 01:28:40 +0000 Subject: [issue10220] Make generator state easier to introspect In-Reply-To: <1288269773.83.0.431465195808.issue10220@psf.upfronthosting.co.za> Message-ID: <1288315720.11.0.959117032588.issue10220@psf.upfronthosting.co.za> Nick Coghlan added the comment: Indeed, the minimal lifecycles are: GEN_CREATED->GEN_CLOSED (exception thrown in before the generator was even started) GEN_CREATED->GEN_RUNNING->GEN_CLOSED (initial next() with internal logic that skips all yields) GEN_CREATED->GEN_RUNNING->GEN_SUSPENDED->GEN_RUNNING->GEN_CLOSED (initial next() with a throw, next or send to close it) Other cases following the same basic pattern as the last one, they just bounce back and forth between suspended and running more times. It occurred to me that threads really use the same state machine, it's just that almost nobody writes their own Python thread schedulers, so only _thread and threading care about the suspended/running distinction. There are quite a few different generator schedulers though, so the distinctions matters to more 3rd party code than it does for threads. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 03:28:54 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 29 Oct 2010 01:28:54 +0000 Subject: [issue10220] Make generator state easier to introspect In-Reply-To: <1288269773.83.0.431465195808.issue10220@psf.upfronthosting.co.za> Message-ID: <1288315734.08.0.00813245909041.issue10220@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 03:50:02 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 29 Oct 2010 01:50:02 +0000 Subject: [issue10223] socket.gethostname() fail In-Reply-To: <1288303989.88.0.633861339057.issue10223@psf.upfronthosting.co.za> Message-ID: <1288317002.23.0.994713642531.issue10223@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: rejected -> duplicate stage: -> committed/rejected superseder: -> socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 04:00:14 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 29 Oct 2010 02:00:14 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1280082784.57.0.628810673592.issue9377@psf.upfronthosting.co.za> Message-ID: <1288317614.35.0.801926353104.issue9377@psf.upfronthosting.co.za> R. David Murray added the comment: Looks like we have our first customer (issue 10223). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 04:00:58 2010 From: report at bugs.python.org (Anthony Long) Date: Fri, 29 Oct 2010 02:00:58 +0000 Subject: [issue8194] Incompatible API change in xmlrpclib.Transport.parse_response() of Python 2.7 and 3.2 In-Reply-To: <1269199462.82.0.615666977327.issue8194@psf.upfronthosting.co.za> Message-ID: <1288317658.2.0.287516789145.issue8194@psf.upfronthosting.co.za> Anthony Long added the comment: Patched my installation of python27 (via macports, snow leopard) and the patch was successful. Verified patch works in a limited capacity, using yolk. ---------- nosy: +antlong _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 04:15:21 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Oct 2010 02:15:21 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287000989.52.0.725529628819.issue10093@psf.upfronthosting.co.za> Message-ID: <1288318521.68.0.924960498775.issue10093@psf.upfronthosting.co.za> Brett Cannon added the comment: That's what I thought. So if socket.socket() alone is enough to consume an fd then there should be a warning. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 04:18:55 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 02:18:55 +0000 Subject: [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : As noted in issue 10224, python 3.x documentation is not being built with python 3.x yet, so a simple cd Doc; make doctest does not work. However, hg trunk version os sphinx works with python 3.x and can be used to validate examples in ReST documentation. ---------- assignee: belopolsky components: Documentation messages: 119840 nosy: belopolsky priority: normal severity: normal stage: needs patch status: open title: Fix doctest runable examples in python manual versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 04:19:06 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 02:19:06 +0000 Subject: [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1288318746.83.0.63634162426.issue10225@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- dependencies: +Build 3.x documentation using python3.x _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 04:20:50 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 29 Oct 2010 02:20:50 +0000 Subject: [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1288318850.73.0.312135010169.issue10225@psf.upfronthosting.co.za> ?ric Araujo added the comment: > hg trunk version [of] sphinx works with python 3.x and can be used to > validate examples in ReST documentation. How do you replace ?make doctest?? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 04:22:51 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 02:22:51 +0000 Subject: [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318850.73.0.312135010169.issue10225@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Thu, Oct 28, 2010 at 10:20 PM, ?ric Araujo wrote: > > How do you replace ?make doctest?? $ sphinx-build -b html -d Doc/build3/doctrees -D latex_paper_size= Doc Doc/build3/html but I had to run 2to3 on Doc/conf.py and Doc/tools first. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 04:25:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 29 Oct 2010 02:25:59 +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: <1288319159.59.0.220137573249.issue4032@psf.upfronthosting.co.za> ?ric Araujo added the comment: Okay, let?s reach a conclusion on the other bug before getting back to this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 04:32:45 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 29 Oct 2010 02:32:45 +0000 Subject: [issue10147] Python Documentation bugs In-Reply-To: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> Message-ID: <1288319565.5.0.62696760445.issue10147@psf.upfronthosting.co.za> ?ric Araujo added the comment: Marc-Andr?: I do recall it being a grammar rule. Take for example the difference between the compound noun ?a system call? and the compound noun used as adjective ?system-level? (in ?a system-level call?). Again, I?m not on a crusade here, just reacting on my gut feeling about a minor change. I can ask English professors if you want :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 04:33:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 29 Oct 2010 02:33:59 +0000 Subject: [issue10147] Python Documentation bugs In-Reply-To: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> Message-ID: <1288319639.29.0.143157797097.issue10147@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file19333/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 04:53:13 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 29 Oct 2010 02:53:13 +0000 Subject: [issue10191] scripts files are not RECORDed. In-Reply-To: <1288014947.33.0.874343051999.issue10191@psf.upfronthosting.co.za> Message-ID: <1288320793.47.0.735320874461.issue10191@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the report. This is indeed a bug with respect to PEP 376. It would be too difficult to modify shutil (and copy2) to make it return filenames, but thanks to the new copy_function hook it will be easy to store filenames in a list and use that. I?ll have to synchronize _backport.shutil with the 3.2 version first. ---------- assignee: tarek -> eric.araujo versions: +3rd party -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 05:30:12 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 29 Oct 2010 03:30:12 +0000 Subject: [issue10186] Invalid SyntaxError pointer offset In-Reply-To: <1287877325.31.0.208364473897.issue10186@psf.upfronthosting.co.za> Message-ID: <1288323012.14.0.027314821417.issue10186@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r85904 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 05:37:44 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 29 Oct 2010 03:37:44 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1288323464.15.0.224472743539.issue6011@psf.upfronthosting.co.za> ?ric Araujo added the comment: I can?t reliably reproduce it, but here you go: $ pwd /home/wok/python/3.2/sep-build-dir-?ric? $ ../configure --prefix $PWD [okay] $ make [snip gcc and ar] ranlib libpython3.2m.a gcc -pthread -Xlinker -export-dynamic -o python Modules/python.o libpython3.2m.a -lpthread -ldl -lutil -lm Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Fatal Python error: Py_Initialize: Unable to get the locale encoding SystemError: NULL result without error in PyObject_Call Aborted make: *** [sharedmods] Error 134 Setting PYTHONHOME to ., .:., $PWD or $PWD:$PWD did not help. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 05:39:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 29 Oct 2010 03:39:06 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1242212510.55.0.349129306137.issue6011@psf.upfronthosting.co.za> Message-ID: <1288323546.96.0.499338589016.issue6011@psf.upfronthosting.co.za> ?ric Araujo added the comment: Of course, first export LANG and LC_ALL to C. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 05:48:56 2010 From: report at bugs.python.org (Manfred Bartz) Date: Fri, 29 Oct 2010 03:48:56 +0000 Subject: [issue10217] python-2.7.amd64.msi install fails In-Reply-To: <1288234706.92.0.436900381953.issue10217@psf.upfronthosting.co.za> Message-ID: <1288324136.62.0.0855565314627.issue10217@psf.upfronthosting.co.za> Manfred Bartz added the comment: I ran the install from the command line with: msiexec /i python-2.7.amd64.msi /l*v python.log compresed log attached. The install completed without error dialogs and a superficial test suggests that I have a working python-2.7-64 installation. ---------- Added file: http://bugs.python.org/file19408/pythonInstallLog.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 06:06:16 2010 From: report at bugs.python.org (Manfred Bartz) Date: Fri, 29 Oct 2010 04:06:16 +0000 Subject: [issue10217] python-2.7.amd64.msi install fails In-Reply-To: <1288234706.92.0.436900381953.issue10217@psf.upfronthosting.co.za> Message-ID: <1288325176.0.0.245150288192.issue10217@psf.upfronthosting.co.za> Manfred Bartz added the comment: I uninstalled python and then re-installed it using the same procedure which caused the original problem. This time the install succeeded without any problems. The only explanation I can think of is that either the temporary 32-bit install or the command-line install caused a file to be installed which was missing before. I will try this again on Monday in a virgin Win7-64 VM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 06:07:13 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 04:07:13 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288325233.7.0.847599039572.issue10224@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Incremental build was not that successful. After editing Doc/faq/programming.rst, I get the following in the error log: # Sphinx version: 1.1pre # Python version: 3.2a3+.0 # Docutils version: 0.7 release # Jinja2 version: 2.5.5 Traceback (most recent call last): File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/cmdline.py", line 173, in main app.build(force_all, filenames) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/application.py", line 203, in build self.builder.build_update() File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/builders/__init__.py", line 193, in build_update 'out of date' % len(to_build)) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/builders/__init__.py", line 249, in build self.write(docnames, list(updated_docnames), method) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/builders/__init__.py", line 279, in write self.prepare_writing(docnames) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/builders/html.py", line 231, in prepare_writing self.load_indexer(docnames) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/builders/html.py", line 619, in load_indexer self.indexer.load(f, self.indexer_format) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/search.py", line 131, in load frozen = format.load(stream) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/search.py", line 64, in load return self.loads(f.read()) File "/Users/sasha/Apps/lib/python3.2/site-packages/Sphinx-1.1predev_20101028-py3.2.egg/sphinx/search.py", line 55, in loads if not data or not s.startswith(self.PREFIX) or not \ TypeError: expected an object with the buffer interface ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 06:51:31 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 04:51:31 +0000 Subject: [issue10147] Python Documentation bugs In-Reply-To: <1287515992.96.0.884562024831.issue10147@psf.upfronthosting.co.za> Message-ID: <1288327891.17.0.649718399012.issue10147@psf.upfronthosting.co.za> Georg Brandl added the comment: I can only repeat myself and point to . ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 06:54:30 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 04:54:30 +0000 Subject: [issue10222] 3.2 on AIX - Unexpected text ',' encountered. In-Reply-To: <1288295054.95.0.251729908149.issue10222@psf.upfronthosting.co.za> Message-ID: <1288328070.52.0.716068963045.issue10222@psf.upfronthosting.co.za> Georg Brandl added the comment: Fixed in r85907. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 07:20:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 05:20:02 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288329602.16.0.115594874287.issue10224@psf.upfronthosting.co.za> Georg Brandl added the comment: I fixed that bug in Sphinx rev 49747f5b0c70 (which I will push as soon as bitbucket is up again); incremental build now works for me. ---------- versions: +Python 3.3 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 07:26:06 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 05:26:06 +0000 Subject: [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> New submission from Alexander Belopolsky : The following example in Doc/library/urlparse.rst is wrong >>> urlparse('www.cwi.nl:80/%7Eguido/Python.html') ParseResult(scheme='', netloc='', path='www.cwi.nl:80/%7Eguido/Python.html', params='', query='', fragment='') In the actual output, scheme='www.cwi.nl'. In addition, the preceding text is confusing and probably not grammatical: """ Otherwise, it is not possible to distinguish between netloc and path components, and would the indistinguishable component would be classified as the path as in a relative URL. """ Discovered while working on issue 10225. ---------- assignee: docs at python components: Documentation messages: 119855 nosy: belopolsky, docs at python priority: normal severity: normal status: open title: urlparse example is wrong versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 07:31:27 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 05:31:27 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288330287.09.0.876213805364.issue10224@psf.upfronthosting.co.za> Georg Brandl added the comment: In r85910, I ported the Python-specific modules in tools/ so that they don't need to be 2to3-converted. Now you can basically easy_install Sphinx on 3.1 and run its sphinx-build without touching the Doc/ tree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 07:32:19 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 05:32:19 +0000 Subject: [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1288330339.92.0.63285237693.issue10226@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: docs at python -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 07:51:25 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 05:51:25 +0000 Subject: [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1288331485.96.0.298263716884.issue10226@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Looks like I've been beaten again by make doctest picking up older python, but something is not right here: In Python 2.6.5: >>> urlparse('www.cwi.nl:80/%7Eguido/Python.html') ParseResult(scheme='www.cwi.nl', netloc='', path='80/%7Eguido/Python.html', params='', query='', fragment='') but in 2.7: >>> urlparse('www.cwi.nl:80/%7Eguido/Python.html') ParseResult(scheme='', netloc='', path='www.cwi.nl:80/%7Eguido/Python.html', params='', query='', fragment='') and the text preceding the example in the doc does not really tell which is right. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 08:01:48 2010 From: report at bugs.python.org (Ronald Oussoren) Date: Fri, 29 Oct 2010 06:01:48 +0000 Subject: [issue10209] Mac OS X: Decompose filenames on encode, and precompose filenames on decode In-Reply-To: <1288139796.38.0.381630346424.issue10209@psf.upfronthosting.co.za> Message-ID: <1288332108.99.0.957844597454.issue10209@psf.upfronthosting.co.za> Ronald Oussoren added the comment: For completeness sake: Apple's Cocoa APIs do not renormalize strings, that is: I've created a file named '??n' in the Terminal, then (using a python 3.2 build): # Terminal input seems NFC: >>> len('??n') 3 # Output from os.listdir isn't: >>> os.listdir('.') ['??n'] >>> len(_[0]) 5 # Output from the Cocoa equivalant also isn't: >>> import Foundation >>> mgr = Foundation.NSFileManager.defaultManager() >>> mgr.directoryContentsAtPath_('.') ( "e\U0301e\U0301n" ) >>> len(_[0]) 5 BTW. fsdecode(fsencode(x)) cannot in general be a no-op, unicode normalizations can screw things up (with the now withdrawn proposal the expression wouldn't be a no-op for NFD strings). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 08:15:07 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 06:15:07 +0000 Subject: [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1288332907.9.0.835031469356.issue10226@psf.upfronthosting.co.za> Georg Brandl added the comment: I think this is correct: it is the new behavior after the fix for #754016 was committed. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 08:28:26 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 06:28:26 +0000 Subject: [issue10198] wave module writes corrupt wav file for zero-length writeframes In-Reply-To: <1288107337.09.0.986719080657.issue10198@psf.upfronthosting.co.za> Message-ID: <1288333706.13.0.354845845212.issue10198@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r85914. ---------- nosy: +georg.brandl resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 08:40:30 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 29 Oct 2010 06:40:30 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288334430.35.0.313222344826.issue10224@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Did you know break building the 3.x documentation with Python 2? If so, please revert that change. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 08:54:32 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 06:54:32 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288335272.44.0.889723895773.issue6715@psf.upfronthosting.co.za> Georg Brandl added the comment: After applying the patch, it builds fine here and the test suite passes. However, it seems to leak quite a bit -- if I run regrtest with -R::, my system starts swapping heavily after the second run. In lzmamodule, there are lots of API calls that aren't error-checked, e.g. PyDict_SetItemString(filter, "dict_size", PyLong_FromLong((long)lzma_options.dict_size)); General comments: please don't introduce tabs and trailing whitespace in C and Python files, and wrap your lines at 79 characters whenever possible. reST function/class directives need a blank line after the signature. (But don't worry about the markup too much, I'll review the new file anyway after commit.) @pitrou: Why is this marked "Python 3.3"? If the error handling in the C module is corrected, it's in a good enough shape to be committed before 3.2b1, and the remaining bugs ironed out until final. ---------- nosy: +georg.brandl versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 08:55:36 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 06:55:36 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288335336.84.0.712847798586.issue10224@psf.upfronthosting.co.za> Georg Brandl added the comment: Nope, these files run just as fine in Python 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 08:56:26 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 06:56:26 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288335386.25.0.413396397624.issue10224@psf.upfronthosting.co.za> Georg Brandl added the comment: (The usual build process via Makefile still uses Python 2, and that won't change for 3.2.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 09:00:39 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 07:00:39 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1288335272.44.0.889723895773.issue6715@psf.upfronthosting.co.za> Message-ID: <1288335633.3565.11.camel@localhost.localdomain> Antoine Pitrou added the comment: > @pitrou: Why is this marked "Python 3.3"? If the error handling in > the C module is corrected, it's in a good enough shape to be committed > before 3.2b1, and the remaining bugs ironed out until final. I think it needs a real review before going in. Now if that review can get done and the issues fixed before the beta, it's ok. By a quick look at the code it seemed to need quite a bit of polish before being acceptable for commit, but I might be mistaken. (we should also avoid the multiprocessing syndrome where we rushed some alpha-quality code just before the feature deadline and then had to fix many issues in urgency. I do believe xz/lzma support is important in the long term, though) Oh, by the way, Per should agree to do maintenance directly against the CPython repository. Please, no more externally-maintained modules (you know what I'm talking about). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 09:04:26 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 07:04:26 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288335866.92.0.648011864908.issue6715@psf.upfronthosting.co.za> Georg Brandl added the comment: Yes, definitely no externally maintained modules. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 09:05:15 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 07:05:15 +0000 Subject: [issue10226] urlparse example is wrong In-Reply-To: <1288332907.9.0.835031469356.issue10226@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Fri, Oct 29, 2010 at 2:15 AM, Georg Brandl wrote: .. > I think this is correct: it is the new behavior after the fix for #754016 was committed. > I agree. I kept the issue open because I cannot parse """ Otherwise, it is not possible to distinguish between netloc and path components, and would the indistinguishable component would be classified as the path as in a relative URL. """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 09:06:13 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 07:06:13 +0000 Subject: [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1288335973.37.0.470788636865.issue10226@psf.upfronthosting.co.za> Georg Brandl added the comment: That's for Senthil to rephrase as intended :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 09:19:07 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 07:19:07 +0000 Subject: [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1288336747.07.0.653423504362.issue10225@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I started with 2.7 branch because some of the issues are the same there, but the tools work better at the moment. I a posting a work-in-progress patch to solicit early feedback. ---------- versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 09:49:47 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 07:49:47 +0000 Subject: [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1288338587.73.0.0698978406246.issue10225@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- keywords: +patch Added file: http://bugs.python.org/file19409/issue10225-r27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 09:50:32 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 07:50:32 +0000 Subject: [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1288338632.62.0.0214168152513.issue10225@psf.upfronthosting.co.za> Changes by Alexander Belopolsky : ---------- nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 10:07:36 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 29 Oct 2010 08:07:36 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287785853.06.0.999498237481.issue10093@psf.upfronthosting.co.za> Message-ID: <4CCA80C3.5080605@egenix.com> Marc-Andre Lemburg added the comment: Brett Cannon wrote: > > Brett Cannon added the comment: > > But this is meant to be an optional warning; users will never see it. Me as a developer, I would like to know when I leave a file open as that is a waste of resources, plus with no guarantee of everything being flushed to disk. That's what I'm referring to: most Python applications are written with the fact in mind, that garbage collection will close the files or socket. That's a perfectly fine way of writing Python applications, so why should the programmer get warned about this regular approach to Python programming ? > Besides, the context manager for files makes the chance of leaving a file open a much more blaring mistake. See above: context aren't required for working with files. And again: it's *not* a mistake to not explicitly close a file. The same applies for sockets. Think of the simple idiom: data = open(filename).read() This would always create a warning under the proposal. Same for: for line in open(filename): print line Also note that files and sockets can be kept as references in data structures (other than local variables or on the stack) and there you usually have the same approach: you expect Python to close the files when garbage collecting the data structures and that's perfectly ok. If you want to monitor resource usage in your application it would be a lot more useful to provide access to the number of currently open FDs, than scattering warnings around the application which mostly trigger false positives. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 10:22:36 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 08:22:36 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <4CCA80C3.5080605@egenix.com> Message-ID: <1288340552.3565.17.camel@localhost.localdomain> Antoine Pitrou added the comment: > That's what I'm referring to: most Python applications are > written with the fact in mind, that garbage collection will > close the files or socket. > > That's a perfectly fine way of writing Python applications, Some people would disagree, especially Windows users who cannot timely delete files when some file descriptors still point to them. > so why should the programmer get warned about this regular > approach to Python programming ? Again: it is an *optional* warning. It is *disabled* by default, except when compiled --with-pydebug. > The same applies for sockets. It is *definitely* a mistake if the socket has been bound to a local address and/or connected to a remote endpoint. > Think of the simple idiom: > > data = open(filename).read() > > This would always create a warning under the proposal. We have had many Windows buildbot failures because of such coding style. > If you want to monitor resource usage in your application it > would be a lot more useful to provide access to the number of > currently open FDs Agreed it would be useful as well, but please tell that to operating system vendors. Python has no way to calculate such a statistic. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 10:50:29 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 29 Oct 2010 08:50:29 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : In a recent email exchange on python-dev, Antoine Pitrou mentioned that slicing memoryview objects (lazy slices) wasn't necessarily very efficient when dealing with short slices. The data he posted was: $ ./python -m timeit -s "x = b'x'*10000" "x[:100]" 10000000 loops, best of 3: 0.134 usec per loop $ ./python -m timeit -s "x = memoryview(b'x'*10000)" "x[:100]" 10000000 loops, best of 3: 0.151 usec per loop Actually, this is not a fair comparison. A more realistic alternative to the memoryview is the bytearray, a mutable buffer. My local tests gave these numbers: python.exe -m timeit -n 10000000 -s "x = ((b'x'*10000))" "x[:100]" 10000000 loops, best of 3: 0.14 usec per loop python.exe -m timeit -n 10000000 -s "x = (bytearray(b'x'*10000))" "x[:100]" 10000000 loops, best of 3: 0.215 usec per loop python.exe -m timeit -n 10000000 -s "x = memoryview(bytearray(b'x'*10000))" "x[:100]" 10000000 loops, best of 3: 0.163 usec per loop In this case, lazy slicing is indeed faster than greedy slicing. However, I was intrigued by how much these cases differ. Why was slicing bytes objects so much faster? Each should just result in the generation of a single object. It turns out that the slicing operation for strings (and sequences is very streamlined in the core. To address this to some extent I provide a patch with three main components: 1) There is now a single object cache of slice objects. These are generated by the core when slicing and immediately released. Reusing them if possible is very beneficial. 2) The PySlice_GetIndicesEx couldn't be optimized because of aliasing. Fixing that function sped it up considerably. 3) Creating a new api to create a memory view from a base memory view and a slice is much faster. The old way would do two copies of a Py_buffer with adverse effects on cache performance. Applying this patch provides the following figures: python.exe -m timeit -n 10000000 -s "x = ((b'x'*10000))" "x[:100]" 10000000 loops, best of 3: 0.125 usec per loop python.exe -m timeit -n 10000000 -s "x = (bytearray(b'x'*10000))" "x[:100]" 10000000 loops, best of 3: 0.202 usec per loop python.exe -m timeit -n 10000000 -s "x = memoryview(bytearray(b'x'*10000))" "x[:100]" 10000000 loops, best of 3: 0.138 usec per loop in memoryobject.c there was a comment stating that there should be an API for this. Now there is, only internal. ---------- components: Interpreter Core keywords: needs review, patch messages: 119872 nosy: krisvale, pitrou priority: normal severity: normal status: open title: Improve performance of MemoryView slicing type: performance versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 10:56:06 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 29 Oct 2010 08:56:06 +0000 Subject: [issue10226] urlparse example is wrong In-Reply-To: <1288335973.37.0.470788636865.issue10226@psf.upfronthosting.co.za> Message-ID: Senthil Kumaran added the comment: - Otherwise, it is not possible to distinguish between netloc and path - components, and would the indistinguishable component would be classified - as the path as in a relative URL. + If the netloc does not start with '//', the module cannot distinguish it + from path and it would classify it as path component in the relative url. How does this sound? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 11:14:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 09:14:31 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1288343671.68.0.765514046082.issue10227@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You forgot to attach your patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 11:50:32 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 29 Oct 2010 09:50:32 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1288345832.65.0.0164936082053.issue10227@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Oh dear. Here it is. ---------- Added file: http://bugs.python.org/file19410/memoryobj.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 12:04:37 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 29 Oct 2010 10:04:37 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1288346677.39.0.539861852647.issue10227@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: But then, perhaps implementing the sequence protocol for memoryviews might be more efficient still. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 12:11:52 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 10:11:52 +0000 Subject: [issue10228] Refleak run of test_dbm fails when several dbm modules are available In-Reply-To: <1288347112.92.0.717435942769.issue10228@psf.upfronthosting.co.za> Message-ID: <1288347112.92.0.717435942769.issue10228@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This is only when several dbm modules are compiled in (e.g. "gnu" and "dumb"): $ ./python -m test.regrtest -R 3:2 test_dbm [1/1] test_dbm beginning 5 repetitions 12345 test test_dbm failed -- Traceback (most recent call last): File "/home/antoine/py3k/deallocwarn/Lib/test/test_dbm.py", line 129, in test_whichdb self.assertEqual(name, dbm.whichdb(_fname)) AssertionError: 'dbm.gnu' != 'dbm.dumb' - dbm.gnu + dbm.dumb ---------- components: Tests messages: 119877 nosy: pitrou priority: normal severity: normal stage: needs patch status: open title: Refleak run of test_dbm fails when several dbm modules are available type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 12:12:52 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 10:12:52 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1288347172.82.0.109054149323.issue10227@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The sequence protocol (if I'm not confused) only work with a PyObject ** array. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 12:15:12 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 10:15:12 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287000989.52.0.725529628819.issue10093@psf.upfronthosting.co.za> Message-ID: <1288347312.93.0.656648238619.issue10093@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is an updated patch (also fixes a small refleak). ---------- Added file: http://bugs.python.org/file19411/deallocwarn4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 12:20:07 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 29 Oct 2010 10:20:07 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1288347607.17.0.721962967677.issue10227@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: As an additional point: the PyMemoryObject has a "base" member that I think is redundant. the "view.obj" should be sufficient. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 12:23:53 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 10:23:53 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288347607.17.0.721962967677.issue10227@psf.upfronthosting.co.za> Message-ID: <1288347829.3565.51.camel@localhost.localdomain> Antoine Pitrou added the comment: > As an additional point: the PyMemoryObject has a "base" member that I > think is redundant. the "view.obj" should be sufficient. Yes, that's what I think as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 12:31:34 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 10:31:34 +0000 Subject: [issue10229] Refleak run of test_gettext fails In-Reply-To: <1288348294.62.0.0907397506052.issue10229@psf.upfronthosting.co.za> Message-ID: <1288348294.62.0.0907397506052.issue10229@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This is probably caused by r85223. $ ./python -m test.regrtest -R 3:2 test_gettext [1/1] test_gettext beginning 5 repetitions 12345 test test_gettext failed -- Traceback (most recent call last): File "/home/antoine/py3k/deallocwarn/Lib/test/test_gettext.py", line 348, in test_cache self.assertEqual(len(gettext._translations), 0) AssertionError: 2 != 0 1 test failed: test_gettext ---------- assignee: eric.araujo components: Tests messages: 119882 nosy: eric.araujo, pitrou priority: normal severity: normal stage: needs patch status: open title: Refleak run of test_gettext fails type: resource usage versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 12:39:15 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 10:39:15 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287000989.52.0.725529628819.issue10093@psf.upfronthosting.co.za> Message-ID: <1288348755.87.0.538383500771.issue10093@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've committed the patch in r85920; let's watch the buildbots. Also, you'll see many warnings in the test suite if compiled --with-pydebug. ---------- resolution: -> fixed stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 12:48:38 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 29 Oct 2010 10:48:38 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1288349318.74.0.841355382384.issue10227@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: In 2.x, strings are sliced using PySequence_GetSlice(). ceval.c in 3.0 is different, there is no apply_slice there (despite comments to that effect). I'd have to take another look with the profiler to figure out how bytes slicing in 3.0 works, but I suspect that it is somehow fasttracked passed the creation of slice objects, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 12:50:44 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 10:50:44 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288349318.74.0.841355382384.issue10227@psf.upfronthosting.co.za> Message-ID: <1288349440.3565.52.camel@localhost.localdomain> Antoine Pitrou added the comment: > I'd have to take another look with the profiler to figure out how > bytes slicing in 3.0 works, but I suspect that it is somehow > fasttracked passed the creation of slice objects, etc. I don't think it is fasttracked at all. Even plain indexing is not fasttracked either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 12:57:24 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 29 Oct 2010 10:57:24 +0000 Subject: [issue10227] Improve performance of MemoryView slicing In-Reply-To: <1288342228.97.0.170566139041.issue10227@psf.upfronthosting.co.za> Message-ID: <1288349844.34.0.233496761748.issue10227@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Well then, its back to the profiler for 3.2. I did all of the profiling with 2.7 for practical reasons (it was the only version I had available at the time) and then ported the change to 3.2 today. But obviously there are different rules in 3.2 :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 13:11:34 2010 From: report at bugs.python.org (Jacques Grove) Date: Fri, 29 Oct 2010 11:11:34 +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: <1288350694.14.0.76473383047.issue2636@psf.upfronthosting.co.za> Jacques Grove added the comment: Do we expect this to work on 64 bit Linux and python 2.6.5? I've compiled and run some of my code through this, and there seems to be issues with non-greedy quantifier matching (at least relative to the old re module): $ cat test.py import re, regex text = "(MY TEST)" regexp = '\((?P.{0,5}?TEST)\)' print re.findall(regexp, text) print regex.findall(regexp, text) $ python test.py ['MY TEST'] [] python 2.7 produces the same results for me. However, making the quantifier greedy (removing the '?') gives the same result for both re and regex modules. ---------- nosy: +jacques _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 13:18:36 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 29 Oct 2010 11:18:36 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1288340552.3565.17.camel@localhost.localdomain> Message-ID: <4CCAAD88.8090705@egenix.com> Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> That's what I'm referring to: most Python applications are >> written with the fact in mind, that garbage collection will >> close the files or socket. >> >> That's a perfectly fine way of writing Python applications, > > Some people would disagree, especially Windows users who cannot timely > delete files when some file descriptors still point to them. There is no difference here: Whether you write an application with automatic closing of the file/socket at garbage collection time in mind, or you explicitly close the file/socket, the timing is the same. The only difference is with Python implementations that don't use synchronous garbage collection, e.g. Jython, but not with CPython. >> so why should the programmer get warned about this regular >> approach to Python programming ? > > Again: it is an *optional* warning. It is *disabled* by default, except > when compiled --with-pydebug. Yes, I know. I still find the warning rather useless, since it warns about code that's perfectly ok. >> The same applies for sockets. > > It is *definitely* a mistake if the socket has been bound to a local > address and/or connected to a remote endpoint. I don't follow you. Where's the difference between writing: s.close() or s = None for an open socket s ? >> Think of the simple idiom: >> >> data = open(filename).read() >> >> This would always create a warning under the proposal. > > We have had many Windows buildbot failures because of such coding style. Again: where's the difference between writing: data = open(filename).read() and f = open(filename) data = f.read() f.close() ? If the above coding style causes problems, the reasons must be elsewhere, since there is no difference between those two styles (other than cluttering up your locals). The for-loop file iterator support was explicitly added to make writing: for line in open(filename): print line possible. >> If you want to monitor resource usage in your application it >> would be a lot more useful to provide access to the number of >> currently open FDs > > Agreed it would be useful as well, but please tell that to operating > system vendors. Python has no way to calculate such a statistic. At least for Linux, that's not hard and I doubt it is for other OSes. 4 On other Unixes, you can simply use fcntl() to scan all possible FDs for open FDs. On Windows you can use one of these functions for the same effect: http://msdn.microsoft.com/en-us/library/kdfaxaay(v=VS.90).aspx ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 13:52:38 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 11:52:38 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <4CCAAD88.8090705@egenix.com> Message-ID: <1288353153.3565.66.camel@localhost.localdomain> Antoine Pitrou added the comment: > Whether you write an application with automatic closing of > the file/socket at garbage collection time in mind, or you explicitly > close the file/socket, the timing is the same. No, because objects can be kept alive through tracebacks (or reference cycles). > I don't follow you. Where's the difference between writing: > > s.close() > or > s = None > > for an open socket s ? The difference is when s is still referenced elsewhere. Also, the intent of the former is clear while the latter is deliberately obscure (while not saving any significant amount of typing). > The for-loop file iterator support was explicitly added to make > writing: > > for line in open(filename): > print line > > possible. So what? > At least for Linux, that's not hard and I doubt it is for other OSes. > > 4 > > On other Unixes, you can simply use fcntl() to scan all possible FDs > for open FDs. > > On Windows you can use one of these functions for the same effect: > http://msdn.microsoft.com/en-us/library/kdfaxaay(v=VS.90).aspx Until you post some code I won't understand what you are talking about. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 14:08:21 2010 From: report at bugs.python.org (STINNER Victor) Date: Fri, 29 Oct 2010 12:08:21 +0000 Subject: [issue10230] test_tarfile failure (test_extractall) on AMD64 debian parallel 3.x: os.utime(float) issue In-Reply-To: <1288354101.14.0.267054038013.issue10230@psf.upfronthosting.co.za> Message-ID: <1288354101.14.0.267054038013.issue10230@psf.upfronthosting.co.za> New submission from STINNER Victor : test_tarfile in only failing on one 3.x buildbot: AMD64 debian parallel 3.x. The problem is related to the mtime field and os.utime(): http://www.python.org/dev/buildbot/builders/AMD64 debian parallel 3.x/builds/508/steps/test/logs/stdio ====================================================================== FAIL: test_extractall (test.test_tarfile.MiscReadTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/autofs/net/homedir/home/martin.vonloewis/buildarea/3.x.loewis-parallel2/build/Lib/test/test_tarfile.py", line 358, in test_extractall self.assertEqual(tarinfo.mtime, file_mtime, errmsg) AssertionError: tar mtime 1041808783 (int) != file time 1041808783.000001 (0x1.f0c5ec7800008p+29) of path '/var/autofs/net/homedir/home/martin.vonloewis/buildarea/3.x.loewis-parallel2/build/build/test_python_23882/@test_23882_tmp-tardir/ustar/dirtype' ====================================================================== FAIL: test_extractall (test.test_tarfile.GzipMiscReadTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/autofs/net/homedir/home/martin.vonloewis/buildarea/3.x.loewis-parallel2/build/Lib/test/test_tarfile.py", line 358, in test_extractall self.assertEqual(tarinfo.mtime, file_mtime, errmsg) AssertionError: tar mtime 1041808783 (int) != file time 1041808783.000003 (0x1.f0c5ec7800019p+29) of path '/var/autofs/net/homedir/home/martin.vonloewis/buildarea/3.x.loewis-parallel2/build/build/test_python_23882/@test_23882_tmp-tardir/ustar/dirtype' ====================================================================== FAIL: test_extractall (test.test_tarfile.Bz2MiscReadTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/var/autofs/net/homedir/home/martin.vonloewis/buildarea/3.x.loewis-parallel2/build/Lib/test/test_tarfile.py", line 358, in test_extractall self.assertEqual(tarinfo.mtime, file_mtime, errmsg) AssertionError: tar mtime 1041808783 (int) != file time 1041808783.000005 (0x1.f0c5ec780002ap+29) of path '/var/autofs/net/homedir/home/martin.vonloewis/buildarea/3.x.loewis-parallel2/build/build/test_python_23882/@test_23882_tmp-tardir/ustar/dirtype' ---------------------------------------------------------------------- (I patched test_extractall to dump mtime values as hexadecimal for floats) Binary dump os this "ustar/dirtype" entry: 15360) file[2]: Tar File (ustar/dirtype/: Directory, 0 bytes) (512 bytes) 0) name= "ustar/dirtype/": Name (100 bytes) 100) mode= "0000755": Mode (8 bytes) 108) uid= "0001750": User ID (8 bytes) 116) gid= "0000144": Group ID (8 bytes) 124) size= "00000000000": Size (12 bytes) 136) mtime= "07606136617": Modification time (12 bytes) 148) check_sum= "015042": Check sum (8 bytes) 156) type= Directory: Type (1 byte) 157) lname= (empty): Link name (100 bytes) 257) magic= "ustar\x0000": Magic (8 bytes) 265) uname= "tarfile": User name (32 bytes) 297) gname= "tarfile": Group name (32 bytes) 329) devmajor= "0000000": Dev major (8 bytes) 337) devminor= "0000000": Dev minor (8 bytes) 345) padding= : Padding (zero) (167 bytes) So this directory has no PAX extra headers, only classical headers, and mtime is 0o7606136617 (1041808783). os.utime() gets an integer with exact value 1041808783, but then os.stat() gives st_mtime: - 1041808783.000001 (0x1.f0c5ec7800008p+29) - 1041808783.000003 (0x1.f0c5ec7800019p+29) - 1041808783.000005 (0x1.f0c5ec780002ap+29) To set file time, os.utime() has 4 implementations: - SetFileTime() for Windows - utimes() using struct timeval - utime() using time_t - utime() using struct utimbuf I don't know which one is used (except that it is not supposed to be a Windows host :-)). ---------- components: Library (Lib), Tests keywords: buildbot messages: 119890 nosy: haypo, loewis priority: normal severity: normal status: open title: test_tarfile failure (test_extractall) on AMD64 debian parallel 3.x: os.utime(float) issue versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 14:18:00 2010 From: report at bugs.python.org (Baptiste Carvello) Date: Fri, 29 Oct 2010 12:18:00 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <1288323546.96.0.499338589016.issue6011@psf.upfronthosting.co.za> Message-ID: <4CCABB59.9090506@free.fr> Baptiste Carvello added the comment: Hello, I can reproduce the exact same error as ?ric. The end of the output is a little bit more informative here: Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Fatal Python error: Py_Initialize: Unable to get the locale encoding SystemError: NULL result without error in PyObject_Call /bin/sh: line 1: 13513 Aborted CC='gcc -pthread' LDSHARED='gcc -pthread -shared ' OPT='-DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes' ./python -E ./setup.py build make: *** [sharedmods] Error 134 I only kept the part of the log that is output if I rerun "make". The number 13513 must be a PID number. It is not stable across invocations. Running just "./python -E ./setup.py build", or just "./python setup.py build" does also abort with Could not find platform dependent libraries Consider setting $PYTHONHOME to [:] Fatal Python error: Py_Initialize: Unable to get the locale encoding SystemError: NULL result without error in PyObject_Call Aborted The instructions to reproduce, used in my home directory (which has a ASCII path), are: svn co http://svn.python.org/projects/python/branches/py3k cd py3k/ export LC_ALL=C export LANG=C ./configure --prefix=/home/baptiste/Desktop/T?l?chargements/PyInstall make make ./python -E ./setup.py build ./python setup.py build The svn revision pulled was 85926. Hope this helps, Baptiste ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 14:26:06 2010 From: report at bugs.python.org (Piotr Matuszewski) Date: Fri, 29 Oct 2010 12:26:06 +0000 Subject: [issue10208] add mazovia.py to encodings/ In-Reply-To: <1288137946.29.0.185771065626.issue10208@psf.upfronthosting.co.za> Message-ID: <1288355166.06.0.374356584406.issue10208@psf.upfronthosting.co.za> Piotr Matuszewski added the comment: it's still used by some business in Poland, who have DOS based systems, but I don't think any new deployments are using it ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 14:30:25 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 29 Oct 2010 12:30:25 +0000 Subject: [issue10230] test_tarfile failure (test_extractall) on AMD64 debian parallel 3.x: os.utime(float) issue In-Reply-To: <1288354101.14.0.267054038013.issue10230@psf.upfronthosting.co.za> Message-ID: <1288355425.15.0.572576391771.issue10230@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is a duplicate of http://bugs.python.org/issue10184 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 14:52:28 2010 From: report at bugs.python.org (Baptiste Carvello) Date: Fri, 29 Oct 2010 12:52:28 +0000 Subject: [issue6011] python doesn't build if prefix contains non-ascii characters In-Reply-To: <4CCABB59.9090506@free.fr> Message-ID: <4CCAC36E.1040904@free.fr> Baptiste Carvello added the comment: A little bit more information: the error message comes from Python/pythonrun.c, line 736, in function initfsencoding. This part of the code is protected with a preprocessor #if: #if defined(HAVE_LANGINFO_H) && defined(CODESET) so I tried replacing that with #if 0. However, the function then fails on line 750. The comment on line 749 states: /* Such error can only occurs in critical situations: no more * memory, import a module of the standard library failed, * etc. */ It looks like it is not the case, and that Py_FileSystemDefaultEncoding has no reasonable default when "python" is called from the build directory with the "C" locale. For the record, when running the system "python" with the "C" locale, the filesystemencoding is gets set to 'ANSI_X3.4-1968'. Last thing, in case it is of any use, all my testing is done on an amd64 Debian stable system. Cheers, Baptiste ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 14:55:50 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 29 Oct 2010 12:55:50 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1288353153.3565.66.camel@localhost.localdomain> Message-ID: <4CCAC451.9030703@egenix.com> Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> Whether you write an application with automatic closing of >> the file/socket at garbage collection time in mind, or you explicitly >> close the file/socket, the timing is the same. > > No, because objects can be kept alive through tracebacks (or reference > cycles). If you get a traceback, the explicitly file.close() won't help you either; but that usually doesn't matter, since program execution will stop, the traceback will get GCed and the file closed. This is a very normal and reasonable expectation of a Python programmer. >> I don't follow you. Where's the difference between writing: >> >> s.close() >> or >> s = None >> >> for an open socket s ? > > The difference is when s is still referenced elsewhere. > Also, the intent of the former is clear while the latter is deliberately > obscure (while not saving any significant amount of typing). Sure, but that's not the point. It is not a mistake to write such code and neither is this obscure, otherwise we'd also require explicit garbage collection for other parts of Python. If the application keeps references to the objects in other places, the programmer would, of course, add an explicit .close(). Ditto for the files. >> The for-loop file iterator support was explicitly added to make >> writing: >> >> for line in open(filename): >> print line >> >> possible. > > So what? The warning will trigger without any reason. >> At least for Linux, that's not hard and I doubt it is for other OSes. >> >> 4 >> >> On other Unixes, you can simply use fcntl() to scan all possible FDs >> for open FDs. >> >> On Windows you can use one of these functions for the same effect: >> http://msdn.microsoft.com/en-us/library/kdfaxaay(v=VS.90).aspx > > Until you post some code I won't understand what you are talking about. RoundUp's email interface ate the code. I'll post it again via the web interface. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 14:57:53 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 29 Oct 2010 12:57:53 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287000989.52.0.725529628819.issue10093@psf.upfronthosting.co.za> Message-ID: <1288357073.39.0.880406714911.issue10093@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Reposted via the web interface: >> If you want to monitor resource usage in your application it >> would be a lot more useful to provide access to the number of >> currently open FDs > Agreed it would be useful as well, but please tell that to operating > system vendors. Python has no way to calculate such a statistic. At least for Linux, that's not hard and I doubt it is for other OSes. >>> import os >>> nfds = len(os.listdir('/proc/%i/fd' % os.getpid())) >>> print nfds 4 On other Unixes, you can simply use fcntl() to scan all possible FDs for open FDs. On Windows you can use one of these functions for the same effect: http://msdn.microsoft.com/en-us/library/kdfaxaay(v=VS.90).aspx ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 14:59:47 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 29 Oct 2010 12:59:47 +0000 Subject: [issue10208] add mazovia.py to encodings/ In-Reply-To: <1288355166.06.0.374356584406.issue10208@psf.upfronthosting.co.za> Message-ID: <4CCAC540.1070304@egenix.com> Marc-Andre Lemburg added the comment: Piotr Matuszewski wrote: > > Piotr Matuszewski added the comment: > > it's still used by some business in Poland, who have DOS based systems, but I don't think any new deployments are using it Then I think it's better maintained outside the stdlib. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 15:00:27 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 29 Oct 2010 13:00:27 +0000 Subject: [issue10208] add mazovia.py to encodings/ In-Reply-To: <1288137946.29.0.185771065626.issue10208@psf.upfronthosting.co.za> Message-ID: <1288357227.99.0.754886252456.issue10208@psf.upfronthosting.co.za> Changes by Marc-Andre Lemburg : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 15:07:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 13:07:01 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <4CCAC451.9030703@egenix.com> Message-ID: <1288357616.3565.76.camel@localhost.localdomain> Antoine Pitrou added the comment: > The warning will trigger without any reason. Well, by now you should have understood the reason, so I conclude that you are either 1) deaf 2) stupid 3) deliberately obnoxious. This is my last answer to you on this topic. Goodbye. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 15:10:35 2010 From: report at bugs.python.org (Hallvard B Furuseth) Date: Fri, 29 Oct 2010 13:10:35 +0000 Subject: [issue10231] SimpleHTTPRequestHandler directory bugs In-Reply-To: <1288357835.63.0.535261040588.issue10231@psf.upfronthosting.co.za> Message-ID: <1288357835.63.0.535261040588.issue10231@psf.upfronthosting.co.za> New submission from Hallvard B Furuseth : SimpleHTTPRequestHandler directory bugs Running 3.2a3 http/server.py or 2.7 SimpleHTTPServer.py as a script: * Redirection appends "/" to the unparsed URL instead of to the pathname component of the parsed URL: "foo/dir?baz" => "foo/dir?baz/". * The unparsed URL is also used to check if the URL ends with "/". Thus "foo/dir?baz/" gives a directory listing instead of redirecting, which makes the files relative to "foo/" instead of to "foo/dir/". * translate_path("directory/") produces filenames without a final "/". Not sure if that is correct for CGI env['PATH_TRANSLATED']. Anyway: This means a non-directory file with a final slash is accepted, but again relative URLs in that file will refer to the wrong absolute URL. ".../foo.html/" + relative URL "bar.html" -> ".../foo.html/bar.html". However if translate_path("...foo/") is changed and you use stat() on the result, I do not know if all relevant directory operations work with the final directory separator on all OSes. I seem to remember getting errors in some OS for stat("dirname/", &st) in C. * translate_path() does not handle initial "."/".." on non-Posix systems. If that's wrong, it can (ignoring other issues listed here) do this: drop = frozenset((os.curdir, os.pardir, '', '.', '..')) for ...: if word not in drop: os.path.join(path, word) Though it looks a bit quicker to do words, drop = [], frozenset((os.curdir, os.pardir, '', '.', '..')) for word in filter(None, path.split('/')): word = os.path.split(os.path.splitdrive(word)[1])[1] if word not in drop: words.append(word) return os.path.join(os.getcwd(), *words) unless that can somehow produce a different result. ---------- components: Library (Lib) messages: 119899 nosy: hfuru priority: normal severity: normal status: open title: SimpleHTTPRequestHandler directory bugs type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 15:15:52 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 29 Oct 2010 13:15:52 +0000 Subject: [issue10206] python program starting with unmatched quote spews spaces to stdout In-Reply-To: <1288123288.86.0.422520379457.issue10206@psf.upfronthosting.co.za> Message-ID: <1288358152.55.0.192835158037.issue10206@psf.upfronthosting.co.za> Eric Smith added the comment: I think Benjamin fixed this in r85904. I'm going to verify and add some tests. ---------- priority: critical -> normal stage: patch review -> unit test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 15:16:57 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 29 Oct 2010 13:16:57 +0000 Subject: [issue10206] python program starting with unmatched quote spews spaces to stdout In-Reply-To: <1288123288.86.0.422520379457.issue10206@psf.upfronthosting.co.za> Message-ID: <1288358217.78.0.821516464067.issue10206@psf.upfronthosting.co.za> Changes by Eric Smith : Removed file: http://bugs.python.org/file19396/issue10206.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 15:26:02 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 29 Oct 2010 13:26:02 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1288357616.3565.76.camel@localhost.localdomain> Message-ID: <4CCACB65.5060603@egenix.com> Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > >> The warning will trigger without any reason. > > Well, by now you should have understood the reason, so I conclude that > you are either 1) deaf 2) stupid 3) deliberately obnoxious. > > This is my last answer to you on this topic. Goodbye. Ignoring your insults, I think the problem is that you fail to see point or address it: Warnings in Python are meant to tell programmers that something should be fixed. The warnings in the examples I gave do not point to cases that need to be fixed, in fact, they are very common idioms used in Python books, examples and tutorials. Note that you've just added warning filters to the test suite to ignore the warning again. I find that a good argument for not having it in this form in the first place. A truely useful ResourceWarning would trigger if resources gets close to some limit, e.g. if the number of open file descriptors reaches a certain limit. This could easily be tested when opening them, since they are plain integers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 15:53:45 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 29 Oct 2010 13:53:45 +0000 Subject: [issue10231] SimpleHTTPRequestHandler directory bugs In-Reply-To: <1288357835.63.0.535261040588.issue10231@psf.upfronthosting.co.za> Message-ID: <1288360425.3.0.646341678387.issue10231@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 16:08:05 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Fri, 29 Oct 2010 14:08:05 +0000 Subject: [issue10214] Misc/python-mode.el is out of date. In-Reply-To: <1288185188.37.0.749151956354.issue10214@psf.upfronthosting.co.za> Message-ID: <1288361285.08.0.649890822295.issue10214@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: r85927 in py3k r85928 in release31-maint r85929 in release27-maint ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 16:09:25 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 14:09:25 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287000989.52.0.725529628819.issue10093@psf.upfronthosting.co.za> Message-ID: <1288361365.92.0.827072367667.issue10093@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The buildbots showed no major issue, so this issue is now resolved. The warnings expose a lot of issues in the stdlib that deserve addressing, though ;) ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 16:09:32 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 29 Oct 2010 14:09:32 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <4CCACB65.5060603@egenix.com> Message-ID: Benjamin Peterson added the comment: 2010/10/29 Marc-Andre Lemburg : > > Marc-Andre Lemburg added the comment: > > Antoine Pitrou wrote: >> >> Antoine Pitrou added the comment: >> >>> The warning will trigger without any reason. >> >> Well, by now you should have understood the reason, so I conclude that >> you are either 1) deaf 2) stupid 3) deliberately obnoxious. >> >> This is my last answer to you on this topic. Goodbye. > > Ignoring your insults, I think the problem is that you fail to see > point or address it: > > Warnings in Python are meant to tell programmers that something > should be fixed. The warnings in the examples I gave do not point > to cases that need to be fixed, in fact, they are very common > idioms used in Python books, examples and tutorials. They're not particularly good idioms then. Leaving files open haphazardly leads to subtle bugs as our test suite has shown. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 16:59:23 2010 From: report at bugs.python.org (David Joy) Date: Fri, 29 Oct 2010 14:59:23 +0000 Subject: [issue4431] Distutils MSVC doesn't create manifest file (with fix) In-Reply-To: <1227644194.32.0.230924221438.issue4431@psf.upfronthosting.co.za> Message-ID: <1288364363.38.0.986573316518.issue4431@psf.upfronthosting.co.za> David Joy added the comment: Hi All, I just built mysql-python against CPython2.7 MSVC2008 Express Edition and Server 2003 R2. All were freshly built on a clean Server 2003 install. This exact issue occurred building with pip 0.8.1 on top of distribute 0.6.14: C:\Program Files\Microsoft SDKs\Windows\v6.0A\bin\mt.exe -nologo -manifest build\temp.win32-2.7\Release\_mysql.pyd.manifest -outputresource:build\lib.win32-2.7\_mysql.pyd;2 build\temp.win32-2.7\Release\_mysql.pyd.manifest : general error c1010070: Failed to load and parse the manifest. The system cannot find the file specified. error: command 'mt.exe' failed with exit status 31 ---------------------------------------- Command C:\Python27\python.exe -c "import setuptools;__file__='C:\\Documents and Settings\\Administrator\\build\\mysql-python\\setup.py';execfile(__file__)" install --single-version-externally-managed --record c:\docume~1\admini~1\locals~1\temp\pip-qqb1ax-record\install-record.txt failed with error code 1 Storing complete log in C:\Documents and Settings\Administrator\Application Data\pip\pip.log Pavel's patch fixes my build. Does this patch break something else? I can reproduce this on 2.7 and 2.6.6. ---------- nosy: +David.Joy versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 17:09:58 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 29 Oct 2010 15:09:58 +0000 Subject: [issue4431] Distutils MSVC doesn't create manifest file (with fix) In-Reply-To: <1288364363.38.0.986573316518.issue4431@psf.upfronthosting.co.za> Message-ID: <4CCAE3BE.4050306@egenix.com> Marc-Andre Lemburg added the comment: Hi David, since both you and Pavel are building mysql-python and using setuptools (which applies a lot of hacks on stock distutils), could you please also try some other package from PyPI in that same configuration and preferably one which doesn't rely on setuptools ? Adding the switch per default will probably not cause much harm, except when you explicitly don't want the manifest to be created and added to the DLL (which is needed in some situations as as well). 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 Fri Oct 29 17:14:00 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 29 Oct 2010 15:14:00 +0000 Subject: [issue4431] Distutils MSVC doesn't create manifest file (with fix) In-Reply-To: <1227644194.32.0.230924221438.issue4431@psf.upfronthosting.co.za> Message-ID: <1288365240.44.0.12520154177.issue4431@psf.upfronthosting.co.za> Changes by Marc-Andre Lemburg : Removed file: http://bugs.python.org/file13126/unnamed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 17:39:48 2010 From: report at bugs.python.org (Robert Lerche) Date: Fri, 29 Oct 2010 15:39:48 +0000 Subject: [issue10232] Tkinter issues with Scrollbar and custom widget list In-Reply-To: <1288366788.46.0.695886030233.issue10232@psf.upfronthosting.co.za> Message-ID: <1288366788.46.0.695886030233.issue10232@psf.upfronthosting.co.za> New submission from Robert Lerche : I have run across several issues (one serious one, showing up only on Windows) when implementing a scroll bar with a list of custom widgets. I suspect these may really be Tk issues but I thought I'd try posting here first. I sent this to the tkinter-discuss list and saw no replies. Please have a look and advise me on the right way to proceed. Thanks. ---------- components: Tkinter files: testcase.py messages: 119907 nosy: Robert.Lerche priority: normal severity: normal status: open title: Tkinter issues with Scrollbar and custom widget list type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file19412/testcase.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 17:40:56 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 15:40:56 +0000 Subject: [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1288366856.48.0.449064438819.issue10225@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I am attaching a new patch which fixes all but two doctest examples. I suspect that the remaining failures are due to a bug in sphinx. (The examples are executed even though marked up with ::). ---------- stage: needs patch -> patch review Added file: http://bugs.python.org/file19413/issue10225a-r27.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 17:44:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 15:44:41 +0000 Subject: [issue10233] fix test_tarfile ResourceWarnings In-Reply-To: <1288367081.73.0.870098966091.issue10233@psf.upfronthosting.co.za> Message-ID: <1288367081.73.0.870098966091.issue10233@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This fixes all the warnings because of files not closed explicitly in test_tarfile. ---------- components: Library (Lib) files: tarfileclose.patch keywords: patch messages: 119909 nosy: lars.gustaebel, pitrou priority: normal severity: normal stage: patch review status: open title: fix test_tarfile ResourceWarnings type: resource usage versions: Python 3.2 Added file: http://bugs.python.org/file19414/tarfileclose.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 17:50:46 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 15:50:46 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288367446.91.0.327296532344.issue10224@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: > The usual build process via Makefile still uses Python 2, > and that won't change for 3.2. Would you consider changing "doctest" make target to check out sphinx trunk (or 3.x compatible release) and run it with the py3k python? This should not affect regular doc builds and running doctest under anything other than the current version of python makes very little sense. Note that I am still targeting documentation fixes for 3.2. See issue 10225. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 17:54:48 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Fri, 29 Oct 2010 15:54:48 +0000 Subject: [issue6645] multiprocessing build fails on AIX - /dev/urandom (or equivalent) not found In-Reply-To: <1249414053.16.0.904107656211.issue6645@psf.upfronthosting.co.za> Message-ID: <1288367688.53.0.0927006207698.issue6645@psf.upfronthosting.co.za> Sridhar Ratnakumar added the comment: No, this is not an issue for me on Python 3.2 and AIX 5.1. ---------- versions: -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 18:01:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 29 Oct 2010 16:01:16 +0000 Subject: [issue10229] Refleak run of test_gettext fails In-Reply-To: <1288348294.62.0.0907397506052.issue10229@psf.upfronthosting.co.za> Message-ID: <1288368076.3.0.117463929966.issue10229@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for catching this. Attached patch fixes the error with -R and works without -R too, please review. ---------- keywords: +needs review, patch nosy: +loewis, v_peter stage: needs patch -> patch review Added file: http://bugs.python.org/file19415/fix-10229.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 18:04:07 2010 From: report at bugs.python.org (Jesse Noller) Date: Fri, 29 Oct 2010 16:04:07 +0000 Subject: [issue6645] multiprocessing build fails on AIX - /dev/urandom (or equivalent) not found In-Reply-To: <1249414053.16.0.904107656211.issue6645@psf.upfronthosting.co.za> Message-ID: <1288368247.28.0.538816050794.issue6645@psf.upfronthosting.co.za> Jesse Noller added the comment: Closing per Sridhar ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 18:10:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 29 Oct 2010 16:10:31 +0000 Subject: [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1288368631.22.0.624896315116.issue10226@psf.upfronthosting.co.za> ?ric Araujo added the comment: // is not part of the netloc in RFC terms, it?s a delimiter between components ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 18:10:35 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 16:10:35 +0000 Subject: [issue10229] Refleak run of test_gettext fails In-Reply-To: <1288368076.3.0.117463929966.issue10229@psf.upfronthosting.co.za> Message-ID: <1288368628.3565.81.camel@localhost.localdomain> Antoine Pitrou added the comment: > Thanks for catching this. Attached patch fixes the error with -R and > works without -R too, please review. It looks good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 18:27:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 16:27:31 +0000 Subject: [issue10234] ResourceWarnings in test_subprocess In-Reply-To: <1288369651.8.0.988581354556.issue10234@psf.upfronthosting.co.za> Message-ID: <1288369651.8.0.988581354556.issue10234@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Since r85920, test_subprocess has been showing a bunch of ResourceWarnings. It seems that the pipe objects don't get explicitly closed in wait() or __del__, while they do in communicate(). ---------- components: Library (Lib), Tests messages: 119916 nosy: gregory.p.smith, pitrou priority: normal severity: normal status: open title: ResourceWarnings in test_subprocess type: resource usage versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 18:28:06 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 16:28:06 +0000 Subject: [issue10225] Fix doctest runable examples in python manual In-Reply-To: <1288318735.45.0.959857258913.issue10225@psf.upfronthosting.co.za> Message-ID: <1288369686.4.0.690054193901.issue10225@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: I started porting the patch to 3.x and it looks like I've uncovered another bug in sphinx: $ sphinx-build -b doctest -d build/doctrees . build/doctest library/traceback.rst .. ********************************************************************** File "library/traceback.rst", line 327, in default .. Differences (ndiff with -expected +actual): *** print_tb: - File "", line 10, in ? ^^^ + File "", line 10, in ? ^^^^^^^^^^^ lumberjack() (I added +REPORT_NDIFF to testoutput options for clarity.) I even tried adding +ELLIPSIS to options, but this did not help. The same example works in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 18:50:14 2010 From: report at bugs.python.org (Daniel Urban) Date: Fri, 29 Oct 2010 16:50:14 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288371014.52.0.88974442522.issue10224@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +durban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 19:03:32 2010 From: report at bugs.python.org (Guandalino) Date: Fri, 29 Oct 2010 17:03:32 +0000 Subject: [issue9340] argparse parse_known_args does not work with subparsers In-Reply-To: <1279886405.92.0.918578525345.issue9340@psf.upfronthosting.co.za> Message-ID: <1288371812.44.0.564097614651.issue9340@psf.upfronthosting.co.za> Changes by Guandalino : ---------- nosy: +guandalino _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 19:44:52 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 29 Oct 2010 17:44:52 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1280082784.57.0.628810673592.issue9377@psf.upfronthosting.co.za> Message-ID: <1288374292.6.0.962506247133.issue9377@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I just did an experiment on Windows 7. I used SetComputerNameEx to set the NetBIOS name (4) to "e2718", and the DNS name (5) to "?3141"; then I rebooted. This is on a system with windows-1252 as its ANSI code page (i.e. u"?"==u"\N{GREEK SMALL LETTER PI}" is not in the ANSI charset. After the reboot, I found - COMPUTERNAME is "P3141", and so is the result of GetComputerNameEx(4) - GetComputerNameEx(5) is "?3141" - socket.gethostname of Python 2.5 returns "p3141". So my theory of how this all fits together is this: 1. it's not really possible to completely decouple the DNS name and the NetBIOS name. Setting the DNS name also modifies the NetBIOS name; I suspect that the reverse is also true. 2. gethostname returns the ANSI version of the DNS name (which happens to convert the GREEK SMALL LETTER PI to a LATIN SMALL LETTER P). 3. the NetBIOS name is an generally an uppercase version of the gethostname result. There may be rules in case the gethostname result contains characters illegal in NetBIOS. In summary, I (now) think it's fine to return the Unicode version of the DNS name from gethostname on Windows. Re msg119271: the name "?3141" really has nothing to do with the DNS on my system. It doesn't occur in DNS any zone, nor could it possibly. It's unclear to me why Microsoft calls it the "DNS name". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 19:57:42 2010 From: report at bugs.python.org (Sandro Tosi) Date: Fri, 29 Oct 2010 17:57:42 +0000 Subject: [issue7547] test_timeout should skip, not fail, when the remote host is not available In-Reply-To: <1261241104.77.0.599570179128.issue7547@psf.upfronthosting.co.za> Message-ID: <1288375062.97.0.203822324888.issue7547@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hello, as discussed on irc, I'm proposing a patch that: - wraps the test with support.transient_internet - limits the assert to only socket.timeout (what we want to test) test_smptnet.py is already fixed, since it already uses support.transient_internet Regards, Sandro ---------- keywords: +patch nosy: +sandro.tosi stage: needs patch -> patch review Added file: http://bugs.python.org/file19416/issue7547-py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 19:58:56 2010 From: report at bugs.python.org (Tomas Hoger) Date: Fri, 29 Oct 2010 17:58:56 +0000 Subject: [issue8678] crashers in rgbimg In-Reply-To: <1273526642.93.0.89259252042.issue8678@psf.upfronthosting.co.za> Message-ID: <1288375136.0.0.0119420146978.issue8678@psf.upfronthosting.co.za> Tomas Hoger added the comment: You seem to be right that r65878 should block the "xsize = ysize = 0x8000" integer overflow. I was testing on the python version with r60793, but not with r65878. Note that the check added in r65878 should still cause crash on divide-by-zero for some files. Attaching my test files. 1 is for excessive ZSIZE, 2 and 3 for the integer overflow, RLE and non-RLE code path, 4 and 5 for RLE decoding issues. 6 should trigger sigfpe in the r65878 check as noted above, but I've not really tested that one. ---------- Added file: http://bugs.python.org/file19417/rgbimg-issue8678.tgz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 20:03:41 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 18:03:41 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288375421.78.0.577976316799.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Committed issue7061a.diff r85930. This is probably a backport candidate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 20:14:53 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 18:14:53 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288376093.65.0.39345844345.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: While working on issue 10225, I have found several mistakes in turtle.rst examples. It probably makes sense to review these separately and commit as part of this issue rather than bunching with the other issue 10225 changes. There are still two remaining failures that I attribute to sphinx bugs. One is due to an already reported ellipsis bug, and the other is a rather strange failure in the shapetransform example. Georg, can you take a look? File "library/turtle.rst", line 1272, in default Failed example: turtle.shapetransform() Expected: (4.0, -1.0, -0.0, 2.0) Got: (2.82842712474619, -2.121320343559643, 2.8284271247461907, 0.7071067811865472) Note that this test succeeds when it is the only test in a file. ---------- Added file: http://bugs.python.org/file19418/issue7061b.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 20:16:41 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 18:16:41 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288376201.28.0.767606783598.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Gregor, I suspect that there are doctest mistakes in the turtle.py docstrings, but I cannot figure out how to run it through doctest. Can you help? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 20:17:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 18:17:47 +0000 Subject: [issue7547] test_timeout should skip, not fail, when the remote host is not available In-Reply-To: <1261241104.77.0.599570179128.issue7547@psf.upfronthosting.co.za> Message-ID: <1288376267.37.0.366098565398.issue7547@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r85931 (3.2), r85932 (3.1) and r85933 (2.7). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 20:22:42 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 29 Oct 2010 18:22:42 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1280082784.57.0.628810673592.issue9377@psf.upfronthosting.co.za> Message-ID: <1288376562.86.0.210441247954.issue9377@psf.upfronthosting.co.za> Martin v. L?wis added the comment: r85934 now uses GetComputerNameExW on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 20:29:30 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Fri, 29 Oct 2010 18:29:30 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288376970.68.0.96421020893.issue7061@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: As I suspected, the turtle.shapetransform() stems from sphinx' failure to reinitialize the turtle variable as testsetup dictates. I can work around this by adding >>> turtle = Turtle() above >>> turtle.shape("square") >>> turtle.shapesize(4,2) >>> turtle.shearfactor(-0.5) >>> turtle.shapetransform() (4.0, -1.0, -0.0, 2.0) but I don't think it is a good idea to pollute the documentation this way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 20:33:17 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 29 Oct 2010 18:33:17 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1288374292.6.0.962506247133.issue9377@psf.upfronthosting.co.za> Message-ID: <4CCB1368.30608@egenix.com> Marc-Andre Lemburg added the comment: Martin v. L?wis wrote: > > Martin v. L?wis added the comment: > > I just did an experiment on Windows 7. I used SetComputerNameEx to set the NetBIOS name (4) to "e2718", and the DNS name (5) to "?3141"; then I rebooted. This is on a system with windows-1252 as its ANSI code page (i.e. u"?"==u"\N{GREEK SMALL LETTER PI}" is not in the ANSI charset. After the reboot, I found > > - COMPUTERNAME is "P3141", and so is the result of GetComputerNameEx(4) > - GetComputerNameEx(5) is "?3141" > - socket.gethostname of Python 2.5 returns "p3141". > > So my theory of how this all fits together is this: > > 1. it's not really possible to completely decouple the DNS name and the NetBIOS name. Setting the DNS name also modifies the NetBIOS name; I suspect that the reverse is also true. The MS docs mention that setting the DNS name will adjust the NetBIO name as well (with the NetBIOS name being converted to upper case and truncated, if the DNS name is too long). They don't mention anything about the NetBIOS name encoding. > 2. gethostname returns the ANSI version of the DNS name (which happens to convert the GREEK SMALL LETTER PI to a LATIN SMALL LETTER P). > > 3. the NetBIOS name is an generally an uppercase version of the gethostname result. There may be rules in case the gethostname result contains characters illegal in NetBIOS. > > In summary, I (now) think it's fine to return the Unicode version of the DNS name from gethostname on Windows. > > Re msg119271: the name "?3141" really has nothing to do with the DNS on my system. It doesn't occur in DNS any zone, nor could it possibly. It's unclear to me why Microsoft calls it the "DNS name". The DNS name of the Windows machine is the combination of the DNS host name and the DNS domain that you setup on the machine. I think the misunderstanding is that you assume this combination will somehow appear as known DNS name of the machine via some DNS server on the network - that's not the case. Of course, it's not particularly useful to set the DNS name to something that other machines cannot find out via an DNS query. FWIW, you can do the same on a Linux box, i.e. setup the host name and domain to some completely bogus values. And as David pointed out, without also updating the /etc/hosts on the Linux, you always get the resolver error with hostname -f I mentioned earlier on (which does a DNS lookup), so there's no real connection to the DNS system on Linux either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 21:04:46 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 29 Oct 2010 19:04:46 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1288376562.86.0.210441247954.issue9377@psf.upfronthosting.co.za> Message-ID: <4CCB1AC9.1080802@egenix.com> Marc-Andre Lemburg added the comment: Martin v. L?wis wrote: > > Martin v. L?wis added the comment: > > r85934 now uses GetComputerNameExW on Windows. Thanks, Martin. Here's a similar discussion of the Windows approach (used in bzr): https://bugs.launchpad.net/bzr/+bug/256550/comments/6 This is what Solaris uses: http://developers.sun.com/dev/gadc/faq/locale.html#get-set (they require conversion to ASCII and using IDNA for non-ASCII names) I found this RFC draft on the topic: http://tools.ietf.org/html/draft-josefsson-getaddrinfo-idn-00 which suggests that there is no standard for the encoding used by the socket host name APIs yet. ASCII, UTF-8 and IDNA are happily mixed and matched. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 21:17:41 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Oct 2010 19:17:41 +0000 Subject: [issue8678] crashers in rgbimg In-Reply-To: <1273526642.93.0.89259252042.issue8678@psf.upfronthosting.co.za> Message-ID: <1288379861.41.0.06734157694.issue8678@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 21:31:49 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 29 Oct 2010 19:31:49 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1280082784.57.0.628810673592.issue9377@psf.upfronthosting.co.za> Message-ID: <1288380709.74.0.466886933256.issue9377@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The Solaris case then is already supported, with no change required: if Solaris bans non-ASCII in the network configuration (or, rather, recommends to use IDNA), then this will work fine with the current code. The Josefsson AI_IDN flag is irrelevant to Python, IMO: it treats byte names as locale-encoded, and converts them with IDNA. Python 3 users really should use Unicode strings in the first place for non-ASCII data, in which case the socket.getaddrinfo uses IDNA, anyway. However, it can't hurt to expose this flag if the underlying C library supports it. AI_CANONIDN might be interesting to implement, but I'd rather wait whether this finds RFC approval. In any case, undoing IDNA is orthogonal to this issue (which is about non-ASCII data returned from the socket API). If anything needs to be done on Unix, I think that the gethostname result should be decoded using the file system encoding; I then don't mind using surrogate escape there for good measure. This won't hurt systems that restrict host names to ASCII, and may do some good for systems that don't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 21:34:16 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 29 Oct 2010 19:34:16 +0000 Subject: [issue10230] test_tarfile failure (test_extractall) on AMD64 debian parallel 3.x: os.utime(float) issue In-Reply-To: <1288354101.14.0.267054038013.issue10230@psf.upfronthosting.co.za> Message-ID: <1288380856.85.0.207892298155.issue10230@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- resolution: -> duplicate status: open -> closed superseder: -> tarfile touches directories twice _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 21:36:47 2010 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 29 Oct 2010 19:36: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: <1288381007.7.0.0247105820283.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: That's a bug. I'll fix it as soon has I've reinstalled the SDK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 21:43:35 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 19:43:35 +0000 Subject: [issue10235] test_argparse depends on the COLUMNS environment variable In-Reply-To: <1288381415.18.0.712134871651.issue10235@psf.upfronthosting.co.za> Message-ID: <1288381415.18.0.712134871651.issue10235@psf.upfronthosting.co.za> New submission from Antoine Pitrou : Changing it can produce failures, e.g.: $ COLUMNS=178 ./python -m test.regrtest -v test_argparse This can be seen on one of the buildbots: http://www.python.org/dev/buildbot/all/builders/PPC%20Leopard%203.x/builds/685/steps/test/logs/stdio ---------- assignee: bethard components: Tests messages: 119931 nosy: bethard, janssen, pitrou priority: normal severity: normal stage: needs patch status: open title: test_argparse depends on the COLUMNS environment variable type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 21:46:55 2010 From: report at bugs.python.org (Stephen Hansen) Date: Fri, 29 Oct 2010 19:46:55 +0000 Subject: [issue10236] Sporadic failures of test_ssl In-Reply-To: <1288381615.12.0.769531001166.issue10236@psf.upfronthosting.co.za> Message-ID: <1288381615.12.0.769531001166.issue10236@psf.upfronthosting.co.za> New submission from Stephen Hansen : Another sporadic failure I've noticed since setting up my buildbot; test_ssl keeps going down. This one I have a hard time analyzing with the tests output, but the latest is: http://www.python.org/dev/buildbot/all/builders/x86%20Snow%20Leopard%203.x/builds/250 There's this part in the log: test_get_server_certificate (test.test_ssl.NetworkedTests) ... [Errno 1] _ssl.c:390: error:14090086:SSL routines:SSL3_GET_SERVER_CERTIFICATE:certificate verify failed Verified certificate for svn.python.org:443 is [...pem...] ok There's an errno printed there, but then more debugging for that same test-- and an 'ok'-- so I don't see the FAIL message I'm expecting. So to my naive reading, it seems that it is running once and failing, then re-running in verbose and /not/ failing (and that the error-like message there may not be an error). So, the original problem is a mystery. Or I'm totally reading it wrong. Either way, I've seen this several times and am not sure how to further debug it. Any suggestions or pointers are welcome. Or fixes :) ---------- messages: 119932 nosy: ixokai priority: normal severity: normal status: open title: Sporadic failures of test_ssl versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 21:49:52 2010 From: report at bugs.python.org (Stephen Hansen) Date: Fri, 29 Oct 2010 19:49:52 +0000 Subject: [issue10236] Sporadic failures of test_ssl In-Reply-To: <1288381615.12.0.769531001166.issue10236@psf.upfronthosting.co.za> Message-ID: <1288381792.39.0.634431197916.issue10236@psf.upfronthosting.co.za> Changes by Stephen Hansen : ---------- components: +Library (Lib), Tests type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 21:53:40 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 19:53:40 +0000 Subject: [issue10235] test_argparse depends on the COLUMNS environment variable In-Reply-To: <1288381415.18.0.712134871651.issue10235@psf.upfronthosting.co.za> Message-ID: <1288382020.14.0.882710830372.issue10235@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Already reported actually. ---------- resolution: -> duplicate status: open -> closed superseder: -> test_argparse.py: 80 failures if COLUMNS env var set to a value other than 80 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 21:54:05 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 19:54:05 +0000 Subject: [issue9553] test_argparse.py: 80 failures if COLUMNS env var set to a value other than 80 In-Reply-To: <1281405802.56.0.0746900619959.issue9553@psf.upfronthosting.co.za> Message-ID: <1288382045.48.0.395328074418.issue9553@psf.upfronthosting.co.za> Antoine Pitrou added the comment: As noted in issue10235, this is responsible for buildbot failures: http://www.python.org/dev/buildbot/all/builders/PPC%20Leopard%203.x/builds/685/steps/test/logs/stdio ---------- nosy: +janssen, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 22:09:05 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Fri, 29 Oct 2010 20:09:05 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1288380709.74.0.466886933256.issue9377@psf.upfronthosting.co.za> Message-ID: <4CCB29DD.6090502@egenix.com> Marc-Andre Lemburg added the comment: Martin v. L?wis wrote: > > Martin v. L?wis added the comment: > > The Solaris case then is already supported, with no change required: if Solaris bans non-ASCII in the network configuration (or, rather, recommends to use IDNA), then this will work fine with the current code. > > The Josefsson AI_IDN flag is irrelevant to Python, IMO: it treats byte names as locale-encoded, and converts them with IDNA. Python 3 users really should use Unicode strings in the first place for non-ASCII data, in which case the socket.getaddrinfo uses IDNA, anyway. However, it can't hurt to expose this flag if the underlying C library supports it. AI_CANONIDN might be interesting to implement, but I'd rather wait whether this finds RFC approval. In any case, undoing IDNA is orthogonal to this issue (which is about non-ASCII data returned from the socket API). > > If anything needs to be done on Unix, I think that the gethostname result should be decoded using the file system encoding; I then don't mind using surrogate escape there for good measure. This won't hurt systems that restrict host names to ASCII, and may do some good for systems that don't. Wouldn't it be better to also attempt to decode the name using IDNA in case the name starts with the IDNA prefix ? This would then also cover the Solaris case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 22:48:46 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 29 Oct 2010 20:48:46 +0000 Subject: [issue10177] PyUnicode_AsWideCharString and PyMem_Free In-Reply-To: <1287836498.58.0.900203329868.issue10177@psf.upfronthosting.co.za> Message-ID: <1288385326.33.0.636472155107.issue10177@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think questions like this are better answered on python-list or even pydev. In the absence of an observed problem, I would presume it is ok. This question should be answered in the C-API doc. If it is not, you could reopen this as a doc issue. ---------- nosy: +terry.reedy resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 23:02:26 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 29 Oct 2010 21:02:26 +0000 Subject: [issue10188] tempfile.TemporaryDirectory may throw errors at shutdown In-Reply-To: <1287917580.57.0.982180579105.issue10188@psf.upfronthosting.co.za> Message-ID: <1288386146.15.0.717939259679.issue10188@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Shutdown has been a 'forever' problem ;-). It would seem sensible to me to have a fixed end-of-shutdown sequence for essential modules. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Oct 29 23:34:39 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 29 Oct 2010 21:34:39 +0000 Subject: [issue6105] json.dumps doesn't respect OrderedDict's iteration order In-Reply-To: <1243243366.01.0.202838739816.issue6105@psf.upfronthosting.co.za> Message-ID: <1288388079.97.0.0656930205068.issue6105@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Upon further consideration, I think this could be backported. ---------- assignee: benjamin.peterson -> rhettinger resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 00:03:36 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 29 Oct 2010 22:03:36 +0000 Subject: [issue10212] struct.unpack and cStringIO.StringIO don't support new buffer In-Reply-To: <1288175813.33.0.0310491559114.issue10212@psf.upfronthosting.co.za> Message-ID: <1288389816.45.0.793996067045.issue10212@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In the absence of doc references in this and #10211 that would *clearly* settle the bug vs. feature issue, it strikes me as a bit murky. So I am inclined to agree with MAL that failure to achieve the stated, documented purpose is a bug. I strongly suspect that if these issues had been filed during the 2.7 beta phase, a fix would have been deemed permissible without much controversy. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 00:10:44 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 29 Oct 2010 22:10:44 +0000 Subject: [issue10232] Tkinter issues with Scrollbar and custom widget list In-Reply-To: <1288366788.46.0.695886030233.issue10232@psf.upfronthosting.co.za> Message-ID: <1288390244.33.0.216017495664.issue10232@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I have not tried your testcase yet, but agree that issue 4 sounds pretty bad. I guess what you are looking for is either a patch to tkinter that solves at least one of the listed problems (even if only a workaround for a TK bug) or a determination that nothing can be done. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 00:25:24 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 29 Oct 2010 22:25:24 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <4CCB1368.30608@egenix.com> Message-ID: <4CCB49D1.9010204@v.loewis.de> Martin v. L?wis added the comment: > The DNS name of the Windows machine is the combination of the DNS host > name and the DNS domain that you setup on the machine. I think the > misunderstanding is that you assume this combination will > somehow appear as known DNS name of the machine via some > DNS server on the network - that's not the case. I don't assume that - I merely point it that it clearly has no relationship to the DNS (unless you explicitly make it that way). So, I wonder why they call it the DNS name - they could have just as well called the "LDAP name", or the "NIS name". In either case, setting the name would have no impact on the respective naming infrastructure. > FWIW, you can do the same on a Linux box, i.e. setup the host name > and domain to some completely bogus values. And as David pointed out, > without also updating the /etc/hosts on the Linux, you always get the > resolver error with hostname -f I mentioned earlier on (which does > a DNS lookup), so there's no real connection to the DNS system on > Linux either. Yes, but Linux (rightly) calls it the "hostname", not the "DNS name". ---------- title: socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names -> socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 00:25:43 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 22:25:43 +0000 Subject: [issue10237] failure in Barrier tests In-Reply-To: <1288391142.98.0.44997335021.issue10237@psf.upfronthosting.co.za> Message-ID: <1288391142.98.0.44997335021.issue10237@psf.upfronthosting.co.za> New submission from Antoine Pitrou : A buildbot has shows occasional failures in the Barrier tests: [299/349] test_threading [39130 refs] [39501 refs] [39501 refs] [39491 refs] [39499 refs] Unhandled exception in thread started by Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 37, in task f() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 704, in f i = self.barrier.wait() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 441, in wait self._enter() # Block while the barrier drains. File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 465, in _enter raise BrokenBarrierError threading.BrokenBarrierError Unhandled exception in thread started by Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 37, in task f() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 704, in f i = self.barrier.wait() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 441, in wait self._enter() # Block while the barrier drains. File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 465, in _enter raise BrokenBarrierError threading.BrokenBarrierError Unhandled exception in thread started by Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 37, in task f() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 704, in f i = self.barrier.wait() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 441, in wait self._enter() # Block while the barrier drains. File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 465, in _enter raise BrokenBarrierError threading.BrokenBarrierError Unhandled exception in thread started by Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 37, in task f() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 704, in f i = self.barrier.wait() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 441, in wait self._enter() # Block while the barrier drains. File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 465, in _enter raise BrokenBarrierError threading.BrokenBarrierError test test_threading failed -- Traceback (most recent call last): File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 720, in test_reset self.run_threads(f) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 615, in run_threads f() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/test/lock_tests.py", line 704, in f i = self.barrier.wait() File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 450, in wait self._wait(timeout) File "/home/buildslave/python-trunk/3.x.norwitz-x86/build/Lib/threading.py", line 489, in _wait raise BrokenBarrierError threading.BrokenBarrierError ---------- assignee: krisvale components: Library (Lib), Tests messages: 119942 nosy: krisvale, pitrou priority: normal severity: normal stage: needs patch status: open title: failure in Barrier tests versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 00:26:54 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 29 Oct 2010 22:26:54 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <4CCB29DD.6090502@egenix.com> Message-ID: <4CCB4A2B.7080800@v.loewis.de> Martin v. L?wis added the comment: > Wouldn't it be better to also attempt to decode the name using IDNA > in case the name starts with the IDNA prefix ? Perhaps better - but incompatible. I don't see a way to have the resolver functions automatically decode IDNA, without potentially breaking existing applications that specifically look for the IDNA prefix (say). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 00:27:12 2010 From: report at bugs.python.org (Robert Lerche) Date: Fri, 29 Oct 2010 22:27:12 +0000 Subject: [issue10232] Tkinter issues with Scrollbar and custom widget list In-Reply-To: <1288366788.46.0.695886030233.issue10232@psf.upfronthosting.co.za> Message-ID: <1288391232.76.0.294987789339.issue10232@psf.upfronthosting.co.za> Robert Lerche added the comment: Hi and thanks for the quick response. I'm happy to follow up with the Tk folks if it turns out that's where the problem lies -- it has been a long time since I wrote a Tcl script so before trying to reproduce the behavior that way I thought I'd try posting what I have so far. If you can just confirm that the behavior is reproducible that would be a good start. As I wrote, I have built everything from sources on Windows so there's always a chance I've done something wrong, although so much is working correctly that I don't expect that to be the case. I'm trying to introduce Python as a development tool at a consulting client (a large company) so I have to pursue stuff like this. Thanks again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 00:27:55 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Oct 2010 22:27:55 +0000 Subject: [issue10238] ctypes not building under OS X 10.6 with LLVM/Clang 2.8 In-Reply-To: <1288391275.39.0.918201255477.issue10238@psf.upfronthosting.co.za> Message-ID: <1288391275.39.0.918201255477.issue10238@psf.upfronthosting.co.za> New submission from Brett Cannon : I get the following output related to the build failure: /var/folders/MN/MN-E3HgoFXSKDXb9le7FQ++++TI/-Tmp-/cc-MxvLE7.s:153:2: error: unrecognized instruction cmovnz %rax, %rdx ^ /var/folders/MN/MN-E3HgoFXSKDXb9le7FQ++++TI/-Tmp-/cc-MxvLE7.s:154:2: error: unrecognized instruction cmovnz %r10, %rax ^ /var/folders/MN/MN-E3HgoFXSKDXb9le7FQ++++TI/-Tmp-/cc-MxvLE7.s:156:2: error: unrecognized instruction cmovnz %r10, %rdx ^ /var/folders/MN/MN-E3HgoFXSKDXb9le7FQ++++TI/-Tmp-/cc-MxvLE7.s:158:2: error: unrecognized instruction cmovnz %r10, %rax ^ /var/folders/MN/MN-E3HgoFXSKDXb9le7FQ++++TI/-Tmp-/cc-MxvLE7.s:159:2: error: unrecognized instruction cmovnz %r11, %rdx ^ /var/folders/MN/MN-E3HgoFXSKDXb9le7FQ++++TI/-Tmp-/cc-MxvLE7.s:166:2: error: unrecognized instruction rep movsb ^ /var/folders/MN/MN-E3HgoFXSKDXb9le7FQ++++TI/-Tmp-/cc-MxvLE7.s:281:2: error: unrecognized instruction cmovnz %rdx, %rcx ^ /var/folders/MN/MN-E3HgoFXSKDXb9le7FQ++++TI/-Tmp-/cc-MxvLE7.s:285:2: error: unrecognized instruction cmovnz %rdx, %rax ^ ---------- components: Build messages: 119945 nosy: brett.cannon priority: deferred blocker severity: normal status: open title: ctypes not building under OS X 10.6 with LLVM/Clang 2.8 type: compile error versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 00:29:04 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 29 Oct 2010 22:29:04 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <1280082784.57.0.628810673592.issue9377@psf.upfronthosting.co.za> Message-ID: <1288391344.91.0.455071093168.issue9377@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: The code in socketmodule.c currently compile with suspect warnings: socketmodule.c(3108) : warning C4047: 'function' : 'LPSTR' differs in levels of indirection from 'int' socketmodule.c(3108) : warning C4024: 'GetComputerNameA' : different types for formal and actual parameter 1 socketmodule.c(3109) : warning C4133: 'function' : incompatible types - from 'Py_UNICODE *' to 'LPDWORD' socketmodule.c(3110) : warning C4020: 'GetComputerNameA' : too many actual parameters was GetComputerName() used instead of GetComputerNameExW()? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 00:33:09 2010 From: report at bugs.python.org (Matthew Barnett) Date: Fri, 29 Oct 2010 22:33: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: <1288391589.65.0.60028908957.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-20101029.zip is a new version of the regex module. I've also added to the unit tests. ---------- Added file: http://bugs.python.org/file19419/issue2636-20101029.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 01:10:51 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 23:10:51 +0000 Subject: [issue10233] fix test_tarfile ResourceWarnings In-Reply-To: <1288367081.73.0.870098966091.issue10233@psf.upfronthosting.co.za> Message-ID: <1288393851.55.0.558191209201.issue10233@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 01:16:55 2010 From: report at bugs.python.org (Neal Becker) Date: Fri, 29 Oct 2010 23:16:55 +0000 Subject: [issue10239] multiprocessing signal defect In-Reply-To: <1288394215.77.0.548546453829.issue10239@psf.upfronthosting.co.za> Message-ID: <1288394215.77.0.548546453829.issue10239@psf.upfronthosting.co.za> New submission from Neal Becker : multiprocessing signal defect From: Neal Becker Date: Friday 29 October 2010 8:12:19 am To: python-list at python.org Groups: gmane.comp.python.general Tested on: python-2.6.4-27.fc13.x86_64 linux fedora 13 x86_64 Seems multiprocessing doesn't behave well with signals: ----------- from multiprocessing import Pool import time def sleep (dummy): ????time.sleep (10) ???? if __name__ == '__main__': ????pool = Pool (processes=2) ????result = pool.map (sleep, range (4)) ???? ------------- start it up $ python test_multip.py? ---------------------- ps auxf | grep python nbecker???6605??1.6??0.1 338192??6952 pts/1????Sl+??08:03???0:00??|???????\_? python test_multip.py nbecker???6606??0.0??0.1 186368??4760 pts/1????S+???08:03???0:00??|??????????? \_ python test_multip.py nbecker???6607??0.0??0.1 186372??4740 pts/1????S+???08:03???0:00??|??????????? \_ python test_multip.py kill 6607 ?ps auxf | grep python nbecker???6605??0.5??0.1 338192??6952 pts/1????Sl+??08:03???0:00??|???????\_? python test_multip.py nbecker???6606??0.0??0.1 186368??4760 pts/1????S+???08:03???0:00??|??????????? \_ python test_multip.py nbecker???6607??0.0??0.0??????0?????0 pts/1????Z+???08:03???0:00??|??????????? \_ [python] ?kill 6606 ps auxf | grep python nbecker???6605??0.3??0.1 338192??6952 pts/1????Sl+??08:03???0:00??|???????\_? python test_multip.py nbecker???6606??0.0??0.0??????0?????0 pts/1????Z+???08:03???0:00??|??????????? \_ [python] nbecker???6607??0.0??0.0??????0?????0 pts/1????Z+???08:03???0:00??|??????????? \_ [python] Now we have 2 dead children and the parent is hung forever. Isn't this a serious defect? ---------- components: Library (Lib) messages: 119948 nosy: Neal.Becker priority: normal severity: normal status: open title: multiprocessing signal defect type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 01:39:10 2010 From: report at bugs.python.org (Brett Cannon) Date: Fri, 29 Oct 2010 23:39:10 +0000 Subject: [issue10233] fix test_tarfile ResourceWarnings In-Reply-To: <1288367081.73.0.870098966091.issue10233@psf.upfronthosting.co.za> Message-ID: <1288395550.61.0.389189526063.issue10233@psf.upfronthosting.co.za> Brett Cannon added the comment: Reviewed at http://codereview.appspot.com/2759042/ ---------- assignee: -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 01:50:32 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 29 Oct 2010 23:50:32 +0000 Subject: [issue10233] fix test_tarfile ResourceWarnings In-Reply-To: <1288367081.73.0.870098966091.issue10233@psf.upfronthosting.co.za> Message-ID: <1288396232.91.0.00254084044478.issue10233@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the review. I've committed a modified patch in r85955. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 02:01:47 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 30 Oct 2010 00:01:47 +0000 Subject: [issue6105] json.dumps doesn't respect OrderedDict's iteration order In-Reply-To: <1243243366.01.0.202838739816.issue6105@psf.upfronthosting.co.za> Message-ID: <1288396907.67.0.333683243675.issue6105@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 02:28:45 2010 From: report at bugs.python.org (Rafe Kettler) Date: Sat, 30 Oct 2010 00:28:45 +0000 Subject: [issue9702] Python violates most users expectations via the modification differences of immutable and mutable objects in methods In-Reply-To: <1282917207.25.0.718078039013.issue9702@psf.upfronthosting.co.za> Message-ID: <1288398525.84.0.572112217568.issue9702@psf.upfronthosting.co.za> Changes by Rafe Kettler : ---------- nosy: +rafe.kettler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 02:48:17 2010 From: report at bugs.python.org (Jacques Grove) Date: Sat, 30 Oct 2010 00:48:17 +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: <1288399697.42.0.325281509628.issue2636@psf.upfronthosting.co.za> Jacques Grove added the comment: Here's another inconsistency (same setup as before, running issue2636-20101029.zip code): $ cat test.py import re, regex text = "\n S" regexp = '[^a]{2}[A-Z]' print re.findall(regexp, text) print regex.findall(regexp, text) $ python test.py [' S'] [] I might flush out some more as I excercise this over the next few days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 03:50:57 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 Oct 2010 01:50:57 +0000 Subject: [issue10232] Tkinter issues with Scrollbar and custom widget list In-Reply-To: <1288366788.46.0.695886030233.issue10232@psf.upfronthosting.co.za> Message-ID: <1288403457.18.0.672713866892.issue10232@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I ran testcase.py with stock 3.1.2 on winxp (under IDLE). Changes needed (one place each) were Tkinter -> tkinter print x -> print(x) <> -> != # <> is long since deprecated! I get 3 line box windowing 10 lines. If I enlarge window, there are still only 3 lines displayed. With triangle arrows at top and bottom of scroll bar box, I can scroll up and down a line at a time, with lines 1 to 8 at top. Nothing prints. There is a slight flash with redisplay. With click and move on scroll bar itself, I can get down to where line 4 is at the top. Motion is not really jerky, rather it jumps one line at a time, just as with triangles. Going farther, box goes crazy flashing. When I unclick mouse, it settles all the way down with line 8 on box. Repetitious print looks like 0.4 0.4 4 0.7001 0.7001 7 0.4334 0.4334 4 0.7 0.7 7 0.4333 0.4333 4 0.7 0.7 7 ... So confirmed behavior is, if anything, worse. Just to make sure that print was not causing a problem, I commented it out and got same behavior. I do not know enough tkinter (tk) to know if there is a bug in your code. I recommend posting to python-list, subject: Problem with tkinter box, with this link and short explanation. There are some people there who know tkinter much better than me who might comment. ---------- versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 03:52:55 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 30 Oct 2010 01:52:55 +0000 Subject: [issue7911] unittest.TestCase.longMessage should default to True in Python 3.2 In-Reply-To: <1265915317.63.0.548370408241.issue7911@psf.upfronthosting.co.za> Message-ID: <1288403575.22.0.422813625298.issue7911@psf.upfronthosting.co.za> Michael Foord added the comment: I intend to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 04:00:19 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 30 Oct 2010 02:00:19 +0000 Subject: [issue10239] multiprocessing signal defect In-Reply-To: <1288394215.77.0.548546453829.issue10239@psf.upfronthosting.co.za> Message-ID: <1288404019.93.0.679500184479.issue10239@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +asksol _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 04:34:08 2010 From: report at bugs.python.org (ivank) Date: Sat, 30 Oct 2010 02:34:08 +0000 Subject: [issue10240] dict.update.__doc__ is misleading In-Reply-To: <1288406048.13.0.615215732385.issue10240@psf.upfronthosting.co.za> Message-ID: <1288406048.13.0.615215732385.issue10240@psf.upfronthosting.co.za> New submission from ivank : It would be nice if dict.update.__doc__ conveyed some of the subtleties of the update algorithm. See the patch. I changed __doc__ to mention the fast path for dicts, and changed one instance of E: -> E.keys(): ---------- components: Interpreter Core files: dict.update.__doc__.patch keywords: patch messages: 119954 nosy: ivank priority: normal severity: normal status: open title: dict.update.__doc__ is misleading versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file19420/dict.update.__doc__.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 04:43:25 2010 From: report at bugs.python.org (Dev Player) Date: Sat, 30 Oct 2010 02:43:25 +0000 Subject: [issue10060] python.exe crashes or hangs on help() modules when bad modules found In-Reply-To: <1286676227.2.0.62342583611.issue10060@psf.upfronthosting.co.za> Message-ID: <1288406605.94.0.342961048356.issue10060@psf.upfronthosting.co.za> Dev Player added the comment: Another thing I've noticed that makes the issue more complicated (or perhaps less complicated depending on your view). When running the python.exe at the DOS prompt (in a window on WinXP), then issuing the help() then modules commands, python.exe seems to hang at times, when it doesn't crash. However this apparent hang sometimes seems to be related to the attached "help" child window/dialog popup instantating with "focus" behind the DOS window. This popup with the focus (and behind it's parent window and being modal) prevents the mouse from moving the DOS window (holding the running python.exe) from being moved. The -sometimes- solution to this "apparent" hang is ALT-TAB back to the DOS window which will put the help-modal-dialog on top of said DOS window (which is running Python). ---------- Added file: http://bugs.python.org/file19421/python_help_modules_help_dialog.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 05:39:08 2010 From: report at bugs.python.org (Matthew Barnett) Date: Sat, 30 Oct 2010 03:39: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: <1288409948.27.0.394689414901.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-20101030.zip is a new version of the regex module. I've also added yet more to the unit tests. ---------- Added file: http://bugs.python.org/file19422/issue2636-20101030.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 05:48:50 2010 From: report at bugs.python.org (Neil Schemenauer) Date: Sat, 30 Oct 2010 03:48:50 +0000 Subject: [issue10241] gc fixes for module m_copy attribute In-Reply-To: <1288410530.83.0.095379048444.issue10241@psf.upfronthosting.co.za> Message-ID: <1288410530.83.0.095379048444.issue10241@psf.upfronthosting.co.za> New submission from Neil Schemenauer : I'm trying implement some saner module shutdown procedure (similar to issue 812369). One of the many problems I've run into is that the GC doesn't know about the m_copy attribute of modules. I think the attached patch is correct. tp_tranverse exposes m_copy if it is non-NULL. tp_clear calls Py_CLEAR on it. ---------- assignee: loewis components: Interpreter Core files: module_m_copy.txt messages: 119957 nosy: benjamin.peterson, loewis, nascheme priority: normal severity: normal status: open title: gc fixes for module m_copy attribute type: behavior Added file: http://bugs.python.org/file19423/module_m_copy.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 06:40:21 2010 From: report at bugs.python.org (Jacques Grove) Date: Sat, 30 Oct 2010 04:40:21 +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: <1288413621.76.0.149968163747.issue2636@psf.upfronthosting.co.za> Jacques Grove added the comment: And another (with issue2636-20101030.zip): $ cat test.py import re, regex text = "XYABCYPPQ\nQ DEF" regexp = 'X(Y[^Y]+?){1,2}(\ |Q)+DEF' print re.findall(regexp, text) print regex.findall(regexp, text) $ python test.py [('YPPQ\n', ' ')] [] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 07:18:00 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sat, 30 Oct 2010 05:18:00 +0000 Subject: [issue10237] failure in Barrier tests In-Reply-To: <1288391142.98.0.44997335021.issue10237@psf.upfronthosting.co.za> Message-ID: <1288415880.13.0.652532244374.issue10237@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: This is a timeout issue, probably encountered on a slow machine. Checked in revision 85964 increasing the default timeout to cater to slower machines. However, I also see that the timeout mechanism used by barrier isn't very robust. I'll submit a patch with a suggested change soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 07:26:12 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 30 Oct 2010 05:26:12 +0000 Subject: [issue10242] unittest's assertItemsEqual() method makes too many assumptions about its input In-Reply-To: <1288416372.65.0.387803067469.issue10242@psf.upfronthosting.co.za> Message-ID: <1288416372.65.0.387803067469.issue10242@psf.upfronthosting.co.za> New submission from Raymond Hettinger : class T(unittest.TestCase): def test_items_equal(self): # this test fails, but should succeed a = [{2,4}, {1,2}] b = a[::-1] self.assertItemsEqual(a, b) This method has a fast-path using sorted() and a slow-path that doesn't care about cross-type comparisons. The fast-path is incorrect though and gets the wrong answer in the above test case. ---------- assignee: michael.foord messages: 119960 nosy: michael.foord, rhettinger priority: high severity: normal status: open title: unittest's assertItemsEqual() method makes too many assumptions about its input versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 08:07:25 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 30 Oct 2010 06:07:25 +0000 Subject: [issue10240] dict.update.__doc__ is misleading In-Reply-To: <1288406048.13.0.615215732385.issue10240@psf.upfronthosting.co.za> Message-ID: <1288418845.77.0.561784591427.issue10240@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'm not sure that we should mention the fast path for dicts. That is an implementation detail and may not be present in IronPython, PyPy, Jython, etc. The current version includes: D.updated(E, **F) --> None. Updated D for dict/iterable E and F. ISTM that covers the semantics of what it does. Your proposed modification gets into how it does it. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 08:32:34 2010 From: report at bugs.python.org (ivank) Date: Sat, 30 Oct 2010 06:32:34 +0000 Subject: [issue10240] dict.update.__doc__ is misleading In-Reply-To: <1288406048.13.0.615215732385.issue10240@psf.upfronthosting.co.za> Message-ID: <1288420354.41.0.410432357777.issue10240@psf.upfronthosting.co.za> ivank added the comment: CPython's dict(obj) ignores `keys` and `__iter__` if obj is a subclass of dict. I thought this was an important language detail, not just an implementation quirk. But, I just tested pypy 1.3, and it is calling .keys() on dicts. Oh well. I think the __doc__ can still be slightly improved; ignore my patch and just change the first E: to E.keys(): - that would be more accurate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 08:46:30 2010 From: report at bugs.python.org (Max Skaller) Date: Sat, 30 Oct 2010 06:46:30 +0000 Subject: [issue10243] Packaged Pythons In-Reply-To: <1288421190.78.0.406160800778.issue10243@psf.upfronthosting.co.za> Message-ID: <1288421190.78.0.406160800778.issue10243@psf.upfronthosting.co.za> New submission from Max Skaller : Not sure if this is a bug or not. I am unable to find libpython.so for Python3 on either my Mac or Ubuntu. Perhaps this is a packaging fault, however some documentation in the Wiki suggests otherwise. It appears the builders have reverted to an archaic linkage pattern which I helped to get rid of (lets see, perhaps a decade ago?). Python 2.6, for example, does ship a shared library. Python must be shipped with code linked as follows, I will explain below why, but first the list: 1) The mainline (C main() function) must be a stub which calls the real mainline, which is located in libpython. 2) The mainline MUST be compiled with C++ not C. 3) All extension libraries and add-ons to Python provided as shared libraries must be explicitly linked against libpython. In particular it is NOT acceptable for any extension or shared library component to expect to find its symbols in the host application executable as the Wiki documentation seems to suggest (in a section which explains a bit of a workaround for OSX frameworks). Now the reason it MUST be this way. First, any C++ code which is to be linked into an application, either statically, dynamically at load time, or under program control at run time, may require certain stuff to be in place (RTTI, streams, exception handling stuff, or whatever) which can only be put in place in the initialisation of the main application. Although the details are platform specific, it is simply not safe to permit C++ extension modules unless this step is taken. Legacy or embedded systems may have to make do with a C mainline, and systems which don't support dynamic loading can also do without C++ compilation provided the pre-loaded extensions are all C. On most major platforms, however, a C++ driver stub is required. The second issue is also quite simple. It is quite incorrect in a modern computing environment to assume an *application* will be hosting the python interpreter directly. It is not only possible, it is in fact the case for my project, that were the Python interpreter to be called, it would from a shared library loaded under program control at run time. Such an interpreter cannot be loaded at all if it isn't present in a library: it either has to be statically linked into the shared library making the call, with some ugly linker switches to make sure no symbols are dropped, or it has to be loaded dynamically. The latter case is the only viable option if the run time linker is unable to share symbols to a loaded application, and even if that is possible and can be arranged it is not likely to work so well if multiple shared libraries try to do it. Similarly, even if you managed to load it somehow, any dynamically loaded extensions may or may not be able to find the symbols. The ONLY reliable way to ensure extensions can find libpython symbols is to link them against libpython. In fact, the mainline application should not only contain NO libpython symbols specifically to disable this wrong practice and break any bad extensions that rely on it, it should also, as explained, contain exactly one reference to libpython, which calls Python with argv, argc[] as if it were the mainline. Just as motivation here: my product is an ultra-high performance programming language with a special construction to allow Python C-extension modules to be built. Its target is usually a shared library and that library is produced by first generating C++ and then compiling it with your native C++ compiler. For a generated program to call Python interpreter, it HAS to be available in a shared library, and for any extension modules that interpreter loads, they HAVE to get their symbols from that shared library, and, if the generated program is itself a Python module, then if that module is to be loaded from any C extension, including itself or some other extension, it HAS to be linked against libpython which HAS to be loaded dynamically by the loaded. The unfortunate downside of this is that it is NOT POSSIBLE to have a huge statically linked Python executable which just loads C extensions and nothing else happens. If you're loading any C extensions dynamically libpython must be loaded dynamically too. Just to be clear: I can easily build it the way I want it but this will not solve my problem, which is to support clients who wish to use my product to generate high performance Python callable modules which will just work "out of the box" with existing Python code. In particular, replacing some slow modules with optimised ones would be more or less entirely transparent .. except that at the moment it could only work with Python 2.x since Python 3.x shipments don't seem to have any shared libpython included (and I just changed my compiler to support Python 3 modules instead of Python 2). ---------- components: Installation messages: 119963 nosy: Max.Skaller priority: normal severity: normal status: open title: Packaged Pythons type: resource usage versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 09:30:34 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 30 Oct 2010 07:30:34 +0000 Subject: [issue6105] json.dumps doesn't respect OrderedDict's iteration order In-Reply-To: <1243243366.01.0.202838739816.issue6105@psf.upfronthosting.co.za> Message-ID: <1288423834.33.0.938464078842.issue6105@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Backported to 2.7 See r85966 ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 09:40:55 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 30 Oct 2010 07:40:55 +0000 Subject: [issue10243] Packaged Pythons In-Reply-To: <1288421190.78.0.406160800778.issue10243@psf.upfronthosting.co.za> Message-ID: <4CCBCC03.8020200@v.loewis.de> Martin v. L?wis added the comment: > Python 2.6, for example, does ship a shared library. That is not really the case. Python 2.6 ships in source form. It builds with a libpython shared library only if you configure with --enable-shared. > In particular it is NOT acceptable for any extension or shared > library component to expect to find its symbols in the host > application executable as the Wiki documentation seems to suggest (in > a section which explains a bit of a workaround for OSX frameworks). I completely disagree with this evaluation. These statements are not true in general, although they might be partially true for specific operating systems and compilers. > Although the details are platform specific, it is simply > not safe to permit C++ extension modules unless this step is taken. It certainly is safe on all platforms where Python does that, i.e. primarily Linux, Windows, and OS X. Only archaic C++ implementations fail to support applications where main() was not compiled with a C++ compiler. > On most major platforms, however, a C++ driver stub is required. That is not true. > It is not only possible, it > is in fact the case for my project, that were the Python interpreter > to be called, it would from a shared library loaded under program > control at run time. Python supports embedding of the interpreter quite well. You can choose between linking Python as a static (.a) or dynamic library. If you use a static library, extension modules would still pick up Python symbols from the executable. > Such an interpreter cannot be loaded at all if it isn't present in a > library: it either has to be statically linked into the shared > library making the call, with some ugly linker switches to make sure > no symbols are dropped, or it has to be loaded dynamically. The Python build process will *always* create a library that embedding applications can link against. > For a generated program to call Python interpreter, it HAS to be > available in a shared library, and for any extension modules that > interpreter loads, they HAVE to get their symbols from that shared > library, and, if the generated program is itself a Python module, > then if that module is to be loaded from any C extension, including > itself or some other extension, it HAS to be linked against libpython > which HAS to be loaded dynamically by the loaded. If that's your requirement, make sure you build against a Python installation that was itself built with --enable-shared. > The unfortunate downside of this is that it is NOT POSSIBLE to have a > huge statically linked Python executable which just loads C > extensions and nothing else happens. If you're loading any C > extensions dynamically libpython must be loaded dynamically too. That depends on the operating system. On Linux, it would be possible to link the entire Python interpreter in your language's shared library, and extension modules would still find their symbols. > Just to be clear: I can easily build it the way I want it but this > will not solve my problem, which is to support clients who wish to > use my product to generate high performance Python callable modules > which will just work "out of the box" with existing Python code. In > particular, replacing some slow modules with optimised ones would be > more or less entirely transparent .. except that at the moment it > could only work with Python 2.x since Python 3.x shipments don't seem > to have any shared libpython included (and I just changed my compiler > to support Python 3 modules instead of Python 2). One solution could be to ship libpythonXY.so yourself, along with your the rest of the binaries that you provide. Or else do as I propose above: link the Python interpreter statically into your shared library. I fail to see the bug in this report. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 10:18:03 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 30 Oct 2010 08:18:03 +0000 Subject: [issue10221] {}.pop('a') raises non-standard KeyError exception In-Reply-To: <1288272402.21.0.117850725041.issue10221@psf.upfronthosting.co.za> Message-ID: <1288426683.64.0.901776789954.issue10221@psf.upfronthosting.co.za> Raymond Hettinger added the comment: See r85967, r85968 and r85969. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 11:37:21 2010 From: report at bugs.python.org (Zbyszek Szmek) Date: Sat, 30 Oct 2010 09:37:21 +0000 Subject: [issue10224] Build 3.x documentation using python3.x In-Reply-To: <1288304199.49.0.7053863257.issue10224@psf.upfronthosting.co.za> Message-ID: <1288431441.37.0.580963951748.issue10224@psf.upfronthosting.co.za> Changes by Zbyszek Szmek : ---------- nosy: +zbysz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 11:37:46 2010 From: report at bugs.python.org (Zbyszek Szmek) Date: Sat, 30 Oct 2010 09:37:46 +0000 Subject: [issue10220] Make generator state easier to introspect In-Reply-To: <1288269773.83.0.431465195808.issue10220@psf.upfronthosting.co.za> Message-ID: <1288431466.66.0.420747117993.issue10220@psf.upfronthosting.co.za> Changes by Zbyszek Szmek : ---------- nosy: +zbysz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 12:20:02 2010 From: report at bugs.python.org (Maciej Fijalkowski) Date: Sat, 30 Oct 2010 10:20:02 +0000 Subject: [issue10244] PEP100 has broken links In-Reply-To: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> Message-ID: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> New submission from Maciej Fijalkowski : PEP100 (http://www.python.org/dev/peps/pep-0100/) links to python starship. Should it just link to python.org for the newest version of this doc? ---------- assignee: docs at python components: Documentation messages: 119967 nosy: docs at python, fijall priority: normal severity: normal status: open title: PEP100 has broken links _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 13:09:56 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 30 Oct 2010 11:09:56 +0000 Subject: [issue10244] PEP100 has broken links In-Reply-To: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> Message-ID: <1288436996.49.0.970156897537.issue10244@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Why do you say that the link is broken? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 13:27:18 2010 From: report at bugs.python.org (Maciej Fijalkowski) Date: Sat, 30 Oct 2010 11:27:18 +0000 Subject: [issue10244] PEP100 has broken links In-Reply-To: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> Message-ID: <1288438038.01.0.512559626789.issue10244@psf.upfronthosting.co.za> Maciej Fijalkowski added the comment: Python starship is down, I thought it's permanently down, isn't it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 13:30:54 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 30 Oct 2010 11:30:54 +0000 Subject: [issue10244] PEP100 has broken links In-Reply-To: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> Message-ID: <1288438254.88.0.254266580257.issue10244@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The link works fine for me right now, and the starship is alive and well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 13:37:20 2010 From: report at bugs.python.org (Maciej Fijalkowski) Date: Sat, 30 Oct 2010 11:37:20 +0000 Subject: [issue10244] PEP100 has broken links In-Reply-To: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> Message-ID: <1288438640.76.0.928367953213.issue10244@psf.upfronthosting.co.za> Maciej Fijalkowski added the comment: That is really weird, it definitely doesn't for me. Anyway, closing the ticket then. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 13:54:08 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 30 Oct 2010 11:54:08 +0000 Subject: [issue10244] PEP100 has broken links In-Reply-To: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> Message-ID: <1288439648.52.0.298129894069.issue10244@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, obviously only the first link works (does for me too), the second needs to have a version filled in :) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 13:54:38 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 30 Oct 2010 11:54:38 +0000 Subject: [issue10244] PEP100 has broken links In-Reply-To: <1288434002.3.0.460558889846.issue10244@psf.upfronthosting.co.za> Message-ID: <4CCC077B.3030405@egenix.com> Marc-Andre Lemburg added the comment: Maciej Fijalkowski wrote: > > New submission from Maciej Fijalkowski : > > PEP100 (http://www.python.org/dev/peps/pep-0100/) links to python starship. Should it just link to python.org for the newest version of this doc? The starship link works for me (starship just moved to a new server, so it'll take a while before the DNS changes propogate). Note that the proposal was moved into the PEP list after we introduced PEPs - the proposal itself predates PEPs as we have them now. The link to the older versions are just there for historic reasons. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 14:17:57 2010 From: report at bugs.python.org (Brian Brazil) Date: Sat, 30 Oct 2010 12:17:57 +0000 Subject: [issue10245] Fix resource warnings in test_telnetlib In-Reply-To: <1288441077.58.0.74967624488.issue10245@psf.upfronthosting.co.za> Message-ID: <1288441077.58.0.74967624488.issue10245@psf.upfronthosting.co.za> New submission from Brian Brazil : Please see attached patch and "closing files and sockets in a timely manner in the stdlib" on python-dev. ---------- components: Tests files: test_telnetlib_fd_leak.patch keywords: patch messages: 119974 nosy: bbrazil, brett.cannon priority: normal severity: normal status: open title: Fix resource warnings in test_telnetlib versions: Python 3.3 Added file: http://bugs.python.org/file19424/test_telnetlib_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 14:43:59 2010 From: report at bugs.python.org (Brian Brazil) Date: Sat, 30 Oct 2010 12:43:59 +0000 Subject: [issue10246] uu.encode fd leak if arguments are filenames In-Reply-To: <1288442639.64.0.225506910081.issue10246@psf.upfronthosting.co.za> Message-ID: <1288442639.64.0.225506910081.issue10246@psf.upfronthosting.co.za> New submission from Brian Brazil : Please see attached patch, I'm not sure if this is the cleanest way to fix this. This also fixes the resource warnings in the test. ---------- components: Library (Lib) files: uu_fd_leak.patch keywords: patch messages: 119975 nosy: bbrazil, brett.cannon priority: normal severity: normal status: open title: uu.encode fd leak if arguments are filenames versions: Python 3.3 Added file: http://bugs.python.org/file19425/uu_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 14:46:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 12:46:57 +0000 Subject: [issue10246] uu.encode fd leak if arguments are filenames In-Reply-To: <1288442639.64.0.225506910081.issue10246@psf.upfronthosting.co.za> Message-ID: <1288442817.54.0.0842456160638.issue10246@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think there should be a try..finally block so that those files get closed even when there's an error in-between. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 14:51:52 2010 From: report at bugs.python.org (Brian Brazil) Date: Sat, 30 Oct 2010 12:51:52 +0000 Subject: [issue10246] uu.encode fd leak if arguments are filenames In-Reply-To: <1288442639.64.0.225506910081.issue10246@psf.upfronthosting.co.za> Message-ID: <1288443112.68.0.35472922219.issue10246@psf.upfronthosting.co.za> Brian Brazil added the comment: How does v2 look? ---------- Added file: http://bugs.python.org/file19426/uu_fd_leak_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 14:59:49 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Oct 2010 12:59:49 +0000 Subject: [issue10240] dict.update.__doc__ is misleading In-Reply-To: <1288406048.13.0.615215732385.issue10240@psf.upfronthosting.co.za> Message-ID: <1288443589.42.0.986827525375.issue10240@psf.upfronthosting.co.za> R. David Murray added the comment: Maybe the fastpath should do a strict check and not be used for subclasses of dict? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 15:00:42 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 13:00:42 +0000 Subject: [issue10246] uu.encode fd leak if arguments are filenames In-Reply-To: <1288443112.68.0.35472922219.issue10246@psf.upfronthosting.co.za> Message-ID: <1288443636.3627.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > How does v2 look? Nice, thank you! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 15:03:48 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 13:03:48 +0000 Subject: [issue10237] failure in Barrier tests In-Reply-To: <1288391142.98.0.44997335021.issue10237@psf.upfronthosting.co.za> Message-ID: <1288443828.33.0.266726009467.issue10237@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I also get a failure here: ====================================================================== FAIL: test_default_timeout (test.test_threading.BarrierTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/__svn__/Lib/test/lock_tests.py", line 784, in test_default_timeout self.run_threads(f) File "/home/antoine/py3k/__svn__/Lib/test/lock_tests.py", line 615, in run_threads f() File "/home/antoine/py3k/__svn__/Lib/test/lock_tests.py", line 783, in f self.assertRaises(threading.BrokenBarrierError, self.barrier.wait) AssertionError: BrokenBarrierError not raised by wait ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 15:04:00 2010 From: report at bugs.python.org (Lorenz Quack) Date: Sat, 30 Oct 2010 13:04:00 +0000 Subject: [issue10247] mold builder In-Reply-To: <20101030130356.13C177820C@psf.upfronthosting.co.za> Message-ID: <20101030130356.13C177820C@psf.upfronthosting.co.za> New submission from Lorenz Quack : RV Plastics is your end to end partner for all your moulds and Injection Moulding requirements. Founded in 2003, RV Plastics dedicates itself to the plastic industry, exporting Plastic injection moulds and molded Components to customers spread over 20 countries. We offer mould design & development services for plastic house ware, electrical, automobile and industrial products. We produce high quality moulds at attractive prices. Tel: 86-769-8997 5802 Fax: 86-769-8458 5238 Web: www(dot)rvmold(dot)com E-mail: rvmold(at)hotmail(dot)com / sales(at)rvmold(dot)com ---------- messages: 119981 nosy: donlorenzo priority: normal severity: normal status: open title: mold builder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 15:04:40 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 13:04:40 +0000 Subject: [issue10246] uu.encode fd leak if arguments are filenames In-Reply-To: <1288442639.64.0.225506910081.issue10246@psf.upfronthosting.co.za> Message-ID: <1288443880.97.0.48541703257.issue10246@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r85975 (3.2). I guess we'll do a big svnmerge to other branches later. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 15:17:28 2010 From: report at bugs.python.org (Brian Brazil) Date: Sat, 30 Oct 2010 13:17:28 +0000 Subject: [issue10248] Fix resource warnings in test_xmlrpclib In-Reply-To: <1288444648.27.0.0542551809175.issue10248@psf.upfronthosting.co.za> Message-ID: <1288444648.27.0.0542551809175.issue10248@psf.upfronthosting.co.za> New submission from Brian Brazil : I'm not 100% comfortable with this patch as my knowledge of the xmlrpc interface is very limited, a simple p.close() would seem cleaner - but that doesn't work. ---------- files: test_xmlrpclib_fd_leak.patch keywords: patch messages: 119983 nosy: bbrazil priority: normal severity: normal status: open title: Fix resource warnings in test_xmlrpclib Added file: http://bugs.python.org/file19427/test_xmlrpclib_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 15:18:05 2010 From: report at bugs.python.org (Brian Brazil) Date: Sat, 30 Oct 2010 13:18:05 +0000 Subject: [issue10249] Fix resource warnings in test_unicodedata In-Reply-To: <1288444685.04.0.0407449427319.issue10249@psf.upfronthosting.co.za> Message-ID: <1288444685.04.0.0407449427319.issue10249@psf.upfronthosting.co.za> New submission from Brian Brazil : Please see attached. ---------- components: Library (Lib) files: test_unicodedata_fd_leak.patch keywords: patch messages: 119984 nosy: bbrazil priority: normal severity: normal status: open title: Fix resource warnings in test_unicodedata versions: Python 3.3 Added file: http://bugs.python.org/file19428/test_unicodedata_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 15:18:47 2010 From: report at bugs.python.org (Brian Brazil) Date: Sat, 30 Oct 2010 13:18:47 +0000 Subject: [issue10250] Fix resource warnings in test_urllib2_localnet In-Reply-To: <1288444727.09.0.95705539029.issue10250@psf.upfronthosting.co.za> Message-ID: <1288444727.09.0.95705539029.issue10250@psf.upfronthosting.co.za> New submission from Brian Brazil : Please see attached, not sure this is quite right. ---------- components: Tests files: test_urllib2_localnet_fd_leak.patch keywords: patch messages: 119985 nosy: bbrazil priority: normal severity: normal status: open title: Fix resource warnings in test_urllib2_localnet versions: Python 3.3 Added file: http://bugs.python.org/file19429/test_urllib2_localnet_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 15:19:29 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 13:19:29 +0000 Subject: [issue10248] Fix resource warnings in test_xmlrpclib In-Reply-To: <1288444648.27.0.0542551809175.issue10248@psf.upfronthosting.co.za> Message-ID: <1288444769.71.0.850885898876.issue10248@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +loewis stage: -> patch review type: -> resource usage versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 15:19:59 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 13:19:59 +0000 Subject: [issue10250] Fix resource warnings in test_urllib2_localnet In-Reply-To: <1288444727.09.0.95705539029.issue10250@psf.upfronthosting.co.za> Message-ID: <1288444799.92.0.774653485976.issue10250@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +orsenthil stage: -> patch review type: -> resource usage versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 15:22:00 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 13:22:00 +0000 Subject: [issue10247] mold builder Message-ID: <1288444920.19.0.909150466553.issue10247@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- Removed message: http://bugs.python.org/msg119981 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 15:22:18 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 13:22:18 +0000 Subject: [issue10247] mold builder Message-ID: <1288444938.05.0.526536776639.issue10247@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: -donlorenzo resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 16:03:53 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Oct 2010 14:03:53 +0000 Subject: [issue9340] argparse parse_known_args does not work with subparsers In-Reply-To: <1279886405.92.0.918578525345.issue9340@psf.upfronthosting.co.za> Message-ID: <1288447433.09.0.416446345121.issue9340@psf.upfronthosting.co.za> R. David Murray added the comment: I've looked over this patch, and it seems to me that there is no compelling reason to create two new functions. I think it would be clearer to just inline that code in the places it is used. If it turns out later that the code needs to be reused elsewhere, it can be factored out at that time. (Also, as it stands the methods are being made part of the public API, and that doesn't look right to me.) Catherine, if you'd like to update the patch that would be great. Otherwise we will hopefully get to it during the upcoming bug weekend. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 16:04:35 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Oct 2010 14:04:35 +0000 Subject: [issue9340] argparse parse_known_args does not work with subparsers In-Reply-To: <1279886405.92.0.918578525345.issue9340@psf.upfronthosting.co.za> Message-ID: <1288447475.24.0.861180022977.issue9340@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- stage: needs patch -> patch review versions: +Python 3.1 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 16:08:06 2010 From: report at bugs.python.org (Brian Brazil) Date: Sat, 30 Oct 2010 14:08:06 +0000 Subject: [issue10251] Fix resource warnings in test_file In-Reply-To: <1288447686.86.0.275228284078.issue10251@psf.upfronthosting.co.za> Message-ID: <1288447686.86.0.275228284078.issue10251@psf.upfronthosting.co.za> New submission from Brian Brazil : Please see attached. ---------- components: Tests files: test_file_fd_leak.patch keywords: patch messages: 119987 nosy: bbrazil priority: normal severity: normal status: open title: Fix resource warnings in test_file versions: Python 3.3 Added file: http://bugs.python.org/file19430/test_file_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 16:22:54 2010 From: report at bugs.python.org (Brian Brazil) Date: Sat, 30 Oct 2010 14:22:54 +0000 Subject: [issue10252] Fix resource warnings in distutil tests In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> New submission from Brian Brazil : Please see attached. ---------- assignee: tarek components: Distutils files: distutils_fd_leak.patch keywords: patch messages: 119988 nosy: bbrazil, eric.araujo, tarek priority: normal severity: normal status: open title: Fix resource warnings in distutil tests versions: Python 3.3 Added file: http://bugs.python.org/file19431/distutils_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 16:23:04 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 14:23:04 +0000 Subject: [issue10251] Fix resource warnings in test_file In-Reply-To: <1288447686.86.0.275228284078.issue10251@psf.upfronthosting.co.za> Message-ID: <1288448584.8.0.416512008235.issue10251@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r85977, thanks. ---------- nosy: +pitrou resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 16:25:05 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 14:25:05 +0000 Subject: [issue10249] Fix resource warnings in test_unicodedata In-Reply-To: <1288444685.04.0.0407449427319.issue10249@psf.upfronthosting.co.za> Message-ID: <1288448705.15.0.671109338856.issue10249@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Fixed in r85978, thank you. ---------- nosy: +pitrou resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 16:25:40 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 14:25:40 +0000 Subject: [issue10252] Fix resource warnings in distutil tests In-Reply-To: <1288448574.25.0.83148173886.issue10252@psf.upfronthosting.co.za> Message-ID: <1288448740.09.0.114944442159.issue10252@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> patch review type: -> resource usage versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 16:51:22 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Oct 2010 14:51:22 +0000 Subject: [issue10226] urlparse example is wrong In-Reply-To: <1288329966.05.0.0344146922962.issue10226@psf.upfronthosting.co.za> Message-ID: <1288450282.22.0.736195691365.issue10226@psf.upfronthosting.co.za> R. David Murray added the comment: How about this: - If the scheme value is not specified, urlparse following the syntax - specifications from RFC 1808, expects the netloc value to start with '//', - Otherwise, it is not possible to distinguish between net_loc and path - component and would classify the indistinguishable component as path as in - a relative url. + Following the syntax specifications in RFC 1808, urlparse recognizes + a netloc only if it is properly introduced by '//'. Otherwise the + input must be presumed to be a relative URL and thus to start with + a path component. However, it seems to me there is a bug here: >>> urlparse.urlparse('www.k.com:80/path') ParseResult(scheme='', netloc='', path='www.k.com:80/path', params='', query='', fragment='') >>> urlparse.urlparse('www.k.com:path') ParseResult(scheme='www.k.com', netloc='', path='path', params='', query='', fragment='') I think the second one is correct and that the first one should produce ParseResult(scheme='www.k.com', netloc='', path='80/path', params='', query='', fragment='') I haven't read all the way through the RFC again, though. But *one* of the above is wrong. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 16:59:08 2010 From: report at bugs.python.org (Brian Brazil) Date: Sat, 30 Oct 2010 14:59:08 +0000 Subject: [issue10253] Fix fd leak in fileio.c and test resource warnings In-Reply-To: <1288450748.11.0.919591582507.issue10253@psf.upfronthosting.co.za> Message-ID: <1288450748.11.0.919591582507.issue10253@psf.upfronthosting.co.za> New submission from Brian Brazil : fileio_init will leak a fd if you open a file for append that isn't seekable. We should close this fd before returning the failure. The attached patch fixes this and a resource warning in the tests, but I'm unsure if it'd be better to use internal_close. I'd want the error from the seek rather than any potential error from the close, so I think this is okay. Regrtest is happy. ---------- components: IO files: fileio_fd_leak.patch keywords: patch messages: 119992 nosy: bbrazil priority: normal severity: normal status: open title: Fix fd leak in fileio.c and test resource warnings versions: Python 3.3 Added file: http://bugs.python.org/file19432/fileio_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 17:02:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 15:02:57 +0000 Subject: [issue10253] Fix fd leak in fileio.c and test resource warnings In-Reply-To: <1288450748.11.0.919591582507.issue10253@psf.upfronthosting.co.za> Message-ID: <1288450977.29.0.360869734095.issue10253@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +amaury.forgeotdarc, benjamin.peterson stage: -> patch review type: -> resource usage versions: +Python 2.7, Python 3.1, Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 17:06:56 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 15:06:56 +0000 Subject: [issue10253] Fix fd leak in fileio.c and test resource warnings In-Reply-To: <1288450748.11.0.919591582507.issue10253@psf.upfronthosting.co.za> Message-ID: <1288451216.92.0.168708636123.issue10253@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It should be closed only if closefd is true. Does it fix a warning in the test suite? Otherwise I think it would need its own test. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 17:12:15 2010 From: report at bugs.python.org (Dave Malcolm) Date: Sat, 30 Oct 2010 15:12:15 +0000 Subject: [issue1346238] A constant folding optimization pass for the AST Message-ID: <1288451535.34.0.491552084996.issue1346238@psf.upfronthosting.co.za> Changes by Dave Malcolm : ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 17:28:11 2010 From: report at bugs.python.org (Brian Brazil) Date: Sat, 30 Oct 2010 15:28:11 +0000 Subject: [issue10253] Fix fd leak in fileio.c and test resource warnings In-Reply-To: <1288450748.11.0.919591582507.issue10253@psf.upfronthosting.co.za> Message-ID: <1288452491.46.0.929930277688.issue10253@psf.upfronthosting.co.za> Brian Brazil added the comment: Version 2 of the patch is attached. This fixes a warning at line 256 in test_fileio.py: f = _FileIO("/dev/tty", "a") on my Hardy machine. ---------- Added file: http://bugs.python.org/file19433/fileio_fd_leak_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 17:42:14 2010 From: report at bugs.python.org (Merlijn van Deen) Date: Sat, 30 Oct 2010 15:42:14 +0000 Subject: [issue10254] unicodedata.normalize('NFC', s) regression In-Reply-To: <1288453334.74.0.770473212932.issue10254@psf.upfronthosting.co.za> Message-ID: <1288453334.74.0.770473212932.issue10254@psf.upfronthosting.co.za> New submission from Merlijn van Deen : Summary: Somewhere between 2.6.5 r79063 and 3.1 r79147 a regression in the unicode NFC normalization has been introduces. This regression leads to bot edit wars on wikipedia [1]. It is reproducable with a simple script [2]. Mediawiki/PHP [3] and C# [4] test scripts both show the old behaviour, which leads me to believe this is a python bug. A search for older bugs shows bug #1054943 [5] which has commits in the suspected region. The regression causes certain NFC-normalized strings to become mangled. Because of the wide range of unicode strings on wikipedia, this causes several problems. Details of those can be found at [1]. Example strings include: (these strings have been NFC-normalized by mediawiki) * u'Li\u030dt-s\u1e73\u0301' * u'\u092e\u093e\u0930\u094d\u0915 \u091c\u093c\u0941\u0915\u0947\u0930\u092c\u0930\u094d\u0917' * u'\u0915\u093f\u0930\u094d\u0917\u093f\u091c\u093c\u0938\u094d\u0924\u093e\u0928' The bug can be shown simply with unicodedata.normalize('NFC', s) == s where s is one of the strings above. This will return True on older python versions, False on newer versions. There is a script available that does this [2]. The bug has been tested on the following machines and python versions. OK indicates the bug is not present, FAIL indicates the bug is present. Host: SunOS willow 5.10 Generic_142910-17 i86pc i386 i86pc Solaris '2.3.3 (#1, Dec 16 2004, 14:38:56) [C]' OK '2.6.5 (r265:79063, Jul 10 2010, 17:50:38) [C]' OK '2.7 (r27:82500, Aug 5 2010, 04:28:45) [C]' FAIL '3.1.2 (r312:79147, Sep 24 2010, 05:34:04) [C]' FAIL Host: Linux nightshade 2.6.26-2-amd64 #1 SMP Thu Sep 16 15:56:38 UTC 2010 x86_64 GNU/Linux '2.4.6 (#2, Jan 24 2010, 12:20:41) \n[GCC 4.3.2]' OK '2.5.2 (r252:60911, Jan 24 2010, 17:44:40) \n[GCC 4.3.2]' OK '2.6.4+ (r264:75706, Feb 16 2010, 05:11:28) \n[GCC 4.4.3]' OK Host: Linux dorthonion 2.6.22.18-co-0.7.4 #1 PREEMPT Wed Apr 15 18:57:39 UTC 2009 i686 GNU/Linux '2.5.4 (r254:67916, Jan 20 2010, 21:44:03) \n[GCC 4.3.3]' OK '2.6.2 (release26-maint, Apr 19 2009, 01:56:41) \n[GCC 4.3.3]' OK '3.0.1+ (r301:69556, Apr 15 2009, 15:59:22) \n[GCC 4.3.3]' OK [1] https://sourceforge.net/tracker/index.php?func=detail&aid=3081100&group_id=93107&atid=603138# ; http://fr.wikipedia.org/w/index.php?title=Mark_Zuckerberg&action=historysubmit&diff=57753004&oldid=57751674 [2] http://pastebin.ca/1977285 (py2.x), http://pastebin.ca/1977287 (py3.x) [3] http://pastebin.ca/1977292 (PHP, placed in http://svn.wikimedia.org/svnroot/mediawiki/trunk/phase3/normal/), [4] http://pastebin.ca/1977261 (C#) [5] http://bugs.python.org/issue1054943# ---------- components: Unicode messages: 119995 nosy: valhallasw priority: normal severity: normal status: open title: unicodedata.normalize('NFC', s) regression type: behavior versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 17:44:36 2010 From: report at bugs.python.org (Merlijn van Deen) Date: Sat, 30 Oct 2010 15:44:36 +0000 Subject: [issue10254] unicodedata.normalize('NFC', s) regression In-Reply-To: <1288453334.74.0.770473212932.issue10254@psf.upfronthosting.co.za> Message-ID: <1288453476.7.0.572199714333.issue10254@psf.upfronthosting.co.za> Merlijn van Deen added the comment: Please note: The bug might very well be present in python 3.2 and 3.3. However, I do not have these versions installed, so I cannot confirm this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 17:46:48 2010 From: report at bugs.python.org (Hirokazu Yamamoto) Date: Sat, 30 Oct 2010 15:46:48 +0000 Subject: [issue10157] Refleaks in pythonrun.c In-Reply-To: <1287596001.72.0.908968504513.issue10157@psf.upfronthosting.co.za> Message-ID: <1288453608.15.0.230297719269.issue10157@psf.upfronthosting.co.za> Hirokazu Yamamoto added the comment: Thank you, I committed your patch in r85980(py3k) and r85981(release31-maint). ---------- assignee: ocean-city -> resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 17:52:45 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 15:52:45 +0000 Subject: [issue10254] unicodedata.normalize('NFC', s) regression In-Reply-To: <1288453334.74.0.770473212932.issue10254@psf.upfronthosting.co.za> Message-ID: <1288453965.26.0.315188876227.issue10254@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Confirmed on Python 3.2. ---------- nosy: +haypo, loewis, pitrou versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 18:17:06 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 30 Oct 2010 16:17:06 +0000 Subject: [issue10164] Add an assertBytesEqual to unittest and use it for bytes assertEqual In-Reply-To: <1287665297.21.0.48545376383.issue10164@psf.upfronthosting.co.za> Message-ID: <1288455426.35.0.0140788178077.issue10164@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 18:19:01 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 30 Oct 2010 16:19:01 +0000 Subject: [issue1346238] A constant folding optimization pass for the AST Message-ID: <1288455541.76.0.42809852587.issue1346238@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: -georg.brandl, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 18:19:37 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 16:19:37 +0000 Subject: [issue10253] Fix fd leak in fileio.c and test resource warnings In-Reply-To: <1288450748.11.0.919591582507.issue10253@psf.upfronthosting.co.za> Message-ID: <1288455577.99.0.440607564396.issue10253@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r85982, thank you. I will backport later. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 18:29:38 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 30 Oct 2010 16:29:38 +0000 Subject: [issue10093] Warn when files are not explicitly closed In-Reply-To: <1287000989.52.0.725529628819.issue10093@psf.upfronthosting.co.za> Message-ID: <1288456178.46.0.450370924378.issue10093@psf.upfronthosting.co.za> R. David Murray added the comment: MAL wrote: > Antoine wrote: >> MAL wrote: >>> I don't follow you. Where's the difference between writing: >>> >>> s.close() >>> or >>> s = None >>> >>> for an open socket s ? >> >> The difference is when s is still referenced elsewhere. >> Also, the intent of the former is clear while the latter is deliberately >> obscure (while not saving any significant amount of typing). > >Sure, but that's not the point. It is not a mistake to write >such code and neither is this obscure, otherwise we'd also >require explicit garbage collection for other parts of Python. Yes it is a mistake: In an earlier message MAL wrote: > The only difference is with Python implementations that don't > use synchronous garbage collection, e.g. Jython, but not with > CPython. This by definition makes it non-equivalent and a bad *Python* idiom, since it depends on an acknowledged CPython *implementation detail*. As far as I know, there is no language requirement that mandates having garbage collection at all. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 18:38:46 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 16:38:46 +0000 Subject: [issue10238] ctypes not building under OS X 10.6 with LLVM/Clang 2.8 In-Reply-To: <1288391275.39.0.918201255477.issue10238@psf.upfronthosting.co.za> Message-ID: <1288456726.08.0.696270051297.issue10238@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Not sure this is a blocker. There are various assembler syntaxes for x86 and chances are LLVM uses a different one from gcc. ---------- assignee: -> theller nosy: +georg.brandl, pitrou, theller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 18:40:31 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 30 Oct 2010 16:40:31 +0000 Subject: [issue6706] asyncore's accept() is broken In-Reply-To: <1250291017.2.0.719693187742.issue6706@psf.upfronthosting.co.za> Message-ID: <1288456831.26.0.334172899409.issue6706@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 18:41:55 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 16:41:55 +0000 Subject: [issue10236] Sporadic failures of test_ssl In-Reply-To: <1288381615.12.0.769531001166.issue10236@psf.upfronthosting.co.za> Message-ID: <1288456915.39.0.301724944351.issue10236@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The errno printed here is just an error which is expected and tested for. The verbose run was ok, it's the silent run just before which produced an error (or several), but unfortunately: test test_ssl failed -- multiple errors occurred; run in verbose mode for details That said, it is likely to be related to a transient failure of a remote host used for testing. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 18:44:27 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 30 Oct 2010 16:44:27 +0000 Subject: [issue6706] asyncore's accept() is broken In-Reply-To: <1250291017.2.0.719693187742.issue6706@psf.upfronthosting.co.za> Message-ID: <1288457067.93.0.517210937556.issue6706@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: CVE-2010-3492 references this issue. http://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2010-3492 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 19:00:35 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 30 Oct 2010 17:00:35 +0000 Subject: [issue10238] ctypes not building under OS X 10.6 with LLVM/Clang 2.8 In-Reply-To: <1288391275.39.0.918201255477.issue10238@psf.upfronthosting.co.za> Message-ID: <1288458035.63.0.617960290112.issue10238@psf.upfronthosting.co.za> Georg Brandl added the comment: I agree, this shouldn't be a blocker. ---------- priority: deferred blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 19:33:45 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 17:33:45 +0000 Subject: [issue10250] Fix resource warnings in test_urllib2_localnet In-Reply-To: <1288444727.09.0.95705539029.issue10250@psf.upfronthosting.co.za> Message-ID: <1288460025.52.0.933084553369.issue10250@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r85983, thank you. ---------- nosy: +pitrou resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 20:00:37 2010 From: report at bugs.python.org (Jack Diederich) Date: Sat, 30 Oct 2010 18:00:37 +0000 Subject: [issue10245] Fix resource warnings in test_telnetlib In-Reply-To: <1288441077.58.0.74967624488.issue10245@psf.upfronthosting.co.za> Message-ID: <1288461637.21.0.258163185369.issue10245@psf.upfronthosting.co.za> Changes by Jack Diederich : ---------- assignee: -> jackdied nosy: +jackdied versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 20:11:05 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 30 Oct 2010 18:11:05 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1288462265.89.0.0378422153394.issue10160@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Some comments about the patch: - this seems to be some dead code: if (nattrs <= 1) { if (!PyArg_UnpackTuple(args, "attrgetter", 1, 1, &attr)) return NULL; - you can't call PyUnicode_GET_SIZE or PyUnicode_AS_UNICODE before you have called PyUnicode_Check. If the object is not an unicode object, it triggers an assertion in debug mode: python: ./Modules/operator.c:404: attrgetter_new: Assertion `((((((PyObject*)(item))->ob_type))->tp_flags & ((1L<<28))) != 0)' failed. - you should also call PyUnicode_InternInPlace() on the last dotless name (after the for loop) - this comment looks false: /* attrgetter_new code should ensure we never come here */ - in dotted_getattr, when attr is a tuple, you leak references to intermediate objects (because you don't decref obj before doing "newobj = obj") Other than that, looks quite worthwhile. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 20:45:38 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 Oct 2010 18:45:38 +0000 Subject: [issue10060] python.exe crashes or hangs on help() modules when bad modules found In-Reply-To: <1286676227.2.0.62342583611.issue10060@psf.upfronthosting.co.za> Message-ID: <1288464338.63.0.75644208271.issue10060@psf.upfronthosting.co.za> Terry J. Reedy added the comment: ?ric, go ahead and consolidate to one issue if you can get to it. Do the other issues shows problems with 3.1 or 3.2 also? I wonder because I have never seen the box in the posted .png and wonder if that is a new 'feature' with 2.7 and possibly 3.2 that was not in 3.1 and possibly the cause. Has anyone posted a 'corrupt module' that reliably reproduces the problem? It is hard to investigate when 'help> modules' works just fine, as it does on my 3.1.2 install. 'Dev': your original post is way too long. The welcome message and module lists could have been snipped to one line plus ellipsis. Example: >>> help() Welcome .... [snip] help> modules Please wait.... [snip] and continue with traceback. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 21:44:33 2010 From: report at bugs.python.org (Neil Schemenauer) Date: Sat, 30 Oct 2010 19:44:33 +0000 Subject: [issue10255] refleak in initstdio In-Reply-To: <1288467873.78.0.806058844227.issue10255@psf.upfronthosting.co.za> Message-ID: <1288467873.78.0.806058844227.issue10255@psf.upfronthosting.co.za> New submission from Neil Schemenauer : It looks to me like initstdio leaks a reference to "open". AFAIK, PyObject_SetAttrString() does not steal a reference. ---------- assignee: pitrou components: Interpreter Core files: initstdio_refleak.txt messages: 120008 nosy: nascheme, pitrou priority: normal severity: normal status: open title: refleak in initstdio type: resource usage Added file: http://bugs.python.org/file19434/initstdio_refleak.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 21:47:11 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 30 Oct 2010 19:47:11 +0000 Subject: [issue10255] refleak in initstdio In-Reply-To: <1288467873.78.0.806058844227.issue10255@psf.upfronthosting.co.za> Message-ID: <1288468031.78.0.353551670441.issue10255@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 21:56:41 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 30 Oct 2010 19:56:41 +0000 Subject: [issue9981] let make_buildinfo use a temporary directory on windows In-Reply-To: <1285741718.07.0.0571419018875.issue9981@psf.upfronthosting.co.za> Message-ID: <1288468601.43.0.453532832346.issue9981@psf.upfronthosting.co.za> Brian Curtin added the comment: Is there a reason this removes the Release x64 configuration? ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 21:58:12 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 30 Oct 2010 19:58:12 +0000 Subject: [issue9981] let make_buildinfo use a temporary directory on windows In-Reply-To: <1285741718.07.0.0571419018875.issue9981@psf.upfronthosting.co.za> Message-ID: <1288468692.53.0.748227567046.issue9981@psf.upfronthosting.co.za> Brian Curtin added the comment: Let me rephrase that: What makes the Release x64 configuration unnecessary, thus removed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 22:10:01 2010 From: report at bugs.python.org (Stephen Hansen) Date: Sat, 30 Oct 2010 20:10:01 +0000 Subject: [issue10237] failure in Barrier tests In-Reply-To: <1288391142.98.0.44997335021.issue10237@psf.upfronthosting.co.za> Message-ID: <1288469401.59.0.982344169422.issue10237@psf.upfronthosting.co.za> Stephen Hansen added the comment: FWIW, my snow leopard slave isn't slow at all so I doubt there's a timeout related to machine speed going on here, as its failing thus: test test_threading failed -- Traceback (most recent call last): File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/lock_tests.py", line 784, in test_default_timeout self.run_threads(f) File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/lock_tests.py", line 615, in run_threads f() File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86/build/Lib/test/lock_tests.py", line 783, in f self.assertRaises(threading.BrokenBarrierError, self.barrier.wait) AssertionError: BrokenBarrierError not raised by wait Its actually a really spammy sort of failure with a lot of errors before it, which may or may not shed more light on the situation: http://www.python.org/dev//buildbot/3.x.stable/builders/x86%20Snow%20Leopard%203.x/builds/267/steps/test/logs/stdio This was r85883, so after the increase in the timeout. ---------- nosy: +ixokai _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 22:15:42 2010 From: report at bugs.python.org (Matthew Barnett) Date: Sat, 30 Oct 2010 20:15:42 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1288469742.83.0.765542248018.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-20101030a.zip is a new version of the regex module. This bug was a bit more difficult to fix, but I think it's OK now! ---------- Added file: http://bugs.python.org/file19435/issue2636-20101030a.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 22:26:23 2010 From: report at bugs.python.org (Brian Brazil) Date: Sat, 30 Oct 2010 20:26:23 +0000 Subject: [issue10256] Fix resource warnings in test_pkgimport In-Reply-To: <1288470383.48.0.0497448669979.issue10256@psf.upfronthosting.co.za> Message-ID: <1288470383.48.0.0497448669979.issue10256@psf.upfronthosting.co.za> New submission from Brian Brazil : Please see attached patch. ---------- components: Tests files: test_pkgimport_fd_leak.patch keywords: patch messages: 120014 nosy: bbrazil priority: normal severity: normal status: open title: Fix resource warnings in test_pkgimport versions: Python 3.3 Added file: http://bugs.python.org/file19436/test_pkgimport_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 22:31:24 2010 From: report at bugs.python.org (Brian Brazil) Date: Sat, 30 Oct 2010 20:31:24 +0000 Subject: [issue10257] Fix resource warnings in test_os In-Reply-To: <1288470684.7.0.213634483079.issue10257@psf.upfronthosting.co.za> Message-ID: <1288470684.7.0.213634483079.issue10257@psf.upfronthosting.co.za> New submission from Brian Brazil : Please see attached. ---------- components: Tests files: test_os_fd_leak.patch keywords: patch messages: 120015 nosy: bbrazil priority: normal severity: normal status: open title: Fix resource warnings in test_os versions: Python 3.3 Added file: http://bugs.python.org/file19437/test_os_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 22:35:53 2010 From: report at bugs.python.org (Brian Brazil) Date: Sat, 30 Oct 2010 20:35:53 +0000 Subject: [issue10257] Fix resource warnings in test_os In-Reply-To: <1288470684.7.0.213634483079.issue10257@psf.upfronthosting.co.za> Message-ID: <1288470953.15.0.339077340162.issue10257@psf.upfronthosting.co.za> Brian Brazil added the comment: I'm used to a slightly different style guide, v2 has the right indentation. ---------- Added file: http://bugs.python.org/file19438/test_os_fd_leak_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 22:37:48 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 30 Oct 2010 20:37:48 +0000 Subject: [issue10257] Fix resource warnings in test_os In-Reply-To: <1288470684.7.0.213634483079.issue10257@psf.upfronthosting.co.za> Message-ID: <1288471068.88.0.52262807358.issue10257@psf.upfronthosting.co.za> ?ric Araujo added the comment: I don?t see any difference :) ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 23:01:20 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 30 Oct 2010 21:01:20 +0000 Subject: [issue10254] unicodedata.normalize('NFC', s) regression In-Reply-To: <1288453334.74.0.770473212932.issue10254@psf.upfronthosting.co.za> Message-ID: <1288472480.54.0.280490517821.issue10254@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The change from issue1054943 is indeed bogus. As written, the code will happily run over starters, even though a blocked start means that subsequent characters can't possibly be combinable. That way, the code manages to combine, in 'Li\u030dt-s\u1e73\u0301', the final U+0301 with the i - even though there are several starters in-between. I think the code should work like this: if comb!=0 and comb1==0: #starter after character with higher class: # not combinable, and all subsequent characters will be blocked # as well break if comb!=0 and comb1==comb: # blocked combining character, continue searching i1++ continue # candidate pair, check whether *i and *i1 are combinable It's unfortunate that the patch had been backported to 2.6.6; we can't fix it there anymore. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 23:01:56 2010 From: report at bugs.python.org (Brian Brazil) Date: Sat, 30 Oct 2010 21:01:56 +0000 Subject: [issue10258] Fix resource warnings in distutil test_tokenize In-Reply-To: <1288472516.9.0.895455205535.issue10258@psf.upfronthosting.co.za> Message-ID: <1288472516.9.0.895455205535.issue10258@psf.upfronthosting.co.za> New submission from Brian Brazil : Please see attached patch. ---------- components: Tests files: test_tokenize_fd_leak.patch keywords: patch messages: 120019 nosy: bbrazil priority: normal severity: normal status: open title: Fix resource warnings in distutil test_tokenize versions: Python 3.3 Added file: http://bugs.python.org/file19439/test_tokenize_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 23:04:06 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 30 Oct 2010 21:04:06 +0000 Subject: [issue10256] Fix resource warnings in test_pkgimport In-Reply-To: <1288470383.48.0.0497448669979.issue10256@psf.upfronthosting.co.za> Message-ID: <1288472646.12.0.565014955618.issue10256@psf.upfronthosting.co.za> Brian Curtin added the comment: Fixed in r85984. Thanks. ---------- assignee: -> brian.curtin nosy: +brian.curtin resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> resource usage versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 23:06:23 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 30 Oct 2010 21:06:23 +0000 Subject: [issue9981] let make_buildinfo use a temporary directory on windows In-Reply-To: <1285741718.07.0.0571419018875.issue9981@psf.upfronthosting.co.za> Message-ID: <1288472783.97.0.779236976964.issue9981@psf.upfronthosting.co.za> Martin v. L?wis added the comment: make_buildinfo is always built and run as a 32-bit binary, so I think this part of the change is fine (though unrelated to the objective of the change). I think the patch is fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 23:25:17 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 30 Oct 2010 21:25:17 +0000 Subject: [issue10257] Fix resource warnings in test_os In-Reply-To: <1288470684.7.0.213634483079.issue10257@psf.upfronthosting.co.za> Message-ID: <1288473917.73.0.469969519154.issue10257@psf.upfronthosting.co.za> Brian Curtin added the comment: Fixed in r85987. Made both places hunks of the patch use the context manager. ---------- assignee: -> brian.curtin nosy: +brian.curtin resolution: -> fixed stage: -> committed/rejected type: -> resource usage versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 23:30:31 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 30 Oct 2010 21:30:31 +0000 Subject: [issue10257] Fix resource warnings in test_os In-Reply-To: <1288470684.7.0.213634483079.issue10257@psf.upfronthosting.co.za> Message-ID: <1288474231.16.0.212498032335.issue10257@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 23:31:08 2010 From: report at bugs.python.org (=?utf-8?b?zqfPgc6uz4PPhM6/z4IgzpPOtc+Jz4HOs86vzr/PhSAoQ2hyaXN0b3MgR2Vvcmdp?= =?utf-8?b?b3Up?=) Date: Sat, 30 Oct 2010 21:31:08 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1288474268.89.0.133993610655.issue10160@psf.upfronthosting.co.za> ??????? ???????? (Christos Georgiou) added the comment: Thank you very much, Antoine, for your review. My comments in reply: - the dead code: it's not dead, IIRC it ensures that at least one argument is given, otherwise it raises an exception. - PyUnicode_GET_SIZE: you're right. The previous patch didn't have this problem, because there were two loops: the first one made sure in advance that all arguments are PyUnicode. - the false comment: right again. A remain from the first patch. - dotted_getattr and references: right! I should have noted better what Raymond's initial loop did. Attached a corrected version of the patch according to Antoine's comments. ---------- Added file: http://bugs.python.org/file19440/issue10160.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Oct 30 23:36:02 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 30 Oct 2010 21:36:02 +0000 Subject: [issue10258] Fix resource warnings in distutil test_tokenize In-Reply-To: <1288472516.9.0.895455205535.issue10258@psf.upfronthosting.co.za> Message-ID: <1288474562.22.0.184359899733.issue10258@psf.upfronthosting.co.za> Brian Curtin added the comment: Fixed in r85990. Thanks. ---------- assignee: -> brian.curtin nosy: +brian.curtin resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> resource usage versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 00:01:59 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 30 Oct 2010 22:01:59 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288476119.48.0.394724333211.issue7061@psf.upfronthosting.co.za> Terry J. Reedy added the comment: On initialization: the json doc has 6 examples. Each starts with 'import json' so each is independent. However, I agree that doing the same for turtle examples would be a bit much. On the other hand, I think 24.5.3. *Methods of RawTurtle/Turtle and corresponding functions* should explicitly give the needed code. So I would change "Most of the examples in this section refer to a Turtle instance called turtle." to "The examples below that refer to a Turtle instance called turtle require something like the following to be run first: >>> from turtle import turtle; turtle = Turtle() " The three examples above turtle.shapetransform start with >>> turtle.reset() I presume they need that to run reliably. If it is also needed for the shapetransform example to run correctly, then I would just added it there too. I will post more after I compare my original post to your revision. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 00:35:34 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 30 Oct 2010 22:35:34 +0000 Subject: [issue10254] unicodedata.normalize('NFC', s) regression In-Reply-To: <1288472480.54.0.280490517821.issue10254@psf.upfronthosting.co.za> Message-ID: <4CCC9DB2.1060406@egenix.com> Marc-Andre Lemburg added the comment: Martin v. L?wis wrote: > It's unfortunate that the patch had been backported to 2.6.6; we can't fix it there anymore. Why not ? It looks a lot like a security fix. ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 01:14:57 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 30 Oct 2010 23:14:57 +0000 Subject: [issue10254] unicodedata.normalize('NFC', s) regression In-Reply-To: <4CCC9DB2.1060406@egenix.com> Message-ID: <4CCCA6EB.8090102@v.loewis.de> Martin v. L?wis added the comment: >> It's unfortunate that the patch had been backported to 2.6.6; we can't fix it there anymore. > > Why not ? It looks a lot like a security fix. Indeed, you could argue that. It's up to the 2.6 release manager, I guess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 02:27:42 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 31 Oct 2010 00:27:42 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1254717274.49.0.570691979968.issue7061@psf.upfronthosting.co.za> Message-ID: <1288484862.33.0.884408929185.issue7061@psf.upfronthosting.co.za> Terry J. Reedy added the comment: GREGOR, I think we need your help to answer a few of these. Subissues from my opening post not resolved in rev85732 -------------------- "version of python installed with Tk support.": cap 'python' to 'Python' Is there any standard on capitalizing 'Python'? ----------- 24.5.3.1. Turtle motion ?? distance units? pixel or world, depending on mode? presume yes, but should say something here. -------------- I said ''' "turtle.onclick(fun, btn=1, add=None) It seems that 'add=False' would be same as 'add=None' and more consistent with below. "add ? True or False ? if True, a new binding will be added, otherwise it will replace a former binding " ''' In declining to make a change, you said " The add argument is passed unchanged to canvas' bind method which is documented as taking either '' or '+' string:" However, naive users are not supposed to know that, which is why you moved turtle doc out of tk chapter. Anyway, one has to know or guess to look for the doc on the generic widget bind method. There still remains a discrepancy between signature and following doc. If you do not want to change the signature, change the doc. Anyway, the sentence needs to be expanded so it makes sense without reading the generic tkinter bind doc. ""add ? True, False, or None - if True, add the new binding to any that already exist, otherwise replace all former bindings with the new one." Same change is needed for onrelease and ondrag ---------------------- You changed the title "Excursus about the use of compound shapes" to "Compound shapes" but did not, as far as I can see, make the same change in the reference in *24.5.5. The public classes of the module turtle* after "addcomponent(poly, fill, outline=None)" Also, the above should actually be "class turtle.addcomponent(poly, fill, outline=None)" to be consistent with the other entries ---------------------------- ''' 24.5.4. Methods of TurtleScreen/Screen and corresponding functions "Most of the examples in this section refer to a TurtleScreen instance called screen." However, 24.5.4.1. Window control turtle.bgcolor(*args) " and so on throughout the section. ?? I presume that should be "screen.bgcolor(*args)" and so on throughout the section. ''' Not addressed as far as I can see. ------------------------ .delay vs. speed is #10170 ------------ ''' "Remark: in order to be able to register key-events, TurtleScreen must have the focus. (See method listen(). >>> def f(): ... fd(50) ... lt(60) ... >>> screen.onkey(f, "Up") >>> screen.listen()" >From the Remark, I expected the two calls to be in the opposite order. Ditto for .onkeypress() ''' Since the .listen doc says "Set focus on TurtleScreen (in order to collect key-events). ", I strongly suspect that 'register' in the remark should be changed to 'collect', 'capture', or 'respond to' for both onkeypress and onkeyrelease. Then the example is correct. --------------- The last 3 sub-issues are still open ''' 24.5.4.5. Settings and special methods ?? .mode: 'world' like standard or logo w/r/t angles? ''' ''' "24.5.4.6. Methods specific to Screen, not inherited from TurtleScreen turtle.exitonclick() Bind bye() method to mouse clicks on the Screen." "If the value ?using_IDLE? in the configuration dictionary is False (default value), also enter mainloop. Remark: If IDLE with the -n switch (no subprocess) is used, this value should be set to True in turtle.cfg. In this case IDLE?s own mainloop is active also for the client script." >From Windows shortcut, I cannot tell how IDLE is started, but seems to work. Anything need to be said re IDLE/turtle on windows? My guess is that IDLE is running normally (without -n), so that there is a subprocess, so that 'using_IDLE' is False even though I am using it, just not in the same process. Correct? ''' ''' 24.5.8. Changes since Python 2.6 Sections about 2.x changes should not be in 3.x docs. ''' ----------------------- Thanks for the other half that are fixed! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 02:29:20 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Sun, 31 Oct 2010 01:29:20 +0000 Subject: [issue7061] Improve 24.5. turtle doc In-Reply-To: <1288484862.33.0.884408929185.issue7061@psf.upfronthosting.co.za> Message-ID: Alexander Belopolsky added the comment: On Sat, Oct 30, 2010 at 8:27 PM, Terry J. Reedy wrote: .. > "version of python installed with Tk support.": cap 'python' to 'Python' > > Is there any standard on capitalizing 'Python'? It looks like it is consistently capitalized in the Python manual. > ----------- > > 24.5.3.1. Turtle motion > > ?? distance units? pixel or world, depending on mode? > presume yes, but should say something here. > -------------- I would just use "distance units" and "angle units" throughout the documentation and explain somewhere how the settings determine the units. .. > There still remains a discrepancy between signature and following doc. If you do not want to change the signature, change the doc. Anyway, the sentence needs to be expanded so it makes sense without reading the generic tkinter bind doc. > > ""add ? True, False, or None - if True, add the new binding to any that already exist, otherwise replace all former bindings with the new one." I would rather change the default to False in both documentation and the code, but let's hear from Gregor first. > > Same change is needed for onrelease and ondrag > ---------------------- > > You changed the title "Excursus about the use of compound shapes" to "Compound shapes" but did not, as far as I can see, make the same change in the reference in *24.5.5. The public classes of the module turtle* after > "addcomponent(poly, fill, outline=None)" I missed that. I'll rename that section to "Public classes". > > Also, the above should actually be > "class turtle.addcomponent(poly, fill, outline=None)" > to be consistent with the other entries I am not sure what you mean. AFAICT, addcomponent is a method and correctly marked as such. .. > and so on throughout the section. > ?? ?I presume that should be > "screen.bgcolor(*args)" and so on throughout the section. > ''' > Not addressed as far as I can see. I cannot find "turtle.bgcolor". Can you post a patch with what you want to change? [skipped issues for which I would appreciate Gregor's input] > ----------------------- > Thanks for the other half that are fixed! I thought I did better than that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 03:10:57 2010 From: report at bugs.python.org (Ivan Razumov) Date: Sun, 31 Oct 2010 02:10:57 +0000 Subject: [issue10259] Entry text not set if both 'Font' and 'fg' are set In-Reply-To: <1288491057.47.0.0560000338786.issue10259@psf.upfronthosting.co.za> Message-ID: <1288491057.47.0.0560000338786.issue10259@psf.upfronthosting.co.za> New submission from Ivan Razumov : OS: Windows 7 x86 Python: 2.6.4 An Entry with both Font and Foreground properties changed (i.e. not OS-default) does not display text set with textvariable.set method. Attached an example of such behavior. ---------- components: Tkinter files: Project5.py messages: 120030 nosy: iarspider priority: normal severity: normal status: open title: Entry text not set if both 'Font' and 'fg' are set type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file19441/Project5.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 03:33:00 2010 From: report at bugs.python.org (Ivan Razumov) Date: Sun, 31 Oct 2010 02:33:00 +0000 Subject: [issue10259] Entry text not set if all of 'Font', 'Foreground' and 'Align' are set In-Reply-To: <1288491057.47.0.0560000338786.issue10259@psf.upfronthosting.co.za> Message-ID: <1288492380.38.0.5562067118.issue10259@psf.upfronthosting.co.za> Changes by Ivan Razumov : ---------- title: Entry text not set if both 'Font' and 'fg' are set -> Entry text not set if all of 'Font', 'Foreground' and 'Align' are set _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 03:34:09 2010 From: report at bugs.python.org (Ivan Razumov) Date: Sun, 31 Oct 2010 02:34:09 +0000 Subject: [issue10259] Entry text not set if all of 'Font', 'Foreground' and 'Align' are set In-Reply-To: <1288491057.47.0.0560000338786.issue10259@psf.upfronthosting.co.za> Message-ID: <1288492449.95.0.206752897055.issue10259@psf.upfronthosting.co.za> Ivan Razumov added the comment: The bug only appears if "Align" is not "Left". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 03:34:30 2010 From: report at bugs.python.org (Ivan Razumov) Date: Sun, 31 Oct 2010 02:34:30 +0000 Subject: [issue10259] Entry text not set if all of 'Font', 'Foreground' and 'Justify' are set In-Reply-To: <1288491057.47.0.0560000338786.issue10259@psf.upfronthosting.co.za> Message-ID: <1288492470.34.0.86759488906.issue10259@psf.upfronthosting.co.za> Changes by Ivan Razumov : ---------- title: Entry text not set if all of 'Font', 'Foreground' and 'Align' are set -> Entry text not set if all of 'Font', 'Foreground' and 'Justify' are set _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 03:34:42 2010 From: report at bugs.python.org (Ivan Razumov) Date: Sun, 31 Oct 2010 02:34:42 +0000 Subject: [issue10259] Entry text not set if all of 'Font', 'Foreground' and 'Justify' are set In-Reply-To: <1288491057.47.0.0560000338786.issue10259@psf.upfronthosting.co.za> Message-ID: <1288492482.56.0.17905191457.issue10259@psf.upfronthosting.co.za> Ivan Razumov added the comment: Typo: align -> Justify ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 04:01:46 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 31 Oct 2010 03:01:46 +0000 Subject: [issue10237] failure in Barrier tests In-Reply-To: <1288391142.98.0.44997335021.issue10237@psf.upfronthosting.co.za> Message-ID: <1288494106.65.0.854137280364.issue10237@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Silly me, changing the default timeout invalidated the unittest for it. Fixed in revision 86018 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 04:45:09 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 03:45:09 +0000 Subject: [issue10164] Add an assertBytesEqual to unittest and use it for bytes assertEqual In-Reply-To: <1287665297.21.0.48545376383.issue10164@psf.upfronthosting.co.za> Message-ID: <1288496709.19.0.372730400569.issue10164@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Am discussing this with the OP on IRC and tabling it for a while so we can better think out the API. The goal is to let assertEqual(a, b) do straight-comparions of raw bytes, but to give a nice looking diff (possibly translated with line breaks or somesuch) when the test fails. This will be helpful in testing the email module. The current patch requires that assertBytesEqual be exposed and called directly so that a user can specify a split-at argument. The purpose of that argument is to approximate the line breaking that occurs naturally in text. The OP does not want to decode the bytes prior to the equality test, but does want a readable diff whenever the bytes represent ascii text. ---------- resolution: -> later _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 04:50:02 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 31 Oct 2010 03:50:02 +0000 Subject: [issue10254] unicodedata.normalize('NFC', s) regression In-Reply-To: <1288453334.74.0.770473212932.issue10254@psf.upfronthosting.co.za> Message-ID: <1288497002.71.0.70451209472.issue10254@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 05:19:25 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 04:19:25 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1288498765.74.0.378873612312.issue10160@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The patch looks fine. You're overview of the process presented here in the tracker would make a nice comment in the code. If Antoine is happy with the latest patch, then it's ready to apply. ---------- assignee: rhettinger -> pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 05:46:49 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 31 Oct 2010 04:46:49 +0000 Subject: [issue10260] Add a thrading.Condition.wait_for() method In-Reply-To: <1288500409.32.0.639501337625.issue10260@psf.upfronthosting.co.za> Message-ID: <1288500409.32.0.639501337625.issue10260@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : The attached patch adds a wait_for method to condition objects. It can simplify code that uses condition variables since it relieves the user from writing a condition loop. In addition it simplifies timeout logic which otherwise has to correctly deal with non-successful wakeups. We also modify the barrier to use it, giving more robust timeout behaviour. (btw, the use of time.time() in threading is unfortunate, since it has low resolution and is affected by a user adjusting the clock. On Windows one would want time.clock(), but that function measures CPU time on unix. Do we need a proper time.wallclock() function available on all platforms?) ---------- components: Library (Lib) files: wait_for.patch keywords: patch messages: 120036 nosy: georg.brandl, krisvale priority: normal severity: normal status: open title: Add a thrading.Condition.wait_for() method type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file19442/wait_for.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 06:27:49 2010 From: report at bugs.python.org (Jacques Grove) Date: Sun, 31 Oct 2010 05:27:49 +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: <1288502869.34.0.474946634924.issue2636@psf.upfronthosting.co.za> Jacques Grove added the comment: Here's one that really falls in the category of "don't do that"; but I found this because I was limiting the system recursion level to somewhat less than the standard 1000 (for other reasons), and I had some shorter duplicate patterns in a big regex. Here is the simplest case to make it blow up with the standard recursion settings: $ cat test.py import re, regex regexp = '(abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ|abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ)' re.compile(regexp) regex.compile(regexp) $ python test.py File "/tmp/test/src/lib/_regex_core.py", line 2024, in optimise subpattern = subpattern.optimise(info) File "/tmp/test/src/lib/_regex_core.py", line 1552, in optimise branches = [_Branch(branches)] RuntimeError: maximum recursion depth exceeded ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 07:09:30 2010 From: report at bugs.python.org (Jacques Grove) Date: Sun, 31 Oct 2010 06:09:30 +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: <1288505370.09.0.175977604485.issue2636@psf.upfronthosting.co.za> Jacques Grove added the comment: And another, bit less pathological, testcase. Sorry for the ugly testcase; it was much worse before I boiled it down :-) $ cat test.py import re, regex text = "\nTest\nxyz\nxyz\nEnd" regexp = '(\nTest(\n+.+?){0,2}?)?\n+End' print re.findall(regexp, text) print regex.findall(regexp, text) $ python test.py [('\nTest\nxyz\nxyz', '\nxyz')] [('', '')] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 09:00:58 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 08:00:58 +0000 Subject: [issue5729] Allows tabs for indenting JSON output In-Reply-To: <1239297330.19.0.24635332127.issue5729@psf.upfronthosting.co.za> Message-ID: <1288512058.82.0.530993777813.issue5729@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Updated and applied in r86022. ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 09:02:05 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 08:02:05 +0000 Subject: [issue10260] Add a threading.Condition.wait_for() method In-Reply-To: <1288500409.32.0.639501337625.issue10260@psf.upfronthosting.co.za> Message-ID: <1288512125.85.0.0754285590453.issue10260@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- title: Add a thrading.Condition.wait_for() method -> Add a threading.Condition.wait_for() method _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 09:21:51 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 08:21:51 +0000 Subject: [issue9974] tokenizer.untokenize not invariant with line continuations In-Reply-To: <1285695065.99.0.439423855227.issue9974@psf.upfronthosting.co.za> Message-ID: <1288513311.77.0.0734382989224.issue9974@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > My patch handles the described situation, albeit a bit poorly ... Let us know when you've got a cleaned-up patch and have run the round-trip tests on a broad selection of files. For your test case, don't feel compelled to use doctest. It's okay to write a regular unittest and add that to the test suite. ---------- assignee: rhettinger -> priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 12:19:58 2010 From: report at bugs.python.org (Karsten Wolf) Date: Sun, 31 Oct 2010 11:19:58 +0000 Subject: [issue10261] tarfile iterator without members caching In-Reply-To: <1288523998.25.0.554801648749.issue10261@psf.upfronthosting.co.za> Message-ID: <1288523998.25.0.554801648749.issue10261@psf.upfronthosting.co.za> New submission from Karsten Wolf : It would be helpful to have a tarfile iterator that does not cache every archive member encountered. This makes it nearly impossible to iterate over an archive with millions of files. ---------- components: Library (Lib) messages: 120041 nosy: karstenw priority: normal severity: normal status: open title: tarfile iterator without members caching type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 12:34:41 2010 From: report at bugs.python.org (=?utf-8?q?Lars_Gust=C3=A4bel?=) Date: Sun, 31 Oct 2010 11:34:41 +0000 Subject: [issue10261] tarfile iterator without members caching In-Reply-To: <1288523998.25.0.554801648749.issue10261@psf.upfronthosting.co.za> Message-ID: <1288524881.03.0.115188247883.issue10261@psf.upfronthosting.co.za> Lars Gust?bel added the comment: I assume you're using Python 2.x. because tarfile's memory footprint was significantly reduced in Python 3.0, see the patch in issue2058 and r62337. This patch was not backported to the 2.x branch back then. As the 2.x branch has been closed for new features, this is not going to happen in the future. ---------- assignee: -> lars.gustaebel nosy: +lars.gustaebel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 12:58:46 2010 From: report at bugs.python.org (Karsten Wolf) Date: Sun, 31 Oct 2010 11:58:46 +0000 Subject: [issue10261] tarfile iterator without members caching In-Reply-To: <1288523998.25.0.554801648749.issue10261@psf.upfronthosting.co.za> Message-ID: <1288526326.0.0.599745921491.issue10261@psf.upfronthosting.co.za> Karsten Wolf added the comment: Yes, I'm on 2.6. I checked the Python 3.x tarfile just for this one line in TarFile.next(): self.members.append(tarinfo) to conclude it would have the same problem. Reducing 2.5gb memory usage as measured in my particular case by 60%, still leaves 1.5gb ram burned which is too much on a 32-bit 2gb ram machine. My solution was to comment out that line which worked perfectly for my case but may not be the solution for the module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 13:01:03 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 31 Oct 2010 12:01:03 +0000 Subject: [issue10254] unicodedata.normalize('NFC', s) regression In-Reply-To: <1288453334.74.0.770473212932.issue10254@psf.upfronthosting.co.za> Message-ID: <1288526463.27.0.782922958831.issue10254@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 13:05:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 31 Oct 2010 12:05:49 +0000 Subject: [issue10261] tarfile iterator without members caching In-Reply-To: <1288523998.25.0.554801648749.issue10261@psf.upfronthosting.co.za> Message-ID: <1288526749.54.0.450190489674.issue10261@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- type: feature request -> resource usage versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 13:07:23 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 31 Oct 2010 12:07:23 +0000 Subject: [issue10262] Add --disable-abi-flags option to `configure` In-Reply-To: <1288526843.14.0.55690735161.issue10262@psf.upfronthosting.co.za> Message-ID: <1288526843.14.0.55690735161.issue10262@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis : Some packagers might want to disable ABI flags. The attached patch adds --disable-abi-flags option to `configure`. ---------- components: Build files: python-abi-flags.patch keywords: patch messages: 120044 nosy: Arfrever, barry priority: normal severity: normal status: open title: Add --disable-abi-flags option to `configure` versions: Python 3.2 Added file: http://bugs.python.org/file19443/python-abi-flags.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 14:18:43 2010 From: report at bugs.python.org (Doug Hellmann) Date: Sun, 31 Oct 2010 13:18:43 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> New submission from Doug Hellmann : Running "python -m site" is supposed to print a report about the current import path and its components (like USER_BASE and USER_SITE). This works under 2.6 and 3.1, but not 2.7. No output is produced under 2.7 at all. When I add a print statement to the end of the module, I see that __name__ is set to "site" instead of "__main__", so the _script() function isn't being invoked at all. ---------- components: Library (Lib) messages: 120045 nosy: doughellmann priority: normal severity: normal status: open title: "python -m site" does not print path details versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 14:56:59 2010 From: report at bugs.python.org (Brian Brazil) Date: Sun, 31 Oct 2010 13:56:59 +0000 Subject: [issue10258] Fix resource warnings in test_tokenize In-Reply-To: <1288472516.9.0.895455205535.issue10258@psf.upfronthosting.co.za> Message-ID: <1288533419.73.0.868487348183.issue10258@psf.upfronthosting.co.za> Brian Brazil added the comment: Fixing title. ---------- title: Fix resource warnings in distutil test_tokenize -> Fix resource warnings in test_tokenize _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 14:59:42 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 31 Oct 2010 13:59:42 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288533582.94.0.369692082569.issue10263@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +eric.araujo, ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 15:09:54 2010 From: report at bugs.python.org (Brian Brazil) Date: Sun, 31 Oct 2010 14:09:54 +0000 Subject: [issue10264] Fix resource warnings in test_smtplib In-Reply-To: <1288534194.29.0.658250394155.issue10264@psf.upfronthosting.co.za> Message-ID: <1288534194.29.0.658250394155.issue10264@psf.upfronthosting.co.za> New submission from Brian Brazil : Please see attached. ---------- components: Tests files: test_smtplib_fd_leak.patch keywords: patch messages: 120047 nosy: bbrazil priority: normal severity: normal status: open title: Fix resource warnings in test_smtplib versions: Python 3.3 Added file: http://bugs.python.org/file19444/test_smtplib_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 15:12:07 2010 From: report at bugs.python.org (Mike Auty) Date: Sun, 31 Oct 2010 14:12:07 +0000 Subject: [issue9561] distutils: set encoding to utf-8 for input and output files In-Reply-To: <1281462699.26.0.0348702049008.issue9561@psf.upfronthosting.co.za> Message-ID: <1288534327.93.0.827169580443.issue9561@psf.upfronthosting.co.za> Changes by Mike Auty : ---------- nosy: +ikelos _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 15:53:33 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 31 Oct 2010 14:53:33 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288536813.45.0.535823522285.issue10263@psf.upfronthosting.co.za> Nick Coghlan added the comment: Since it works for me (I tried both r84120, my old 2.7 build from August or so, and r86033, which is the 2.7 head), we'll need more information. The starting blurb from the interactive prompt would be a good place to start. (-m was slightly broken from April-June or so during 2.7 development, so custom builds in that window may exhibit occasional weirdness) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:03:33 2010 From: report at bugs.python.org (Brian Brazil) Date: Sun, 31 Oct 2010 15:03:33 +0000 Subject: [issue10265] Fix fd leak in sunau In-Reply-To: <1288537413.19.0.268070514121.issue10265@psf.upfronthosting.co.za> Message-ID: <1288537413.19.0.268070514121.issue10265@psf.upfronthosting.co.za> New submission from Brian Brazil : Please see attached. It's possible that this change will lead to fds leaking if someone is passing in a fd, however a) this is consistent with how other modules (e.g. uu) do it and b) of the 2 (!) uses of this module I found on Google Codesearch, both pass in filenames. ---------- components: Library (Lib) messages: 120049 nosy: bbrazil priority: normal severity: normal status: open title: Fix fd leak in sunau versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:04:28 2010 From: report at bugs.python.org (=?utf-8?q?Per_=C3=98yvind_Karlsen?=) Date: Sun, 31 Oct 2010 15:04:28 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288537468.57.0.712767274854.issue6715@psf.upfronthosting.co.za> Per ?yvind Karlsen added the comment: I've uploaded a new version of the patch to http://codereview.appspot.com/2724043/ now. I'd be okay on doing maintenance directly against the CPython repository btw. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:07:20 2010 From: report at bugs.python.org (Brian Curtin) Date: Sun, 31 Oct 2010 15:07:20 +0000 Subject: [issue10265] Fix fd leak in sunau In-Reply-To: <1288537413.19.0.268070514121.issue10265@psf.upfronthosting.co.za> Message-ID: <1288537640.33.0.468543723845.issue10265@psf.upfronthosting.co.za> Brian Curtin added the comment: Forget the attachment? ---------- nosy: +brian.curtin type: -> resource usage versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:10:55 2010 From: report at bugs.python.org (Doug Hellmann) Date: Sun, 31 Oct 2010 15:10:55 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288537855.25.0.867123242758.issue10263@psf.upfronthosting.co.za> Doug Hellmann added the comment: I downloaded an OS X installer from python.org, but I don't remember the date I did that. Here's the output when I start the interpreter: $ which python /Library/Frameworks/Python.framework/Versions/2.7/bin/python $ python Python 2.7 (r27:82508, Jul 3 2010, 21:12:11) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:15:16 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 31 Oct 2010 15:15:16 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288538116.72.0.874687485494.issue10263@psf.upfronthosting.co.za> Nick Coghlan added the comment: Note also that site.py runs twice when used with -m: once implicitly during interpreter startup, and a second time as the main module. Due to the way the interpreter starts up and figures out sys.path, it is possible for the implicit import to pick up the correct version, but for the explicit invocation to find an old version. With my site.py patched to include a "print __name__" line, I get the following: $ ./python -m site site __main__ sys.path = [
] USER_BASE:
(exists) USER_SITE:
(exists) ENABLE_USER_SITE: True The fact that you're only seeing one printout suggests to me that this is exactly the problem you're running into. The easiest way to confirm that is to run "python Lib/site.py" explicitly rather than via -m. That way you aren't relying on the second import working correctly (and I'm assuming you want to run this because you have doubts as to the correctness of the contents of your sys.path) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:16:08 2010 From: report at bugs.python.org (Brian Brazil) Date: Sun, 31 Oct 2010 15:16:08 +0000 Subject: [issue10266] uu.decode fd leak if in_file is a filename In-Reply-To: <1288538168.63.0.84193162166.issue10266@psf.upfronthosting.co.za> Message-ID: <1288538168.63.0.84193162166.issue10266@psf.upfronthosting.co.za> New submission from Brian Brazil : I missed this when fixing issue 10246. The attached patch fixes this and adds a test that produces a resource warning with the old code. ---------- components: Library (Lib) files: uu_decode_fd_leak.patch keywords: patch messages: 120054 nosy: bbrazil priority: normal severity: normal status: open title: uu.decode fd leak if in_file is a filename versions: Python 3.3 Added file: http://bugs.python.org/file19445/uu_decode_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:16:25 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 31 Oct 2010 15:16:25 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288538185.0.0.326953411795.issue10263@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:18:22 2010 From: report at bugs.python.org (Doug Hellmann) Date: Sun, 31 Oct 2010 15:18:22 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288538302.76.0.696858366591.issue10263@psf.upfronthosting.co.za> Doug Hellmann added the comment: Actually I'm trying to update the PyMOTW article about site, and I discovered that the output from the old examples that showed using --user-base and --user-site were no longer producing any output. It looks like the build of 2.7 I downloaded is fairly old, so I'll try updating that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:19:20 2010 From: report at bugs.python.org (Brian Brazil) Date: Sun, 31 Oct 2010 15:19:20 +0000 Subject: [issue10265] Fix fd leak in sunau In-Reply-To: <1288537413.19.0.268070514121.issue10265@psf.upfronthosting.co.za> Message-ID: <1288538360.93.0.536589285622.issue10265@psf.upfronthosting.co.za> Brian Brazil added the comment: That'd help alright. ---------- keywords: +patch Added file: http://bugs.python.org/file19446/sunau_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:20:15 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 31 Oct 2010 15:20:15 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288538415.11.0.713503230027.issue10263@psf.upfronthosting.co.za> Nick Coghlan added the comment: r82508 is the correct release binary (created after the error I mentioned above was fixed). I've CC'ed Ronald to see if he can shed any light - it may be a platform specific issue with the way sys.path is calculated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:24:55 2010 From: report at bugs.python.org (Doug Hellmann) Date: Sun, 31 Oct 2010 15:24:55 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288538695.48.0.663054234868.issue10263@psf.upfronthosting.co.za> Doug Hellmann added the comment: Ah, I assumed that since the revision number was older there might be a newer build available now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:27:42 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 31 Oct 2010 15:27:42 +0000 Subject: [issue10160] operator.attrgetter slower than lambda after adding dotted names ability In-Reply-To: <1287619821.22.0.706433716481.issue10160@psf.upfronthosting.co.za> Message-ID: <1288538862.1.0.933849476471.issue10160@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The PyUnicode_GET_SIZE issue was still there, but I've fixed it and committed in r86036. Thanks for your contribution! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:30:40 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 31 Oct 2010 15:30:40 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288539040.85.0.989717570687.issue10263@psf.upfronthosting.co.za> Nick Coghlan added the comment: No, there won't be another binary release until 2.7.1 comes out. The SVN revision number ratchets up pretty fast, since it is counting checkins on *all* branches, even experimental ones. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:36:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 31 Oct 2010 15:36:11 +0000 Subject: [issue10265] Fix fd leak in sunau In-Reply-To: <1288537413.19.0.268070514121.issue10265@psf.upfronthosting.co.za> Message-ID: <1288539371.85.0.299921331134.issue10265@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > It's possible that this change will lead to fds leaking if someone is > passing in a fd I don't think so, why do you say that? That said, there's an indentation problem in your patch. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:37:14 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 31 Oct 2010 15:37:14 +0000 Subject: [issue10264] Fix resource warnings in test_smtplib In-Reply-To: <1288534194.29.0.658250394155.issue10264@psf.upfronthosting.co.za> Message-ID: <1288539434.53.0.48898027351.issue10264@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +giampaolo.rodola, r.david.murray stage: -> patch review type: -> resource usage _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:38:51 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 31 Oct 2010 15:38:51 +0000 Subject: [issue10266] uu.decode fd leak if in_file is a filename In-Reply-To: <1288538168.63.0.84193162166.issue10266@psf.upfronthosting.co.za> Message-ID: <1288539531.44.0.453719432264.issue10266@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Now that the previous patch has been committed, could you post a patch against current SVN? ---------- nosy: +pitrou type: -> resource usage versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:55:52 2010 From: report at bugs.python.org (Neil Schemenauer) Date: Sun, 31 Oct 2010 15:55:52 +0000 Subject: [issue10241] gc fixes for module m_copy attribute In-Reply-To: <1288410530.83.0.095379048444.issue10241@psf.upfronthosting.co.za> Message-ID: <1288540552.96.0.703409513032.issue10241@psf.upfronthosting.co.za> Neil Schemenauer added the comment: Oops, my patch doesn't work since m_base can be shared by more than one module instance. I guess a different solution would be to cleanup the m_copy references on interpreter shutdown. Somehow they would have to be found though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 16:59:06 2010 From: report at bugs.python.org (Brian Brazil) Date: Sun, 31 Oct 2010 15:59:06 +0000 Subject: [issue10266] uu.decode fd leak if in_file is a filename In-Reply-To: <1288538168.63.0.84193162166.issue10266@psf.upfronthosting.co.za> Message-ID: <1288540746.42.0.651436209477.issue10266@psf.upfronthosting.co.za> Brian Brazil added the comment: The patch is against current SVN. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 17:04:42 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 31 Oct 2010 16:04:42 +0000 Subject: [issue10266] uu.decode fd leak if in_file is a filename In-Reply-To: <1288538168.63.0.84193162166.issue10266@psf.upfronthosting.co.za> Message-ID: <1288541082.96.0.949855529479.issue10266@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Oops, sorry. I hadn't seen that this was about a different function. I've committed the patch in r86037. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 17:06:04 2010 From: report at bugs.python.org (Brian Brazil) Date: Sun, 31 Oct 2010 16:06:04 +0000 Subject: [issue10265] Fix fd leak in sunau In-Reply-To: <1288537413.19.0.268070514121.issue10265@psf.upfronthosting.co.za> Message-ID: <1288541164.04.0.162930376445.issue10265@psf.upfronthosting.co.za> Brian Brazil added the comment: Currently, if you pass in a fd it'll be closed by the __del__. My patch no longer does this so any use of the module depending on this behaviour could leak an fd. However, noone seems to use the module that way. V2 attached. ---------- Added file: http://bugs.python.org/file19447/sunau_fd_leak_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 17:25:06 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 31 Oct 2010 16:25:06 +0000 Subject: [issue10267] test_ttk_guionly leaks many references In-Reply-To: <1288542306.75.0.249495592657.issue10267@psf.upfronthosting.co.za> Message-ID: <1288542306.75.0.249495592657.issue10267@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This can be seen on all 3 branches: $ ./python -m test.regrtest -uall -R 3:2 test_ttk_guionly [306/349] test_ttk_guionly beginning 5 repetitions 12345 ..... test_ttk_guionly leaked [590, 590] references, sum=1180 ---------- components: Tkinter messages: 120067 nosy: gpolo, pitrou priority: high severity: normal status: open title: test_ttk_guionly leaks many references type: resource usage versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 17:28:58 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 16:28:58 +0000 Subject: [issue9685] tuples should remember their hash value In-Reply-To: <1282764797.19.0.867524122951.issue9685@psf.upfronthosting.co.za> Message-ID: <1288542538.88.0.504295492918.issue9685@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: rhettinger -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 17:43:25 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 31 Oct 2010 16:43:25 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288543405.7.0.0144481310679.issue6715@psf.upfronthosting.co.za> Martin v. L?wis added the comment: After starting to review the code, I'm becoming skeptical whether this is the right approach. This does way to much action in C, and thus becomes complicated but also limited. An alternative approach would be to just expose lzma_code to Python, and then integrate that into the io architecture, i.e. as a subclass of RawIOBase. I.e. LZMAFile would go; if you want to compress to a file, use FileIO instead, and wrap that with a LZMAIO (say). LZMACompressor and Decompressor could stay if desired, although it seems more liblzma-like to have a single object for both compression and decompression. In addition, I find the options object too complicated. It seems to serve documentation purposes only, so I wonder whether it could be reduced in code size. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 18:07:13 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 31 Oct 2010 17:07:13 +0000 Subject: [issue10268] Add --enable-loadable-sqlite-extensions option to `configure` In-Reply-To: <1288544831.28.0.692302384707.issue10268@psf.upfronthosting.co.za> Message-ID: <1288544831.28.0.692302384707.issue10268@psf.upfronthosting.co.za> New submission from Arfrever Frehtes Taifersar Arahesis : I would like to suggest introduction of --enable-loadable-sqlite-extensions option, so that packagers (and maybe other users) don't need to comment out 1 line in setup.py. I'm attaching the patch. ---------- components: Build files: python-loadable-sqlite-extensions.patch keywords: patch messages: 120069 nosy: Arfrever, ghaering priority: normal severity: normal status: open title: Add --enable-loadable-sqlite-extensions option to `configure` type: feature request versions: Python 3.2 Added file: http://bugs.python.org/file19448/python-loadable-sqlite-extensions.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 18:14:01 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 31 Oct 2010 17:14:01 +0000 Subject: [issue10268] Add --enable-loadable-sqlite-extensions option to `configure` In-Reply-To: <1288544831.28.0.692302384707.issue10268@psf.upfronthosting.co.za> Message-ID: <1288545241.84.0.256559697308.issue10268@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r86045 ---------- nosy: +benjamin.peterson resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 18:15:54 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 31 Oct 2010 17:15:54 +0000 Subject: [issue10264] Fix resource warnings in test_smtplib In-Reply-To: <1288534194.29.0.658250394155.issue10264@psf.upfronthosting.co.za> Message-ID: <1288545354.48.0.548298043449.issue10264@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r86046. Thanks ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 18:56:39 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 31 Oct 2010 17:56:39 +0000 Subject: [issue10246] uu.encode fd leak if arguments are filenames In-Reply-To: <1288443880.97.0.48541703257.issue10246@psf.upfronthosting.co.za> Message-ID: Brett Cannon added the comment: On Sat, Oct 30, 2010 at 06:04, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > Committed in r85975 (3.2). I guess we'll do a big svnmerge to other branches later. Or not at all. I honestly have not been worrying about backporting since these are minor changes that are more stylistic cleanup than fixes that have to get in. While it's good to be doing this for 3.2, I don't view it as critical enough to worry about backporting (although I have no issue if people do a backport). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 18:58:22 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 17:58:22 +0000 Subject: [issue10110] Queue doesn't recognize it is full after shrinking maxsize In-Reply-To: <1287105905.32.0.568830983004.issue10110@psf.upfronthosting.co.za> Message-ID: <1288547902.36.0.207140607885.issue10110@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Applied in r86049. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 19:02:10 2010 From: report at bugs.python.org (Brian Brazil) Date: Sun, 31 Oct 2010 18:02:10 +0000 Subject: [issue10246] uu.encode fd leak if arguments are filenames In-Reply-To: <1288442639.64.0.225506910081.issue10246@psf.upfronthosting.co.za> Message-ID: <1288548130.86.0.0667697832974.issue10246@psf.upfronthosting.co.za> Brian Brazil added the comment: The garbage collector should take care of the vast majority of these, it's only bugs in the C like issue 10253 that I'd worry about. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 19:05:47 2010 From: report at bugs.python.org (Brian Curtin) Date: Sun, 31 Oct 2010 18:05:47 +0000 Subject: [issue9846] ZipExtFile provides no mechanism for closing the underlying file object In-Reply-To: <1284394640.99.0.715812735205.issue9846@psf.upfronthosting.co.za> Message-ID: <1288548347.34.0.0692538328523.issue9846@psf.upfronthosting.co.za> Brian Curtin added the comment: A fix to this would help silence a number of ResourceWarning messages coming out of the test suite. ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 19:16:05 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 18:16:05 +0000 Subject: [issue10025] random.seed not initialized as advertised In-Reply-To: <1286235186.65.0.07824350342.issue10025@psf.upfronthosting.co.za> Message-ID: <1288548965.21.0.778916644035.issue10025@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Removed the inaccurate description. See r86053. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 19:21:01 2010 From: report at bugs.python.org (Brian Brazil) Date: Sun, 31 Oct 2010 18:21:01 +0000 Subject: [issue10269] Fix some resource warnings in test_sax In-Reply-To: <1288549261.81.0.692632435193.issue10269@psf.upfronthosting.co.za> Message-ID: <1288549261.81.0.692632435193.issue10269@psf.upfronthosting.co.za> New submission from Brian Brazil : Please see attached. ---------- components: Tests files: test_sax_fd_leak.patch keywords: patch messages: 120077 nosy: bbrazil priority: normal severity: normal status: open title: Fix some resource warnings in test_sax versions: Python 3.3 Added file: http://bugs.python.org/file19449/test_sax_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 19:23:33 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 31 Oct 2010 18:23:33 +0000 Subject: [issue10269] Fix some resource warnings in test_sax In-Reply-To: <1288549261.81.0.692632435193.issue10269@psf.upfronthosting.co.za> Message-ID: <1288549413.0.0.652416237736.issue10269@psf.upfronthosting.co.za> Benjamin Peterson added the comment: r86055 ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 19:30:42 2010 From: report at bugs.python.org (Brian Brazil) Date: Sun, 31 Oct 2010 18:30:42 +0000 Subject: [issue10270] Fix resource warnings in test_threading In-Reply-To: <1288549842.1.0.819549161722.issue10270@psf.upfronthosting.co.za> Message-ID: <1288549842.1.0.819549161722.issue10270@psf.upfronthosting.co.za> New submission from Brian Brazil : Please see attached. ---------- components: Tests files: test_threading_fd_leak.patch keywords: patch messages: 120079 nosy: bbrazil priority: normal severity: normal status: open title: Fix resource warnings in test_threading Added file: http://bugs.python.org/file19450/test_threading_fd_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 19:53:35 2010 From: report at bugs.python.org (lekma) Date: Sun, 31 Oct 2010 18:53:35 +0000 Subject: [issue10271] warnings.showwarning should allow any callable object In-Reply-To: <1288551215.82.0.402250167562.issue10271@psf.upfronthosting.co.za> Message-ID: <1288551215.82.0.402250167562.issue10271@psf.upfronthosting.co.za> New submission from lekma : Overriding warnings.showwarning() with a c/python module function (from a c/python module) doesn't work because warn_explicit() only allow PyFunction or PyMethod objects to be called (unfortunately c/python module functions are of type PyCFunction). Suggested changes in _warnings.c (from py3k) - not tested at all: from: 412 if (!PyMethod_Check(show_fxn) && !PyFunction_Check(show_fxn)) { 413 PyErr_SetString(PyExc_TypeError, 414 "warnings.showwarning() must be set to a " 415 "function or method"); to: 412 if (!PyCallable_Check(show_fxn)) { 413 PyErr_SetString(PyExc_TypeError, 414 "warnings.showwarning() must be set to a " 415 "callable"); ---------- components: Library (Lib) messages: 120080 nosy: lekma priority: normal severity: normal status: open title: warnings.showwarning should allow any callable object type: feature request versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 20:03:15 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 31 Oct 2010 19:03:15 +0000 Subject: [issue10271] warnings.showwarning should allow any callable object In-Reply-To: <1288551215.82.0.402250167562.issue10271@psf.upfronthosting.co.za> Message-ID: <1288551795.78.0.771254154577.issue10271@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 20:03:29 2010 From: report at bugs.python.org (Brett Cannon) Date: Sun, 31 Oct 2010 19:03:29 +0000 Subject: [issue10271] warnings.showwarning should allow any callable object In-Reply-To: <1288551215.82.0.402250167562.issue10271@psf.upfronthosting.co.za> Message-ID: <1288551809.02.0.673727746725.issue10271@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- versions: -Python 2.6, Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 20:34:32 2010 From: report at bugs.python.org (David Watson) Date: Sun, 31 Oct 2010 19:34:32 +0000 Subject: [issue9377] socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names In-Reply-To: <4CCB1368.30608@egenix.com> Message-ID: <20101031193421.GA4170@dbwatson.ukfsn.org> David Watson added the comment: > FWIW, you can do the same on a Linux box, i.e. setup the host name > and domain to some completely bogus values. And as David pointed out, > without also updating the /etc/hosts on the Linux, you always get the > resolver error with hostname -f I mentioned earlier on (which does > a DNS lookup), so there's no real connection to the DNS system on > Linux either. Just to clarify here: there isn't anything special about /etc/hosts; it's handled by a pluggable module which performs hostname lookups in it alongside a similar module for the DNS. glibc's Name Service Switch combines the views provided by the various modules into a single byte-oriented namespace for hostnames according to the settings in /etc/nssswitch.conf (this namespace allows non-ASCII bytes, as the /etc/hosts examples demonstrate). http://www.kernel.org/doc/man-pages/online/pages/man5/nsswitch.conf.5.html http://www.gnu.org/software/libc/manual/html_node/Name-Service-Switch.html It's an extensible system, so people can write their own modules to handle whatever name services they have to deal with, and configure hostname lookup to query them before, after or instead of the DNS. A hostname that is not resolvable in the DNS may be resolvable in one of these. ---------- title: socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names -> socket, PEP 383: Mishandling of non-ASCII bytes in host/domain names _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 21:47:17 2010 From: report at bugs.python.org (Mathieu Bridon) Date: Sun, 31 Oct 2010 20:47:17 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1288558037.17.0.50511878051.issue9584@psf.upfronthosting.co.za> Mathieu Bridon added the comment: I finally found the time to follow up on this issue, sorry for the absence of response. The thread on Python-Ideas didn't really lead to a consensus (nor did it generate a lot of discussion). Some wanted to see this in fnmatch, others in glob and others in shutils. Most thought glob was the appropriate place though, and this is also my opinion. >From the Python documentation, fnmatch is a ? Unix filename pattern matching ? while glob is a ? Unix style pathname pattern expansion ?. This makes it clear to me that curly expansion has its place in glob, that would then use fnmatch to match the resulting list of expanded paths. Here is a patch against the py3k branch. The patch contains both the implementation, unit tests, and some changes to the documentation. Note that could I only run the unit tests on Linux (Fedora 14 x86_64) which is the only system I have at hand. ---------- title: Allow curly braces in fnmatch -> Allow curly brace expansion Added file: http://bugs.python.org/file19451/0001-Curly-brace-expansion-in-glob.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 21:47:39 2010 From: report at bugs.python.org (Mathieu Bridon) Date: Sun, 31 Oct 2010 20:47:39 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1288558059.01.0.575319616645.issue9584@psf.upfronthosting.co.za> Changes by Mathieu Bridon : Removed file: http://bugs.python.org/file18497/curly-fnmatch.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 21:47:56 2010 From: report at bugs.python.org (Ned Deily) Date: Sun, 31 Oct 2010 20:47:56 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288558076.13.0.251432279277.issue10263@psf.upfronthosting.co.za> Ned Deily added the comment: Unfortunately, the problem here is caused by having setuptools or Distribute installed. As released, both setuptools and Distribute install an easy-install.pth into site-packages to insert its "egg" into sys.path. If you look inside the egg, you'll see it has its own site.py which gets executed first as a bootstrap to do sys.path manipulations after finding and importing the site module from the standard library. So -m site actually runs the setuptools/distribute site module and not the expected standard library one. To work as expected, the problem needs to be corrected in setuptools and Distribute so you may want to open issues with both projects if necessary. BTW, I was unable to reproduce the problem with a current Debian Linux system with the Debian distribute package installed; it seems that the package there is patched to not install easy-install.pth. I expect you would see the problem there if you installed either manually. ---------- nosy: +ned.deily resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 21:57:34 2010 From: report at bugs.python.org (=?utf-8?q?Per_=C3=98yvind_Karlsen?=) Date: Sun, 31 Oct 2010 20:57:34 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288558654.91.0.332401754229.issue6715@psf.upfronthosting.co.za> Per ?yvind Karlsen added the comment: LZMAFile, LZMACompressor & LZMADecompressor are all inspired by and written to be as similar to bz2's for easier use & maintenance. I must admit that I haven't really put much thought into alternate ways to implement them beyond monkey see, monkey do.. ;) LZMAOptions is a bit awkwardly written, but it doesn't serve documentation purposes only, it also exposes these values for max, min etc. to python (ie. as used by it's regression tests) and are also used when processing various compression options passed. IMO it does serve a useful purpose, but certainly wouldn't hurt from being rewritten in some better way... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 22:15:30 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 31 Oct 2010 21:15:30 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288559730.04.0.930767886252.issue6715@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I feel guilty of having said, some months ago, that "Well, I wouldn't say bz2module is the best module out there, but as you say it's probably good enough" (my words). It's true that bz2module is not awful in terms of coding style or quality; the main issue with it is that uses outdated ways of doing I/O compared to what Python 3 recommends (that is, compose various building blocks together to allow for better re-use). A point of reference is gzip, where the core compression routines (mostly wrappers) are in zlibmodule (in C), but the high-level file object is written in pure Python (and is composeable with other building blocks for fast buffered IO). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 22:24:27 2010 From: report at bugs.python.org (=?utf-8?q?Per_=C3=98yvind_Karlsen?=) Date: Sun, 31 Oct 2010 21:24:27 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1288560267.02.0.76925595899.issue6715@psf.upfronthosting.co.za> Per ?yvind Karlsen added the comment: Hehe, don't feel guily on my part at least, I had already implemented it like this long before. :p I guess I could rewrite it following these suggestions, but I probably won't be able to finish it in time for 3.2 beta. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 22:27:23 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 31 Oct 2010 21:27:23 +0000 Subject: [issue10265] Fix fd leak in sunau In-Reply-To: <1288537413.19.0.268070514121.issue10265@psf.upfronthosting.co.za> Message-ID: <1288560443.26.0.729279128963.issue10265@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r86067. Thank you Brian! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 22:30:39 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 21:30:39 +0000 Subject: [issue7447] Sum() doc and behavior mismatch In-Reply-To: <1260060640.85.0.12368990118.issue7447@psf.upfronthosting.co.za> Message-ID: <1288560639.87.0.395198445231.issue7447@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed in r86066, r86068 and r86069. ---------- resolution: -> fixed status: open -> closed versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 22:35:59 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 31 Oct 2010 21:35:59 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1288558654.91.0.332401754229.issue6715@psf.upfronthosting.co.za> Message-ID: <4CCDE13B.4010807@v.loewis.de> Martin v. L?wis added the comment: > LZMAFile, LZMACompressor & LZMADecompressor are all inspired by and > written to be as similar to bz2's for easier use & maintenance. I > must admit that I haven't really put much thought into alternate ways > to implement them beyond monkey see, monkey do.. ;) My concern really is with LZMAFile only. It uses stdio, and it really shouldn't - we are trying to drop stdio in Python, as it's causing too many problems. LZMACompressor/Decompressor may be fine. > LZMAOptions is a bit awkwardly written, but it doesn't serve > documentation purposes only, it also exposes these values for max, > min etc. to python (ie. as used by it's regression tests) and are > also used when processing various compression options passed. > > IMO it does serve a useful purpose, but certainly wouldn't hurt from > being rewritten in some better way... If you are willing to do that, here is what I propose: rename the module to _lzma, drop options and lzmafile from _lzma. Then write lzma.py, which re-introduces this Options class in pure Python, as well as reintroduces LZMAFile, wrapping io.FileIO. The various constants that go into options should be exposed from _lzma using PyModule_AddIntConstant (except perhaps for the ones that you define yourself, such as LZMA_BEST_SPEED) That assumes, of course, that there is a need to provide backwards compatibility. I would personally be fine with *just* having the LZMA symbolic constants exposed, leaving it to the user to determine which constant serves which purpose (e.g. guessing what LZMA_DICT_SIZE_MIN and LZMA_DICT_SIZE_MAX do when there is a dict_size keyword parameter isn't too hard). But then, having the various options explained in a consistent manner may be useful enough to preserve the Options class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 22:43:53 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 31 Oct 2010 21:43:53 +0000 Subject: [issue10272] SSL handshake timeouts not caught by transient_internet In-Reply-To: <1288561433.38.0.641849376879.issue10272@psf.upfronthosting.co.za> Message-ID: <1288561433.38.0.641849376879.issue10272@psf.upfronthosting.co.za> New submission from Antoine Pitrou : The issue here is that ssl is using its own exception class rather than the socket module's "timeout" class: test test_httplib failed -- Traceback (most recent call last): File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/test/test_httplib.py", line 408, in test_networked h.request('GET', '/') File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py", line 943, in request self._send_request(method, url, body, headers) File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py", line 981, in _send_request self.endheaders(body) File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py", line 939, in endheaders self._send_output(message_body) File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py", line 791, in _send_output self.send(msg) File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py", line 737, in send self.connect() File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/http/client.py", line 1086, in connect server_hostname=server_hostname) File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/ssl.py", line 168, in wrap_socket _context=self) File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/ssl.py", line 254, in __init__ raise x File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/ssl.py", line 250, in __init__ self.do_handshake() File "/Users/pythonbuildbot/buildarea/3.x.hansen-osx-x86-2/build/Lib/ssl.py", line 429, in do_handshake self._sslobj.do_handshake() ssl.SSLError: _ssl.c:374: The handshake operation timed out ---------- components: Tests messages: 120090 nosy: pitrou priority: low severity: normal status: open title: SSL handshake timeouts not caught by transient_internet type: behavior versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 22:46:26 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 31 Oct 2010 21:46:26 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1288560267.02.0.76925595899.issue6715@psf.upfronthosting.co.za> Message-ID: <4CCDE3AF.90504@v.loewis.de> Martin v. L?wis added the comment: > I guess I could rewrite it following these suggestions, but I probably won't be able to > finish it in time for 3.2 beta. The more I think about it, the more I feel like -1 about this code as long as it uses stdio, and does buffering. We really don't need another implementation of splitting a stream of bytes into lines. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 22:55:03 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 31 Oct 2010 21:55:03 +0000 Subject: [issue775964] fix test_grp failing when NIS entries present Message-ID: <1288562103.71.0.543867771359.issue775964@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think this approach (of file19364) is reasonable. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 23:02:38 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 22:02:38 +0000 Subject: [issue7402] Improve reduce example in doanddont.rst In-Reply-To: <1259318842.77.0.740725384087.issue7402@psf.upfronthosting.co.za> Message-ID: <1288562558.35.0.716518743799.issue7402@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed in r86070, r86071, and r86072. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 23:03:30 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 22:03:30 +0000 Subject: [issue7402] Improve reduce example in doanddont.rst In-Reply-To: <1259318842.77.0.740725384087.issue7402@psf.upfronthosting.co.za> Message-ID: <1288562610.8.0.172895209205.issue7402@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 23:29:45 2010 From: report at bugs.python.org (Doug Hellmann) Date: Sun, 31 Oct 2010 22:29:45 +0000 Subject: [issue10263] "python -m site" does not print path details In-Reply-To: <1288531123.45.0.881083161674.issue10263@psf.upfronthosting.co.za> Message-ID: <1288564185.49.0.261671571342.issue10263@psf.upfronthosting.co.za> Doug Hellmann added the comment: That's strange. I have Distribute 0.6.10, including an easy-install.pth file, installed under 2.6 and it doesn't exhibit the problem. Is there some interaction between a change in Python 2.7 and Distribute? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 23:36:27 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 22:36:27 +0000 Subject: [issue9886] Make operator.itemgetter/attrgetter/methodcaller easier to discover In-Reply-To: <1284725606.32.0.188356028787.issue9886@psf.upfronthosting.co.za> Message-ID: <1288564587.02.0.316320913526.issue9886@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Fixed. See r86073. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Oct 31 23:51:29 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 31 Oct 2010 22:51:29 +0000 Subject: [issue9120] Reduce pickle size for an empty set In-Reply-To: <1277839720.0.0.346517516652.issue9120@psf.upfronthosting.co.za> Message-ID: <1288565489.9.0.26345352603.issue9120@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Have looked at this again and think I don't care what happens to it. The gain is minimal but it doesn't take much extra core. Like Fred, I'm not sure having another code path to test and maintain just to save 5 bytes. Unassigning. If anyone except the OP feels strongly either way, either close it or apply it. ---------- assignee: rhettinger -> type: feature request -> performance _______________________________________ Python tracker _______________________________________