From report at bugs.python.org Sat Dec 1 00:16:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 23:16:13 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354317373.63.0.21986122434.issue16586@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Issue16009 has an effect on error messages. But this error message should not be. scan_once() returns a 32-bit overflowed index (994967285 == 3300000011 - 2**32). However all indices in Modules/_json.c are of type Py_ssize_t. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 00:30:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 30 Nov 2012 23:30:49 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354318249.32.0.577535449985.issue16586@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ahem... I just noticed: import simplejson as json Dustin, this is not Python issue, this is simplejson issue. Can you reproduce the bug with standard json module? Try something like '[%*s]' % (2**32, ''), this should require less memory (especially on 3.3+). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 01:02:48 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Sat, 01 Dec 2012 00:02:48 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1354320168.13.0.439987610731.issue7976@psf.upfronthosting.co.za> Bruno Dupuis added the comment: Changes made. I added the exception doc and some cosmetics ---------- Added file: http://bugs.python.org/file28173/warnings_opt_parse_API-5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 01:14:51 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Sat, 01 Dec 2012 00:14:51 +0000 Subject: [issue1075356] exceeding obscure weakproxy bug Message-ID: <1354320891.67.0.890774145305.issue1075356@psf.upfronthosting.co.za> Changes by Bruno Dupuis : ---------- nosy: +bruno.dupuis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 01:16:07 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 01 Dec 2012 00:16:07 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1354320967.3.0.995019470524.issue7976@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks! Latest version looks good to me. David, Nick, do you want to have a look at the patch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 01:23:52 2012 From: report at bugs.python.org (Markus Kettunen) Date: Sat, 01 Dec 2012 00:23:52 +0000 Subject: [issue16587] Py_Initialize breaks wprintf on Windows Message-ID: <1354321432.5.0.798652538273.issue16587@psf.upfronthosting.co.za> New submission from Markus Kettunen: In a C application on Windows, at least on MSVC 2010 and Windows 7, do this: wprintf(L"Test\n"); Py_Initialize(); wprintf(L"Test\n"); Output is: Test T e s t I was able to track the issue to fileio.c to the following code block by searching where wprintf breaks: if (dircheck(self, nameobj) < 0) goto error; #if defined(MS_WINDOWS) || defined(__CYGWIN__) /* don't translate newlines (\r\n <=> \n) */ _setmode(self->fd, O_BINARY); <----- breaks it #endif if (PyObject_SetAttrString((PyObject *)self, "name", nameobj) < 0) goto error; This can be easily confirmed by adding wprintfs on both sides of _setmode. This issue was also raised at http://mail.python.org/pipermail/python-list/2012-February/620528.html but no solution was provided back then. ---------- components: IO, Unicode, Windows messages: 176732 nosy: ezio.melotti, makegho priority: normal severity: normal status: open title: Py_Initialize breaks wprintf on Windows type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 01:38:43 2012 From: report at bugs.python.org (Dustin Boswell) Date: Sat, 01 Dec 2012 00:38:43 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354322323.21.0.604784147586.issue16586@psf.upfronthosting.co.za> Dustin Boswell added the comment: I thought simplejson was a standard module for 2.6, and got renamed to json (replacing the older json module) in later versions. For instance, I get the same problem with 2.7 (no simplejson): python2.7 -c "import json; json.loads('[' + '''\".......\", ''' * 200000000 + '0]') " ^AcTraceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/json/__init__.py", line 326, in loads return _default_decoder.decode(s) File "/usr/local/lib/python2.7/json/decoder.py", line 369, in decode raise ValueError(errmsg("Extra data", s, end, len(s))) ValueError: Extra data: line 1 column -2094967293 - line 1 column 2200000003 (char -2094967293 - 2200000003) And if I use the "json" module in 2.6 (which is 10x slower, takes over 30 minutes to run) it also fails, but with a difference trace: python2.6 -c "import json; json.loads('[' + '''\".......\", ''' * 200000000 + '0]') " Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.6/json/__init__.py", line 307, in loads return _default_decoder.decode(s) File "/usr/lib/python2.6/json/decoder.py", line 319, in decode obj, end = self.raw_decode(s, idx=_w(s, 0).end()) File "/usr/lib/python2.6/json/decoder.py", line 336, in raw_decode obj, end = self._scanner.iterscan(s, **kw).next() File "/usr/lib/python2.6/json/scanner.py", line 55, in iterscan rval, next_pos = action(m, context) File "/usr/lib/python2.6/json/decoder.py", line 217, in JSONArray value, end = iterscan(s, idx=end, context=context).next() File "/usr/lib/python2.6/json/scanner.py", line 55, in iterscan rval, next_pos = action(m, context) File "/usr/lib/python2.6/json/decoder.py", line 155, in JSONString return scanstring(match.string, match.end(), encoding, strict) ValueError: end is out of bounds ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 01:47:50 2012 From: report at bugs.python.org (Markus Kettunen) Date: Sat, 01 Dec 2012 00:47:50 +0000 Subject: [issue16587] Py_Initialize breaks wprintf on Windows In-Reply-To: <1354321432.5.0.798652538273.issue16587@psf.upfronthosting.co.za> Message-ID: <1354322870.91.0.12808888955.issue16587@psf.upfronthosting.co.za> Markus Kettunen added the comment: If the standard streams are not used through Python, this hack can be used to work around the bug on C side: #ifdef WIN32 #include #endif ... Py_Initialize(); #ifdef WIN32 _setmode(stdin->_file, O_TEXT); _setmode(stdout->_file, O_TEXT); _setmode(stderr->_file, O_TEXT); #endif ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 02:04:59 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Sat, 01 Dec 2012 01:04:59 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1354323899.47.0.945208792064.issue7976@psf.upfronthosting.co.za> Bruno Dupuis added the comment: corrected, I changed the name of the function to parse_option, and I kept WarningsOptionParsingError as a name for the exception. These two sound good together. ---------- Added file: http://bugs.python.org/file28174/warnings_opt_parse_API-6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 02:11:51 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 01 Dec 2012 01:11:51 +0000 Subject: [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <20121130152040.3b61a295@resist.wooz.org> Message-ID: Nick Coghlan added the comment: +1 I wrote the stuff in PEP 1 about committers acting as editors, but agree the editor part itself also falls into the "currently unwritten, but should be written" category. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 02:23:07 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Sat, 01 Dec 2012 01:23:07 +0000 Subject: [issue7976] warnings should provide a public API for accessing its option parsing code In-Reply-To: <1266771333.82.0.427614024661.issue7976@psf.upfronthosting.co.za> Message-ID: <1354324987.3.0.522657021373.issue7976@psf.upfronthosting.co.za> Changes by Bruno Dupuis : Added file: http://bugs.python.org/file28175/warnings_opt_parse_API-7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 03:41:38 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Sat, 01 Dec 2012 02:41:38 +0000 Subject: [issue16588] gcc 4.7 ilegitimate unused-but-set warnings on Python/thread_pthread.h Message-ID: <1354329698.56.0.368664055406.issue16588@psf.upfronthosting.co.za> New submission from Bruno Dupuis: Looks like #10951, but for another version of gcc. I get these warnings: In file included from Python/thread.c:86:0: Python/thread_pthread.h: In function ?PyThread_free_lock?: Python/thread_pthread.h:304:17: attention : variable ?error? set but not used [-Wunused-but-set-variable] Python/thread_pthread.h: In function ?PyThread_acquire_lock_timed?: Python/thread_pthread.h:335:17: attention : variable ?error? set but not used [-Wunused-but-set-variable] Python/thread_pthread.h: In function ?PyThread_release_lock?: Python/thread_pthread.h:386:17: attention : variable ?error? set but not used [-Wunused-but-set-variable] I tried to remove the variables, but the build crash as they are used in #define CHECK_STATUS(name) if (status != 0) { perror(name); error = 1; } looks like a gcc 4.7.2 bug. ---------- components: Build messages: 176737 nosy: bruno.dupuis priority: normal severity: normal status: open title: gcc 4.7 ilegitimate unused-but-set warnings on Python/thread_pthread.h versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 06:08:33 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 01 Dec 2012 05:08:33 +0000 Subject: [issue16588] gcc 4.7 ilegitimate unused-but-set warnings on Python/thread_pthread.h In-Reply-To: <1354329698.56.0.368664055406.issue16588@psf.upfronthosting.co.za> Message-ID: <1354338513.13.0.307438548889.issue16588@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: The warning is legitimate. "error" is set to 0 at the beginning and it will be set to 1 if an error occurred (via CHECK_STATUS macro). But the variable "error" is never used in the function. So it is set, but never actually used in the function. The obvious thing to do is to use the variable. For instance, with an "if (error) {}" do nothing construction. Please, review the patch. I will commit it if another core developer thinks it is ok. Python 2.7, 3.2, 3.3 and 3.4 affected. It you think there is a better way of handling this, let me know. PS: With the default compilation parameters (-O3), that empty "if" is optimized out, as it should. ---------- assignee: -> jcea keywords: +easy nosy: +jcea stage: -> patch review versions: +Python 2.7, Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 06:09:42 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 01 Dec 2012 05:09:42 +0000 Subject: [issue16588] gcc 4.7 ilegitimate unused-but-set warnings on Python/thread_pthread.h In-Reply-To: <1354329698.56.0.368664055406.issue16588@psf.upfronthosting.co.za> Message-ID: <1354338582.39.0.320239110695.issue16588@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- keywords: +patch Added file: http://bugs.python.org/file28176/z.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 06:10:25 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 01 Dec 2012 05:10:25 +0000 Subject: [issue16588] gcc 4.7 unused-but-set warnings on Python/thread_pthread.h In-Reply-To: <1354329698.56.0.368664055406.issue16588@psf.upfronthosting.co.za> Message-ID: <1354338625.38.0.587845417538.issue16588@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- title: gcc 4.7 ilegitimate unused-but-set warnings on Python/thread_pthread.h -> gcc 4.7 unused-but-set warnings on Python/thread_pthread.h _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 06:15:02 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 01 Dec 2012 05:15:02 +0000 Subject: [issue16588] gcc 4.7 unused-but-set warnings on Python/thread_pthread.h In-Reply-To: <1354329698.56.0.368664055406.issue16588@psf.upfronthosting.co.za> Message-ID: <1354338902.67.0.907976597827.issue16588@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : Added file: http://bugs.python.org/file28177/z2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 06:15:42 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 01 Dec 2012 05:15:42 +0000 Subject: [issue16588] gcc 4.7 unused-but-set warnings on Python/thread_pthread.h In-Reply-To: <1354329698.56.0.368664055406.issue16588@psf.upfronthosting.co.za> Message-ID: <1354338942.32.0.785716555922.issue16588@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Another patch proposal, not sure about which is cleaner. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 11:14:02 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Sat, 01 Dec 2012 10:14:02 +0000 Subject: [issue16588] gcc 4.7 unused-but-set warnings on Python/thread_pthread.h In-Reply-To: <1354329698.56.0.368664055406.issue16588@psf.upfronthosting.co.za> Message-ID: <1354356842.89.0.607858459151.issue16588@psf.upfronthosting.co.za> Bruno Dupuis added the comment: I don't agree. Trash build logs are bad, trash code (I mean, in terms of utility, not quality :-) ) is far worst IMHO. The purpose of this bug, to me, is to try to find a neat way to suppress the warnings without touching the code, and if we can't, wich is probable, we just tell the world : "Yeah, we know this bug, it's not ours and it has no inpact". Anyway, I do not know the official policy for this kind of problem, but I really think we should avoid adding dead code as a workaround for every bug of every supported version of each supported compiler. ---------- versions: -Python 2.7, Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 12:55:59 2012 From: report at bugs.python.org (Sebastian Kraft) Date: Sat, 01 Dec 2012 11:55:59 +0000 Subject: [issue16525] wave file module does not support 32bit float format In-Reply-To: <1353528827.37.0.543069044809.issue16525@psf.upfronthosting.co.za> Message-ID: <1354362959.91.0.741713744906.issue16525@psf.upfronthosting.co.za> Sebastian Kraft added the comment: Contribution agreement is now attached to my account. So the review can start ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 13:20:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2012 12:20:58 +0000 Subject: [issue1739648] zipfile.testzip() using progressive file reads Message-ID: <1354364458.12.0.539982141585.issue1739648@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I?added comments in Rietveld. ---------- components: +Tests versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 13:24:47 2012 From: report at bugs.python.org (Daniel Urban) Date: Sat, 01 Dec 2012 12:24:47 +0000 Subject: [issue16584] unhandled IOError filecmp.cmpfiles() if file not readable In-Reply-To: <1354300040.38.0.588944499058.issue16584@psf.upfronthosting.co.za> Message-ID: <1354364687.29.0.319633280251.issue16584@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- stage: -> patch review type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 14:00:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2012 13:00:43 +0000 Subject: [issue12004] PyZipFile.writepy gives internal error on syntax errors In-Reply-To: <1304562440.9.0.83817194423.issue12004@psf.upfronthosting.co.za> Message-ID: <1354366843.2.0.864239481407.issue12004@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patches look good to me, except that `self.assertIn('mod1.py', names)` can be used instead `self.assertTrue('mod1.py' in names)`. ---------- nosy: +alanmcintyre, serhiy.storchaka stage: -> commit review versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 15:21:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2012 14:21:49 +0000 Subject: [issue4844] ZipFile doesn't range check in _EndRecData() In-Reply-To: <1231169051.46.0.731825269948.issue4844@psf.upfronthosting.co.za> Message-ID: <1354371709.81.0.228025140361.issue4844@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch for 3.4, which adds checks for other unpacks (except one, for which issue14315 exists). Also BadZipfile replaced by BadZipFile and trailing whitespaces deleted. For 2.7 BadZipFile should be replaced by BadZipfile back. ---------- stage: -> patch review type: -> behavior versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 -Python 2.6 Added file: http://bugs.python.org/file28178/zipfile_unpack_check.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 15:31:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2012 14:31:56 +0000 Subject: [issue10712] 2to3 fixer for deprecated unittest method names In-Reply-To: <1292441796.9.0.018359428873.issue10712@psf.upfronthosting.co.za> Message-ID: <1354372316.04.0.168959223948.issue10712@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 18:26:05 2012 From: report at bugs.python.org (mindrones) Date: Sat, 01 Dec 2012 17:26:05 +0000 Subject: [issue16589] PrettyPrinter docs is incomplete Message-ID: <1354382765.36.0.618684854763.issue16589@psf.upfronthosting.co.za> New submission from mindrones: Hi, at http://docs.python.org/2.7/library/pprint.html#pprint.PrettyPrinter we see: "class pprint.PrettyPrinter(...)" while at http://docs.python.org/3.3/library/pprint.html#pprint.PrettyPrinter we see: "class pprint.PrettyPrinter(indent=1, width=80, depth=None, stream=None)" I think the first case is a bug. Regards, Luca ---------- assignee: docs at python components: Documentation messages: 176745 nosy: docs at python, mindrones priority: normal severity: normal status: open title: PrettyPrinter docs is incomplete versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 18:36:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Dec 2012 17:36:14 +0000 Subject: [issue16589] PrettyPrinter docs is incomplete In-Reply-To: <1354382765.36.0.618684854763.issue16589@psf.upfronthosting.co.za> Message-ID: <3YDKQ55ytGzNWw@mail.python.org> Roundup Robot added the comment: New changeset 62fed5f18681 by Ezio Melotti in branch '2.7': #16589: fix pprint signatures in the doc (backport of 106ee4eb5970). http://hg.python.org/cpython/rev/62fed5f18681 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 18:37:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 01 Dec 2012 17:37:07 +0000 Subject: [issue16589] PrettyPrinter docs is incomplete In-Reply-To: <1354382765.36.0.618684854763.issue16589@psf.upfronthosting.co.za> Message-ID: <1354383427.23.0.492701769997.issue16589@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 18:55:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2012 17:55:07 +0000 Subject: [issue16590] Drop <2.6 support from _json.c Message-ID: <1354384507.61.0.431771846234.issue16590@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Modules/_json.c contains workarounds for Python versions <2.6. Now this code is not needed and can be safely dropped. This patch moved from issue16586. ---------- components: Extension Modules files: json_size_t_cleanup.patch keywords: patch messages: 176748 nosy: ezio.melotti, pitrou, rhettinger, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Drop <2.6 support from _json.c type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28179/json_size_t_cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 18:56:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2012 17:56:29 +0000 Subject: [issue16590] Drop <2.6 support from _json.c In-Reply-To: <1354384507.61.0.431771846234.issue16590@psf.upfronthosting.co.za> Message-ID: <1354384589.14.0.462475868633.issue16590@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 19:35:48 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 01 Dec 2012 18:35:48 +0000 Subject: [issue16590] Drop <2.6 support from _json.c In-Reply-To: <1354384507.61.0.431771846234.issue16590@psf.upfronthosting.co.za> Message-ID: <3YDLkq5vZwzQ0W@mail.python.org> Roundup Robot added the comment: New changeset 2c04d2102534 by Antoine Pitrou in branch 'default': Issue #16590: remove obsolete compatibility code from the _json module. http://hg.python.org/cpython/rev/2c04d2102534 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 19:36:51 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Dec 2012 18:36:51 +0000 Subject: [issue16590] Drop <2.6 support from _json.c In-Reply-To: <1354384507.61.0.431771846234.issue16590@psf.upfronthosting.co.za> Message-ID: <1354387011.63.0.801356340339.issue16590@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you :) ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 19:37:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2012 18:37:09 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354387029.1.0.649030099074.issue16586@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28171/json_size_t_cleanup.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 19:37:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2012 18:37:16 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354387036.33.0.561782330292.issue16586@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28172/json_size_t_cleanup-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 20:23:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2012 19:23:03 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354389783.78.0.577770215941.issue16586@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Dustin, what version of 2.7 do you use? What "python2.7 -V" says? Please someone run on self-built 64-bit Python 2.7 something like (this should require a little greater than 2GB of memory): python -c "import json; json.loads('[%2200000000s' % ']')" I suspect that this is a build bug. Does it reproduced on Python 3? ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 20:23:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 01 Dec 2012 19:23:13 +0000 Subject: [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1354389793.12.0.583777143504.issue16581@psf.upfronthosting.co.za> Chris Jerdonek added the comment: >From PEP 1: "If the PEP author is a Python developer, assign the bug/patch to him, otherwise assign it to the [a] PEP editor." Given that the list is small, something else that might make sense is adding a "PEP editors" area to the Experts Index in the devguide. That would allow one to do more easily what is stated above, for example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 20:29:05 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 01 Dec 2012 19:29:05 +0000 Subject: [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1354390145.87.0.767107368914.issue16581@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Btw, I will prepare a patch that incorporates the information that Barry provided. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 20:43:13 2012 From: report at bugs.python.org (Fabian Groffen) Date: Sat, 01 Dec 2012 19:43:13 +0000 Subject: [issue16591] RUNSHARED wrong for OSX no framework Message-ID: <1354390993.26.0.328076404417.issue16591@psf.upfronthosting.co.za> New submission from Fabian Groffen: Python fails to run python.exe on OSX when a non-framework build is requested, due to wrong quoting in configure.ac. Like all other RUNSHARED, it shouldn't be quoted because then `pwd` won't be expanded, resulting in a wrong DYLD_LIBRARY_PATH when regen is ran (from a different directory than where libpython3.3.dylib resides). Attached patch solves the issue. The issue seems to be in current 3.3 and default heads. ---------- components: Build files: 11_all_darwin-dyld-library-path.patch hgrepos: 162 keywords: patch messages: 176754 nosy: grobian priority: normal severity: normal status: open title: RUNSHARED wrong for OSX no framework type: compile error versions: Python 3.3 Added file: http://bugs.python.org/file28180/11_all_darwin-dyld-library-path.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 21:44:45 2012 From: report at bugs.python.org (Dustin Boswell) Date: Sat, 01 Dec 2012 20:44:45 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354394685.49.0.42489434159.issue16586@psf.upfronthosting.co.za> Dustin Boswell added the comment: Python 2.7.3 (default, Aug 3 2012, 20:01:21) [GCC 4.4.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import sys;print("%x" % sys.maxsize, sys.maxsize > 2**32) ('7fffffffffffffff', True) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 21:49:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2012 20:49:22 +0000 Subject: [issue11908] Weird `slice.stop or sys.maxint` In-Reply-To: <1303493846.17.0.214651551769.issue11908@psf.upfronthosting.co.za> Message-ID: <1354394962.52.0.711228613685.issue11908@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. However note, that for 2.7 the patch should be modified (maxsize -> maxint, range -> xrange). ---------- nosy: +serhiy.storchaka stage: needs patch -> commit review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 21:54:39 2012 From: report at bugs.python.org (Dustin Boswell) Date: Sat, 01 Dec 2012 20:54:39 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354395279.69.0.241349615159.issue16586@psf.upfronthosting.co.za> Dustin Boswell added the comment: Yes, bug exists on 3.1 (gcc build), as well as darwin build of 2.7: python3.1 -c "import json; json.loads('[%2200000000s' % ']')" Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.1/json/__init__.py", line 293, in loads return _default_decoder.decode(s) File "/usr/lib/python3.1/json/decoder.py", line 328, in decode raise ValueError(errmsg("Extra data", s, end, len(s))) ValueError: Extra data: line 1 column -2094967295 - line 1 column 2200000001 (char -2094967295 - 2200000001) python3.1 Python 3.1.2 (r312:79147, Oct 23 2012, 20:07:42) [GCC 4.4.3] on linux2 >>> import sys;print("%x" % sys.maxsize, sys.maxsize > 2**32) 7fffffffffffffff True python2.7 -c "import json; json.loads('[%2200000000s' % ']')" Traceback (most recent call last): File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/__init__.py", line 326, in loads File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/json/decoder.py", line 369, in decode ValueError: Extra data: line 1 column -2094967295 - line 1 column 2200000001 (char -2094967295 - 2200000001) python2.7 Python 2.7.2 (default, Jun 20 2012, 16:23:33) [GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)] on darwin >>> import sys;print("%x" % sys.maxsize, sys.maxsize > 2**32) ('7fffffffffffffff', True) ---------- versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 22:20:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2012 21:20:51 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354396851.71.0.947704744832.issue16586@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As Antoine Pitrou reported on IRC, this bug exists on 3.x. Sorry, but this bug can't be fixed on 2.6 and 3.1. ---------- versions: +Python 3.2, Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 22:22:16 2012 From: report at bugs.python.org (Bradley Froehle) Date: Sat, 01 Dec 2012 21:22:16 +0000 Subject: [issue10712] 2to3 fixer for deprecated unittest method names In-Reply-To: <1292441796.9.0.018359428873.issue10712@psf.upfronthosting.co.za> Message-ID: <1354396936.79.0.00341329906022.issue10712@psf.upfronthosting.co.za> Bradley Froehle added the comment: Bikeshedding, but the fixer name of 'asserts' bugs me. I'd suggest 'unittest' or 'unittest_asserts'. ---------- nosy: +bfroehle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 22:29:28 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Dec 2012 21:29:28 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354397368.97.0.608293545738.issue16586@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Actually, this isn't a problem in _json.c but in the re library: JSONDecoder.raw_decode() works fine, but JSONDecoder.decode() raises: $ ./python -c "import json.decoder; print(json.decoder.JSONDecoder().raw_decode('[%2200000000s' % ']'))" ([], 2200000001) $ ./python -c "import json.decoder; print(json.decoder.JSONDecoder().decode('[%2200000000s' % ']'))" Traceback (most recent call last): File "", line 1, in File "/home/antoine/cpython/default/Lib/json/decoder.py", line 347, in decode raise ValueError(errmsg("Extra data", s, end, len(s))) ValueError: Extra data: line 1 column -2094967295 - line 1 column 2200000001 (char -2094967295 - 2200000001) (decode() is basically raw_decode() followed by a call to WHITESPACE.match() from the end of the JSON object: http://hg.python.org/cpython/file/2c04d2102534/Lib/json/decoder.py#l339 ) ---------- nosy: +pitrou stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 22:36:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2012 21:36:24 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354397784.76.0.943712857448.issue16586@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Uh, this is issue10182. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 22:38:29 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Dec 2012 21:38:29 +0000 Subject: [issue16586] json library can't parse large (> 2^31) strings In-Reply-To: <1354311645.71.0.363130090165.issue16586@psf.upfronthosting.co.za> Message-ID: <1354397909.63.0.415131842618.issue16586@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Uh, this is issue10182. Indeed, the patch there seems to fix it. ---------- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> match_start truncates large values _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 22:49:07 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 01 Dec 2012 21:49:07 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <1354398547.78.0.972817236586.issue10182@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Actually, we now have a 64-bit big endian buildbot and it does not show any test failure: http://buildbot.python.org/all/builders/SPARC%20Solaris%2010%20%28cc%2C%2064b%29%20%5BSB%5D%203.x [...] checking size of int... 4 checking size of long... 8 checking size of void *... 8 checking size of short... 2 checking size of float... 4 checking size of double... 8 checking size of fpos_t... 8 checking size of size_t... 8 [...] checking whether byte ordering is bigendian... yes ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 23:01:28 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 01 Dec 2012 22:01:28 +0000 Subject: [issue9650] format codes in time.strptime docstrings In-Reply-To: <1282319380.5.0.724924373031.issue9650@psf.upfronthosting.co.za> Message-ID: <1354399288.29.0.242767804867.issue9650@psf.upfronthosting.co.za> ?ric Araujo added the comment: Any reason to not backport this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 23:06:48 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 01 Dec 2012 22:06:48 +0000 Subject: [issue10712] 2to3 fixer for deprecated unittest method names In-Reply-To: <1292441796.9.0.018359428873.issue10712@psf.upfronthosting.co.za> Message-ID: <1354399608.34.0.61646817846.issue10712@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Looks fine, though. Make sure to add docs to library/2to3.rst. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 1 23:08:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 01 Dec 2012 22:08:53 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <1354399733.7.0.966254673287.issue10182@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a test. ---------- Added file: http://bugs.python.org/file28181/buildvalue_overflow_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 02:27:30 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 01:27:30 +0000 Subject: [issue16592] stringlib_bytes_join doesn't raise MemoryError on allocation failure Message-ID: <1354411650.12.0.480511904473.issue16592@psf.upfronthosting.co.za> New submission from Antoine Pitrou: >>> l = [b''] * (100*1024*1024) [104918914 refs] >>> d = b''.join(l) Traceback (most recent call last): File "", line 1, in SystemError: error return without exception set (you'll have to adjust the list size based on your system memory size) ---------- components: Interpreter Core keywords: easy messages: 176767 nosy: pitrou priority: normal severity: normal stage: needs patch status: open title: stringlib_bytes_join doesn't raise MemoryError on allocation failure type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 07:11:18 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sun, 02 Dec 2012 06:11:18 +0000 Subject: [issue16593] Have BSD 'make -s' DTRT Message-ID: <1354428678.52.0.554916840287.issue16593@psf.upfronthosting.co.za> New submission from Daniel Shahaf: FreeBSD make sets $$MAKEFLAGS differently than GNU make does. Attached patch updates Makefile.pre.in to recognise that syntax too. Preliminary versions discussed with Crys on #python-dev. ---------- components: Build messages: 176768 nosy: danielsh priority: normal severity: normal status: open title: Have BSD 'make -s' DTRT type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 07:14:02 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sun, 02 Dec 2012 06:14:02 +0000 Subject: [issue16593] Have BSD 'make -s' DTRT In-Reply-To: <1354428678.52.0.554916840287.issue16593@psf.upfronthosting.co.za> Message-ID: <1354428842.37.0.503626211594.issue16593@psf.upfronthosting.co.za> Changes by Daniel Shahaf : ---------- keywords: +patch Added file: http://bugs.python.org/file28182/makedashs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 07:39:38 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 02 Dec 2012 06:39:38 +0000 Subject: [issue16593] Have BSD 'make -s' DTRT In-Reply-To: <1354428678.52.0.554916840287.issue16593@psf.upfronthosting.co.za> Message-ID: <1354430378.79.0.946751166096.issue16593@psf.upfronthosting.co.za> Christian Heimes added the comment: Thanks for your patch! Crys ---------- nosy: +christian.heimes resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 07:56:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Dec 2012 06:56:52 +0000 Subject: [issue16592] stringlib_bytes_join doesn't raise MemoryError on allocation failure In-Reply-To: <1354411650.12.0.480511904473.issue16592@psf.upfronthosting.co.za> Message-ID: <3YDg9v1c5nzNGR@mail.python.org> Roundup Robot added the comment: New changeset 9af5a2611202 by Christian Heimes in branch 'default': Issue #16592: stringlib_bytes_join doesn't raise MemoryError on allocation failure http://hg.python.org/cpython/rev/9af5a2611202 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 07:59:25 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 02 Dec 2012 06:59:25 +0000 Subject: [issue16592] stringlib_bytes_join doesn't raise MemoryError on allocation failure In-Reply-To: <1354411650.12.0.480511904473.issue16592@psf.upfronthosting.co.za> Message-ID: <1354431565.72.0.614787791808.issue16592@psf.upfronthosting.co.za> Christian Heimes added the comment: Antoine, on Unix you can restrict the address space of a program to test the issue without almost crashing and OOMing your box. ;) >>> import resource >>> resource.setrlimit(resource.RLIMIT_AS, (1024*1024*100, 1024*1024*100)) >>> l = [b''] * (100*1024*70) >>> d = b''.join(l) Traceback (most recent call last): File "", line 1, in MemoryError I wonder why I don't see a memory error in Python 3.3 or earlier. Any idea? ---------- nosy: +christian.heimes resolution: -> fixed status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 08:14:04 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 02 Dec 2012 07:14:04 +0000 Subject: [issue16572] Bad multi-inheritance support in some libs like threading or multiprocessing In-Reply-To: <1354138508.41.0.9459136379.issue16572@psf.upfronthosting.co.za> Message-ID: <1354432444.22.0.060904728526.issue16572@psf.upfronthosting.co.za> ?ric Araujo added the comment: Adding Raymond, who thinks super is super, to the nosy list. http://rhettinger.wordpress.com/2011/05/26/super-considered-super/ ---------- nosy: +eric.araujo, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 08:26:16 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Dec 2012 07:26:16 +0000 Subject: [issue16593] Have BSD 'make -s' DTRT In-Reply-To: <1354428678.52.0.554916840287.issue16593@psf.upfronthosting.co.za> Message-ID: <3YDgqq4qCNzNGF@mail.python.org> Roundup Robot added the comment: New changeset ceb325fdd54e by Christian Heimes in branch '3.2': - Issue #16593: Have BSD 'make -s' do the right thing, thanks to Daniel Shahaf http://hg.python.org/cpython/rev/ceb325fdd54e New changeset 323f0aeba89d by Christian Heimes in branch '3.3': Issue #16593: Have BSD 'make -s' do the right thing, thanks to Daniel Shahaf http://hg.python.org/cpython/rev/323f0aeba89d New changeset 0fa67e3f195d by Christian Heimes in branch '2.7': - Issue #16593: Have BSD 'make -s' do the right thing, thanks to Daniel Shahaf http://hg.python.org/cpython/rev/0fa67e3f195d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 08:39:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Dec 2012 07:39:43 +0000 Subject: [issue16588] gcc 4.7 unused-but-set warnings on Python/thread_pthread.h In-Reply-To: <1354329698.56.0.368664055406.issue16588@psf.upfronthosting.co.za> Message-ID: <3YDh7L74s4zNHd@mail.python.org> Roundup Robot added the comment: New changeset 280469ce6669 by Christian Heimes in branch '3.2': Issue #16588: Silence unused-but-set warnings in Python/thread_pthread.h http://hg.python.org/cpython/rev/280469ce6669 New changeset 470785a9fdd5 by Christian Heimes in branch '3.3': Issue #16588: Silence unused-but-set warnings in Python/thread_pthread.h http://hg.python.org/cpython/rev/470785a9fdd5 New changeset 33b070ef0bad by Christian Heimes in branch 'default': Issue #16588: Silence unused-but-set warnings in Python/thread_pthread.h http://hg.python.org/cpython/rev/33b070ef0bad ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 08:45:15 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 02 Dec 2012 07:45:15 +0000 Subject: [issue16588] gcc 4.7 unused-but-set warnings on Python/thread_pthread.h In-Reply-To: <1354329698.56.0.368664055406.issue16588@psf.upfronthosting.co.za> Message-ID: <1354434315.47.0.589345883677.issue16588@psf.upfronthosting.co.za> Christian Heimes added the comment: Jes?s, I've used a slightly different comment in my patch. Python 3.3 and 3.4 now compile the core and modules without any warnings. 3.2 still has some warnings. ---------- nosy: +christian.heimes resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: -> compile error versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 08:49:07 2012 From: report at bugs.python.org (danblack) Date: Sun, 02 Dec 2012 07:49:07 +0000 Subject: [issue8109] Server-side support for TLS Server Name Indication extension In-Reply-To: <1268234047.5.0.702223567094.issue8109@psf.upfronthosting.co.za> Message-ID: <1354434547.01.0.653971044825.issue8109@psf.upfronthosting.co.za> danblack added the comment: > Antoine Pitrou (pitrou) * Date: 2012-10-06 13:10 > Daniel, I'll take a look. minor nag :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 10:07:29 2012 From: report at bugs.python.org (Andy Zeldis) Date: Sun, 02 Dec 2012 09:07:29 +0000 Subject: [issue16594] SocketServer should set SO_REUSEPORT along with SO_REUSEADDR when present Message-ID: <1354439249.45.0.0324812571604.issue16594@psf.upfronthosting.co.za> New submission from Andy Zeldis: On BSD (including Mac OS X) SO_REUSEPORT should be specified along with SO_REUSEADDR to match behavior on Linux (and possible Windows). This is needed to have multiple listeners to a UDP broadcast. I discovered this when using PyOSC. Attached is an example modified to subclass SocketServer with a workaround. It should be possible to start multiple instances of this program, all of which will receive messages to a broadcast address (eg 255.255.255.255:7110). This test uses Python 2.7 on OS X (despite the "python3" shebang line from the example) ---------- components: Library (Lib) files: osc-broadcast-rcv.py messages: 176777 nosy: Andy.Zeldis priority: normal severity: normal status: open title: SocketServer should set SO_REUSEPORT along with SO_REUSEADDR when present type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file28183/osc-broadcast-rcv.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 10:49:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Dec 2012 09:49:07 +0000 Subject: [issue16592] stringlib_bytes_join doesn't raise MemoryError on allocation failure In-Reply-To: <1354411650.12.0.480511904473.issue16592@psf.upfronthosting.co.za> Message-ID: <1354441747.18.0.293107658324.issue16592@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I wonder why I don't see a memory error in Python 3.3 or earlier. Any idea? See issue #15958. Now join() accept arbitrary buffer objects, which can be modified during iteration, and therefore need a temporary list of Py_buffers. ---------- nosy: +serhiy.storchaka status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 10:54:51 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 09:54:51 +0000 Subject: [issue16592] stringlib_bytes_join doesn't raise MemoryError on allocation failure In-Reply-To: <1354411650.12.0.480511904473.issue16592@psf.upfronthosting.co.za> Message-ID: <1354442091.58.0.616170894617.issue16592@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Antoine, on Unix you can restrict the address space of a program to > test the issue without almost crashing and OOMing your box. ;) Ah, thanks, but I didn't crash and OOM it, since it has no swap: memory errors get raised quickly here :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 11:20:31 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Dec 2012 10:20:31 +0000 Subject: [issue11908] Weird `slice.stop or sys.maxint` In-Reply-To: <1303493846.17.0.214651551769.issue11908@psf.upfronthosting.co.za> Message-ID: <1354443631.64.0.414836002646.issue11908@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 11:23:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Dec 2012 10:23:39 +0000 Subject: [issue13555] cPickle MemoryError when loading large file (while pickle works) In-Reply-To: <1323348723.51.0.524535293585.issue13555@psf.upfronthosting.co.za> Message-ID: <1354443819.77.0.754769417588.issue13555@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 11:27:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Dec 2012 10:27:47 +0000 Subject: [issue10640] SystemError on pickling bytes >= 4GB In-Reply-To: <1291663989.87.0.429691501814.issue10640@psf.upfronthosting.co.za> Message-ID: <1354444067.7.0.12170164923.issue10640@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 11:33:08 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 10:33:08 +0000 Subject: [issue16592] stringlib_bytes_join doesn't raise MemoryError on allocation failure In-Reply-To: <1354411650.12.0.480511904473.issue16592@psf.upfronthosting.co.za> Message-ID: <1354444388.54.0.463328105933.issue16592@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 11:38:36 2012 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Sun, 02 Dec 2012 10:38:36 +0000 Subject: [issue16585] surrogateescape broken w/ multibytecodecs' encode In-Reply-To: <1354306822.13.0.130768178209.issue16585@psf.upfronthosting.co.za> Message-ID: <1354444716.64.0.485382330704.issue16585@psf.upfronthosting.co.za> Walter D?rwald added the comment: And returning bytes is documented in PEP 383, as an extension to the PEP 293 machinery: """To convert non-decodable bytes, a new error handler ([2]) "surrogateescape" is introduced, which produces these surrogates. On encoding, the error handler converts the surrogate back to the corresponding byte. This error handler will be used in any API that receives or produces file names, command line arguments, or environment variables. The error handler interface is extended to allow the encode error handler to return byte strings immediately, in addition to returning Unicode strings which then get encoded again (also see the discussion below).""" ---------- nosy: +doerwalter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 11:51:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Dec 2012 10:51:59 +0000 Subject: [issue11344] Add os.path.splitpath(path) function In-Reply-To: <1298795208.87.0.771920756626.issue11344@psf.upfronthosting.co.za> Message-ID: <1354445519.85.0.681547508965.issue11344@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: splitpath() should be equivalent to followed code (but be non-recursive and more effective): def splitpath(path): head, tail = split(path) if head == path: return [head] else: return splitpath(head) + [tail] ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 11:57:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Dec 2012 10:57:36 +0000 Subject: [issue11344] Add os.path.splitpath(path) function In-Reply-To: <1298795208.87.0.771920756626.issue11344@psf.upfronthosting.co.za> Message-ID: <1354445856.82.0.258809342608.issue11344@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 12:12:34 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 11:12:34 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <1354446754.6.0.841782719284.issue10182@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the patch. For the record, the test passes successfully but it needs 40 GB, not 4 GB: http://buildbot.python.org/all/builders/AMD64%20Ubuntu%20LTS%20bigmem%20custom/builds/3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 12:14:42 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 02 Dec 2012 11:14:42 +0000 Subject: [issue16595] Add resource.prlimit Message-ID: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> New submission from Christian Heimes: Linux has an additional function to setrlimit and getrlimit which supports to query and/or modify resource limits of another process. http://www.kernel.org/doc/man-pages/online/pages/man2/getrlimit.2.html The patch implements resource.prlimit(pid, resource[, limits]) on all platforms that have a prlimit() function. I haven't included the regenerated configure script. You have to run autoreconf in order to test the new function. ---------- assignee: christian.heimes components: Extension Modules files: prlimit.patch keywords: patch messages: 176783 nosy: christian.heimes priority: normal severity: normal stage: patch review status: open title: Add resource.prlimit type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28184/prlimit.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 12:26:11 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Dec 2012 11:26:11 +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: <1354447571.76.0.223947743373.issue10052@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch (against the default branch). It adds simple AC_CHECK_TYPE configure-time typechecks for uint32_t and friends. ---------- Added file: http://bugs.python.org/file28185/issue10052.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 12:34:28 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 02 Dec 2012 11:34:28 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> Message-ID: <1354448068.95.0.464136441472.issue16595@psf.upfronthosting.co.za> Christian Heimes added the comment: prlimit() needs glibc 2.13+ (thanks Arfrever). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 12:56:36 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Dec 2012 11:56:36 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <3YDnql5kr4zNBQ@mail.python.org> Roundup Robot added the comment: New changeset 0edc92d78192 by Antoine Pitrou in branch '3.2': Issue #10182: The re module doesn't truncate indices to 32 bits anymore. http://hg.python.org/cpython/rev/0edc92d78192 New changeset 21ceee08a375 by Antoine Pitrou in branch '3.3': Issue #10182: The re module doesn't truncate indices to 32 bits anymore. http://hg.python.org/cpython/rev/21ceee08a375 New changeset e7104cc09d02 by Antoine Pitrou in branch 'default': Issue #10182: The re module doesn't truncate indices to 32 bits anymore. http://hg.python.org/cpython/rev/e7104cc09d02 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 13:01:08 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Dec 2012 12:01:08 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <3YDnx036q5zNP4@mail.python.org> Roundup Robot added the comment: New changeset de0f38f9280e by Antoine Pitrou in branch '2.7': Issue #10182: The re module doesn't truncate indices to 32 bits anymore. http://hg.python.org/cpython/rev/de0f38f9280e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 13:01:40 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 12:01:40 +0000 Subject: [issue10182] match_start truncates large values In-Reply-To: <1287859071.54.0.617398147143.issue10182@psf.upfronthosting.co.za> Message-ID: <1354449699.99.0.709057389531.issue10182@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 13:04:01 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 12:04:01 +0000 Subject: [issue16585] surrogateescape broken w/ multibytecodecs' encode In-Reply-To: <1354306822.13.0.130768178209.issue16585@psf.upfronthosting.co.za> Message-ID: <1354449841.46.0.950725940836.issue16585@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: docs at python -> components: +Library (Lib) -Documentation, Interpreter Core, Unicode _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 13:11:50 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Dec 2012 12:11:50 +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: <3YDp9K2WDVzNcd@mail.python.org> Roundup Robot added the comment: New changeset 6f9aba5f8d32 by Mark Dickinson in branch 'default': Issue 10052: fix failed uint32_t / uint64_t / int32_t / int64_t detection on some platforms. http://hg.python.org/cpython/rev/6f9aba5f8d32 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 13:12:41 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Dec 2012 12:12:41 +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: <1354450361.25.0.848674092593.issue10052@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed to default. I want to look at the buildbot results and try some manual snakebite tests before deciding whether to backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 14:16:01 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Dec 2012 13:16:01 +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: <3YDqbN4qR1zN8g@mail.python.org> Roundup Robot added the comment: New changeset 48fbe78167cd by Mark Dickinson in branch '2.7': Issue 10052: fix failed uint32_t / uint64_t / int32_t / int64_t detection on some platforms. http://hg.python.org/cpython/rev/48fbe78167cd ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 14:22:56 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Dec 2012 13:22:56 +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: <3YDqlM4NCRzN8g@mail.python.org> Roundup Robot added the comment: New changeset d82b73366227 by Mark Dickinson in branch '3.2': Issue 10052: fix failed uint32_t / uint64_t / int32_t / int64_t detection on some platforms. http://hg.python.org/cpython/rev/d82b73366227 New changeset 48de792747dc by Mark Dickinson in branch '3.3': Issue 10052: merge fix from 3.2. http://hg.python.org/cpython/rev/48de792747dc New changeset 22d891a2d533 by Mark Dickinson in branch 'default': Issue 10052: null merge from 3.3 http://hg.python.org/cpython/rev/22d891a2d533 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 14:23:45 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 02 Dec 2012 13:23:45 +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: <1354454625.06.0.144771292198.issue10052@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed in all branches. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 14:39:34 2012 From: report at bugs.python.org (koobs) Date: Sun, 02 Dec 2012 13:39:34 +0000 Subject: [issue12812] libffi does not build with clang on amd64 In-Reply-To: <1313994656.23.0.148190380431.issue12812@psf.upfronthosting.co.za> Message-ID: <1354455574.55.0.294680862276.issue12812@psf.upfronthosting.co.za> koobs added the comment: This is also an issue for clang builds of Python on FreeBSD and results in the _ctypes extension failing to compile (See: koobs-freebsd-clang buildbot) The original mozilla patch (see References below) did not make it into the libffi 3.0.11 release, which has already been committed to the Cpython tree (see #15194) Attached here is the original Mozilla patch to configure & configure.ac which I have included in a PR submitted to the FreeBSD ports tree for python27 The PR includes test builds with gcc and clang on multiple FreeBSD versions and architectures, along with a libffi unit test run with clang (http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/171768) I propose this patch be committed to all branches to re-enable _ctypes extension builds with clang. References: - http://www.cygwin.com/ml/libffi-discuss/2011/msg00024.html - https://bugzilla.mozilla.org/show_bug.cgi?id=631928 - https://github.com/atgreen/libffi/issues/21 - https://bugs.gentoo.org/show_bug.cgi?id=417179 - http://www.freebsd.org/cgi/query-pr.cgi?pr=ports/171768 ---------- keywords: +patch nosy: +koobs Added file: http://bugs.python.org/file28186/libffi-3.0.11-clang.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 14:45:22 2012 From: report at bugs.python.org (koobs) Date: Sun, 02 Dec 2012 13:45:22 +0000 Subject: [issue12812] libffi does not build with clang on amd64 In-Reply-To: <1313994656.23.0.148190380431.issue12812@psf.upfronthosting.co.za> Message-ID: <1354455922.53.0.748740999852.issue12812@psf.upfronthosting.co.za> koobs added the comment: Correction, the PR mentioned in the previous comment has been submitted for devel/libffi in the FreeBSD ports tree (update from 3.0.9 -> 3.0.11), not lang/python27 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 16:28:05 2012 From: report at bugs.python.org (Taavi Burns) Date: Sun, 02 Dec 2012 15:28:05 +0000 Subject: [issue16556] Update string.Formatter.vformat documentation to say "**kwargs" In-Reply-To: <1353903093.51.0.301727912961.issue16556@psf.upfronthosting.co.za> Message-ID: <1354462085.16.0.732867326499.issue16556@psf.upfronthosting.co.za> Taavi Burns added the comment: Ah, yes, I could have been more clear that I wasn't even looking at the source code itself. :) Thanks! ---------- resolution: fixed -> status: closed -> open versions: -Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 16:50:23 2012 From: report at bugs.python.org (Taavi Burns) Date: Sun, 02 Dec 2012 15:50:23 +0000 Subject: [issue16556] Update string.Formatter.vformat documentation to say "**kwargs" In-Reply-To: <1353903093.51.0.301727912961.issue16556@psf.upfronthosting.co.za> Message-ID: <1354463423.74.0.940812348867.issue16556@psf.upfronthosting.co.za> Taavi Burns added the comment: Gak, sorry, didn't mean to change the status and resolution! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 17:08:32 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 16:08:32 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames In-Reply-To: <1352153903.84.0.995057035576.issue16416@psf.upfronthosting.co.za> Message-ID: <1354464512.72.0.799144144556.issue16416@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 17:21:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Dec 2012 16:21:14 +0000 Subject: [issue16585] surrogateescape broken w/ multibytecodecs' encode In-Reply-To: <1354306822.13.0.130768178209.issue16585@psf.upfronthosting.co.za> Message-ID: <3YDvj53mZdzN0x@mail.python.org> Roundup Robot added the comment: New changeset 5c88c72dec60 by Benjamin Peterson in branch '3.3': support encoding error handlers that return bytes (closes #16585) http://hg.python.org/cpython/rev/5c88c72dec60 New changeset 2181c37977d3 by Benjamin Peterson in branch 'default': merge 3.3 (#16585) http://hg.python.org/cpython/rev/2181c37977d3 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 17:33:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Dec 2012 16:33:24 +0000 Subject: [issue16585] surrogateescape broken w/ multibytecodecs' encode In-Reply-To: <1354306822.13.0.130768178209.issue16585@psf.upfronthosting.co.za> Message-ID: <3YDvz74SKtzNHf@mail.python.org> Roundup Robot added the comment: New changeset 777aabdff35a by Benjamin Peterson in branch '3.3': document that encoding error handlers may return bytes (#16585) http://hg.python.org/cpython/rev/777aabdff35a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 17:41:11 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 02 Dec 2012 16:41:11 +0000 Subject: [issue11908] Weird `slice.stop or sys.maxint` In-Reply-To: <1303493846.17.0.214651551769.issue11908@psf.upfronthosting.co.za> Message-ID: <1354466471.55.0.605672824554.issue11908@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 18:18:33 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 02 Dec 2012 17:18:33 +0000 Subject: [issue16579] .pyw disturb multiprocessing behavior In-Reply-To: <1354211145.86.0.68056435154.issue16579@psf.upfronthosting.co.za> Message-ID: <1354468713.28.0.932386380854.issue16579@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 18:18:40 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 02 Dec 2012 17:18:40 +0000 Subject: [issue11908] Weird `slice.stop or sys.maxint` In-Reply-To: <1303493846.17.0.214651551769.issue11908@psf.upfronthosting.co.za> Message-ID: <1354468720.7.0.0457712624118.issue11908@psf.upfronthosting.co.za> Raymond Hettinger added the comment: ysj: The "equivalent" means "roughly equivalent" not "precisely equivalent". The purpose of the code in the docs is to help communicate what islice() is all about. Practicality beats purity in this regard. I know of no one who has ever been mislead by the islice() docs. I don't really like the proposed patch -- it improves a bit on technical accuracy but forgoes readability and still falls short on what stop=None does and on which arguments are required. That said, I don't really like the current version of the "roughly equivalent code either". It should probably be rewritten completely (no longer using slice() and it should show the actual looping logic. For clarity, it may be helpful to split it into two code-equivalents, one for the finite case (where stop is specified) and one for the infinite case (where stop is None). As it stands, the examples are beating the code equivalent when it comes to communicating what islice() does. I don't want to lengthen the code fragment unless it becomes *both* more communicative and more accurate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 19:11:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 02 Dec 2012 18:11:43 +0000 Subject: [issue16562] Optimize dict equality test In-Reply-To: <1353961574.84.0.437047945536.issue16562@psf.upfronthosting.co.za> Message-ID: <3YDy8Z6KqfzPjS@mail.python.org> Roundup Robot added the comment: New changeset d12785ecca72 by Antoine Pitrou in branch 'default': Issue #16562: Optimize dict equality testing. http://hg.python.org/cpython/rev/d12785ecca72 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 19:12:09 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 18:12:09 +0000 Subject: [issue16562] Optimize dict equality test In-Reply-To: <1353961574.84.0.437047945536.issue16562@psf.upfronthosting.co.za> Message-ID: <1354471929.68.0.105090408175.issue16562@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The patch looks correct. If the tests pass, go ahead and apply it. Done. ---------- nosy: +pitrou resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 19:15:09 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 18:15:09 +0000 Subject: [issue4844] ZipFile doesn't range check in _EndRecData() In-Reply-To: <1231169051.46.0.731825269948.issue4844@psf.upfronthosting.co.za> Message-ID: <1354472109.54.0.566515865572.issue4844@psf.upfronthosting.co.za> Antoine Pitrou added the comment: In test_damaged_zipfile: + for N in range(len(s) - 2): + with open(TESTFN, "wb") as f: + f.write(s[:N]) why not `range(len(s))` instead? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 19:18:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 18:18:42 +0000 Subject: [issue6744] calling kevent repr raises a TypeError In-Reply-To: <1250800889.41.0.974799993123.issue6744@psf.upfronthosting.co.za> Message-ID: <1354472322.7.0.784530871539.issue6744@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you, Berker. I'm now closing the issue. ---------- assignee: christian.heimes -> nosy: +pitrou resolution: -> out of date stage: -> committed/rejected status: open -> closed superseder: -> select module - kevent ident field 64 bit issue _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 19:40:32 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 18:40:32 +0000 Subject: [issue15727] PyType_FromSpecWithBases tp_new bugfix In-Reply-To: <1345391866.4.0.54341725267.issue15727@psf.upfronthosting.co.za> Message-ID: <1354473632.1.0.528104920119.issue15727@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Robin, do you remember which extension types were affected by this issue? ---------- nosy: +pitrou versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 19:48:28 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 18:48:28 +0000 Subject: [issue16594] SocketServer should set SO_REUSEPORT along with SO_REUSEADDR when present In-Reply-To: <1354439249.45.0.0324812571604.issue16594@psf.upfronthosting.co.za> Message-ID: <1354474108.77.0.0430564220633.issue16594@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 19:49:26 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 18:49:26 +0000 Subject: [issue16525] wave file module does not support 32bit float format In-Reply-To: <1353528827.37.0.543069044809.issue16525@psf.upfronthosting.co.za> Message-ID: <1354474166.82.0.269181052734.issue16525@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +mark.dickinson stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 19:49:53 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 02 Dec 2012 18:49:53 +0000 Subject: [issue16587] Py_Initialize breaks wprintf on Windows In-Reply-To: <1354321432.5.0.798652538273.issue16587@psf.upfronthosting.co.za> Message-ID: <1354474193.54.0.877525337281.issue16587@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 20:47:20 2012 From: report at bugs.python.org (icemac) Date: Sun, 02 Dec 2012 19:47:20 +0000 Subject: [issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread In-Reply-To: <1317935848.16.0.589862913408.issue13120@psf.upfronthosting.co.za> Message-ID: <1354477640.89.0.547102398274.issue13120@psf.upfronthosting.co.za> icemac added the comment: This bug bites me when developing with Pyramid using Python 3.2. I'd like to get it solved generally as the patch works for me (Python 3.2.3)). What needs to be done to get this patch into the version control system? ---------- nosy: +icemac _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 21:45:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Dec 2012 20:45:37 +0000 Subject: [issue11344] Add os.path.splitpath(path) function In-Reply-To: <1298795208.87.0.771920756626.issue11344@psf.upfronthosting.co.za> Message-ID: <1354481137.09.0.768353739509.issue11344@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The proposed patch adds effective implementations of mentioned above algorithm. splitpath() can be used for consecutive implementation of relpath() and commonpath(). ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 21:46:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Dec 2012 20:46:24 +0000 Subject: [issue11344] Add os.path.splitpath(path) function In-Reply-To: <1298795208.87.0.771920756626.issue11344@psf.upfronthosting.co.za> Message-ID: <1354481184.57.0.613367396587.issue11344@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28187/ospath_splitpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 21:47:31 2012 From: report at bugs.python.org (Bob Ziuchkovski) Date: Sun, 02 Dec 2012 20:47:31 +0000 Subject: [issue14621] Hash function is not randomized properly In-Reply-To: <1334858289.64.0.441945117447.issue14621@psf.upfronthosting.co.za> Message-ID: <1354481251.18.0.190611799123.issue14621@psf.upfronthosting.co.za> Bob Ziuchkovski added the comment: Why not redefine -R to mean "use secure hashing algorithms for built-in types"? When specified, use hashing algorithms that are secure against denial-of-service and other known attacks, at the possible expense of performance. When not specified, use whatever hashing algorithms provide the most sensible defaults for every-day use (basically hash the way python currently hashes). Secure hashing would apply not just to strings but to numeric and other types as well. This would break the invariant of `x == y implies hash(x) == hash(y)` for numeric types that Mark mentioned. However, that seems like an implementation detail that python users shouldn't rely upon. ---------- nosy: +Bob.Ziuchkovski _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 21:59:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Dec 2012 20:59:57 +0000 Subject: [issue4844] ZipFile doesn't range check in _EndRecData() In-Reply-To: <1231169051.46.0.731825269948.issue4844@psf.upfronthosting.co.za> Message-ID: <1354481997.74.0.725834265499.issue4844@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I just copy it from Alan's test. Actually this is not needed, `range(len(s))` can be used. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 22:26:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Dec 2012 21:26:07 +0000 Subject: [issue8821] Range check on unicode repr In-Reply-To: <1274847113.25.0.171149609237.issue8821@psf.upfronthosting.co.za> Message-ID: <1354483567.93.0.368110837003.issue8821@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This patch is not needed for 3.3+. And for 2.7 and 3.2 it actually doesn't fix any bug in the current code. ---------- nosy: +serhiy.storchaka versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 22:52:49 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 02 Dec 2012 21:52:49 +0000 Subject: [issue15955] gzip, bz2, lzma: add option to limit output size In-Reply-To: <1347884562.79.0.801674791772.issue15955@psf.upfronthosting.co.za> Message-ID: <1354485169.64.0.67284748913.issue15955@psf.upfronthosting.co.za> Nadeem Vawda added the comment: I've tried reimplementing LZMAFile in terms of the decompress_into() method, and it has ended up not being any faster than the existing implementation. (It is _slightly_ faster for readinto() with a large buffer size, but all other cases it was either of equal performance or significantly slower.) In addition, decompress_into() is more complicated to work with than I had expected, so I withdraw my objection to the approach based on max_length/unconsumed_tail. > unconsumed_tail should be private hidden attribute, which automatically prepends any consumed data. I don't think this is a good idea. In order to have predictable memory usage, the caller will need to ensure that the current input is fully decompressed before passing in the next block of compressed data. This can be done more simply with the interface used by zlib. Compare: while not d.eof: output = d.decompress(b'', 8192) if not output: compressed = f.read(8192) if not compressed: raise ValueError('End-of-stream marker not found') output = d.decompress(compressed, 8192) # with: # Using zlib's interface while not d.eof: compressed = d.unconsumed_tail or f.read(8192) if not compressed: raise ValueError('End-of-stream marker not found') output = d.decompress(compressed, 8192) # A related, but orthogonal proposal: We might want to make unconsumed_tail a memoryview (provided the input data is know to be immutable), to avoid creating an unnecessary copy of the data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 22:53:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Dec 2012 21:53:47 +0000 Subject: [issue11204] re module: strange behaviour of space inside {m, n} In-Reply-To: <1297552798.48.0.889043344562.issue11204@psf.upfronthosting.co.za> Message-ID: <1354485227.45.0.851984166101.issue11204@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Library (Lib), Regular Expressions nosy: +mrabarnett type: -> behavior versions: +Python 3.2, Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 23:21:08 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Dec 2012 22:21:08 +0000 Subject: [issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread In-Reply-To: <1317935848.16.0.589862913408.issue13120@psf.upfronthosting.co.za> Message-ID: <1354486868.97.0.263757586991.issue13120@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 23:28:55 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 02 Dec 2012 22:28:55 +0000 Subject: [issue11204] re module: strange behaviour of space inside {m, n} In-Reply-To: <1297552798.48.0.889043344562.issue11204@psf.upfronthosting.co.za> Message-ID: <1354487335.89.0.0911759006091.issue11204@psf.upfronthosting.co.za> Matthew Barnett added the comment: Interesting. In my regex module (http://pypi.python.org/pypi/regex) I have: bool(regex.match(pat, "bb", regex.VERBOSE)) # True bool(regex.match(pat, "b{1,3}", regex.VERBOSE)) # False because I thought that when the VERBOSE flag is turned on it should ignore whitespace except when it's inside a character class, so "b{1, 3}" would be treated as "b{1,3}". Apparently re has another exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 23:40:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Dec 2012 22:40:27 +0000 Subject: [issue11204] re module: strange behaviour of space inside {m, n} In-Reply-To: <1297552798.48.0.889043344562.issue11204@psf.upfronthosting.co.za> Message-ID: <1354488027.95.0.588317456006.issue11204@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: $ echo 'bbbbbaaa' | grep -o 'b\{1,3\}a' bbba $ echo 'bbbbbaaa' | grep -o 'b\{1, 3\}a' grep: Invalid content of \{\} $ echo 'bbbbbaaa' | egrep -o 'b{1,3}a' bbba $ echo 'bbbbbaaa' | egrep -o 'b{1, 3}a' $ echo 'bbb{1, 3}aa' | LC_ALL=C egrep -o 'b{1, 3}a' b{1, 3}a I.e. grep raises error and egrep chooses silent verbatim meaning. I don't know what any standards say about this. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 23:51:41 2012 From: report at bugs.python.org (Nurhusien Hasen) Date: Sun, 02 Dec 2012 22:51:41 +0000 Subject: [issue210599] bug (Incorrect signal processing) - Python 1.5.2 (PR#102) Message-ID: <1354488701.67.0.236333942969.issue210599@psf.upfronthosting.co.za> Nurhusien Hasen added the comment: Find public sheard Admenstartion bug python serves ---------- hgrepos: +163 nosy: +Nurhusien2 versions: +Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file28188/ipython07_pe-gr_cise.pdf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 23:55:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Dec 2012 22:55:11 +0000 Subject: [issue10631] ZipFile and current directory change In-Reply-To: <1291567761.41.0.659026181219.issue10631@psf.upfronthosting.co.za> Message-ID: <1354488911.2.0.332856590375.issue10631@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Library (Lib) nosy: +serhiy.storchaka versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 2 23:56:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 02 Dec 2012 22:56:50 +0000 Subject: [issue10040] GZipFile failure on large files In-Reply-To: <1286416633.51.0.196300487006.issue10040@psf.upfronthosting.co.za> Message-ID: <1354489010.62.0.213190098035.issue10040@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 00:16:14 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Dec 2012 23:16:14 +0000 Subject: [issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__ In-Reply-To: <1348615231.16.0.514985949274.issue16049@psf.upfronthosting.co.za> Message-ID: <1354490174.85.0.373255560127.issue16049@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 00:23:04 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Dec 2012 23:23:04 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed Message-ID: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> New submission from Andrew Svetlov: GvR in http://mail.python.org/pipermail/python-ideas/2012-November/017991.html has requested for improving pdb to jump over yield instead of following it. ---------- components: Library (Lib) messages: 176815 nosy: asvetlov, gvanrossum priority: normal severity: normal status: open title: Skip stack unwinding when "next", "until" and "return" pdb commands executed type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 00:24:53 2012 From: report at bugs.python.org (John-John Tedro) Date: Sun, 02 Dec 2012 23:24:53 +0000 Subject: [issue16597] close not being called with context manager on IOError when device is full. Message-ID: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> New submission from John-John Tedro: In 3.2.2 and 3.2.3 on linux64, when running the following code. try: print("Writing to /dev/full") with open("/dev/full", "w") as f: f.write("Write to full device") except: print("Catch, file closed?") Using strace -e close ~/usr/python3.2.3/bin/python3 test.py ... Writing to /dev/full Catch, file closed? close(3) = 0 The file descriptor being used (3) to attempt writing to /dev/full is not closed until the process exits. I expected this to be closed when leaving the context manager. ---------- components: IO messages: 176816 nosy: udoprog priority: normal severity: normal status: open title: close not being called with context manager on IOError when device is full. type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 00:27:35 2012 From: report at bugs.python.org (John-John Tedro) Date: Sun, 02 Dec 2012 23:27:35 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1354490855.07.0.208243750047.issue16597@psf.upfronthosting.co.za> Changes by John-John Tedro : ---------- title: close not being called with context manager on IOError when device is full. -> file descriptor not being closed with context manager on IOError when device is full _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 00:30:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Dec 2012 23:30:19 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1354491019.56.0.301403725072.issue16596@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Patch attached. It modifies "next", "return" and "until" commands behavior when they are executed if current debugged function is generator. 1. "next" skips stack unwindind if yield tries to follow it. Now it goes just to next executed line. 2. "until" does the same: skips all yields until target is reached. 3. "return" waits to return *from* generator (by explicit or implicit StopIteration or GeneratorExit exception) ignoring following yields inside generator. ---------- keywords: +patch Added file: http://bugs.python.org/file28189/issue16596.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 00:31:08 2012 From: report at bugs.python.org (John-John Tedro) Date: Sun, 02 Dec 2012 23:31:08 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1354491068.7.0.0759117990265.issue16597@psf.upfronthosting.co.za> John-John Tedro added the comment: Originally discovered on http://stackoverflow.com/questions/13649330/what-happens-to-file-descriptors-in-python-3-when-close-fails ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 00:47:22 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 02 Dec 2012 23:47:22 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1354492042.46.0.249987115048.issue16596@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- title: Skip stack unwinding when "next", "until" and "return" pdb commands executed -> Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 01:10:46 2012 From: report at bugs.python.org (Matthew Barnett) Date: Mon, 03 Dec 2012 00:10:46 +0000 Subject: [issue11204] re module: strange behaviour of space inside {m, n} In-Reply-To: <1297552798.48.0.889043344562.issue11204@psf.upfronthosting.co.za> Message-ID: <1354493446.58.0.432110848174.issue11204@psf.upfronthosting.co.za> Matthew Barnett added the comment: The question is whether re should always treat 'b{1, 3}a' as a literal, even with the VERBOSE flag. I've checked with Perl 5.14.2, and it agrees with re: adding a space _always_ makes it a literal, even with the 'x' flag (/b{1, 3}a/x is treated as /b\{1,3}a/). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 01:13:55 2012 From: report at bugs.python.org (Ron Hubbard) Date: Mon, 03 Dec 2012 00:13:55 +0000 Subject: [issue9674] make install DESTDIR=/home/blah fails when the prefix specified is / In-Reply-To: <1282677588.85.0.771807305266.issue9674@psf.upfronthosting.co.za> Message-ID: <1354493635.17.0.311493606033.issue9674@psf.upfronthosting.co.za> Ron Hubbard added the comment: George.Peristerakis' patch works please apply ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 01:18:42 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2012 00:18:42 +0000 Subject: [issue16434] SocketServer call shutdown in the wrong way In-Reply-To: <1352377990.43.0.148428023395.issue16434@psf.upfronthosting.co.za> Message-ID: <1354493922.93.0.540906361387.issue16434@psf.upfronthosting.co.za> Andrew Svetlov added the comment: request should be socket.socket instance which definitely has shutdown method accepting socket.SHUT_WR. I guest the problem not in stdlib but in your code or maybe in the Paste (I'm not familiar with it, sorry). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 01:19:08 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2012 00:19:08 +0000 Subject: [issue16434] SocketServer call shutdown in the wrong way In-Reply-To: <1352377990.43.0.148428023395.issue16434@psf.upfronthosting.co.za> Message-ID: <1354493948.07.0.159440055358.issue16434@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- stage: needs patch -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 01:34:26 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2012 00:34:26 +0000 Subject: [issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread In-Reply-To: <1317935848.16.0.589862913408.issue13120@psf.upfronthosting.co.za> Message-ID: <1354494866.7.0.248616097533.issue13120@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Uploaded updated cumulative patch. Can we apply the patch to 3.2 or at least to 3.3? I see nothing wrong with it, but I'm ok with pushing to 3.4 only if we want to be extra careful. ---------- assignee: -> asvetlov versions: +Python 3.4 Added file: http://bugs.python.org/file28190/issue13120.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 01:42:06 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2012 00:42:06 +0000 Subject: [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1354495326.15.0.315777295395.issue16267@psf.upfronthosting.co.za> Andrew Svetlov added the comment: After trying to make patch I've realized ? better to leave current behavior as is and change documentation only. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:41:43 2012 From: report at bugs.python.org (Steven Kryskalla) Date: Mon, 03 Dec 2012 03:41:43 +0000 Subject: [issue16598] Docs: double newlines printed in some file iteration examples Message-ID: <1354506102.98.0.373990465676.issue16598@psf.upfronthosting.co.za> New submission from Steven Kryskalla: I heard someone complain about this code appearing in the official documentation in a few places: for line in open("file.txt"): print(line) This code will print two newlines. I went through the current "default" and "2.7" branches and changed the places where this occurred to use print(line, end="") for 3.x or "print line," for 2.x. r80699.patch is for the "default" branch (3.x) r80694.py27.patch is for the "2.7" branch ---------- assignee: docs at python components: Documentation files: r80699.patch hgrepos: 164 keywords: patch messages: 176824 nosy: docs at python, lost-theory priority: normal severity: normal status: open title: Docs: double newlines printed in some file iteration examples type: enhancement versions: Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file28191/r80699.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:42:28 2012 From: report at bugs.python.org (Steven Kryskalla) Date: Mon, 03 Dec 2012 03:42:28 +0000 Subject: [issue16598] Docs: double newlines printed in some file iteration examples In-Reply-To: <1354506102.98.0.373990465676.issue16598@psf.upfronthosting.co.za> Message-ID: <1354506148.38.0.256681198947.issue16598@psf.upfronthosting.co.za> Changes by Steven Kryskalla : ---------- versions: +Python 2.7 Added file: http://bugs.python.org/file28192/r80699.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:43:01 2012 From: report at bugs.python.org (Steven Kryskalla) Date: Mon, 03 Dec 2012 03:43:01 +0000 Subject: [issue16598] Docs: double newlines printed in some file iteration examples In-Reply-To: <1354506102.98.0.373990465676.issue16598@psf.upfronthosting.co.za> Message-ID: <1354506181.87.0.891081755083.issue16598@psf.upfronthosting.co.za> Changes by Steven Kryskalla : Removed file: http://bugs.python.org/file28192/r80699.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 04:43:21 2012 From: report at bugs.python.org (Steven Kryskalla) Date: Mon, 03 Dec 2012 03:43:21 +0000 Subject: [issue16598] Docs: double newlines printed in some file iteration examples In-Reply-To: <1354506102.98.0.373990465676.issue16598@psf.upfronthosting.co.za> Message-ID: <1354506201.3.0.0286845356179.issue16598@psf.upfronthosting.co.za> Changes by Steven Kryskalla : Added file: http://bugs.python.org/file28193/r80694.py27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:07:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 03 Dec 2012 05:07:03 +0000 Subject: [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1354511223.87.0.683331684418.issue16581@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching proposed patch. The patch also makes some minor stylistic improvements and typo fixes (e.g. s/work flow/workflow/, s/we/the PEP editors/, and eliminating trailing whitespace on a few lines). ---------- keywords: +patch Added file: http://bugs.python.org/file28194/issue-16581-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:22:45 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 03 Dec 2012 05:22:45 +0000 Subject: [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1354512165.24.0.320846542312.issue16581@psf.upfronthosting.co.za> Ezio Melotti added the comment: +PEP editorship is by invitation of the current editors. The address + is a mailing list consisting of PEP editors. The "consisting" doesn't sound too well to me, maybe "reserved to"? +PEP-related email should be sent to this address (no cross-posting please). emails? ---------- nosy: +ezio.melotti stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 06:34:14 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 03 Dec 2012 05:34:14 +0000 Subject: [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1354512854.07.0.781451713493.issue16581@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > The "consisting" doesn't sound too well to me, maybe "reserved to"? "Reserved for" sounds good to me. Originally I was thinking of "limited to" or "restricted to," but that had a connotation of exclusivity I wanted to avoid. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 08:23:52 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2012 07:23:52 +0000 Subject: [issue16587] Py_Initialize breaks wprintf on Windows In-Reply-To: <1354321432.5.0.798652538273.issue16587@psf.upfronthosting.co.za> Message-ID: <1354519432.16.0.714317109686.issue16587@psf.upfronthosting.co.za> STINNER Victor added the comment: _setmode(self->fd, O_BINARY) change was done in Python 3.2: see the issue #10841. This change introduced regressions: - #11272: "input() has trailing carriage return on windows", fixed in Python 3.2.1 - #11395: "print(s) fails on Windows with long strings", fixed in Python 3.2.1 - #13119: "Newline for print() is \n on Windows, and not \r\n as expected", fixed in Python 3.3 (and will be fixed in Python 3.2.4) In Python 3.1, _setmode(self->fd, O_BINARY) was already used when Python is called with the -u command line option. _setmode() supports different options: - _O_BINARY: no conversion - _O_TEXT: translate "\n" with "\r\n" - _O_U8TEXT: UTF-8 without BOM - _O_U16TEXT: UTF-16 without BOM - _O_WTEXT: UTF-16 with BOM I didn't try wprintf(). This function is not used in the Python source code (except in the Windows launcher, which is not part of the main interpreter). I don't know how to fix wprintf(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 08:43:05 2012 From: report at bugs.python.org (Lucas Maystre) Date: Mon, 03 Dec 2012 07:43:05 +0000 Subject: [issue11175] allow argparse FileType to accept encoding and errors arguments In-Reply-To: <1297352833.64.0.0994986830559.issue11175@psf.upfronthosting.co.za> Message-ID: <1354520585.92.0.569193464531.issue11175@psf.upfronthosting.co.za> Lucas Maystre added the comment: As per Ezio's comment, changed "l1" to "utf-8" in the example of the doc. ---------- Added file: http://bugs.python.org/file28195/filetype11175.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 08:45:24 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Dec 2012 07:45:24 +0000 Subject: [issue16587] Py_Initialize breaks wprintf on Windows In-Reply-To: <1354321432.5.0.798652538273.issue16587@psf.upfronthosting.co.za> Message-ID: <1354520724.7.0.787216867112.issue16587@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 08:52:30 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Dec 2012 07:52:30 +0000 Subject: [issue9674] make install DESTDIR=/home/blah fails when the prefix specified is / In-Reply-To: <1282677588.85.0.771807305266.issue9674@psf.upfronthosting.co.za> Message-ID: <1354521150.6.0.662463595601.issue9674@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 08:54:13 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Dec 2012 07:54:13 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1354521253.38.0.954311468806.issue16597@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 08:56:38 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Dec 2012 07:56:38 +0000 Subject: [issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__ In-Reply-To: <1348615231.16.0.514985949274.issue16049@psf.upfronthosting.co.za> Message-ID: <1354521398.85.0.405261247249.issue16049@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 08:57:32 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Dec 2012 07:57:32 +0000 Subject: [issue15955] gzip, bz2, lzma: add option to limit output size In-Reply-To: <1347884562.79.0.801674791772.issue15955@psf.upfronthosting.co.za> Message-ID: <1354521452.27.0.693611806767.issue15955@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 08:58:45 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Dec 2012 07:58:45 +0000 Subject: [issue10631] ZipFile and current directory change In-Reply-To: <1291567761.41.0.659026181219.issue10631@psf.upfronthosting.co.za> Message-ID: <1354521525.11.0.6915973049.issue10631@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 09:01:42 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Dec 2012 08:01:42 +0000 Subject: [issue11344] Add os.path.splitpath(path) function In-Reply-To: <1298795208.87.0.771920756626.issue11344@psf.upfronthosting.co.za> Message-ID: <1354521702.69.0.657392070758.issue11344@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 09:02:43 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Dec 2012 08:02:43 +0000 Subject: [issue16595] Add resource.prlimit In-Reply-To: <1354446881.9.0.288115855459.issue16595@psf.upfronthosting.co.za> Message-ID: <1354521763.65.0.487201233923.issue16595@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 09:04:25 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Dec 2012 08:04:25 +0000 Subject: [issue10712] 2to3 fixer for deprecated unittest method names In-Reply-To: <1292441796.9.0.018359428873.issue10712@psf.upfronthosting.co.za> Message-ID: <1354521865.75.0.847051090117.issue10712@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 09:08:08 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Dec 2012 08:08:08 +0000 Subject: [issue4805] Make python code compilable with a C++ compiler In-Reply-To: <1230872206.73.0.47638283248.issue4805@psf.upfronthosting.co.za> Message-ID: <1354522088.35.0.14189440149.issue4805@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 09:09:25 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Dec 2012 08:09:25 +0000 Subject: [issue2897] include structmember.h in Python.h In-Reply-To: <1210977912.97.0.641461512834.issue2897@psf.upfronthosting.co.za> Message-ID: <1354522165.29.0.358965542213.issue2897@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 09:10:13 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Dec 2012 08:10:13 +0000 Subject: [issue16568] allow constructors to be documented separately from class In-Reply-To: <1354093412.82.0.692042663136.issue16568@psf.upfronthosting.co.za> Message-ID: <1354522213.52.0.699722604019.issue16568@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 09:12:05 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 03 Dec 2012 08:12:05 +0000 Subject: [issue11797] 2to3 does not correct "reload" In-Reply-To: <1302191844.85.0.922084217825.issue11797@psf.upfronthosting.co.za> Message-ID: <1354522325.41.0.79508044425.issue11797@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 10:22:21 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 09:22:21 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1354526541.5.0.849785870542.issue16597@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: >>> f = open("/dev/full", "wb", buffering=0) >>> f.write(b"Write to full device") Traceback (most recent call last): File "", line 1, in OSError: [Errno 28] No space left on device >>> f.close() >>> f.closed True >>> f = open("/dev/full", "wb") >>> f.write(b"Write to full device") 20 >>> f.close() Traceback (most recent call last): File "", line 1, in OSError: [Errno 28] No space left on device >>> f.closed False Python 2 has the same behavior using io.open. ---------- nosy: +serhiy.storchaka versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 10:24:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 09:24:50 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1354526690.28.0.0254031693169.issue16597@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The bug only in C implementation. >>> import _pyio >>> f = _pyio.open("/dev/full", "wb") >>> f.write(b"Write to full device") 20 >>> f.close() Traceback (most recent call last): File "", line 1, in File "/home/serhiy/py/cpython/Lib/_pyio.py", line 732, in close self.flush() File "/home/serhiy/py/cpython/Lib/_pyio.py", line 1121, in flush self._flush_unlocked() File "/home/serhiy/py/cpython/Lib/_pyio.py", line 1128, in _flush_unlocked n = self.raw.write(self._write_buf) OSError: [Errno 28] No space left on device >>> f.closed True ---------- components: +Extension Modules _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 10:42:03 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 03 Dec 2012 09:42:03 +0000 Subject: [issue16599] unittest: Access test result from tearDown Message-ID: <1354527723.36.0.769611290906.issue16599@psf.upfronthosting.co.za> New submission from anatoly techtonik: A common usage pattern is to prevent clean up in tearDown() if the test failed. However, it requires a hack: http://stackoverflow.com/questions/4414234/getting-pythons-unittest-results-in-a-teardown-method. Would be nice to have an officially documented feature. ---------- components: Library (Lib), Tests messages: 176832 nosy: techtonik priority: normal severity: normal status: open title: unittest: Access test result from tearDown versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 10:55:29 2012 From: report at bugs.python.org (Robert McGibbon) Date: Mon, 03 Dec 2012 09:55:29 +0000 Subject: [issue16600] rlcompleter Message-ID: <1354528529.28.0.687527154306.issue16600@psf.upfronthosting.co.za> New submission from Robert McGibbon: I'm not really sure how what the format for filing bugs with python is, so I'm sorry in advance if I've done something wrong. There is a very small py3k bug in the readline completer (rlcompleter.py). Specifically, if you look at line 105 (http://hg.python.org/cpython/file/03ce83e43e1b/Lib/rlcompleter.py#l105), you can see that the rlcompleter module is trying to remove '__builtins__' from the list of possible completions that it gives. This made sense in python2.x, but sense the name '__bultins__' was changed to 'builtins', perhaps the line should be changed? The same issue applies on line 131-134 of the same file I think. Thanks! ---------- messages: 176833 nosy: rmcgibbo priority: normal severity: normal status: open title: rlcompleter type: behavior versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 10:55:58 2012 From: report at bugs.python.org (Robert McGibbon) Date: Mon, 03 Dec 2012 09:55:58 +0000 Subject: [issue16600] small py3k bug in rlcompleter In-Reply-To: <1354528529.28.0.687527154306.issue16600@psf.upfronthosting.co.za> Message-ID: <1354528558.97.0.994819651898.issue16600@psf.upfronthosting.co.za> Changes by Robert McGibbon : ---------- title: rlcompleter -> small py3k bug in rlcompleter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 11:05:02 2012 From: report at bugs.python.org (Daniel Urban) Date: Mon, 03 Dec 2012 10:05:02 +0000 Subject: [issue16599] unittest: Access test result from tearDown In-Reply-To: <1354527723.36.0.769611290906.issue16599@psf.upfronthosting.co.za> Message-ID: <1354529102.08.0.0490988419768.issue16599@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- stage: -> needs patch type: -> enhancement versions: +Python 3.4 -Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 12:11:22 2012 From: report at bugs.python.org (Alex stein) Date: Mon, 03 Dec 2012 11:11:22 +0000 Subject: [issue16579] .pyw disturb multiprocessing behavior In-Reply-To: <1354211145.86.0.68056435154.issue16579@psf.upfronthosting.co.za> Message-ID: <1354533082.68.0.109919083469.issue16579@psf.upfronthosting.co.za> Alex stein added the comment: It seems like you?re right. I redirect the sys.stdout and the problem is solved. Thank you for your help. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 12:49:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Dec 2012 11:49:13 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames In-Reply-To: <1352153903.84.0.995057035576.issue16416@psf.upfronthosting.co.za> Message-ID: <3YFPcm6j16zQC5@mail.python.org> Roundup Robot added the comment: New changeset c838c9b117f1 by Victor Stinner in branch '3.2': Issue #16416: On Mac OS X, operating system data are now always http://hg.python.org/cpython/rev/c838c9b117f1 New changeset 26c4748351cb by Victor Stinner in branch '3.3': (Merge 3.2) Issue #16416: On Mac OS X, operating system data are now always http://hg.python.org/cpython/rev/26c4748351cb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 12:49:58 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2012 11:49:58 +0000 Subject: [issue16587] Py_Initialize breaks wprintf on Windows In-Reply-To: <1354520724.73.0.0598673724792.issue16587@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > _setmode(self->fd, O_BINARY) change was done in Python 3.2: see the issue #10841 The main reason was to be able to read binary file from sys.stdin using the CGI module: see the issue #4953. In _O_TEXT mode, 0x0A byte is replaced with 0x0A 0x0D (or the opposite, I never remember) which corrupt binary files. Articles about _setmode() and wprintf(): "A confluence of circumstances leaves a stone unturned..." http://blogs.msdn.com/b/michkap/archive/2010/09/23/10066660.aspx "Conventional wisdom is retarded, aka What the @#%&* is _O_U16TEXT?" http://blogs.msdn.com/b/michkap/archive/2008/03/18/8306597.aspx See also issue #1602 (Windows console doesn't print or input Unicode). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 12:51:40 2012 From: report at bugs.python.org (Robert McGibbon) Date: Mon, 03 Dec 2012 11:51:40 +0000 Subject: [issue16600] small py3k issue in rlcompleter In-Reply-To: <1354528529.28.0.687527154306.issue16600@psf.upfronthosting.co.za> Message-ID: <1354535500.11.0.700151651361.issue16600@psf.upfronthosting.co.za> Changes by Robert McGibbon : ---------- title: small py3k bug in rlcompleter -> small py3k issue in rlcompleter _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 13:00:57 2012 From: report at bugs.python.org (Robert McGibbon) Date: Mon, 03 Dec 2012 12:00:57 +0000 Subject: [issue16600] small py3k issue in rlcompleter In-Reply-To: <1354528529.28.0.687527154306.issue16600@psf.upfronthosting.co.za> Message-ID: <1354536057.04.0.118828056334.issue16600@psf.upfronthosting.co.za> Robert McGibbon added the comment: nevermind. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 13:01:05 2012 From: report at bugs.python.org (Robert McGibbon) Date: Mon, 03 Dec 2012 12:01:05 +0000 Subject: [issue16600] small py3k issue in rlcompleter In-Reply-To: <1354528529.28.0.687527154306.issue16600@psf.upfronthosting.co.za> Message-ID: <1354536065.24.0.0272591541053.issue16600@psf.upfronthosting.co.za> Changes by Robert McGibbon : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 13:26:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 12:26:00 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1354537560.21.0.00913722810277.issue16597@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which calls close() on underlying stream even if flush() raises an exception. I am not sure that I correctly set a context exception. There is no other examples in the code. ---------- keywords: +patch nosy: +benjamin.peterson, pitrou, stutzbach stage: -> patch review Added file: http://bugs.python.org/file28196/bufferedio_finally_close.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 13:27:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 12:27:52 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1354537672.53.0.0455629236257.issue16597@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28196/bufferedio_finally_close.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 13:28:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 12:28:51 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1354537731.47.0.308280252616.issue16597@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28197/bufferedio_finally_close.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 14:13:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Dec 2012 13:13:13 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames In-Reply-To: <1352153903.84.0.995057035576.issue16416@psf.upfronthosting.co.za> Message-ID: <3YFRTh71PQzPjS@mail.python.org> Roundup Robot added the comment: New changeset af6fd3ca6de9 by Victor Stinner in branch '3.2': Issue #16416: Fix compilation error http://hg.python.org/cpython/rev/af6fd3ca6de9 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 14:14:59 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 03 Dec 2012 13:14:59 +0000 Subject: [issue16416] Mac OS X: don't use the locale encoding but UTF-8 to encode and decode filenames In-Reply-To: <1352153903.84.0.995057035576.issue16416@psf.upfronthosting.co.za> Message-ID: <1354540499.74.0.207193755267.issue16416@psf.upfronthosting.co.za> STINNER Victor added the comment: The issue should now be fixed in Python 3.2, 3.3 and 3.4. ---------- resolution: -> fixed status: open -> closed versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 15:04:34 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2012 14:04:34 +0000 Subject: [issue16582] Tkinter calls SystemExit with string In-Reply-To: <1354298633.36.0.337905476432.issue16582@psf.upfronthosting.co.za> Message-ID: <1354543474.1.0.39373237169.issue16582@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks for report. The patch is really trivial, but I don't sure if it can be applied to released python versions. ---------- keywords: +patch nosy: +asvetlov Added file: http://bugs.python.org/file28198/issue16582.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 15:09:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 14:09:33 +0000 Subject: [issue10631] ZipFile and current directory change In-Reply-To: <1291567761.41.0.659026181219.issue10631@psf.upfronthosting.co.za> Message-ID: <1354543773.06.0.811207747559.issue10631@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patch from issue14099 is intended to fix this issue. ---------- nosy: +alanmcintyre _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 15:09:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 14:09:49 +0000 Subject: [issue14099] ZipFile.open() should not reopen the underlying file In-Reply-To: <1329993992.32.0.270050568564.issue14099@psf.upfronthosting.co.za> Message-ID: <1354543789.58.0.654581654231.issue14099@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This issue looks as a duplicate or a superseder of issue10631. See also issue16569. seek() for every read should significantly decrease performance. It may be worth to prohibit the simultaneous reading of different files from the archive. In any case the children counting in the patch looks doubtful. ---------- nosy: +Arfrever, loewis, ocean-city, pitrou, r.david.murray, serhiy.storchaka versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 15:13:58 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 03 Dec 2012 14:13:58 +0000 Subject: [issue16583] Tkinter nested SystemExit In-Reply-To: <1354299283.97.0.595004930549.issue16583@psf.upfronthosting.co.za> Message-ID: <3YFSqn6P1CzNT9@mail.python.org> Roundup Robot added the comment: New changeset b742bbf6b07f by Andrew Svetlov in branch '3.2': Issue #16583: Prevent nesting SystemExit in tkinter.CallWrapper http://hg.python.org/cpython/rev/b742bbf6b07f New changeset 96b6e6522a1d by Andrew Svetlov in branch '3.3': Merge issue #16583: Prevent nesting SystemExit in tkinter.CallWrapper http://hg.python.org/cpython/rev/96b6e6522a1d New changeset 657caf5d3eb1 by Andrew Svetlov in branch 'default': Merge issue #16583: Prevent nesting SystemExit in tkinter.CallWrapper http://hg.python.org/cpython/rev/657caf5d3eb1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 15:18:31 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2012 14:18:31 +0000 Subject: [issue16583] Tkinter nested SystemExit In-Reply-To: <1354299283.97.0.595004930549.issue16583@psf.upfronthosting.co.za> Message-ID: <1354544311.81.0.0388128617504.issue16583@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks for report. As tkinter code is not processed via 2to3 tool now, I've fixed tkinter/__init__.py and like to close the issue. If there are problems in 2to3 please open new ticket dedicated to 2to3 tool only, not related to tkinter. ---------- components: -2to3 (2.x to 3.x conversion tool) keywords: +easy nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 15:25:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 14:25:15 +0000 Subject: [issue16582] Tkinter calls SystemExit with string In-Reply-To: <1354298633.36.0.337905476432.issue16582@psf.upfronthosting.co.za> Message-ID: <1354544715.56.0.0415940284054.issue16582@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The code was changed in the changeset e8a2a5e4c7b0. > def _exit(code='0'): >- import sys >- sys.exit(getint(code)) >+ raise SystemExit, code I think it is a bug and should be fixed. ---------- nosy: +gvanrossum, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 15:53:52 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 03 Dec 2012 14:53:52 +0000 Subject: [issue16599] unittest: Access test result from tearDown In-Reply-To: <1354527723.36.0.769611290906.issue16599@psf.upfronthosting.co.za> Message-ID: <1354546432.81.0.155312194047.issue16599@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:34:22 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2012 15:34:22 +0000 Subject: [issue16492] Add a load_parents argument to importlib.find_loader() In-Reply-To: <1353163131.46.0.896555939151.issue16492@psf.upfronthosting.co.za> Message-ID: <1354548862.58.0.154344054107.issue16492@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:37:10 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2012 15:37:10 +0000 Subject: [issue16494] Add a method on importlib.SourceLoader for creating bytecode file format/container In-Reply-To: <1353168017.12.0.0693705888433.issue16494@psf.upfronthosting.co.za> Message-ID: <1354549030.99.0.332674679765.issue16494@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:38:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2012 15:38:19 +0000 Subject: [issue16495] bytes_decode() unnecessarily examines encoding In-Reply-To: <1353187789.37.0.881944433109.issue16495@psf.upfronthosting.co.za> Message-ID: <1354549099.88.0.387901247836.issue16495@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:39:03 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2012 15:39:03 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1354549143.16.0.577796251634.issue16496@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:39:21 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2012 15:39:21 +0000 Subject: [issue16499] CLI option for isolated mode In-Reply-To: <1353248771.63.0.703024605939.issue16499@psf.upfronthosting.co.za> Message-ID: <1354549161.13.0.785663482346.issue16499@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:39:42 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2012 15:39:42 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <1354549182.82.0.806821288737.issue16511@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:40:37 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 03 Dec 2012 15:40:37 +0000 Subject: [issue16531] Allow IPNetwork to take a tuple In-Reply-To: <1353621566.3.0.0992835206333.issue16531@psf.upfronthosting.co.za> Message-ID: <1354549237.62.0.90146734216.issue16531@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 16:57:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 15:57:12 +0000 Subject: [issue5701] ZipFile returns compressed data stream when encountering unsupported compression method In-Reply-To: <1238947051.8.0.105309388943.issue5701@psf.upfronthosting.co.za> Message-ID: <1354550232.37.0.529141905298.issue5701@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: test needed -> committed/rejected status: open -> closed superseder: -> zipfile should raise an exception for unsupported compression methods _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:02:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 16:02:44 +0000 Subject: [issue6669] TarFile.getmembers fails at struct.unpack: unpack requires a string argument of length 4 In-Reply-To: <1249679476.65.0.0604043126333.issue6669@psf.upfronthosting.co.za> Message-ID: <1354550564.8.0.775181241363.issue6669@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also related issue4844 and issue14315 for zipfile. ---------- nosy: +serhiy.storchaka versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:03:26 2012 From: report at bugs.python.org (Stepan Kasal) Date: Mon, 03 Dec 2012 16:03:26 +0000 Subject: [issue16569] Preventing errors of simultaneous access in zipfile In-Reply-To: <1354112511.94.0.436567820333.issue16569@psf.upfronthosting.co.za> Message-ID: <1354550606.68.0.517382332475.issue16569@psf.upfronthosting.co.za> Stepan Kasal added the comment: I agree that reading from a file open for write should be forbidden, no matter whether ZipFile was called with fp or a name. Actually, it is not yet forbidden, and two of the tests in the zipfile.py test suite do actually rely on this misfeature. The first chunk in the patch http://bugs.python.org/file24624/Proposed-fix-of-issue14099-second.patch contains a fix for this bug in test suite. OTOH, decompressing several files for a given zip file simultaneously does not sound that bad. You know, with all the current file managers, people look at a zip as if it were kind of a directory. ---------- nosy: +kasal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:14:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 16:14:53 +0000 Subject: [issue16569] Preventing errors of simultaneous access in zipfile In-Reply-To: <1354112511.94.0.436567820333.issue16569@psf.upfronthosting.co.za> Message-ID: <1354551293.17.0.211730469886.issue16569@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Test: http://bugs.python.org/file24624/Proposed-fix-of-issue14099-second.patch file24624 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:16:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 16:16:22 +0000 Subject: [issue16569] Preventing errors of simultaneous access in zipfile In-Reply-To: <1354112511.94.0.436567820333.issue16569@psf.upfronthosting.co.za> Message-ID: <1354551382.69.0.779290343468.issue16569@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Test: file24624/Proposed-fix-of-issue14099-second.patch ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:37:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 16:37:58 +0000 Subject: [issue16569] Preventing errors of simultaneous access in zipfile In-Reply-To: <1354112511.94.0.436567820333.issue16569@psf.upfronthosting.co.za> Message-ID: <1354552678.51.0.892169662386.issue16569@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Actually, it is not yet forbidden, and two of the tests in the zipfile.py test suite do actually rely on this misfeature. Indeed. I missed that. Actually these tests work by accident, due to the fact that the contents of the zipfile is placed in the file object buffer. > OTOH, decompressing several files for a given zip file simultaneously does not sound that bad. You know, with all the current file managers, people look at a zip as if it were kind of a directory. I agree, but I'm afraid it's impossible to do without performance regression due to seek before every read. And for now ZipFile is not support simultaneous reading when external file object used. Also ZipFile is not thread-safe in any case. You can open several ZipFiles for simultaneous reading. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:45:07 2012 From: report at bugs.python.org (Stepan Kasal) Date: Mon, 03 Dec 2012 16:45:07 +0000 Subject: [issue14099] ZipFile.open() should not reopen the underlying file In-Reply-To: <1329993992.32.0.270050568564.issue14099@psf.upfronthosting.co.za> Message-ID: <1354553107.9.0.103314647853.issue14099@psf.upfronthosting.co.za> Stepan Kasal added the comment: Re: children counting You need to know the number of open children and whether the parent ZipFile object is still open. As soon as both all children and the parent ZipFile are closed, the underlying fp (corresponding to the file name given initially) shall be closed as well. The code submitted in the patch ensures that. But other implementations are possible. In any case, it is necessary to ensure that the children stay usable even if the parent ZipFile is closed, because of code like this: def datafile(self): with ZipFile(self.datafilezip, "r") as f: return f.open("data.txt") This idiom currently works and should not be broken. Re: seek() The read can interfere not only with a parallel file expansion, but also with a ZipFile metadata read (user can list the contents of the zip again). Both of these would have to be forbidden by the documentation, and, ideally, also enforced. (As disscussed issue #16569) OTOH, zipfile.py is already slow, because the decompression is implemented in Python as interpreted code. I guess that the slowdown by seek() is neglectable compared to this. Also note that we most often seek to the current position; the OS should notice that and return swiftly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:48:11 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Mon, 03 Dec 2012 16:48:11 +0000 Subject: [issue16076] xml.etree.ElementTree.Element is no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1354553291.45.0.381006209237.issue16076@psf.upfronthosting.co.za> Daniel Shahaf added the comment: Attached patch for your consideration. I've tested pickling/unpickling and comparing the resulting object attribute by attribute (.tag, .attrib, .text, .tail for equality; and recursively .getchildren()), and 'make test' --- all seems to work. If the approach is sound, I can submit a revised patch that also updates documentation, regression tests, and potententially updates other type objects in the same manner as this patch updates _elementtree.Element . ---------- components: +Extension Modules keywords: +patch nosy: +danielsh Added file: http://bugs.python.org/file28199/i16076-cpatch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:50:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 16:50:29 +0000 Subject: [issue14099] ZipFile.open() should not reopen the underlying file In-Reply-To: <1329993992.32.0.270050568564.issue14099@psf.upfronthosting.co.za> Message-ID: <1354553429.11.0.0532769926701.issue14099@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I?think some benchmarks will needed to see how it will affect the performance. Please update your patch to current sources. The module code was changed last months. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 17:51:35 2012 From: report at bugs.python.org (Stepan Kasal) Date: Mon, 03 Dec 2012 16:51:35 +0000 Subject: [issue16569] Preventing errors of simultaneous access in zipfile In-Reply-To: <1354112511.94.0.436567820333.issue16569@psf.upfronthosting.co.za> Message-ID: <1354553495.9.0.00716641165961.issue16569@psf.upfronthosting.co.za> Stepan Kasal added the comment: > but I'm afraid it's impossible to do without performance regression due to seek before every read. I agree that this is key question. I would hope that the performance hit wouldn't be so bad, unless there are actually two decompressions running concurrently. So we can have an implementation that is generally correct, though some use scenarios result in slow execution. OTOH, if the seek() call were a problem even if the new position is the same as the old one, they can be optimized out by a simple wrapper around fp. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:03:54 2012 From: report at bugs.python.org (Stepan Kasal) Date: Mon, 03 Dec 2012 17:03:54 +0000 Subject: [issue14099] ZipFile.open() should not reopen the underlying file In-Reply-To: <1329993992.32.0.270050568564.issue14099@psf.upfronthosting.co.za> Message-ID: <1354554234.28.0.0378648802108.issue14099@psf.upfronthosting.co.za> Stepan Kasal added the comment: I'm not sure when I'll get to this, sorry. Hopefully sometime soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:12:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 17:12:45 +0000 Subject: [issue14099] ZipFile.open() should not reopen the underlying file In-Reply-To: <1329993992.32.0.270050568564.issue14099@psf.upfronthosting.co.za> Message-ID: <1354554765.24.0.897777657504.issue14099@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > This idiom currently works and should not be broken. Hmm. This seems doubtful to me, but if it is used, then I agree, it shouldn't be broken. > I guess that the slowdown by seek() is neglectable compared to this. Even one function call can have effect on performance of short reads (issue10376, issue16304). Fortunately in this corner case the read buffer will be used. > Also note that we most often seek to the current position; the OS should notice that and return swiftly. This may affect the buffered Python file (I did not check). The OS also doesn't notice this if the OS is Windows (issue8745). I want to see and test an updated patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:16:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 17:16:30 +0000 Subject: [issue14099] ZipFile.open() should not reopen the underlying file In-Reply-To: <1329993992.32.0.270050568564.issue14099@psf.upfronthosting.co.za> Message-ID: <1354554990.19.0.258689211925.issue14099@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, not issue16304, but issue16034. The commit messages were wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 18:47:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 03 Dec 2012 17:47:17 +0000 Subject: [issue4833] Explicit directories for zipfiles In-Reply-To: <1231088968.72.0.101458538333.issue4833@psf.upfronthosting.co.za> Message-ID: <1354556837.31.0.496215301115.issue4833@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually now creating directories in zipfile is possible with ZipFile.writestr(special_zip_info, b''). However a special method (like ZipFile.mkdir(name))?can be useful. ---------- nosy: +serhiy.storchaka stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 19:34:22 2012 From: report at bugs.python.org (Abraham Karplus) Date: Mon, 03 Dec 2012 18:34:22 +0000 Subject: [issue16582] Tkinter calls SystemExit with string In-Reply-To: <1354298633.36.0.337905476432.issue16582@psf.upfronthosting.co.za> Message-ID: <1354559662.18.0.575015333459.issue16582@psf.upfronthosting.co.za> Abraham Karplus added the comment: I'd be fine with having it fixed just in 3.4, as it is easy enough to work around for now. (Call deletecommand('exit') and then createcommand('exit', working_exit_function) with working_exit function being the patched version of _exit.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 19:48:44 2012 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 03 Dec 2012 18:48:44 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1354560524.75.0.998325688666.issue16596@psf.upfronthosting.co.za> Guido van Rossum added the comment: Thanks! I will try it out shortly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 20:49:50 2012 From: report at bugs.python.org (Simon Law) Date: Mon, 03 Dec 2012 19:49:50 +0000 Subject: [issue9974] tokenizer.untokenize not invariant with line continuations In-Reply-To: <1285695065.99.0.439423855227.issue9974@psf.upfronthosting.co.za> Message-ID: <1354564190.26.0.568290359399.issue9974@psf.upfronthosting.co.za> Changes by Simon Law : ---------- nosy: +sfllaw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 21:01:12 2012 From: report at bugs.python.org (Michael Birtwell) Date: Mon, 03 Dec 2012 20:01:12 +0000 Subject: [issue16601] Restarting iteration over tarfile continues from where it left off. Message-ID: <1354564872.87.0.0661195327337.issue16601@psf.upfronthosting.co.za> New submission from Michael Birtwell: If you partially iterate over a tarfile then try and restart iteration of that tarfile it will continue from where it left off rather than restarting from the beginning. I've only tried this with the tarfile implementation in python 2.7 but the 3.x code looks the same in this respect. I've included a patch with my approach to fixing this. ---------- components: Library (Lib) files: fix-tarfile-restart-iteration.patch keywords: patch messages: 176863 nosy: mbirtwell priority: normal severity: normal status: open title: Restarting iteration over tarfile continues from where it left off. versions: Python 2.7 Added file: http://bugs.python.org/file28200/fix-tarfile-restart-iteration.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 21:03:37 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 03 Dec 2012 20:03:37 +0000 Subject: [issue16507] Patch selectmodule.c to support WSAPoll on Windows In-Reply-To: <1353277974.19.0.012295377293.issue16507@psf.upfronthosting.co.za> Message-ID: <1354565017.86.0.0348471553817.issue16507@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Attached is an alternative patch which only touches selectmodule.c. It still does not support WinXP. Note that in this version register() and modify() do not ignore the POLLPRI flag if it was *explicitly* passed. But I am not sure how best to deal with POLLPRI. ---------- nosy: +sbt Added file: http://bugs.python.org/file28201/miminal-wsapoll.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 21:19:33 2012 From: report at bugs.python.org (Michael Birtwell) Date: Mon, 03 Dec 2012 20:19:33 +0000 Subject: [issue16601] Restarting iteration over tarfile continues from where it left off. In-Reply-To: <1354564872.87.0.0661195327337.issue16601@psf.upfronthosting.co.za> Message-ID: <1354565973.6.0.841984652034.issue16601@psf.upfronthosting.co.za> Michael Birtwell added the comment: Embarrassingly as soon as I uploaded that patch I found a problem with it. I hadn't taken in to account the special case for the first member. Here's a replacement patch ---------- type: -> behavior Added file: http://bugs.python.org/file28202/fix-tarfile-restart-iteration2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 21:56:31 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 03 Dec 2012 20:56:31 +0000 Subject: [issue16601] Restarting iteration over tarfile continues from where it left off. In-Reply-To: <1354564872.87.0.0661195327337.issue16601@psf.upfronthosting.co.za> Message-ID: <1354568191.4.0.0994121554388.issue16601@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the patch. Could you either include a test or post code that demonstrates the problem, please? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 23:29:14 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 03 Dec 2012 22:29:14 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1354573754.08.0.789572117703.issue16596@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 3 23:49:39 2012 From: report at bugs.python.org (Larry Hastings) Date: Mon, 03 Dec 2012 22:49:39 +0000 Subject: [issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins In-Reply-To: <1353123389.46.0.245856363901.issue16490@psf.upfronthosting.co.za> Message-ID: <1354574979.19.0.175015955086.issue16490@psf.upfronthosting.co.za> Larry Hastings added the comment: http://mail.python.org/pipermail/python-dev/2012-December/122920.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 00:00:41 2012 From: report at bugs.python.org (Michael Birtwell) Date: Mon, 03 Dec 2012 23:00:41 +0000 Subject: [issue16601] Restarting iteration over tarfile continues from where it left off. In-Reply-To: <1354564872.87.0.0661195327337.issue16601@psf.upfronthosting.co.za> Message-ID: <1354575641.94.0.305683244229.issue16601@psf.upfronthosting.co.za> Michael Birtwell added the comment: Here's a patch on the tarfile's unittest module. ---------- Added file: http://bugs.python.org/file28203/test-tarfile-restart-iteration.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 02:20:08 2012 From: report at bugs.python.org (Gary Miguel) Date: Tue, 04 Dec 2012 01:20:08 +0000 Subject: [issue12268] file readline, readlines & readall methods can lose data on EINTR In-Reply-To: <1307306343.57.0.342192724444.issue12268@psf.upfronthosting.co.za> Message-ID: <1354584008.95.0.879189210388.issue12268@psf.upfronthosting.co.za> Changes by Gary Miguel : ---------- nosy: +Gary.Miguel _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 03:23:05 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Dec 2012 02:23:05 +0000 Subject: [issue16455] sys.getfilesystemencoding() is not the locale encoding on FreeBSD and OpenSolaris when the locale is not set In-Reply-To: <1352672055.11.0.23985291602.issue16455@psf.upfronthosting.co.za> Message-ID: <3YFn140B1hzQCL@mail.python.org> Roundup Robot added the comment: New changeset c25635b137cc by Victor Stinner in branch 'default': Issue #16455: On FreeBSD and Solaris, if the locale is C, the http://hg.python.org/cpython/rev/c25635b137cc ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 03:24:48 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2012 02:24:48 +0000 Subject: [issue16455] Decode command line arguments from ASCII on FreeBSD and Solaris if the locale is C In-Reply-To: <1352672055.11.0.23985291602.issue16455@psf.upfronthosting.co.za> Message-ID: <1354587888.24.0.391919790936.issue16455@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: sys.getfilesystemencoding() is not the locale encoding on FreeBSD and OpenSolaris when the locale is not set -> Decode command line arguments from ASCII on FreeBSD and Solaris if the locale is C _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 03:30:31 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2012 02:30:31 +0000 Subject: [issue16455] Decode command line arguments from ASCII on FreeBSD and Solaris if the locale is C In-Reply-To: <1352672055.11.0.23985291602.issue16455@psf.upfronthosting.co.za> Message-ID: <1354588231.44.0.253473737736.issue16455@psf.upfronthosting.co.za> STINNER Victor added the comment: > We have two options, I don't know which one is the best (safer). Force ASCII is safer. Python should announce that it does not "understand" non-ASCII bytes on the command line. I also chose this option because isalpha(0xe9) returns 0 (even if mbstowcs(0xe9) returns L"\xe9"): FreeBSD doesn't consider U+00E9 as a letter in the C locale, so Python should also consider this byte as raw data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 03:32:10 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2012 02:32:10 +0000 Subject: [issue16455] Decode command line arguments from ASCII on FreeBSD and Solaris if the locale is C In-Reply-To: <1352672055.11.0.23985291602.issue16455@psf.upfronthosting.co.za> Message-ID: <1354588330.38.0.882412433221.issue16455@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset c25635b137cc by Victor Stinner in branch 'default': > Issue #16455: On FreeBSD and Solaris, if the locale is C, the > http://hg.python.org/cpython/rev/c25635b137cc This changeset should fix #16218 on FreeBSD and Solaris (these OS should now decode correctly undecodable command line arguments). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 03:32:43 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2012 02:32:43 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1354588363.39.0.286435622507.issue16218@psf.upfronthosting.co.za> STINNER Victor added the comment: > New changeset c25635b137cc by Victor Stinner in branch 'default': > Issue #16455: On FreeBSD and Solaris, if the locale is C, the > http://hg.python.org/cpython/rev/c25635b137cc This changeset should fix this issue on FreeBSD and Solaris: see the issue #16455 for more information. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 05:02:09 2012 From: report at bugs.python.org (Philip Jenvey) Date: Tue, 04 Dec 2012 04:02:09 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1354593729.35.0.303585454389.issue15031@psf.upfronthosting.co.za> Philip Jenvey added the comment: >From the perspective of Jython we'd want the easiest way to hook into this as possible of course, but I think that overriding marshal to handle a $py.class or whatever format would be a misappropriation of the marshal module Jython actually has a slow, preliminary .pyc bytecode interpreter, so it needs marshal the way it is. Correct me if I'm wrong but I think the overriding a method of a Loader option could allow you to even have the import system support .pyc *and* $py.class at the same time in Jython (just by addding another Loader into the mix) I'm not sure anyone would ever want to do that in practice, but it's probably worth considering. Overriding a Loader method is probably the 'most work' for alternative implementations, right? But it's still fairly trivial ---------- nosy: +pjenvey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 07:50:28 2012 From: report at bugs.python.org (Eugene Toder) Date: Tue, 04 Dec 2012 06:50:28 +0000 Subject: [issue16602] weakref can return an object with 0 refcount Message-ID: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> New submission from Eugene Toder: An interaction between weakrefs and trashcan can cause weakref to return the object it's pointing to after object's refcount is already 0. Given that the object is usually increfed and decrefed, this leads to double dealloc and crashing or hanging. Tested 2.6.6, 2.7.2 and 3.3.0 on win7. In more details. The documentation for Py_TRASHCAN_SAFE_BEGIN tells to put it right after PyObject_GC_UnTrack. This means that PyObject_ClearWeakRefs goes after it, and, for example, in subtype_dealloc of Objects/typeobject.c this is indeed the case. This means that if we get into a long chain of deallocations and the trashcan kicks in, we get an object with 0 refcount and without cleared weakrefs lying in trash_delete_later until we go PyTrash_UNWIND_LEVEL levels up. During that time we can execute arbitrary python code, so all we need is some code with an access to the weakref to dereference it. The current recommendation of clearing weakrefs before clearing attributes makes this less likely to happen, but it's still easy enough: import weakref class C: def __init__(self, parent): if not parent: return wself = weakref.ref(self) def cb(wparent): o = wself() self.wparent = weakref.ref(parent, cb) d = weakref.WeakKeyDictionary() root = c = C(None) for n in range(100): d[c] = c = C(c) print('deleting') del root print('done') In this case weakref callback in WeakKeyDictionary deletes the reference to the next object, causing the next level of destruction, until trashcan kicks in. Trashcan delays clearing of weakrefs, allowing the second weakref's (wparent) callback to see the dead object via wself that it captured. Attached is a similar example with less weakrefs using __del__. ---------- components: Interpreter Core files: wr2.py messages: 176874 nosy: eltoder, pitrou priority: normal severity: normal status: open title: weakref can return an object with 0 refcount type: crash versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file28204/wr2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 08:11:14 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 04 Dec 2012 07:11:14 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> Message-ID: <1354605074.36.0.476521304929.issue16602@psf.upfronthosting.co.za> Christian Heimes added the comment: Thank you very much for bringing the issue to our attention. I've removed 2.6 and 3.1 because they are in security fix mode and this issue poses no security threat. ---------- nosy: +christian.heimes stage: -> needs patch versions: +Python 3.4 -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 08:13:47 2012 From: report at bugs.python.org (Christian Heimes) Date: Tue, 04 Dec 2012 07:13:47 +0000 Subject: [issue15004] add weakref support to types.SimpleNamespace In-Reply-To: <1338865132.4.0.472631439697.issue15004@psf.upfronthosting.co.za> Message-ID: <1354605227.95.0.533275512936.issue15004@psf.upfronthosting.co.za> Christian Heimes added the comment: The patch LGTM except for the extra code reformatting. However it's too late for 3.3. ---------- nosy: +christian.heimes versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 08:16:19 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Dec 2012 07:16:19 +0000 Subject: [issue15004] add weakref support to types.SimpleNamespace In-Reply-To: <1338865132.4.0.472631439697.issue15004@psf.upfronthosting.co.za> Message-ID: <1354605379.27.0.273956790603.issue15004@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You shouldn't have to export something named __weakref__. Furthermore, the test should check that weakrefs work, not that an attribute exists. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 08:21:08 2012 From: report at bugs.python.org (Christoph Sieghart) Date: Tue, 04 Dec 2012 07:21:08 +0000 Subject: [issue14102] argparse: add ability to create a man page In-Reply-To: <1330031760.56.0.8938390885.issue14102@psf.upfronthosting.co.za> Message-ID: <1354605668.62.0.784815040364.issue14102@psf.upfronthosting.co.za> Changes by Christoph Sieghart : ---------- nosy: +sigi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 09:06:09 2012 From: report at bugs.python.org (David Villa Alises) Date: Tue, 04 Dec 2012 08:06:09 +0000 Subject: [issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins In-Reply-To: <1353123389.46.0.245856363901.issue16490@psf.upfronthosting.co.za> Message-ID: <1354608369.09.0.312628289003.issue16490@psf.upfronthosting.co.za> David Villa Alises added the comment: What about something like gobject.introspection? https://live.gnome.org/GObjectIntrospection/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 09:35:14 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2012 08:35:14 +0000 Subject: [issue13876] Sporadic failure in test_socket: testRecvmsgEOF In-Reply-To: <1327588563.2.0.447366914719.issue13876@psf.upfronthosting.co.za> Message-ID: <1354610114.85.0.534557439831.issue13876@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: Sporadic failure in test_socket -> Sporadic failure in test_socket: testRecvmsgEOF _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 09:35:54 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2012 08:35:54 +0000 Subject: [issue16603] Sporadic test_socket failures: testFDPassCMSG_SPACE on Mac OS X Message-ID: <1354610154.86.0.887949323401.issue16603@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20Mountain%20Lion%20%5BSB%5D%203.x/builds/523/steps/test/logs/stdio ====================================================================== ERROR: testFDPassCMSG_SPACE (test.test_socket.RecvmsgIntoSCMRightsStreamTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/test_socket.py", line 2502, in testFDPassCMSG_SPACE socket.CMSG_SPACE(4 * SIZEOF_INT))) File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/test_socket.py", line 1786, in doRecvmsg result = sock.recvmsg_into([buf], *args) socket.timeout: timed out ====================================================================== ERROR: testFDPassCMSG_SPACE (test.test_socket.RecvmsgIntoSCMRightsStreamTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/test_socket.py", line 232, in _tearDown raise exc File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/test_socket.py", line 244, in clientRun test_func() File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/test_socket.py", line 2506, in _testFDPassCMSG_SPACE self.createAndSendFDs(4) File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/test_socket.py", line 2445, in createAndSendFDs array.array("i", self.newFDs(n)))]), File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/test_socket.py", line 1687, in sendmsgToServer *(args + self.sendmsg_to_server_defaults[len(args):])) BrokenPipeError: [Errno 32] Broken pipe -- See also issue #13876. I copied the nosy list of this issue. ---------- components: Tests messages: 176879 nosy: giampaolo.rodola, haypo, nadeem.vawda, neologix, pitrou, rosslagerwall priority: normal severity: normal status: open title: Sporadic test_socket failures: testFDPassCMSG_SPACE on Mac OS X versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 09:37:14 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2012 08:37:14 +0000 Subject: [issue16604] Sporadic .test_threaded_import failure: test_parallel_meta_path on Windows 7 Message-ID: <1354610234.83.0.00487836911931.issue16604@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/x86%20Windows7%203.x/builds/5975/steps/test/logs/stdio ====================================================================== FAIL: test_parallel_meta_path (test.test_threaded_import.ThreadedImportTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "D:\cygwin\home\db3l\buildarea\3.x.bolen-windows7\build\lib\test\test_threaded_import.py", line 133, in test_parallel_meta_path self.assertEqual(finder.x, finder.numcalls) AssertionError: 93 != 94 ---------- components: Tests messages: 176880 nosy: brett.cannon, haypo, pitrou priority: normal severity: normal status: open title: Sporadic .test_threaded_import failure: test_parallel_meta_path on Windows 7 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 09:46:58 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2012 08:46:58 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <1354610818.81.0.402832117055.issue15745@psf.upfronthosting.co.za> STINNER Victor added the comment: I didn't read the whole issue, but the following code makes sense. +try: + import posix +except ImportError: + # Windows has nanosecond utime resolution. + UTIME_EPSILON = 2e-9 +else: + import sysconfig + if 'HAVE_UTIMENSAT' in posix._have_functions: + UTIME_EPSILON = 2e-9 + elif 'HAVE_UTIMES' in sysconfig.get_config_vars(): + UTIME_EPSILON = 2e-6 + else: + UTIME_EPSILON = 1.0 Windows doesn't really have nanosecond resolution: the common Windows unit is 100 ns. See GetFileInformationByHandle() documentation: its BY_HANDLE_FILE_INFORMATION structure has FILETIME fields, and FILETIME uses the 100 ns unit. We might expose this unit (UTIME_EPSILON, in the os module maybe?) as we done for time function with time.get_clock_info(). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 09:49:17 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2012 08:49:17 +0000 Subject: [issue16605] test_posix.test_fs_holes() fails on FreeBSD 9.0 Message-ID: <1354610957.0.0.869745259261.issue16605@psf.upfronthosting.co.za> New submission from STINNER Victor: http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%203.x/builds/761/steps/test/logs/stdio ====================================================================== FAIL: test_fs_holes (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/3.x.koobs-freebsd/build/Lib/test/test_posix.py", line 1003, in test_fs_holes self.assertLessEqual(size, os.lseek(fno, i, os.SEEK_HOLE)) AssertionError: 5 not less than or equal to 0 -- See also the issue #10142 which added this feature. I copied the nosy list of this issue. ---------- components: Tests messages: 176882 nosy: aklauer, amaury.forgeotdarc, benjamin.peterson, georg.brandl, haypo, jcea, loewis, pitrou, python-dev, rhettinger, skrah, terry.reedy priority: normal severity: normal status: open title: test_posix.test_fs_holes() fails on FreeBSD 9.0 versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 09:49:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2012 08:49:43 +0000 Subject: [issue15955] gzip, bz2, lzma: add option to limit output size In-Reply-To: <1354485169.64.0.67284748913.issue15955@psf.upfronthosting.co.za> Message-ID: <201212041049.23400.storchaka@gmail.com> Serhiy Storchaka added the comment: > # Using zlib's interface > while not d.eof: > compressed = d.unconsumed_tail or f.read(8192) > if not compressed: > raise ValueError('End-of-stream marker not found') > output = d.decompress(compressed, 8192) > # This is not usable with bzip2. Bzip2 uses large block size and unconsumed_tail can be non empty but decompress() will return b''. With zlib you possible can see the same effect on some input when read by one byte. > A related, but orthogonal proposal: We might want to make unconsumed_tail > a memoryview (provided the input data is know to be immutable), to avoid > creating an unnecessary copy of the data. It looks interesting. However the data should be copied anyway if the input data is not a bytes object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 09:53:57 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2012 08:53:57 +0000 Subject: [issue16275] test_ctypes fails on Solaris 10 SPARC 2.7 (nitrogen/s10) (Sun C compiler) In-Reply-To: <1350552289.03.0.785225307416.issue16275@psf.upfronthosting.co.za> Message-ID: <1354611237.97.0.673301499514.issue16275@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:06:51 2012 From: report at bugs.python.org (koobs) Date: Tue, 04 Dec 2012 09:06:51 +0000 Subject: [issue15747] Various chflags tests failing on FreeBSD/ZFS In-Reply-To: <1345515856.04.0.888770182553.issue15747@psf.upfronthosting.co.za> Message-ID: <1354612011.68.0.13572302481.issue15747@psf.upfronthosting.co.za> koobs added the comment: I think this needs a backport to 2.7, my FreeBSD buildbots are failing on that branch since moving buildbots home directory onto a ZFS fs: ====================================================================== ERROR: test_chflags (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/2.7.koobs-freebsd/build/Lib/test/test_posix.py", line 350, in test_chflags self._test_chflags_regular_file(posix.chflags, test_support.TESTFN) File "/usr/home/buildbot/python/2.7.koobs-freebsd/build/Lib/test/test_posix.py", line 337, in _test_chflags_regular_file chflags_func(target_file, st.st_flags | stat.UF_IMMUTABLE) OSError: [Errno 45] Operation not supported: '@test_38161_tmp' ====================================================================== ERROR: test_lchflags_regular_file (test.test_posix.PosixTester) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/buildbot/python/2.7.koobs-freebsd/build/Lib/test/test_posix.py", line 354, in test_lchflags_regular_file self._test_chflags_regular_file(posix.lchflags, test_support.TESTFN) File "/usr/home/buildbot/python/2.7.koobs-freebsd/build/Lib/test/test_posix.py", line 337, in _test_chflags_regular_file chflags_func(target_file, st.st_flags | stat.UF_IMMUTABLE) OSError: [Errno 45] Operation not supported: '@test_38161_tmp' ---------------------------------------------------------------------- Ran 38 tests in 0.455s I won't link the buildbot log url here since it will not be valid forever. ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:07:44 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Dec 2012 09:07:44 +0000 Subject: [issue15747] Various chflags tests failing on FreeBSD/ZFS In-Reply-To: <1345515856.04.0.888770182553.issue15747@psf.upfronthosting.co.za> Message-ID: <3YFy001KSpzQK0@mail.python.org> Roundup Robot added the comment: New changeset 4beb1630544f by Victor Stinner in branch '2.7': Issue #15747: skip chflags UF_IMMUTABLE tests if EOPNOTSUPP is raised. http://hg.python.org/cpython/rev/4beb1630544f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:30:05 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Dec 2012 09:30:05 +0000 Subject: [issue16604] Sporadic .test_threaded_import failure: test_parallel_meta_path on Windows 7 In-Reply-To: <1354610234.83.0.00487836911931.issue16604@psf.upfronthosting.co.za> Message-ID: <1354613405.03.0.659173085363.issue16604@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> duplicate status: open -> closed superseder: -> test_circular_imports() of test_threaded_import fails on FreeBSD 9.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:34:17 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Dec 2012 09:34:17 +0000 Subject: [issue12268] file readline, readlines & readall methods can lose data on EINTR In-Reply-To: <1307306343.57.0.342192724444.issue12268@psf.upfronthosting.co.za> Message-ID: <1354613657.68.0.0298394662429.issue12268@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Is there anything left to do here? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:40:06 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2012 09:40:06 +0000 Subject: [issue16604] Sporadic .test_threaded_import failure: test_parallel_meta_path on Windows 7 In-Reply-To: <1354610234.83.0.00487836911931.issue16604@psf.upfronthosting.co.za> Message-ID: <1354614006.46.0.584260905061.issue16604@psf.upfronthosting.co.za> STINNER Victor added the comment: > status: open -> closed > superseder: test_circular_imports() of test_threaded_import fails on FreeBSD 9.0 > resolution: duplicate Oh strange, I failed to find this issue (even if I'm the author of its first message!). I forgot maybe to search "test_parallel_meta_path". Thanks Antoine :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:46:38 2012 From: report at bugs.python.org (koobs) Date: Tue, 04 Dec 2012 09:46:38 +0000 Subject: [issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0 In-Reply-To: <1344473974.14.0.584788696764.issue15599@psf.upfronthosting.co.za> Message-ID: <1354614398.0.0.0953309431426.issue15599@psf.upfronthosting.co.za> Changes by koobs : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:50:49 2012 From: report at bugs.python.org (koobs) Date: Tue, 04 Dec 2012 09:50:49 +0000 Subject: [issue15747] Various chflags tests failing on FreeBSD/ZFS In-Reply-To: <1345515856.04.0.888770182553.issue15747@psf.upfronthosting.co.za> Message-ID: <1354614649.71.0.847076810862.issue15747@psf.upfronthosting.co.za> koobs added the comment: Confirming successful 2.7 build post Victors commit on both buildbots (standard & clang) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:54:11 2012 From: report at bugs.python.org (koobs) Date: Tue, 04 Dec 2012 09:54:11 +0000 Subject: [issue16605] test_posix.test_fs_holes() fails on FreeBSD 9.0 In-Reply-To: <1354610957.0.0.869745259261.issue16605@psf.upfronthosting.co.za> Message-ID: <1354614851.56.0.500806771369.issue16605@psf.upfronthosting.co.za> Changes by koobs : ---------- nosy: +koobs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 10:59:24 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 04 Dec 2012 09:59:24 +0000 Subject: [issue14803] Add feature to allow code execution prior to __main__ invocation In-Reply-To: <1336981419.55.0.280530546632.issue14803@psf.upfronthosting.co.za> Message-ID: <1354615164.86.0.582270883821.issue14803@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: offtopic: Noticed something pretty annoying: If a package uses relative imports, e.g. from . import sibling_module, then it is impossible to run that package as a script, even with the __main__ trick. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:10:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2012 10:10:49 +0000 Subject: [issue10040] GZipFile failure on large files In-Reply-To: <1286416633.51.0.196300487006.issue10040@psf.upfronthosting.co.za> Message-ID: <1354615849.19.0.784027533404.issue10040@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:17:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2012 10:17:20 +0000 Subject: [issue16504] IDLE - fatal error when opening a file with certain tokenizing errors In-Reply-To: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za> Message-ID: <1354616240.16.0.0383698201039.issue16504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- nosy: +kbk stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:32:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2012 10:32:23 +0000 Subject: [issue6584] gzip module has no custom exception In-Reply-To: <1248675050.27.0.747048824781.issue6584@psf.upfronthosting.co.za> Message-ID: <1354617143.43.0.0690887803157.issue6584@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: read32() should raise BadGzipFile when less than 4 bytes read. Also you should introduce read8() function which raises BadGzipFile when less than 1 byte read. See also issue4844 and issue14315 for zipfile. ---------- stage: commit review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:34:34 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Dec 2012 10:34:34 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> Message-ID: <1354617274.39.0.286880724545.issue16602@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The easy fix would probably be to return Py_None when the weakref'ed object has a zero refcount. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:40:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2012 10:40:07 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1354617607.91.0.190844216894.issue16444@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping. ---------- stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:44:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2012 10:44:30 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1354617870.27.0.90402807599.issue8865@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As I see, Christian's contributor agreement already confirmed. Let's go ahead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 11:48:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2012 10:48:04 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1354618084.23.0.465210370802.issue8865@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Christian, it would be nice if you write the tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 12:31:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2012 11:31:31 +0000 Subject: [issue15955] gzip, bz2, lzma: add option to limit output size In-Reply-To: <1347884562.79.0.801674791772.issue15955@psf.upfronthosting.co.za> Message-ID: <1354620691.66.0.881076781282.issue15955@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually it should be: # Using zlib's interface while not d.eof: output = d.decompress(d.unconsumed_tail, 8192) while not output and not d.eof: compressed = f.read(8192) if not compressed: raise ValueError('End-of-stream marker not found') output = d.decompress(d.unconsumed_tail + compressed, 8192) # Note that you should use d.unconsumed_tail + compressed as input, and therefore do an unnecessary copy of the data. Without explicit unconsumed_tail you can write input data in the internal mutable buffer, it will be more effective for large buffer (handreds of KB) and small input chunks (several KB). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 12:37:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2012 11:37:44 +0000 Subject: [issue12457] type() returns incorrect type for nested classes In-Reply-To: <1309497940.68.0.603392922196.issue12457@psf.upfronthosting.co.za> Message-ID: <1354621064.08.0.862808100523.issue12457@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Should it be closed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 12:44:43 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 04 Dec 2012 11:44:43 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1354621483.92.0.674644890698.issue16596@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Rename skip_yield to skipyield ---------- Added file: http://bugs.python.org/file28205/issue16596_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 12:55:47 2012 From: report at bugs.python.org (Eyal Lewisohn) Date: Tue, 04 Dec 2012 11:55:47 +0000 Subject: [issue2193] Cookie Colon Name Bug In-Reply-To: <1203992843.27.0.867127322082.issue2193@psf.upfronthosting.co.za> Message-ID: <1354622146.99.0.707475822975.issue2193@psf.upfronthosting.co.za> Eyal Lewisohn added the comment: just wanted to note that I agree with BM's comment and that I had to change LegalChars myself to include the slash '/' in order for my application to work properly. ---------- nosy: +Eyal.Lewisohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:06:38 2012 From: report at bugs.python.org (Daniel Urban) Date: Tue, 04 Dec 2012 12:06:38 +0000 Subject: [issue12457] type() returns incorrect type for nested classes In-Reply-To: <1309497940.68.0.603392922196.issue12457@psf.upfronthosting.co.za> Message-ID: <1354622798.5.0.635651385454.issue12457@psf.upfronthosting.co.za> Daniel Urban added the comment: I don't know what is the protocol for duplicates when the superseder is still open. If they should be closed, then I think yes, this should be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:06:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Dec 2012 12:06:42 +0000 Subject: [issue16599] unittest: Access test result from tearDown In-Reply-To: <1354527723.36.0.769611290906.issue16599@psf.upfronthosting.co.za> Message-ID: <1354622802.52.0.523060373319.issue16599@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Another solution would be to add a new method named addSuccessCleanup. ---------- nosy: +michael.foord, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:08:07 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 04 Dec 2012 12:08:07 +0000 Subject: [issue16599] unittest: Access test result from tearDown In-Reply-To: <1354527723.36.0.769611290906.issue16599@psf.upfronthosting.co.za> Message-ID: <1354622887.84.0.738703740591.issue16599@psf.upfronthosting.co.za> anatoly techtonik added the comment: Or call tearDown() with some parameter that it's able to retrieve. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:08:43 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Dec 2012 12:08:43 +0000 Subject: [issue12457] type() returns incorrect type for nested classes In-Reply-To: <1309497940.68.0.603392922196.issue12457@psf.upfronthosting.co.za> Message-ID: <1354622923.16.0.731352451106.issue12457@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The "naming confusion" was fixed in 3.3: http://docs.python.org/dev/whatsnew/3.3.html#pep-3155-qualified-name-for-classes-and-functions As for pickle, it indeed depends on protocol version 4 as proposed in PEP 3154. ---------- nosy: +pitrou stage: needs patch -> status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:09:51 2012 From: report at bugs.python.org (Michael Foord) Date: Tue, 04 Dec 2012 12:09:51 +0000 Subject: [issue16599] unittest: Access test result from tearDown In-Reply-To: <1354527723.36.0.769611290906.issue16599@psf.upfronthosting.co.za> Message-ID: <1354622991.53.0.377602273343.issue16599@psf.upfronthosting.co.za> Michael Foord added the comment: Changing the signature of tearDown would be backwards incompatible. addSuccessCleanup is an interesting idea - cleanup functions that are only executed if the test passes. (What to do if a cleanup function raises an exception though? And when do these get executed - before or after standard cleanups.) In general cleanup functions are an improvement on tearDown. ---------- assignee: -> michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:34:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2012 12:34:07 +0000 Subject: [issue16541] tk_setPalette doesn't accept keyword parameters In-Reply-To: <1353691491.46.0.777146427691.issue16541@psf.upfronthosting.co.za> Message-ID: <1354624447.0.0.0492622991969.issue16541@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, doing list(kw.items()) is safe now. Here is a patch. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file28206/tkinter_tk_setPalette.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:40:49 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 04 Dec 2012 12:40:49 +0000 Subject: [issue16599] unittest: Access test result from tearDown In-Reply-To: <1354527723.36.0.769611290906.issue16599@psf.upfronthosting.co.za> Message-ID: <1354624849.88.0.373908740004.issue16599@psf.upfronthosting.co.za> anatoly techtonik added the comment: addSuccessCleanup is not the best name as it assumes that some cleanup is being added, which is confusing. Additional consideration that the need to leave the test results is a user run time preference, which may only be actual when debugging or working on the particular test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:43:32 2012 From: report at bugs.python.org (Thorsten Simons) Date: Tue, 04 Dec 2012 12:43:32 +0000 Subject: [issue16606] hashlib memory leak Message-ID: <1354625012.22.0.133818584828.issue16606@psf.upfronthosting.co.za> New submission from Thorsten Simons: hashlib seems to leak memory when used on a Linux box (whereas the same works fine when run under Windows 7) (tested w/ Python 3.2.1 and 3.2.3) import hashlib #file = 'B:\\video\\TEST\\01_file_10G' file = '/video/TEST/01_file_10G' myhash = hashlib.sha256() with open(file, "rb") as f: for buffer in f: myhash.update(buffer) print('hash =', myhash.hexdigest()) On Windows, 'python3 mem.py' occupies roundabout 7 MB memory, on Linux (OpenSuse 12.2), it quickly acquires all available memory, then all swap, than get's killed. ---------- components: Library (Lib) messages: 176907 nosy: Thorsten.Simons priority: normal severity: normal status: open title: hashlib memory leak type: resource usage versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:43:38 2012 From: report at bugs.python.org (Michael Foord) Date: Tue, 04 Dec 2012 12:43:38 +0000 Subject: [issue16599] unittest: Access test result from tearDown In-Reply-To: <1354527723.36.0.769611290906.issue16599@psf.upfronthosting.co.za> Message-ID: <1354625018.11.0.367977993743.issue16599@psf.upfronthosting.co.za> Michael Foord added the comment: Well, addSuccessCleanup *would* be an api for adding a cleanup - one that is only called on success. So the cleanup is skipped on failure or error, which was the original use case. "Additional consideration that the need to leave the test results is a user run time preference, which may only be actual when debugging or working on the particular test." I can't parse that sentence, can you rephrase please. (Did you mean another word other than "leave", and I don't understand "may only be actual".) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:45:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2012 12:45:08 +0000 Subject: [issue16599] unittest: Access test result from tearDown In-Reply-To: <1354527723.36.0.769611290906.issue16599@psf.upfronthosting.co.za> Message-ID: <1354625108.6.0.753093959751.issue16599@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Why do you need it? You can add a test result depended code at the end of the test method. For example set a special flag def setUp(self): self.success = False def tearDown(self): if not self.success: ... def test_xxx(self): ... self.success = True I don't think any special support in stdlib needed. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 13:58:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2012 12:58:16 +0000 Subject: [issue16445] SEGFAULT when deleting Exception.message In-Reply-To: <1352415910.77.0.640632287013.issue16445@psf.upfronthosting.co.za> Message-ID: <1354625896.84.0.882895353768.issue16445@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Victor, I will be glad to review any related patches, but please split the patch on several patches, from most undoubted to more sophisticated patterns. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 14:05:39 2012 From: report at bugs.python.org (Thorsten Simons) Date: Tue, 04 Dec 2012 13:05:39 +0000 Subject: [issue16606] hashlib memory leak In-Reply-To: <1354625012.22.0.133818584828.issue16606@psf.upfronthosting.co.za> Message-ID: <1354626339.43.0.610827653672.issue16606@psf.upfronthosting.co.za> Thorsten Simons added the comment: forgot to say that this is about huge files (tested w/ a 10GB file) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 14:08:35 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Dec 2012 13:08:35 +0000 Subject: [issue16606] hashlib memory leak In-Reply-To: <1354625012.22.0.133818584828.issue16606@psf.upfronthosting.co.za> Message-ID: <1354626515.52.0.312477940085.issue16606@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What happens if you replace iteration with something like: with open(file, "rb") as f: while True: data = f.read(16384) if not data: break myhash.update(data) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 15:15:02 2012 From: report at bugs.python.org (Thorsten Simons) Date: Tue, 04 Dec 2012 14:15:02 +0000 Subject: [issue16606] hashlib memory leak In-Reply-To: <1354625012.22.0.133818584828.issue16606@psf.upfronthosting.co.za> Message-ID: <1354630502.89.0.310451755196.issue16606@psf.upfronthosting.co.za> Thorsten Simons added the comment: Antoine, this was of great help - no memory leaking anymore... So, I asume that somewhere in the iteration the read file is buffered? Does that make sense or - was it the developers intention? Thank you, Regards, Thorsten ---------- resolution: -> works for me _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 15:20:26 2012 From: report at bugs.python.org (Eugene Toder) Date: Tue, 04 Dec 2012 14:20:26 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> Message-ID: <1354630826.24.0.840835739302.issue16602@psf.upfronthosting.co.za> Eugene Toder added the comment: Agreed. That's what I've put in my code as a work around. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 15:20:31 2012 From: report at bugs.python.org (Nick Coghlan) Date: Tue, 04 Dec 2012 14:20:31 +0000 Subject: [issue14803] Add feature to allow code execution prior to __main__ invocation In-Reply-To: <1354615164.86.0.582270883821.issue14803@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Why post that complaint here? If there's a case where__main__.__package__ isn't being set correctly by -m, file a separate bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 15:28:52 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Dec 2012 14:28:52 +0000 Subject: [issue16606] hashlib memory leak In-Reply-To: <1354625012.22.0.133818584828.issue16606@psf.upfronthosting.co.za> Message-ID: <1354631332.52.0.245949661371.issue16606@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, it's not immediately obvious what the exact problem could be. Are you reading a regular text file? Or is it a binary file where maybe the '\n' character appears very rarely? If it can be reproduced with a smaller file, perhaps you can attach it somewhere. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 16:01:38 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 04 Dec 2012 15:01:38 +0000 Subject: [issue16507] Patch selectmodule.c to support WSAPoll on Windows In-Reply-To: <1353277974.19.0.012295377293.issue16507@psf.upfronthosting.co.za> Message-ID: <1354633298.02.0.690078497791.issue16507@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Here is a version which loads WSAPoll at runtime. Still no tests or docs. ---------- Added file: http://bugs.python.org/file28207/runtime_wsapoll.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 16:04:43 2012 From: report at bugs.python.org (Lukas Lueg) Date: Tue, 04 Dec 2012 15:04:43 +0000 Subject: [issue16606] hashlib memory leak In-Reply-To: <1354625012.22.0.133818584828.issue16606@psf.upfronthosting.co.za> Message-ID: <1354633483.13.0.933947443916.issue16606@psf.upfronthosting.co.za> Lukas Lueg added the comment: Thorsten, the problem is that you are using line-based syntax. The code 'for buffer in f:' will read one line per iteration and put it to 'buffer'; for a file opened in binary mode, the iterator will always seek to the next b'\n'. Depending on the content of the file, python may have to read tons of data before the next b'\n' appears. ---------- nosy: +ebfe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 16:10:50 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 04 Dec 2012 15:10:50 +0000 Subject: [issue16599] unittest: Access test result from tearDown In-Reply-To: <1354625018.11.0.367977993743.issue16599@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: On Tue, Dec 4, 2012 at 3:43 PM, Michael Foord wrote: > > Well, addSuccessCleanup *would* be an api for adding a cleanup - one that > is only called on success. So the cleanup is skipped on failure or error, > which was the original use case. > I thought it will be a callback method. > "Additional consideration that the need to leave the test results is a > user run time preference, which may only be actual when debugging or > working on the particular test." > > I can't parse that sentence, can you rephrase please. (Did you mean > another word other than "leave", and I don't understand "may only be > actual".) > Most of the time users need to clean up mess. It mostly during debug session you need to leave it. So the workaround should be easy and obvious to enable and disable. Serhiy's method is good. I was too busy with other stuff to think about it. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 16:19:30 2012 From: report at bugs.python.org (Thorsten Simons) Date: Tue, 04 Dec 2012 15:19:30 +0000 Subject: [issue16606] hashlib memory leak In-Reply-To: <1354625012.22.0.133818584828.issue16606@psf.upfronthosting.co.za> Message-ID: <1354634370.56.0.447446875879.issue16606@psf.upfronthosting.co.za> Thorsten Simons added the comment: OK, learned something again - should have known this :-( Thank you! Thorsten ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 16:42:30 2012 From: report at bugs.python.org (Brett Cannon) Date: Tue, 04 Dec 2012 15:42:30 +0000 Subject: [issue15031] Split .pyc parsing from module loading In-Reply-To: <1339096213.71.0.334524050625.issue15031@psf.upfronthosting.co.za> Message-ID: <1354635750.25.0.675180743931.issue15031@psf.upfronthosting.co.za> Brett Cannon added the comment: So we have IronPython who has their own format, Jython who has their own format *and* .pyc files (which would screw with __cached__ so I assume they won't try to use both at the same time), PyPy which use .pyc files, and CPython which uses .pyc files. My motivation for exposing this publicly is quickly dwindling, although factoring it out for private use is fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 17:16:08 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 04 Dec 2012 16:16:08 +0000 Subject: [issue16605] test_posix.test_fs_holes() fails on FreeBSD 9.0 In-Reply-To: <1354610957.0.0.869745259261.issue16605@psf.upfronthosting.co.za> Message-ID: <1354637768.25.0.317408717354.issue16605@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: This is likely a FreeBSD 9 kernel bug. Using this code under python 3, on a ZFS filesystem: """ import os f = open("test", "wb") f.write(b"hello") f.flush() print(os.lseek(f.fileno(), 3, os.SEEK_HOLE)) """ Under Solaris, the reply is 5, pointing to the end of the file. Under current FreeBSD 9, it replies "3". In fact, it replies back current file offset. This is wrong according to "lseek" man: """ [...] 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. [...] 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.** """ So FreeBSD has two bugs: 1. It is giving an error if the filesystem doesn't support holes. The correct behavious SHOULD report a hole at the end of the file. 2. In a file without holes, on a filesystem supporting holes (ZFS), FreeBSD 9 is returning current file offset for SEEK_HOLE, instead of reporting offset = filesize. Consistent with the "virtual hole" at the end of the file. koobs, can you report to FreeBSD guys?. In the meantime we could apply a "SkipIf" to this test, to skio FreeBSD 9 (for now). Ideas? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 17:22:55 2012 From: report at bugs.python.org (koobs) Date: Tue, 04 Dec 2012 16:22:55 +0000 Subject: [issue16605] test_posix.test_fs_holes() fails on FreeBSD 9.0 In-Reply-To: <1354610957.0.0.869745259261.issue16605@psf.upfronthosting.co.za> Message-ID: <1354638175.84.0.403965234329.issue16605@psf.upfronthosting.co.za> koobs added the comment: I'll take care of upstream and report back with PR numbers. Happy with the skipIf until resolved. Thanks for your time and patience jcea, much appreciated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 17:24:41 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 04 Dec 2012 16:24:41 +0000 Subject: [issue16605] test_posix.test_fs_holes() fails on FreeBSD 9.0 In-Reply-To: <1354610957.0.0.869745259261.issue16605@psf.upfronthosting.co.za> Message-ID: <1354638281.54.0.74690089643.issue16605@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: koobs, do you want the SkipIf now?. Maybe having a red buildbot can contribute push FreeBSD kernel guys :) ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 17:25:26 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Tue, 04 Dec 2012 16:25:26 +0000 Subject: [issue16605] test_posix.test_fs_holes() fails on FreeBSD 9.0 In-Reply-To: <1354610957.0.0.869745259261.issue16605@psf.upfronthosting.co.za> Message-ID: <1354638326.4.0.865505573497.issue16605@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- assignee: -> jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 17:28:16 2012 From: report at bugs.python.org (koobs) Date: Tue, 04 Dec 2012 16:28:16 +0000 Subject: [issue16605] test_posix.test_fs_holes() fails on FreeBSD 9.0 In-Reply-To: <1354610957.0.0.869745259261.issue16605@psf.upfronthosting.co.za> Message-ID: <1354638496.87.0.954688036495.issue16605@psf.upfronthosting.co.za> koobs added the comment: Give me till the end of the weekend, will ping you for the skipIf then if I haven't made progress. Thank you again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 18:32:20 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 04 Dec 2012 17:32:20 +0000 Subject: [issue12268] file readline, readlines & readall methods can lose data on EINTR In-Reply-To: <1354613657.68.0.0298394662429.issue12268@psf.upfronthosting.co.za> Message-ID: Gregory P. Smith added the comment: Yes. See my comment from June. The write paths need to be taken care of. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 18:46:30 2012 From: report at bugs.python.org (Eric Snow) Date: Tue, 04 Dec 2012 17:46:30 +0000 Subject: [issue16606] hashlib memory leak In-Reply-To: <1354625012.22.0.133818584828.issue16606@psf.upfronthosting.co.za> Message-ID: <1354643190.65.0.952571029339.issue16606@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 19:07:15 2012 From: report at bugs.python.org (Daniel Urban) Date: Tue, 04 Dec 2012 18:07:15 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> Message-ID: <1354644435.93.0.00546611629806.issue16602@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +daniel.urban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 19:48:27 2012 From: report at bugs.python.org (myreallycoolname) Date: Tue, 04 Dec 2012 18:48:27 +0000 Subject: [issue16607] Bad examples in documentation Message-ID: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> New submission from myreallycoolname: The doumentation examples imn the tutorial in python3.2 are at lest in part invalid. I was having trouble understanding the documentation so I pulled out my pthony interperator and pluged in one of tyhe examples. Just as I thought self was not defined. You can't learn python if the docs are bad. Please review the examples under classes to make sure they are all correct. ---------- assignee: docs at python components: Documentation messages: 176927 nosy: docs at python, myreallycoolname priority: normal severity: normal status: open title: Bad examples in documentation versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 19:54:03 2012 From: report at bugs.python.org (David W. Lambert) Date: Tue, 04 Dec 2012 18:54:03 +0000 Subject: [issue16608] subclass str fails Message-ID: <1354647243.72.0.494328426401.issue16608@psf.upfronthosting.co.za> New submission from David W. Lambert: http://forums.devshed.com/newreply.php?do=newreply&noquote=1&p=2838814 >>> class c(tuple): ... def __init__(s,a,b): ... tuple.__init__(s,a) ... self.b = b ... >>> c(tuple(),666) Traceback (most recent call last): File "", line 1, in TypeError: tuple() takes at most 1 argument (2 given) >>> ---------- components: Interpreter Core messages: 176928 nosy: LambertDW priority: normal severity: normal status: open title: subclass str fails type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:00:28 2012 From: report at bugs.python.org (Daniel Urban) Date: Tue, 04 Dec 2012 19:00:28 +0000 Subject: [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1354647628.15.0.0342205882933.issue16607@psf.upfronthosting.co.za> Daniel Urban added the comment: Could you please point to a specific example which is incorrect? Thank you. ---------- nosy: +daniel.urban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:03:07 2012 From: report at bugs.python.org (Cal Leeming) Date: Tue, 04 Dec 2012 19:03:07 +0000 Subject: [issue16609] random.random() / float() loses precision when passed to str() Message-ID: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> New submission from Cal Leeming: Hello, Today I came up against a strange problem where collisions were being encountered after less than 1mil iterations when attempting to use random.random(). After much digging, the problem was because I was casting my float to a string, and this was automatically rounding it. Some explanation is given [1], but it still leaves me with questions. >>> import random >>> random.random() 0.33885573194811902 >>> x = random.random() >>> x 0.88022393777095409 >>> print x 0.880223937771 >>> str(x) '0.880223937771' >>> print str(x) 0.880223937771 >>> repr(x) '0.88022393777095409' >>> str(repr(x)) '0.88022393777095409' After painstakingly searching through documentation (including the lengthy one about floating points arithmetic), I was unable to find any explanation behind why the float is automatically rounded if str() is called on it. Although I doubt this behavior would ever be changed, it would be nice to update the documentation to reflect this. I'm thinking a note underneath random.random() explaining that you have to use repr() and not str() in order to maintain floating point precision. Thoughts? Cal [1] http://stackoverflow.com/questions/3481289/converting-a-python-float-to-a-string-without-losing-precision ---------- components: Interpreter Core messages: 176930 nosy: sleepycal priority: normal severity: normal status: open title: random.random() / float() loses precision when passed to str() versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:11:07 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Dec 2012 19:11:07 +0000 Subject: [issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread In-Reply-To: <1317935848.16.0.589862913408.issue13120@psf.upfronthosting.co.za> Message-ID: <3YGCNB3T2BzNcB@mail.python.org> Roundup Robot added the comment: New changeset 708586792eec by Andrew Svetlov in branch '3.2': Issue #13120: Allow to call pdb.set_trace() from thread. http://hg.python.org/cpython/rev/708586792eec New changeset 678dba60c12d by Andrew Svetlov in branch '3.3': Merge issue #13120: Allow to call pdb.set_trace() from thread. http://hg.python.org/cpython/rev/678dba60c12d New changeset 4006c4ca0c1f by Andrew Svetlov in branch 'default': Merge issue #13120: Allow to call pdb.set_trace() from thread. http://hg.python.org/cpython/rev/4006c4ca0c1f ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:14:02 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 04 Dec 2012 19:14:02 +0000 Subject: [issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread In-Reply-To: <1317935848.16.0.589862913408.issue13120@psf.upfronthosting.co.za> Message-ID: <1354648442.68.0.636496617958.issue13120@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:17:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 04 Dec 2012 19:17:54 +0000 Subject: [issue16609] random.random() / float() loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354648674.7.0.0242819046462.issue16609@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: http://docs.python.org/2/tutorial/floatingpoint.html ---------- nosy: +serhiy.storchaka resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:21:11 2012 From: report at bugs.python.org (Cal Leeming) Date: Tue, 04 Dec 2012 19:21:11 +0000 Subject: [issue16609] random.random() / float() loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354648871.71.0.885565533235.issue16609@psf.upfronthosting.co.za> Cal Leeming added the comment: As stated before, I have already read this document. This ticket is specifically about making users aware of this behaviour in the form of a documentation update on the random.random() docs. The link you provided does not exactly make this very clear. ---------- resolution: invalid -> status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:21:47 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Dec 2012 19:21:47 +0000 Subject: [issue12268] file readline, readlines & readall methods can lose data on EINTR In-Reply-To: <1307306343.57.0.342192724444.issue12268@psf.upfronthosting.co.za> Message-ID: <1354648907.87.0.672059389007.issue12268@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, this issue is about "readline, readlines & readall". It would be easier to follow if you opened a separate issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:33:37 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 04 Dec 2012 19:33:37 +0000 Subject: [issue16608] immutable subclass constructor call error does not show subclass name In-Reply-To: <1354647243.72.0.494328426401.issue16608@psf.upfronthosting.co.za> Message-ID: <1354649617.16.0.703837839339.issue16608@psf.upfronthosting.co.za> R. David Murray added the comment: Is your error report the fact that the name 'tuple' appears in the error message instead of 'c'? That does seem sub-optimal. It may not be easy to improve, though. ---------- nosy: +r.david.murray priority: normal -> low title: subclass str fails -> immutable subclass constructor call error does not show subclass name versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:42:27 2012 From: report at bugs.python.org (David W. Lambert) Date: Tue, 04 Dec 2012 19:42:27 +0000 Subject: [issue16608] immutable subclass constructor call error does not show subclass name In-Reply-To: <1354647243.72.0.494328426401.issue16608@psf.upfronthosting.co.za> Message-ID: <1354650147.2.0.605947917134.issue16608@psf.upfronthosting.co.za> David W. Lambert added the comment: The apparent problem was that the constructing str with __init__ failed. I now recall that immutables take initial values in the __new__ method. Sorry! Otherwise, it was quite thoughtful for you to search for a problem. Dave. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:46:00 2012 From: report at bugs.python.org (Stepan Wagner) Date: Tue, 04 Dec 2012 19:46:00 +0000 Subject: [issue16610] Silent StopIteration exc when raised from generator inside of another generator Message-ID: <1354650360.2.0.9530636235.issue16610@psf.upfronthosting.co.za> New submission from Stepan Wagner: def emptygen(): # Or other more meaningful generator raise StopIteration yield def wrap(gen): next(gen) print("This should be printed or StopIteration raised.") while True: try: yield next(gen) except StopIteration as exc: return items = wrap(emptygen()) for item in items: print(item) print("End.") ---------- components: Interpreter Core messages: 176939 nosy: Stepan.Wagner priority: normal severity: normal status: open title: Silent StopIteration exc when raised from generator inside of another generator type: behavior versions: Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:50:48 2012 From: report at bugs.python.org (Georg Brandl) Date: Tue, 04 Dec 2012 19:50:48 +0000 Subject: [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1354650648.89.0.699449840908.issue16607@psf.upfronthosting.co.za> Georg Brandl added the comment: I had a look and can't see an example in the "Classes" doc where self might not be defined. Please reopen with a concrete pointer if you think otherwise. ---------- nosy: +georg.brandl resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:54:43 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 04 Dec 2012 19:54:43 +0000 Subject: [issue16609] random.random() / float() loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354650883.97.0.39140039822.issue16609@psf.upfronthosting.co.za> Mark Dickinson added the comment: The `random` module docs are not the right place to add notes about general floating-point arithmetic behaviour. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 20:57:57 2012 From: report at bugs.python.org (Cal Leeming) Date: Tue, 04 Dec 2012 19:57:57 +0000 Subject: [issue16609] random.random() / float() loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354651077.77.0.253833816177.issue16609@psf.upfronthosting.co.za> Cal Leeming added the comment: Normally I would concur, but casting random.random() to a string is commonly used, and people aren't going to read the entire floating point arithmetic page to figure this out. And even if they do, that page still doesn't make it entirely obvious at first read. Hopefully if anyone else is caught out by this, then they will see this thread at least :X ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:00:29 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 04 Dec 2012 20:00:29 +0000 Subject: [issue16609] random.random() / float() loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354651229.82.0.614848177739.issue16609@psf.upfronthosting.co.za> R. David Murray added the comment: In fact it has been changed. In Python3 you get: >>> x = 0.88022393777095409 >>> x 0.8802239377709541 >>> str(x) '0.8802239377709541' Even in 2.7 you would get the above repr, not the one you showed. This is because 2.7 and 3.3 use the "shortest repr" described in the floating point document, but 2.7 still uses the old rounding as the default str representation (for backward compatibility reasons). While you could still make an argument for updating the 2.7 docs, I'm not sure it is worth it. If you (or anyone) want to propose a patch, I would suggest that instead of adding a note to the random docs, that a glossary entry be added for 'floating point' which mentions it as a 2.7 limitation, and a link to that glossary entry from the random docs. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python, r.david.murray priority: normal -> low type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:05:50 2012 From: report at bugs.python.org (Cal Leeming) Date: Tue, 04 Dec 2012 20:05:50 +0000 Subject: [issue16609] random.random() / float() loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354651550.98.0.733901045922.issue16609@psf.upfronthosting.co.za> Cal Leeming added the comment: Many thanks for your lengthy response David. Sorry, my initial bug report stated it was Python 2.7. The tests I performed were actually on Python 2.6.6. I will take a look at how to contribute documentation updates, and once I've familiarized myself with it I'll submit a patch for review. Thanks again ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:06:35 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 04 Dec 2012 20:06:35 +0000 Subject: [issue16609] random.random() / float() loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354651595.36.0.945036378668.issue16609@psf.upfronthosting.co.za> Mark Dickinson added the comment: It is notable that this behaviour isn't described anywhere that I can find in the library manual or the reference manual. As David says, it applies only to 2.7; in 3.2 and later, `str` and `repr` are identical. > a glossary entry be added for 'floating point' which mentions it as a > 2.7 limitation That could work. I *really* don't think it should be linked to from the random docs, though; this has absolutely nothing to do with the random module, except that the random module happens to contain functions that can produce floats. Many other modules do that, too. Another option would be to add the information somewhere in http://docs.python.org/2/library/stdtypes.html#numeric-types-int-float-long-complex ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:08:40 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 04 Dec 2012 20:08:40 +0000 Subject: [issue16608] immutable subclass constructor call error does not show subclass name In-Reply-To: <1354647243.72.0.494328426401.issue16608@psf.upfronthosting.co.za> Message-ID: <1354651720.92.0.386699792893.issue16608@psf.upfronthosting.co.za> R. David Murray added the comment: I have no idea what you are referring to by 'constructing str' :( I thought at first it was your incorrect tuple call in the init that was the issue, but that didn't look right, and after reproducing it and playing with it for a bit I figured out it was the __new__ failure, and I realized the reason I was confused was that the error message said 'tuple' instead of 'c'. So I definitely think that message could use improvement if it is practical. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:11:16 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 04 Dec 2012 20:11:16 +0000 Subject: [issue16609] float loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354651876.53.0.610548140377.issue16609@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- title: random.random() / float() loses precision when passed to str() -> float loses precision when passed to str() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:14:36 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 04 Dec 2012 20:14:36 +0000 Subject: [issue16610] Silent StopIteration exc when raised from generator inside of another generator In-Reply-To: <1354650360.2.0.9530636235.issue16610@psf.upfronthosting.co.za> Message-ID: <1354652076.22.0.194061837098.issue16610@psf.upfronthosting.co.za> R. David Murray added the comment: I don't see the bug here. Your for loop calls wrap. Wrap calls emptygen. Emptygen raises a StopIteration exception. That exception is of course propagated upward (it isn't caught by wrap), and the loop stops. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:20:44 2012 From: report at bugs.python.org (David W. Lambert) Date: Tue, 04 Dec 2012 20:20:44 +0000 Subject: [issue16608] immutable subclass constructor call error does not show subclass name In-Reply-To: <1354651720.92.0.386699792893.issue16608@psf.upfronthosting.co.za> Message-ID: <1354652443.19542.37.camel@lambertdw> David W. Lambert added the comment: Sorry again. You probably didn't follow the link I posted to see the problem origination. Which was "Cannot subclass str." I generalized this to tuple. On Tue, 2012-12-04 at 20:08 +0000, R. David Murray wrote: > R. David Murray added the comment: > > I have no idea what you are referring to by 'constructing str' :( > > I thought at first it was your incorrect tuple call in the init that was the issue, but that didn't look right, and after reproducing it and playing with it for a bit I figured out it was the __new__ failure, and I realized the reason I was confused was that the error message said 'tuple' instead of 'c'. So I definitely think that message could use improvement if it is practical. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:21:29 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 04 Dec 2012 20:21:29 +0000 Subject: [issue16609] float loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354652489.72.0.0378282689016.issue16609@psf.upfronthosting.co.za> R. David Murray added the comment: That's why I suggested a glossary entry. The relevant function description *does* contain the phrase "floating point", so a glossary link there would be reasonably natural. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:23:46 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 04 Dec 2012 20:23:46 +0000 Subject: [issue16608] immutable subclass constructor call error does not show subclass name In-Reply-To: <1354647243.72.0.494328426401.issue16608@psf.upfronthosting.co.za> Message-ID: <1354652626.94.0.423223845711.issue16608@psf.upfronthosting.co.za> R. David Murray added the comment: I followed the link, but it took me to a login/signup form, so it wasn't very informative. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:28:16 2012 From: report at bugs.python.org (Stepan Wagner) Date: Tue, 04 Dec 2012 20:28:16 +0000 Subject: [issue16610] Silent StopIteration exc when raised from generator inside of another generator In-Reply-To: <1354652076.22.0.194061837098.issue16610@psf.upfronthosting.co.za> Message-ID: Stepan Wagner added the comment: OK, thanks for explanation. The behaviour is still strange, because when I delete try...except clause from wrap, the StopIteration exc from emptygen terminates the program with traceback. On Tue, Dec 4, 2012 at 9:14 PM, R. David Murray wrote: > > R. David Murray added the comment: > > I don't see the bug here. > > Your for loop calls wrap. Wrap calls emptygen. Emptygen raises a > StopIteration exception. That exception is of course propagated upward (it > isn't caught by wrap), and the loop stops. > > ---------- > nosy: +r.david.murray > resolution: -> invalid > stage: -> committed/rejected > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:29:05 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 04 Dec 2012 20:29:05 +0000 Subject: [issue16609] float loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354652945.57.0.215501410396.issue16609@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I agree with Mark here. This isn't specific to random.random() and it's already covered elsewhere in the documentation. Furthermore, I don't know why you're using str() on random.random(). There are better ways to get random strings, such as random.getrandbits() or os.urandom(). Recommend closing. ---------- nosy: +pitrou resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:33:40 2012 From: report at bugs.python.org (Cal Leeming) Date: Tue, 04 Dec 2012 20:33:40 +0000 Subject: [issue16609] float loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354653220.51.0.743034073591.issue16609@psf.upfronthosting.co.za> Cal Leeming added the comment: Actually, you do have a good point, this should have been using random.getrandbits really. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:34:10 2012 From: report at bugs.python.org (Campbell Barton) Date: Tue, 04 Dec 2012 20:34:10 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess In-Reply-To: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> Message-ID: <1354653250.81.0.997307818969.issue16123@psf.upfronthosting.co.za> Campbell Barton added the comment: Hi, I just found a use for this feature, with `use_subprocess` being optional its possible to load idle into a running python session. -- import idlelib import idlelib.PyShell idlelib.PyShell.main() -- This allows you to load idle inside an application that embeds python, is there some other way to do this without this option? ---------- nosy: +ideasman42 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:37:58 2012 From: report at bugs.python.org (Cal Leeming) Date: Tue, 04 Dec 2012 20:37:58 +0000 Subject: [issue16609] float loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354653478.56.0.53510586157.issue16609@psf.upfronthosting.co.za> Changes by Cal Leeming : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:42:00 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 04 Dec 2012 20:42:00 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <3YGFP401QGzNf3@mail.python.org> Roundup Robot added the comment: New changeset ed0ff4b3d1c4 by Victor Stinner in branch 'default': Issue #16444: test more bytes in support.TESTFN_UNDECODABLE to support more Windows code pages http://hg.python.org/cpython/rev/ed0ff4b3d1c4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:46:38 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 04 Dec 2012 20:46:38 +0000 Subject: [issue16610] Silent StopIteration exc when raised from generator inside of another generator In-Reply-To: <1354650360.2.0.9530636235.issue16610@psf.upfronthosting.co.za> Message-ID: <1354653998.82.0.372295967268.issue16610@psf.upfronthosting.co.za> R. David Murray added the comment: The only way I was able to replicate that result was by removing the entire try/except block, including the yield. In that case, wrap is no longer a generator, so the exception is raised before you enter the for loop. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:50:24 2012 From: report at bugs.python.org (John Dennis) Date: Tue, 04 Dec 2012 20:50:24 +0000 Subject: [issue16611] multiple problems with Cookie.py Message-ID: <1354654224.49.0.677339520856.issue16611@psf.upfronthosting.co.za> New submission from John Dennis: There are multiple problems with Cookie.py. Some of the issues are covered in http://bugs.python.org/issue3073 which is still open (after 4.5 years). In all honesty the API and the implementation are not great perhaps the best thing would be to remove it from the core libraries, however you can't remove a core library. There is cookielib.py is which is pretty good however cookielib.py is tightly coupled to urllib2 and if you're not using urllib2 you can't use cookielib.py so you're stuck using Cookie.py which means the best thing is to get the bugs in Cookie.py fixed. Of the problems illustrated in the attached unittest (test_cookie.py) the absolute must fix issues are the inability to parse an Expires attribute and the impossibility of testing the HttpOnly & Secure flags for a truth value after parsing. Those are critical because it makes using Cookie.py impossible. The other errors would be nice to get fixed, but not as critical. Next in importance would be respecting the truth value when setting the HttpOnly & Secure flags. Failing to detect an improperly formatted cookie when parsing is the least important because hopefully you won't have improperly formatted cookies (unfortunately a weak assumption) Note: the HttpOnly and Secure issues are symmetrical, they both suffer the same problems because they're both boolean flags whose True value is asserted by the flag's presence and it's False value by it's absence. Cookie parsing problems: * Cannot read a properly formatted Expires attribute (see also issue 3073) * Impossible to determine state of HttpOnly boolean flag after parsing * Impossible to determine state of Secure boolean flag after parsing * Fails to raise any errors when parsing invalid cookie strings Cookie creation/initialization problems: * Setting HttpOnly flag to a value which evaluates to False results in the flag being set to True (there is no check whatsoever on the value). * Setting Secure flag to a value which evaluates to False results in the flag being set to True (there is no check whatsoever on the value). Attached is a unittest illustrating the problems (more details are in the unittest). python test_cookie.py FF.FFFFFF...F ---------------------------------------------------------------------- Ran 13 tests in 0.003s FAILED (failures=9) ---------- components: Library (Lib) files: test_cookie.py messages: 176957 nosy: jdennis priority: normal severity: normal status: open title: multiple problems with Cookie.py versions: Python 2.7 Added file: http://bugs.python.org/file28208/test_cookie.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 21:53:30 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 04 Dec 2012 20:53:30 +0000 Subject: [issue16444] Use support.TESTFN_UNDECODABLE on UNIX In-Reply-To: <1352415134.41.0.932872803675.issue16444@psf.upfronthosting.co.za> Message-ID: <1354654410.21.0.796317063819.issue16444@psf.upfronthosting.co.za> STINNER Victor added the comment: Ooook, all remaining issues about undecodable bytes should now be fixed (until someone opens a new one? :-)) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 22:01:37 2012 From: report at bugs.python.org (Stepan Wagner) Date: Tue, 04 Dec 2012 21:01:37 +0000 Subject: [issue16610] Silent StopIteration exc when raised from generator inside of another generator In-Reply-To: <1354653998.82.0.372295967268.issue16610@psf.upfronthosting.co.za> Message-ID: Stepan Wagner added the comment: Thank you, I wasn't paying attention enough. It works as you describe. On Tue, Dec 4, 2012 at 9:46 PM, R. David Murray wrote: > > R. David Murray added the comment: > > The only way I was able to replicate that result was by removing the > entire try/except block, including the yield. In that case, wrap is no > longer a generator, so the exception is raised before you enter the for > loop. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 22:12:14 2012 From: report at bugs.python.org (myreallycoolname) Date: Tue, 04 Dec 2012 21:12:14 +0000 Subject: [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <20121204211211.55680@gmx.com> myreallycoolname added the comment: Sorry about that. You will unfortunatly have to wait as I'm not on a computer that has python installed currently. > ----- Original Message ----- > From: Daniel Urban > Sent: 12/04/12 02:00 PM > To: doark at mail.com > Subject: [issue16607] Bad examples in documentation > > Daniel Urban added the comment: > > Could you please point to a specific example which is incorrect? Thank you. > > ---------- > nosy: +daniel.urban > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 22:17:00 2012 From: report at bugs.python.org (myreallycoolname) Date: Tue, 04 Dec 2012 21:17:00 +0000 Subject: [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <20121204211658.55680@gmx.com> myreallycoolname added the comment: I'm no expert so I'm not sure which it is but try these: >>> class Complex: ... def __init__(self, realpart, imagpart): ... self.r = realpart ... self.i = imagpart ... class Bag: def __init__(self): self.data = [] def add(self, x): self.data.append(x) def addtwice(self, x): self.add(x) self.add(x) If that's not it wait and I'll submit a new and better bug report or add to the existing one. > ----- Original Message ----- > From: myreallycoolname > Sent: 12/04/12 04:12 PM > To: doark at mail.com > Subject: [issue16607] Bad examples in documentation > > myreallycoolname added the comment: > > Sorry about that. You will unfortunatly have to wait as I'm not on a computer that has python installed currently. > > > ----- Original Message ----- > > From: Daniel Urban > > Sent: 12/04/12 02:00 PM > > To: doark at mail.com > > Subject: [issue16607] Bad examples in documentation > > > > Daniel Urban added the comment: > > > > Could you please point to a specific example which is incorrect? Thank you. > > > > ---------- > > nosy: +daniel.urban > > > > _______________________________________ > > Python tracker > > > > _______________________________________ > > > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 23:08:09 2012 From: report at bugs.python.org (Daniel Urban) Date: Tue, 04 Dec 2012 22:08:09 +0000 Subject: [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1354658889.34.0.935999932064.issue16607@psf.upfronthosting.co.za> Daniel Urban added the comment: Both work fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 23:18:57 2012 From: report at bugs.python.org (Larry Hastings) Date: Tue, 04 Dec 2012 22:18:57 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk Message-ID: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> New submission from Larry Hastings: This bug tracker entry is to track adding "Argument Clinic" to CPython trunk. Please see http://mail.python.org/pipermail/python-dev/2012-December/122920.html for more information. ---------- assignee: larry components: Interpreter Core messages: 176965 nosy: larry priority: normal severity: normal stage: needs patch status: open title: Integrate "Argument Clinic" specialized preprocessor into CPython trunk type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 23:25:38 2012 From: report at bugs.python.org (Glenn Linderman) Date: Tue, 04 Dec 2012 22:25:38 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354659938.58.0.27131510654.issue16612@psf.upfronthosting.co.za> Changes by Glenn Linderman : ---------- nosy: +v+python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 23:28:44 2012 From: report at bugs.python.org (Dave Malcolm) Date: Tue, 04 Dec 2012 22:28:44 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354660124.75.0.277008793897.issue16612@psf.upfronthosting.co.za> Changes by Dave Malcolm : ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 23:32:00 2012 From: report at bugs.python.org (Alex Gaynor) Date: Tue, 04 Dec 2012 22:32:00 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354660320.28.0.35647570171.issue16612@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 23:34:50 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 04 Dec 2012 22:34:50 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354660490.52.0.406060914189.issue16612@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 4 23:35:48 2012 From: report at bugs.python.org (=?utf-8?q?Andreas_St=C3=BChrk?=) Date: Tue, 04 Dec 2012 22:35:48 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354660548.4.0.380198137737.issue16612@psf.upfronthosting.co.za> Changes by Andreas St?hrk : ---------- nosy: +Trundle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 00:40:14 2012 From: report at bugs.python.org (Eric V. Smith) Date: Tue, 04 Dec 2012 23:40:14 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354664414.26.0.210248463606.issue16612@psf.upfronthosting.co.za> Changes by Eric V. Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 01:13:53 2012 From: report at bugs.python.org (Jeremy Kloth) Date: Wed, 05 Dec 2012 00:13:53 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354666433.34.0.177594144154.issue16612@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 01:24:47 2012 From: report at bugs.python.org (Eitan Adler) Date: Wed, 05 Dec 2012 00:24:47 +0000 Subject: [issue16605] test_posix.test_fs_holes() fails on FreeBSD 9.0 In-Reply-To: <1354610957.0.0.869745259261.issue16605@psf.upfronthosting.co.za> Message-ID: <1354667087.17.0.663007150047.issue16605@psf.upfronthosting.co.za> Changes by Eitan Adler : ---------- nosy: +eadler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 02:14:37 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 05 Dec 2012 01:14:37 +0000 Subject: [issue8713] multiprocessing needs option to eschew fork() under Linux In-Reply-To: <1273853591.12.0.245920632829.issue8713@psf.upfronthosting.co.za> Message-ID: <1354670077.08.0.700555780201.issue8713@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 02:17:51 2012 From: report at bugs.python.org (Daniel Swanson) Date: Wed, 05 Dec 2012 01:17:51 +0000 Subject: [issue15346] Tkinter extention modules have no documentation In-Reply-To: <1342198047.2.0.619885102312.issue15346@psf.upfronthosting.co.za> Message-ID: <1354670271.91.0.646315628324.issue15346@psf.upfronthosting.co.za> Daniel Swanson added the comment: We could at least put links to some documentation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 03:29:27 2012 From: report at bugs.python.org (Roger Serwy) Date: Wed, 05 Dec 2012 02:29:27 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess In-Reply-To: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> Message-ID: <1354674567.39.0.103510494205.issue16123@psf.upfronthosting.co.za> Roger Serwy added the comment: Campbell, your example runs IDLE *with* a subprocess. The "use_subprocess" flag defaults to True. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 07:31:55 2012 From: report at bugs.python.org (Campbell Barton) Date: Wed, 05 Dec 2012 06:31:55 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess In-Reply-To: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> Message-ID: <1354689115.11.0.629846804766.issue16123@psf.upfronthosting.co.za> Campbell Barton added the comment: @Roger, I should have mentioned I had to add "-n" to the argv so subprocess would be disabled. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 08:31:35 2012 From: report at bugs.python.org (Daniel Urban) Date: Wed, 05 Dec 2012 07:31:35 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354692695.92.0.655317082624.issue16612@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +daniel.urban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 08:52:15 2012 From: report at bugs.python.org (Christian Schubert) Date: Wed, 05 Dec 2012 07:52:15 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1354693934.99.0.817877042374.issue8865@psf.upfronthosting.co.za> Christian Schubert added the comment: What's a proper test for this? Testing, that the (now expected) exception occurs when invoking poll concurrently? Or rather, that the race condition does not occur? Last time I checked, pypy handled the concurrent poll invocation well, so it would fail both tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 08:52:40 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 05 Dec 2012 07:52:40 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354693960.2.0.939207218029.issue16612@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 08:53:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Dec 2012 07:53:12 +0000 Subject: [issue15627] Add a method to importlib.abc.SourceLoader for converting source to a code object In-Reply-To: <1344732276.83.0.543554641885.issue15627@psf.upfronthosting.co.za> Message-ID: <3YGXHW3s6XzQQ9@mail.python.org> Roundup Robot added the comment: New changeset 7caab48f171e by Eric Snow in branch 'default': Issue #15627: This is simply an update to the name of a new method recently added http://hg.python.org/cpython/rev/7caab48f171e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:25:37 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 05 Dec 2012 08:25:37 +0000 Subject: [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1354695937.41.0.555817688988.issue16581@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Are there any comments on the patch from the PEP 1 authors? PEP 1 says that I should assign this to one of the PEP authors. Any takers, or is this something I can commit on the authors' behalf? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:29:09 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 08:29:09 +0000 Subject: [issue16123] IDLE - deprecate running without a subprocess In-Reply-To: <1349302429.82.0.0807471180715.issue16123@psf.upfronthosting.co.za> Message-ID: <1354696149.62.0.5759421271.issue16123@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I think that usage is not officially supported, so we cannot grant this way will work forever. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 09:54:15 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 08:54:15 +0000 Subject: [issue15346] Tkinter extention modules have no documentation In-Reply-To: <1342198047.2.0.619885102312.issue15346@psf.upfronthosting.co.za> Message-ID: <1354697655.48.0.682389680112.issue15346@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Patch is welcome! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 10:13:11 2012 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 05 Dec 2012 09:13:11 +0000 Subject: [issue16613] ChainMap.new_child could use improvement Message-ID: <1354698791.22.0.0978748363163.issue16613@psf.upfronthosting.co.za> New submission from Vinay Sajip: ChainMap.new_child could IMO be improved through allowing an optional dict to be passed, which is used to create the child. The use case is that you sometimes need to temporarily push a new non-empty mapping in front of an existing chain. This could be achieved by changing new_child to the following, which is backwards-compatible: def new_child(self, d=None): 'New ChainMap with a new dict followed by all previous maps.' return self.__class__(d or {}, *self.maps) ---------- components: Library (Lib) messages: 176974 nosy: rhettinger, vinay.sajip priority: normal severity: normal status: open title: ChainMap.new_child could use improvement type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:52:50 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 10:52:50 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354704770.49.0.0387304599433.issue16612@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:53:52 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 10:53:52 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1354704832.84.0.121535562108.issue8865@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 11:58:42 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 10:58:42 +0000 Subject: [issue12268] file readline, readlines & readall methods can lose data on EINTR In-Reply-To: <1307306343.57.0.342192724444.issue12268@psf.upfronthosting.co.za> Message-ID: <1354705122.62.0.62148987674.issue12268@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:00:24 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 11:00:24 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> Message-ID: <1354705224.53.0.857803613168.issue16602@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:07:36 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 11:07:36 +0000 Subject: [issue14913] tokenize the source to manage Pdb breakpoints In-Reply-To: <1337946553.88.0.954704249232.issue14913@psf.upfronthosting.co.za> Message-ID: <1354705656.5.0.891864810772.issue14913@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:07:49 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 11:07:49 +0000 Subject: [issue14728] trace function not set, causing some Pdb commands to fail In-Reply-To: <1336214625.48.0.950841547459.issue14728@psf.upfronthosting.co.za> Message-ID: <1354705669.88.0.373211784737.issue14728@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:08:05 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 11:08:05 +0000 Subject: [issue14743] on terminating, Pdb debugs itself In-Reply-To: <1336420111.44.0.550150061213.issue14743@psf.upfronthosting.co.za> Message-ID: <1354705685.05.0.764807691124.issue14743@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:08:21 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 11:08:21 +0000 Subject: [issue16180] cannot quit pdb when there is a syntax error in the debuggee (must kill it) In-Reply-To: <1349811204.12.0.797224741983.issue16180@psf.upfronthosting.co.za> Message-ID: <1354705701.42.0.627049251602.issue16180@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:08:35 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 11:08:35 +0000 Subject: [issue13044] pdb throws AttributeError at end of debugging session In-Reply-To: <1316968582.76.0.94343164649.issue13044@psf.upfronthosting.co.za> Message-ID: <1354705715.89.0.626713268492.issue13044@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:08:45 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 11:08:45 +0000 Subject: [issue14912] Pdb does not stop at a breakpoint after a restart command and source changes In-Reply-To: <1337945757.27.0.114974346451.issue14912@psf.upfronthosting.co.za> Message-ID: <1354705725.23.0.671444300021.issue14912@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:08:51 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 11:08:51 +0000 Subject: [issue16482] pdb.set_trace() clobbering traceback on error In-Reply-To: <1353002125.56.0.265106335805.issue16482@psf.upfronthosting.co.za> Message-ID: <1354705731.97.0.801888088123.issue16482@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:09:20 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 11:09:20 +0000 Subject: [issue9633] pdb go stack up/down In-Reply-To: <1282133837.82.0.171010459939.issue9633@psf.upfronthosting.co.za> Message-ID: <1354705760.37.0.514980308303.issue9633@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:37:03 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 05 Dec 2012 11:37:03 +0000 Subject: [issue16605] test_posix.test_fs_holes() fails on FreeBSD 9.0 In-Reply-To: <1354610957.0.0.869745259261.issue16605@psf.upfronthosting.co.za> Message-ID: <1354707423.5.0.0211393004814.issue16605@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: FreeBSD Buildbot has been updated to 9.1, and the issue is solved. This was clearly a 9.0 kernel bug. Closing bug as "Invalid". Thanks for triaging this, Koobs. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:37:16 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 05 Dec 2012 11:37:16 +0000 Subject: [issue16605] test_posix.test_fs_holes() fails on FreeBSD 9.0 In-Reply-To: <1354610957.0.0.869745259261.issue16605@psf.upfronthosting.co.za> Message-ID: <1354707436.0.0.442388803573.issue16605@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:38:02 2012 From: report at bugs.python.org (koobs) Date: Wed, 05 Dec 2012 11:38:02 +0000 Subject: [issue16605] test_posix.test_fs_holes() fails on FreeBSD 9.0 In-Reply-To: <1354610957.0.0.869745259261.issue16605@psf.upfronthosting.co.za> Message-ID: <1354707482.31.0.28286267733.issue16605@psf.upfronthosting.co.za> koobs added the comment: I have just upgraded the buildbot host to FreeBSD 9.1-RELEASE and cannot see failures in the 3.x and 3.3 branches over the last couple of builds. I have been unable to isolate the commit that fixed it, but the relevant revision log is here if anybody wants to cast an eye over it for confirmation http://svnweb.freebsd.org/base/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_vnops.c?view=log ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 12:56:45 2012 From: report at bugs.python.org (Stefan Krah) Date: Wed, 05 Dec 2012 11:56:45 +0000 Subject: [issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread In-Reply-To: <1317935848.16.0.589862913408.issue13120@psf.upfronthosting.co.za> Message-ID: <1354708605.84.0.508280459755.issue13120@psf.upfronthosting.co.za> Stefan Krah added the comment: I think this commit broke the --without-threads buildbot: http://buildbot.python.org/all/builders/AMD64%20Fedora%20without%20threads%203.x/builds/3581/steps/test/logs/stdio ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 13:15:26 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 05 Dec 2012 12:15:26 +0000 Subject: [issue15745] Numerous utime ns tests fail on FreeBSD w/ ZFS (update: and NetBSD w/ FFS, Solaris w/ UFS) In-Reply-To: <1345515355.02.0.72747216818.issue15745@psf.upfronthosting.co.za> Message-ID: <1354709726.93.0.392704000369.issue15745@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 13:36:58 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 05 Dec 2012 12:36:58 +0000 Subject: [issue16287] Sporadic test_utime() failures on Solaris In-Reply-To: <1350652599.36.0.707342371082.issue16287@psf.upfronthosting.co.za> Message-ID: <1354711018.96.0.0705836755785.issue16287@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Doing "./python Lib/test/regrtest.py test_os" for current "default" in Solaris 10 Update 10, I don't see any test failure. I have run it 10.000 times. I can't reproduce this. What Solaris 10 version are you using, Trent? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 13:41:09 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 12:41:09 +0000 Subject: [issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread In-Reply-To: <1317935848.16.0.589862913408.issue13120@psf.upfronthosting.co.za> Message-ID: <1354711269.43.0.971758267347.issue13120@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Will take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:07:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Dec 2012 13:07:20 +0000 Subject: [issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread In-Reply-To: <1317935848.16.0.589862913408.issue13120@psf.upfronthosting.co.za> Message-ID: <3YGgFz5YVhzQNn@mail.python.org> Roundup Robot added the comment: New changeset 26056f8a0afe by Andrew Svetlov in branch '3.2': Skip pdb test for #13120 if threading is not available. http://hg.python.org/cpython/rev/26056f8a0afe New changeset 328a8824c1a7 by Andrew Svetlov in branch '3.3': Merge: skip pdb test for #13120 if threading is not available. http://hg.python.org/cpython/rev/328a8824c1a7 New changeset 4cb84c0fbee2 by Andrew Svetlov in branch 'default': Merge: skip pdb test for #13120 if threading is not available. http://hg.python.org/cpython/rev/4cb84c0fbee2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:24:24 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 05 Dec 2012 13:24:24 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354713864.71.0.525181004318.issue16612@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:28:07 2012 From: report at bugs.python.org (Michael Edwards) Date: Wed, 05 Dec 2012 13:28:07 +0000 Subject: [issue16614] argparse accepts partial parameters Message-ID: <1354714087.56.0.314171831729.issue16614@psf.upfronthosting.co.za> New submission from Michael Edwards: When running parse_args, ArgumentParser is liberal in accepting parameters. Partial matches will be accepted as arguments (in the included example, --test bob, --tester bob, --testers bob all set the testers argument) Perhaps this is documented, but it was super unexpected for me. ---------- components: Library (Lib) files: test.py messages: 176981 nosy: Michael.Edwards priority: normal severity: normal status: open title: argparse accepts partial parameters versions: Python 2.7 Added file: http://bugs.python.org/file28209/test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:39:38 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 05 Dec 2012 13:39:38 +0000 Subject: [issue16588] gcc 4.7 unused-but-set warnings on Python/thread_pthread.h In-Reply-To: <1354329698.56.0.368664055406.issue16588@psf.upfronthosting.co.za> Message-ID: <1354714778.74.0.949838841333.issue16588@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- resolution: fixed -> stage: committed/rejected -> patch review status: closed -> open type: compile error -> versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:40:29 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 05 Dec 2012 13:40:29 +0000 Subject: [issue16588] gcc 4.7 unused-but-set warnings on Python/thread_pthread.h In-Reply-To: <1354329698.56.0.368664055406.issue16588@psf.upfronthosting.co.za> Message-ID: <1354714829.58.0.883748558371.issue16588@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: -> compile error _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:42:18 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 05 Dec 2012 13:42:18 +0000 Subject: [issue16588] gcc 4.7 unused-but-set warnings on Python/thread_pthread.h In-Reply-To: <1354329698.56.0.368664055406.issue16588@psf.upfronthosting.co.za> Message-ID: <3YGh2K4d1pzQQ1@mail.python.org> Roundup Robot added the comment: New changeset 0adfbafe8a99 by Jesus Cea in branch '2.7': Closes #16588: Silence unused-but-set warnings in Python/thread_pthread.h http://hg.python.org/cpython/rev/0adfbafe8a99 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:43:13 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 13:43:13 +0000 Subject: [issue13120] Default nosigint option to pdb.Pdb() prevents use in non-main thread In-Reply-To: <1317935848.16.0.589862913408.issue13120@psf.upfronthosting.co.za> Message-ID: <1354714993.73.0.763329374562.issue13120@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Failed test is skipped if there are no threads. Thanks for report, Stefan! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:45:09 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 05 Dec 2012 13:45:09 +0000 Subject: [issue16615] gcc 4.7 unused-but-set warnings Message-ID: <1354715109.8.0.920033612812.issue16615@psf.upfronthosting.co.za> New submission from Jes?s Cea Avi?n: GCC 4.7 is showing some compilation warning about setting variables never read. ---------- assignee: jcea messages: 176984 nosy: jcea priority: normal severity: normal status: open title: gcc 4.7 unused-but-set warnings type: compile error versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:45:39 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 05 Dec 2012 13:45:39 +0000 Subject: [issue16615] gcc 4.7 unused-but-set warnings In-Reply-To: <1354715109.8.0.920033612812.issue16615@psf.upfronthosting.co.za> Message-ID: <1354715139.19.0.386777179164.issue16615@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Spin-off of Issue #16588. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:48:48 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Dec 2012 13:48:48 +0000 Subject: [issue16614] argparse should have an option to require un-abbreviated option names In-Reply-To: <1354714087.56.0.314171831729.issue16614@psf.upfronthosting.co.za> Message-ID: <1354715328.13.0.0585320761743.issue16614@psf.upfronthosting.co.za> R. David Murray added the comment: It is both documented (http://docs.python.org/dev/library/argparse.html#argument-abbreviations) and an important feature. I thought there was an enhancement request in this tracker for making the behavior optional, but I couldn't find it when I looked, so I'm turning this into one. If someone finds that there is already another issue this one can be closed as a dup. I'm marking it low priority, though, because I think most people want the ability to abbreviate the option names. ---------- keywords: +easy nosy: +bethard, r.david.murray priority: normal -> low stage: -> needs patch title: argparse accepts partial parameters -> argparse should have an option to require un-abbreviated option names type: -> enhancement versions: +Python 3.4 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:53:48 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 05 Dec 2012 13:53:48 +0000 Subject: [issue13328] pdb shows code from wrong module In-Reply-To: <1320278597.67.0.4589054929.issue13328@psf.upfronthosting.co.za> Message-ID: <1354715628.7.0.603186816457.issue13328@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 14:54:53 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 05 Dec 2012 13:54:53 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1354715693.7.0.277851115373.issue16596@psf.upfronthosting.co.za> Changes by Xavier de Gaye : ---------- nosy: +xdegaye _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:21:02 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 05 Dec 2012 14:21:02 +0000 Subject: [issue16615] gcc 4.7 unused-but-set warnings In-Reply-To: <1354715109.8.0.920033612812.issue16615@psf.upfronthosting.co.za> Message-ID: <1354717262.5.0.531132583348.issue16615@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- assignee: jcea -> nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:33:18 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 05 Dec 2012 14:33:18 +0000 Subject: [issue13044] pdb throws AttributeError at end of debugging session In-Reply-To: <1316968582.76.0.94343164649.issue13044@psf.upfronthosting.co.za> Message-ID: <1354717998.8.0.830201017822.issue13044@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Do we need to fix it at all? On finalizing pdb can stop working at some time, but debugging on finalization stage can be still useful in certain cases. Xavier, your proposition noticeably changes current behavior as I understand it. For now set_trace() works as breakpoint set up by program, you can go out of debugged function and it's very convenient from my perspective. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 15:58:42 2012 From: report at bugs.python.org (=?utf-8?q?Pekka_Kl=C3=A4rck?=) Date: Wed, 05 Dec 2012 14:58:42 +0000 Subject: [issue1209447] os.path.join() fails if 2nd arg is a UNC path Message-ID: <1354719522.15.0.0579197901119.issue1209447@psf.upfronthosting.co.za> Pekka Kl?rck added the comment: It seems that joining UNC path to a directory root fails: Python 2.7.3 (default, Sep 26 2012, 21:51:14) [GCC 4.7.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from ntpath import join >>> join('c:\\', '\\\\server\\mount\\dir') 'c:\\\\server\\mount\\dir' When the first argument contains also something else everything works fine: >>> join('c:\\dir', '\\\\server\\mount\\dir') '\\\\server\\mount\\dir' I would say this is a bug. Obviously fixing this changes behavior, but I have hard time believing that anyone relies on the current buggy output. On the other hand, I was today reported a bug in my software that was caused by this. Funny thing was that the bug was in code that was added as a workaround for issue #3426 (i.e. use `join(os.getcwdu(), path)` instead of `abspath(path)` when path is Unicode). Luckily adding another workaround for this issue is pretty easy. ---------- nosy: +pekka.klarck _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:25:28 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 05 Dec 2012 16:25:28 +0000 Subject: [issue16616] test_poll.PollTests.poll_unit_tests() is dead code Message-ID: <1354724728.62.0.359623055954.issue16616@psf.upfronthosting.co.za> New submission from Richard Oudkerk: PollTests.poll_unit_tests() is not run because its method name does not begin with "test". It looks it was accidentally disabled when test_poll() was converted to unittest in f56b25168142. Renaming it test_poll_unit_tests() makes it run successfully (at least under Linux). Is it sufficient to reenable it only for the 3.4 branch? ---------- components: Tests messages: 176989 nosy: georg.brandl, sbt priority: normal severity: normal stage: needs patch status: open title: test_poll.PollTests.poll_unit_tests() is dead code versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 17:42:00 2012 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 05 Dec 2012 16:42:00 +0000 Subject: [issue15516] exception-handling bug in PyString_Format In-Reply-To: <1343764780.71.0.604975878578.issue15516@psf.upfronthosting.co.za> Message-ID: <1354725720.66.0.274898266724.issue15516@psf.upfronthosting.co.za> Changes by Dave Malcolm : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:05:26 2012 From: report at bugs.python.org (Vladimir Kotulskiy) Date: Wed, 05 Dec 2012 17:05:26 +0000 Subject: [issue16617] mimetypes.py UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128) Message-ID: <1354727126.64.0.779112456141.issue16617@psf.upfronthosting.co.za> New submission from Vladimir Kotulskiy: File "C:\DevTools\Python27\lib\mimetypes.py", line 355, in init db.read_windows_registry() File "C:\DevTools\Python27\lib\mimetypes.py", line 259, in read_windows_registry for ctype in enum_types(mimedb): File "C:\DevTools\Python27\lib\mimetypes.py", line 249, 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) ---------- components: Unicode, Windows files: mimetypes.patch keywords: patch messages: 176990 nosy: Vladimir.Kotulskiy, ezio.melotti priority: normal severity: normal status: open title: mimetypes.py UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128) type: crash versions: Python 2.7 Added file: http://bugs.python.org/file28210/mimetypes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:09:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2012 17:09:02 +0000 Subject: [issue16618] Different glob() results for strings and bytes Message-ID: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: glob ignores names which starts with dot if pattern is not starts with dot. But this is wrong for bytes pattern in Python 3. >>> import glob >>> glob.glob('*hg') [] >>> glob.glob(b'*hg') [b'.hg'] The proposed patch fixes this inconsistency. Also it contains new tests for this and some other possible cases. ---------- components: Library (Lib) files: glob_dotfiles.patch keywords: patch messages: 176991 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Different glob() results for strings and bytes type: behavior versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28211/glob_dotfiles.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:20:58 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 05 Dec 2012 17:20:58 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> Message-ID: <1354728057.99.0.713571337641.issue16602@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:22:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2012 17:22:38 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> Message-ID: <1354728158.12.0.30950440332.issue16618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Python 2.7 is not needed the fix, however additional tests can be useful. Here is a patch. ---------- components: +Tests versions: +Python 2.7 Added file: http://bugs.python.org/file28212/glob_tests-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:22:56 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 05 Dec 2012 17:22:56 +0000 Subject: [issue13044] pdb throws AttributeError at end of debugging session In-Reply-To: <1316968582.76.0.94343164649.issue13044@psf.upfronthosting.co.za> Message-ID: <1354728176.18.0.264894260866.issue13044@psf.upfronthosting.co.za> Xavier de Gaye added the comment: > On finalizing pdb can stop working at some time, but debugging on > finalization stage can be still useful in certain cases. Agreed that debugging on finalization stage is useful. Debugging on finalization stage does not seem to work though: =============================== class C: def __del__(self): print('deleted') c = C() import pdb; pdb.set_trace() x = 1 =============================== $ python3 bar.py > /tmp/bar.py(7)() -> x = 1 (Pdb) step --Return-- > /tmp/bar.py(7)()->None -> x = 1 (Pdb) step deleted $ =============================== Maybe this is another issue. > Xavier, your proposition noticeably changes current behavior as I understand > it. For now set_trace() works as breakpoint set up by program, you can go > out of debugged function and it's very convenient from my perspective. This proposition only sets the global trace function to None on returning from the bottom frame, i.e. the oldest frame in the stack. So you can still use set_trace() as a hard-coded breakpoint and continue the debugging session out of the debugged function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:23:19 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 05 Dec 2012 17:23:19 +0000 Subject: [issue16617] mimetypes.py UnicodeDecodeError: 'ascii' codec can't decode byte 0xe0 in position 0: ordinal not in range(128) In-Reply-To: <1354727126.64.0.779112456141.issue16617@psf.upfronthosting.co.za> Message-ID: <1354728199.78.0.430256458189.issue16617@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: This is a duplicate of issue9291. ---------- nosy: +amaury.forgeotdarc resolution: -> duplicate status: open -> closed superseder: -> mimetypes initialization fails on Windows because of non-Latin characters in registry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:49:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 05 Dec 2012 17:49:49 +0000 Subject: [issue16614] argparse should have an option to require un-abbreviated option names In-Reply-To: <1354714087.56.0.314171831729.issue16614@psf.upfronthosting.co.za> Message-ID: <1354729789.73.0.572309167293.issue16614@psf.upfronthosting.co.za> Chris Jerdonek added the comment: David, is issue 14910 the one you were thinking of? ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 18:51:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2012 17:51:49 +0000 Subject: [issue13968] Support recursive globs In-Reply-To: <1328700146.65.0.884103301197.issue13968@psf.upfronthosting.co.za> Message-ID: <1354729909.55.0.604376057293.issue13968@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which implements recursive globbing which conforms to Bash globbing with "globstar" option. For backward compatibility recursive globbing off by default and works only if new argument "recursive" is true (default is False). I am not sure this is a better variant. Possible the default should be True. '**' pattern is very unlikely in old code. However recursive globbing on arbitrary pattern and arbitrary tree is not safe, it can hang on recursive symlinks. The patch contains changes from issue16618. ---------- dependencies: +Different glob() results for strings and bytes nosy: +loewis Added file: http://bugs.python.org/file28213/glob_recursive.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 19:20:16 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 05 Dec 2012 18:20:16 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> Message-ID: <1354731616.52.0.614226725273.issue16618@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 19:45:11 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Dec 2012 18:45:11 +0000 Subject: [issue14910] argparse: disable abbreviation In-Reply-To: <1337943742.57.0.897347214609.issue14910@psf.upfronthosting.co.za> Message-ID: <1354733111.47.0.600823439118.issue14910@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +Michael.Edwards _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 19:45:51 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 05 Dec 2012 18:45:51 +0000 Subject: [issue16614] argparse should have an option to require un-abbreviated option names In-Reply-To: <1354714087.56.0.314171831729.issue16614@psf.upfronthosting.co.za> Message-ID: <1354733151.4.0.599563008683.issue16614@psf.upfronthosting.co.za> R. David Murray added the comment: It is indeed. And it even has a patch. Don't know how I missed it. ---------- resolution: -> duplicate stage: needs patch -> committed/rejected superseder: -> argparse: disable abbreviation _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:19:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2012 19:19:43 +0000 Subject: [issue8865] select.poll is not thread safe In-Reply-To: <1275344415.87.0.130024541357.issue8865@psf.upfronthosting.co.za> Message-ID: <1354735183.06.0.438589521014.issue8865@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Test should check changed behavior. I.e. it should test that calling poll concurrently raises an exception. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:22:41 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 05 Dec 2012 19:22:41 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1354735361.03.0.0123450260002.issue16597@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:28:31 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Wed, 05 Dec 2012 19:28:31 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances Message-ID: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> New submission from Bruno Dupuis: We found some strange behaviour of the compiler in this discussion on python-list: http://mail.python.org/pipermail/python-list/2012-December/636104.html The fact is, `return` and `return None` result in inconsistent bytecode depending on the context. Consider : >>> import dis >>> def f(x): ... return None ... >>> dis.dis(f) 2 0 LOAD_CONST 0 (None) 3 RETURN_VALUE >>> def g(x): ... return None ... print(x) ... >>> dis.dis(g) 2 0 LOAD_GLOBAL 0 (None) 3 RETURN_VALUE 3 4 LOAD_GLOBAL 1 (print) 7 LOAD_FAST 0 (x) 10 CALL_FUNCTION 1 (1 positional, 0 keyword pair) 13 POP_TOP `return None` statement results in LOAD_GLOBAL 0 if there is some unreachable code after it. I first saw that as an optimization issue, but Ian Kelly's message http://mail.python.org/pipermail/python-list/2012-December/636117.html gives an extensive analysis and some examples: """ I think this should even be considered a bug, not just a missing optimization. Consider: >>> globals()['None'] = 42 >>> def f(x): ... return None ... print(x) ... >>> f('test') 42 The use of the LOAD_GLOBAL allows None to effectively be reassigned. """ Ian also points out in this message that `return` and `return None` don't result in the same bytecode when followed by trash code. ---------- components: Interpreter Core messages: 176999 nosy: Horpner, bruno.dupuis, ikelly, python-dev, stevenjd priority: normal severity: normal status: open title: LOAD_GLOBAL used to load `None` under certain circumstances versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:31:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2012 19:31:10 +0000 Subject: [issue8402] Add a function to escape metacharacters in glob/fnmatch In-Reply-To: <1271292687.68.0.249436327738.issue8402@psf.upfronthosting.co.za> Message-ID: <1354735870.74.0.104468096594.issue8402@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is good, if stdlib has function for escaping any special characters, even if this function is simple. There are already escape functions for re and sgml/xml/html. Private function glob.glob1 used in Lib/msilib and Tools/msi to prevent unexpected globbing in parent directory name. ``glob.glob1(dirname, pattern)`` should be replaced by ``glob.glob(os.path.join(fnmatch.escape(dirname), pattern)`` in external code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:34:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2012 19:34:09 +0000 Subject: [issue16620] Avoid using private function glob.glob1() in msi module and tools Message-ID: <1354736049.23.0.98660459286.issue16620@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Private function glob.glob1() used in Lib/msilib and Tools/msi to prevent unexpected globbing in parent directory name. ``glob.glob1(dirname, pattern)`` should be replaced by ``glob.glob(os.path.join(fnmatch.escape(dirname), pattern)`` in external code. ---------- components: Demos and Tools, Library (Lib) messages: 177001 nosy: serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Avoid using private function glob.glob1() in msi module and tools type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:35:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2012 19:35:29 +0000 Subject: [issue16620] Avoid using private function glob.glob1() in msi module and tools In-Reply-To: <1354736049.23.0.98660459286.issue16620@psf.upfronthosting.co.za> Message-ID: <1354736128.99.0.558811804755.issue16620@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Add a function to escape metacharacters in glob/fnmatch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:36:59 2012 From: report at bugs.python.org (Carlos Ferreira) Date: Wed, 05 Dec 2012 19:36:59 +0000 Subject: [issue16621] sched module enhancement request Message-ID: <1354736219.44.0.000463218427314.issue16621@psf.upfronthosting.co.za> New submission from Carlos Ferreira: The sched module available in the Python core lacks a simple but very useful which is waiting for new events scheduling. Current version only process events that are present in the queue before the schedule.run() is issued or for events that are schedule while the scheduler is still active and processing events from the queue. I propose a simple enhancement, by using an Event object from the threading module, so that the thread that is running the scheduler, waits for new events scheduling, after finishing processing all queued events. The sched2.py is a modified version of the original sched.py (modified by means of a large hammer), which adds an "alwaysRunning" argument in the object constructor, a self.wakeUpEvent attribute which is the Event Object, a modified eterabs method to call the Event.set() and finally, a modified run() to wait for new events. This modification is just a quick patch in order to pass the idea of what is being requested here. If there is a better way to do this, then it should be taken. ---------- components: Library (Lib) files: sched2.py messages: 177002 nosy: carlosmf.pt priority: normal severity: normal status: open title: sched module enhancement request type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file28214/sched2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:39:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 05 Dec 2012 19:39:55 +0000 Subject: [issue16621] sched module enhancement request In-Reply-To: <1354736219.44.0.000463218427314.issue16621@psf.upfronthosting.co.za> Message-ID: <1354736395.0.0.455987577199.issue16621@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue16165. ---------- nosy: +serhiy.storchaka versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:41:29 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 05 Dec 2012 19:41:29 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: <1321140269.61.0.335726830367.issue13390@psf.upfronthosting.co.za> Message-ID: <1354736489.16.0.793061977787.issue13390@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:42:28 2012 From: report at bugs.python.org (Carlos Ferreira) Date: Wed, 05 Dec 2012 19:42:28 +0000 Subject: [issue16621] sched module enhancement request In-Reply-To: <1354736219.44.0.000463218427314.issue16621@psf.upfronthosting.co.za> Message-ID: <1354736548.38.0.67772456184.issue16621@psf.upfronthosting.co.za> Changes by Carlos Ferreira : Removed file: http://bugs.python.org/file28214/sched2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 20:43:04 2012 From: report at bugs.python.org (Carlos Ferreira) Date: Wed, 05 Dec 2012 19:43:04 +0000 Subject: [issue16621] sched module enhancement request In-Reply-To: <1354736219.44.0.000463218427314.issue16621@psf.upfronthosting.co.za> Message-ID: <1354736584.96.0.642919428539.issue16621@psf.upfronthosting.co.za> Carlos Ferreira added the comment: Sorry, wrong file issued before... ---------- Added file: http://bugs.python.org/file28215/sched2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 21:00:00 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 05 Dec 2012 20:00:00 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: <1321140269.61.0.335726830367.issue13390@psf.upfronthosting.co.za> Message-ID: <1354737600.9.0.017802735459.issue13390@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is an updated patch. test_ctypes still leaks memory blocks with it: $ ./python -m test -R 3:8 test_ctypes [1/1] test_ctypes beginning 11 repetitions 12345678901 ........... test_ctypes leaked [2, 2, 1, 1, 1, 1, 1, 1] memory blocks, sum=10 ---------- nosy: +benjamin.peterson Added file: http://bugs.python.org/file28216/debugblocks5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 21:24:39 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 05 Dec 2012 20:24:39 +0000 Subject: [issue16569] Preventing errors of simultaneous access in zipfile In-Reply-To: <1354112511.94.0.436567820333.issue16569@psf.upfronthosting.co.za> Message-ID: <1354739079.51.0.299652893079.issue16569@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Seek can be very cheap. Anybody could actually measure it??? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 21:38:26 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 05 Dec 2012 20:38:26 +0000 Subject: [issue16601] Restarting iteration over tarfile continues from where it left off. In-Reply-To: <1354564872.87.0.0661195327337.issue16601@psf.upfronthosting.co.za> Message-ID: <1354739906.59.0.920944343821.issue16601@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 21:45:30 2012 From: report at bugs.python.org (Matthew Barnett) Date: Wed, 05 Dec 2012 20:45:30 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354740330.59.0.161579232833.issue16619@psf.upfronthosting.co.za> Matthew Barnett added the comment: The same problem occurs with both `False` and `True`. ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 21:59:26 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Wed, 05 Dec 2012 20:59:26 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354741166.56.0.334141263558.issue16619@psf.upfronthosting.co.za> Bruno Dupuis added the comment: To me, the whole issue is at line ~ 480 in peehole.c in the LOAD_NAME/LOAD_GLOBAL switch case. This explains the difference between `return` and `return None` as the former is actually compiled to LOAD_CONST. OTOH, `return None` has to pass the optim pass to be changed in LOAD_CONST. The real bug is sometime it doesn't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 22:10:22 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Wed, 05 Dec 2012 21:10:22 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354741822.17.0.698747915639.issue16619@psf.upfronthosting.co.za> Bruno Dupuis added the comment: line 426 in peehole.c : if (codestr[codelen-1] != RETURN_VALUE) goto exitUnchanged; before the optim. I'm quite sure it's here. i patch and see... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 22:11:23 2012 From: report at bugs.python.org (Alex Gaynor) Date: Wed, 05 Dec 2012 21:11:23 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354741883.95.0.230285572876.issue16619@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 22:13:25 2012 From: report at bugs.python.org (Steve OBrien) Date: Wed, 05 Dec 2012 21:13:25 +0000 Subject: [issue16622] IDLE crashes on parentheses Message-ID: <1354742003.92.0.600931221581.issue16622@psf.upfronthosting.co.za> New submission from Steve OBrien: Working in IDLE on Mac OSX 10.8 when I type a parentheses IDLE crashes. Here is the output of the crash report: Process: Python [60507] Path: /Applications/Python 3.3/IDLE.app/Contents/MacOS/Python Identifier: org.python.IDLE Version: 3.3.0 (3.3.0) Code Type: X86-64 (Native) Parent Process: launchd [324] User ID: 493825946 Date/Time: 2012-12-05 13:04:49.616 -0800 OS Version: Mac OS X 10.8.2 (12C60) Report Version: 10 Interval Since Last Report: 112281 sec Crashes Since Last Report: 4 Per-App Interval Since Last Report: 27530 sec Per-App Crashes Since Last Report: 3 Anonymous UUID: 337BE211-7572-210E-6815-99D0FE44035F Crashed Thread: 0 Dispatch queue: com.apple.main-thread Exception Type: EXC_CRASH (SIGABRT) Exception Codes: 0x0000000000000000, 0x0000000000000000 Application Specific Information: *** Terminating app due to uncaught exception 'NSInternalInconsistencyException', reason: 'Error (1000) creating window shape' terminate called throwing an exception abort() called Application Specific Backtrace 1: 0 CoreFoundation 0x00007fff8e7050a6 __exceptionPreprocess + 198 1 libobjc.A.dylib 0x00007fff91e733f0 objc_exception_throw + 43 2 CoreFoundation 0x00007fff8e704e7c +[NSException raise:format:] + 204 3 AppKit 0x00007fff8d7d0eb3 _NXCreateWindowWithStyleMask + 276 4 AppKit 0x00007fff8d86591f _NSCreateWindow + 64 5 AppKit 0x00007fff8d6e14bd -[NSWindow _commonAwake] + 2159 6 AppKit 0x00007fff8d79185b -[NSWindow _makeKeyRegardlessOfVisibility] + 88 7 AppKit 0x00007fff8d7917c5 -[NSWindow makeKeyAndOrderFront:] + 25 8 Tk 0x0000000101410c99 XMapWindow + 156 9 Tk 0x000000010137d3dc Tk_MapWindow + 89 10 Tk 0x00000001013862ea MapFrame + 62 11 Tcl 0x00000001012d8197 TclServiceIdle + 76 12 Tcl 0x00000001012bc5b6 Tcl_DoOneEvent + 329 13 Tk 0x000000010135c8c7 Tk_UpdateObjCmd + 162 14 Tcl 0x0000000101256c76 TclEvalObjvInternal + 782 15 Tcl 0x0000000101257e68 Tcl_EvalObjv + 66 16 _tkinter.so 0x00000001007d75be Tkapp_Call + 190 17 Python 0x00000001000de02e PyEval_EvalFrameEx + 29774 18 Python 0x00000001000dd7cf PyEval_EvalFrameEx + 27631 19 Python 0x00000001000dd7cf PyEval_EvalFrameEx + 27631 20 Python 0x00000001000dd7cf PyEval_EvalFrameEx + 27631 21 Python 0x00000001000df1b8 PyEval_EvalCodeEx + 2296 22 Python 0x000000010003d67a function_call + 186 23 Python 0x000000010000d418 PyObject_Call + 104 24 Python 0x00000001000d9003 PyEval_EvalFrameEx + 9251 25 Python 0x00000001000df1b8 PyEval_EvalCodeEx + 2296 26 Python 0x000000010003d67a function_call + 186 27 Python 0x000000010000d418 PyObject_Call + 104 28 Python 0x00000001000d9003 PyEval_EvalFrameEx + 9251 29 Python 0x00000001000df1b8 PyEval_EvalCodeEx + 2296 30 Python 0x000000010003d67a function_call + 186 31 Python 0x000000010000d418 PyObject_Call + 104 32 Python 0x0000000100027b0a method_call + 138 33 Python 0x000000010000d418 PyObject_Call + 104 34 Python 0x00000001000d5197 PyEval_CallObjectWithKeywords + 87 35 _tkinter.so 0x00000001007d58a8 PythonCmd + 456 36 Tcl 0x000000010125392f TclInvokeStringCommand + 105 37 Tcl 0x0000000101256c76 TclEvalObjvInternal + 782 38 Tcl 0x0000000101290138 TclExecuteByteCode + 4379 39 Tcl 0x0000000101296d8f TclCompEvalObj + 460 40 Tcl 0x000000010125823d TclEvalObjEx + 817 41 Tcl 0x00000001012d8494 AfterProc + 86 42 Tcl 0x00000001012d8391 TimerHandlerEventProc + 104 43 Tcl 0x00000001012bc2b3 Tcl_ServiceEvent + 147 44 Tcl 0x00000001012bc5a7 Tcl_DoOneEvent + 314 45 _tkinter.so 0x00000001007d4e51 Tkapp_MainLoop + 177 46 Python 0x00000001000de02e PyEval_EvalFrameEx + 29774 47 Python 0x00000001000df1b8 PyEval_EvalCodeEx + 2296 48 Python 0x00000001000dd647 PyEval_EvalFrameEx + 27239 49 Python 0x00000001000dd7cf PyEval_EvalFrameEx + 27631 50 Python 0x00000001000df1b8 PyEval_EvalCodeEx + 2296 51 Python 0x00000001000df27f PyEval_EvalCode + 63 52 Python 0x000000010010639b PyRun_FileExFlags + 187 53 Python 0x00000001001066b6 PyRun_SimpleFileExFlags + 598 54 Python 0x000000010011d783 Py_Main + 3203 55 Python 0x0000000100000e0e Python + 3598 56 Python 0x0000000100000c54 Python + 3156 Thread 0 Crashed:: Dispatch queue: com.apple.main-thread 0 libsystem_kernel.dylib 0x00007fff9822b212 __pthread_kill + 10 1 libsystem_c.dylib 0x00007fff8ea53af4 pthread_kill + 90 2 libsystem_c.dylib 0x00007fff8ea97dce abort + 143 3 libc++abi.dylib 0x00007fff9124fa17 abort_message + 257 4 libc++abi.dylib 0x00007fff9124d3c6 default_terminate() + 28 5 libobjc.A.dylib 0x00007fff91e73873 _objc_terminate() + 91 6 libc++abi.dylib 0x00007fff9124d3f5 safe_handler_caller(void (*)()) + 8 7 libc++abi.dylib 0x00007fff9124d450 std::terminate() + 16 8 libc++abi.dylib 0x00007fff9124e5b7 __cxa_throw + 111 9 libobjc.A.dylib 0x00007fff91e7350c objc_exception_throw + 327 10 com.apple.CoreFoundation 0x00007fff8e704e7c +[NSException raise:format:] + 204 11 com.apple.AppKit 0x00007fff8d7d0eb3 _NXCreateWindowWithStyleMask + 276 12 com.apple.AppKit 0x00007fff8d86591f _NSCreateWindow + 64 13 com.apple.AppKit 0x00007fff8d6e14bd -[NSWindow _commonAwake] + 2159 14 com.apple.AppKit 0x00007fff8d79185b -[NSWindow _makeKeyRegardlessOfVisibility] + 88 15 com.apple.AppKit 0x00007fff8d7917c5 -[NSWindow makeKeyAndOrderFront:] + 25 16 Tk 0x0000000101410c99 XMapWindow + 156 17 Tk 0x000000010137d3dc Tk_MapWindow + 89 18 Tk 0x00000001013862ea MapFrame + 62 19 Tcl 0x00000001012d8197 TclServiceIdle + 76 20 Tcl 0x00000001012bc5b6 Tcl_DoOneEvent + 329 21 Tk 0x000000010135c8c7 Tk_UpdateObjCmd + 162 22 Tcl 0x0000000101256c76 TclEvalObjvInternal + 782 23 Tcl 0x0000000101257e68 Tcl_EvalObjv + 66 24 _tkinter.so 0x00000001007d75be Tkapp_Call + 190 25 org.python.python 0x00000001000de02e PyEval_EvalFrameEx + 29774 26 org.python.python 0x00000001000dd7cf PyEval_EvalFrameEx + 27631 27 org.python.python 0x00000001000dd7cf PyEval_EvalFrameEx + 27631 28 org.python.python 0x00000001000dd7cf PyEval_EvalFrameEx + 27631 29 org.python.python 0x00000001000df1b8 PyEval_EvalCodeEx + 2296 30 org.python.python 0x000000010003d67a function_call + 186 31 org.python.python 0x000000010000d418 PyObject_Call + 104 32 org.python.python 0x00000001000d9003 PyEval_EvalFrameEx + 9251 33 org.python.python 0x00000001000df1b8 PyEval_EvalCodeEx + 2296 34 org.python.python 0x000000010003d67a function_call + 186 35 org.python.python 0x000000010000d418 PyObject_Call + 104 36 org.python.python 0x00000001000d9003 PyEval_EvalFrameEx + 9251 37 org.python.python 0x00000001000df1b8 PyEval_EvalCodeEx + 2296 38 org.python.python 0x000000010003d67a function_call + 186 39 org.python.python 0x000000010000d418 PyObject_Call + 104 40 org.python.python 0x0000000100027b0a method_call + 138 41 org.python.python 0x000000010000d418 PyObject_Call + 104 42 org.python.python 0x00000001000d5197 PyEval_CallObjectWithKeywords + 87 43 _tkinter.so 0x00000001007d58a8 PythonCmd + 456 44 Tcl 0x000000010125392f TclInvokeStringCommand + 105 45 Tcl 0x0000000101256c76 TclEvalObjvInternal + 782 46 Tcl 0x0000000101290138 TclExecuteByteCode + 4379 47 Tcl 0x0000000101296d8f TclCompEvalObj + 460 48 Tcl 0x000000010125823d TclEvalObjEx + 817 49 Tcl 0x00000001012d8494 AfterProc + 86 50 Tcl 0x00000001012d8391 TimerHandlerEventProc + 104 51 Tcl 0x00000001012bc2b3 Tcl_ServiceEvent + 147 52 Tcl 0x00000001012bc5a7 Tcl_DoOneEvent + 314 53 _tkinter.so 0x00000001007d4e51 Tkapp_MainLoop + 177 54 org.python.python 0x00000001000de02e PyEval_EvalFrameEx + 29774 55 org.python.python 0x00000001000df1b8 PyEval_EvalCodeEx + 2296 56 org.python.python 0x00000001000dd647 PyEval_EvalFrameEx + 27239 57 org.python.python 0x00000001000dd7cf PyEval_EvalFrameEx + 27631 58 org.python.python 0x00000001000df1b8 PyEval_EvalCodeEx + 2296 59 org.python.python 0x00000001000df27f PyEval_EvalCode + 63 60 org.python.python 0x000000010010639b PyRun_FileExFlags + 187 61 org.python.python 0x00000001001066b6 PyRun_SimpleFileExFlags + 598 62 org.python.python 0x000000010011d783 Py_Main + 3203 63 Python 0x0000000100000e0e 0x100000000 + 3598 64 Python 0x0000000100000c54 0x100000000 + 3156 Thread 1: 0 libsystem_kernel.dylib 0x00007fff9822b6d6 __workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8ea54eec _pthread_workq_return + 25 2 libsystem_c.dylib 0x00007fff8ea54cb3 _pthread_wqthread + 412 3 libsystem_c.dylib 0x00007fff8ea3f171 start_wqthread + 13 Thread 2:: Dispatch queue: com.apple.libdispatch-manager 0 libsystem_kernel.dylib 0x00007fff9822bd16 kevent + 10 1 libdispatch.dylib 0x00007fff92af8dea _dispatch_mgr_invoke + 883 2 libdispatch.dylib 0x00007fff92af89ee _dispatch_mgr_thread + 54 Thread 3: 0 libsystem_kernel.dylib 0x00007fff9822b6d6 __workq_kernreturn + 10 1 libsystem_c.dylib 0x00007fff8ea54eec _pthread_workq_return + 25 2 libsystem_c.dylib 0x00007fff8ea54cb3 _pthread_wqthread + 412 3 libsystem_c.dylib 0x00007fff8ea3f171 start_wqthread + 13 Thread 4: 0 libsystem_kernel.dylib 0x00007fff9822b322 __select + 10 1 Tcl 0x00000001012efde3 NotifierThreadProc + 558 2 libsystem_c.dylib 0x00007fff8ea52742 _pthread_start + 327 3 libsystem_c.dylib 0x00007fff8ea3f181 thread_start + 13 Thread 0 crashed with X86 Thread State (64-bit): rax: 0x0000000000000000 rbx: 0x0000000000000006 rcx: 0x00007fff5fbfb528 rdx: 0x0000000000000000 rdi: 0x0000000000001007 rsi: 0x0000000000000006 rbp: 0x00007fff5fbfb550 rsp: 0x00007fff5fbfb528 r8: 0x00007fff7c768278 r9: 0x0000000000000015 r10: 0x0000000020000000 r11: 0x0000000000000206 r12: 0x00007fff5fbfb6b0 r13: 0x0000000101827610 r14: 0x00007fff7c769180 r15: 0x00007fff5fbfb590 rip: 0x00007fff9822b212 rfl: 0x0000000000000206 cr2: 0x00007fff7c761fe8 Logical CPU: 0 Binary Images: 0x100000000 - 0x100000ff7 +Python (???) /Applications/Python 3.3/IDLE.app/Contents/MacOS/Python 0x100003000 - 0x1001cafff +org.python.python (3.3.0, [c] 2004-2012 Python Software Foundation. - 3.3.0) <7322AE55-7D5B-D794-C34A-008F718FDD9E> /Library/Frameworks/Python.framework/Versions/3.3/Python 0x1003ef000 - 0x1003effff +_bisect.so (???) <9B7DA040-0268-66BA-44D0-8B99D4DD5F5C> /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/_bisect.so 0x1003f4000 - 0x1003f5ff7 +_heapq.so (???) <5C90A077-D3A3-B15F-D979-DA502BACBCED> /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/_heapq.so 0x1003fa000 - 0x1003fbff7 +_posixsubprocess.so (???) /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/_posixsubprocess.so 0x10073f000 - 0x100743ff7 +_struct.so (???) /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/_struct.so 0x10074a000 - 0x100754ff7 +_socket.so (???) <5A8950A5-94B3-F9CA-99AC-07A78A7F5064> /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/_socket.so 0x100760000 - 0x100762fff +time.so (???) /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/time.so 0x1007c9000 - 0x1007ccfff +select.so (???) /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/select.so 0x1007d2000 - 0x1007d9ff7 +_tkinter.so (???) <7BAA763A-7C3E-3690-A57C-41E5E92958A8> /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/_tkinter.so 0x1007fc000 - 0x1007fdff7 +_random.so (???) /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/_random.so 0x101246000 - 0x101323fef +Tcl (8.5.11 - 8.5.11) <985B2C1E-F571-8BE9-20CB-C9252A009C75> /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl 0x10134f000 - 0x10145dfff +Tk (8.5.11 - 8.5.11) <71FC9167-700A-4984-D34A-5E71E101C01F> /Library/Frameworks/Tk.framework/Versions/8.5/Tk 0x1014df000 - 0x1014e4ff7 +math.so (???) <174FC328-DDD1-B9BA-7F5C-635AB356C246> /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/math.so 0x1014eb000 - 0x1014edff7 +_hashlib.so (???) <8D219436-DEC8-887D-6F07-08CEB0DD057D> /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/_hashlib.so 0x1014f1000 - 0x1014f2ff7 +fcntl.so (???) /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/fcntl.so 0x1016c3000 - 0x1016d3ff7 +_pickle.so (???) /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/_pickle.so 0x1020d5000 - 0x1020dcfef +array.so (???) <36C1D84F-51B0-2128-CE0D-977FE11F512B> /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/array.so 0x108a48000 - 0x108aebfe7 +unicodedata.so (???) <8758869B-96C8-781F-8B5A-0FE9628A4430> /Library/Frameworks/Python.framework/Versions/3.3/lib/python3.3/lib-dynload/unicodedata.so 0x109300000 - 0x109584ff7 com.apple.RawCamera.bundle (4.02 - 672) <03BC689F-CE3F-351D-AAD4-3D6C5E81F34C> /System/Library/CoreServices/RawCamera.bundle/Contents/MacOS/RawCamera 0x7fff60eb1000 - 0x7fff60ee593f dyld (210.2.3) /usr/lib/dyld 0x7fff8c22a000 - 0x7fff8c27fff7 libTIFF.dylib (845) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libTIFF.dylib 0x7fff8c2bc000 - 0x7fff8c2e7fff libxslt.1.dylib (11.3) <441776B8-9130-3893-956F-39C85FFA644F> /usr/lib/libxslt.1.dylib 0x7fff8caa6000 - 0x7fff8caf5ff7 libcorecrypto.dylib (106.2) /usr/lib/system/libcorecrypto.dylib 0x7fff8caf6000 - 0x7fff8cafdfff libcopyfile.dylib (89) <876573D0-E907-3566-A108-577EAD1B6182> /usr/lib/system/libcopyfile.dylib 0x7fff8cb09000 - 0x7fff8cb0bff7 libunc.dylib (25) <92805328-CD36-34FF-9436-571AB0485072> /usr/lib/system/libunc.dylib 0x7fff8cb0c000 - 0x7fff8cb8cff7 com.apple.ApplicationServices.ATS (332 - 341.1) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/ATS 0x7fff8cb8d000 - 0x7fff8cb91fff libpam.2.dylib (20) /usr/lib/libpam.2.dylib 0x7fff8cb92000 - 0x7fff8cb94fff com.apple.securityhi (4.0 - 55002) <34E45C60-DC7E-3FCC-A1ED-EBF48B77C559> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SecurityHI.framework/Versions/A/SecurityHI 0x7fff8cba2000 - 0x7fff8cda2fff libicucore.A.dylib (491.11.1) /usr/lib/libicucore.A.dylib 0x7fff8cda3000 - 0x7fff8cda3fff com.apple.CoreServices (57 - 57) <9DD44CB0-C644-35C3-8F57-0B41B3EC147D> /System/Library/Frameworks/CoreServices.framework/Versions/A/CoreServices 0x7fff8cda4000 - 0x7fff8cea1ff7 libxml2.2.dylib (22.3) <47B09CB2-C636-3024-8B55-6040F7829B4C> /usr/lib/libxml2.2.dylib 0x7fff8d13d000 - 0x7fff8d181fff libcups.2.dylib (327) <9B3F3321-D2BC-3195-BF20-4008FC52A390> /usr/lib/libcups.2.dylib 0x7fff8d29c000 - 0x7fff8d2d9fe7 libGLImage.dylib (8.6.1) <7F31DD61-3110-3541-A9BB-035CD1262E50> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLImage.dylib 0x7fff8d522000 - 0x7fff8d528fff com.apple.DiskArbitration (2.5.1 - 2.5.1) /System/Library/Frameworks/DiskArbitration.framework/Versions/A/DiskArbitration 0x7fff8d584000 - 0x7fff8e1b1ff7 com.apple.AppKit (6.8 - 1187.34) <1FF64844-EB62-3F96-AED7-6525B7CCEC23> /System/Library/Frameworks/AppKit.framework/Versions/C/AppKit 0x7fff8e1b4000 - 0x7fff8e1e5ff7 com.apple.DictionaryServices (1.2 - 184.4) <054F2D6F-9CFF-3EF1-9778-25C551B616C1> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/DictionaryServices.framework/Versions/A/DictionaryServices 0x7fff8e1e6000 - 0x7fff8e1f4fff libcommonCrypto.dylib (60026) <2D6537F5-1B5E-305C-A1CF-D1FA80CA3939> /usr/lib/system/libcommonCrypto.dylib 0x7fff8e1f5000 - 0x7fff8e1fbfff libGFXShared.dylib (8.6.1) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGFXShared.dylib 0x7fff8e2ed000 - 0x7fff8e2f1fff libGIF.dylib (845) <2690CE83-E934-3EF8-A30A-996EDADCE3E4> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libGIF.dylib 0x7fff8e2f2000 - 0x7fff8e2fdfff com.apple.CommonAuth (3.0 - 2.0) <74A86DDD-57D0-3178-AB74-E1F31DBFFC39> /System/Library/PrivateFrameworks/CommonAuth.framework/Versions/A/CommonAuth 0x7fff8e2fe000 - 0x7fff8e325ff7 com.apple.PerformanceAnalysis (1.16 - 16) /System/Library/PrivateFrameworks/PerformanceAnalysis.framework/Versions/A/PerformanceAnalysis 0x7fff8e326000 - 0x7fff8e446fff com.apple.desktopservices (1.7.2 - 1.7.2) /System/Library/PrivateFrameworks/DesktopServicesPriv.framework/Versions/A/DesktopServicesPriv 0x7fff8e4a4000 - 0x7fff8e4affff libsystem_notify.dylib (98.5) /usr/lib/system/libsystem_notify.dylib 0x7fff8e4bc000 - 0x7fff8e506ff7 libGLU.dylib (8.6.1) /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGLU.dylib 0x7fff8e507000 - 0x7fff8e5a5ff7 com.apple.ink.framework (10.8.2 - 150) <84B9825C-3822-375F-BE58-A753444FBDE2> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Ink.framework/Versions/A/Ink 0x7fff8e651000 - 0x7fff8e671fff libPng.dylib (845) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libPng.dylib 0x7fff8e672000 - 0x7fff8e85bfff com.apple.CoreFoundation (6.8 - 744.12) /System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation 0x7fff8e85c000 - 0x7fff8e85cfff com.apple.Accelerate (1.8 - Accelerate 1.8) <6AD48543-0864-3D40-80CE-01F184F24B45> /System/Library/Frameworks/Accelerate.framework/Versions/A/Accelerate 0x7fff8e909000 - 0x7fff8ea22ff7 com.apple.ImageIO.framework (3.2.0 - 845) <553B9828-A7D9-3AE4-A214-1C33417545FD> /System/Library/Frameworks/ImageIO.framework/Versions/A/ImageIO 0x7fff8ea3e000 - 0x7fff8eb0afe7 libsystem_c.dylib (825.25) <8CBCF9B9-EBB7-365E-A3FF-2F3850763C6B> /usr/lib/system/libsystem_c.dylib 0x7fff8eb2e000 - 0x7fff8eb4fff7 libCRFSuite.dylib (33) <736ABE58-8DED-3289-A042-C25AF7AE5B23> /usr/lib/libCRFSuite.dylib 0x7fff8ebd3000 - 0x7fff8ebd7fff com.apple.IOSurface (86.0.3 - 86.0.3) /System/Library/Frameworks/IOSurface.framework/Versions/A/IOSurface 0x7fff8ebe7000 - 0x7fff8ecacff7 com.apple.coreui (2.0 - 181.1) <83D2C92D-6842-3C9D-9289-39D5B4554C3A> /System/Library/PrivateFrameworks/CoreUI.framework/Versions/A/CoreUI 0x7fff8ed04000 - 0x7fff8ee55fff com.apple.audio.toolbox.AudioToolbox (1.8 - 1.8) <833DA682-A3C1-39E7-AEC3-9EDC734DE2A9> /System/Library/Frameworks/AudioToolbox.framework/Versions/A/AudioToolbox 0x7fff8ee56000 - 0x7fff8ee64ff7 libsystem_network.dylib (77.10) <0D99F24E-56FE-380F-B81B-4A4C630EE587> /usr/lib/system/libsystem_network.dylib 0x7fff8ee79000 - 0x7fff8f1d5fff com.apple.Foundation (6.8 - 945.11) /System/Library/Frameworks/Foundation.framework/Versions/C/Foundation 0x7fff8f1d6000 - 0x7fff8f2cbfff libiconv.2.dylib (34) /usr/lib/libiconv.2.dylib 0x7fff8f2cc000 - 0x7fff8f31bff7 libFontRegistry.dylib (100) <2E03D7DA-9B8F-31BB-8FB5-3D3B6272127F> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontRegistry.dylib 0x7fff8f31c000 - 0x7fff8f379fff com.apple.audio.CoreAudio (4.1.0 - 4.1.0) /System/Library/Frameworks/CoreAudio.framework/Versions/A/CoreAudio 0x7fff8f45e000 - 0x7fff8f461fff com.apple.help (1.3.2 - 42) <343904FE-3022-3573-97D6-5FE17F8643BA> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Help.framework/Versions/A/Help 0x7fff8f533000 - 0x7fff8f589fff com.apple.HIServices (1.20 - 417) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/HIServices.framework/Versions/A/HIServices 0x7fff8f5ce000 - 0x7fff8f5f0ff7 libxpc.dylib (140.41) /usr/lib/system/libxpc.dylib 0x7fff8f609000 - 0x7fff8f61cff7 com.apple.LangAnalysis (1.7.0 - 1.7.0) <2F2694E9-A7BC-33C7-B4CF-8EC907DF0FEB> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/LangAnalysis.framework/Versions/A/LangAnalysis 0x7fff8f61d000 - 0x7fff8f7cbfff com.apple.QuartzCore (1.8 - 304.0) /System/Library/Frameworks/QuartzCore.framework/Versions/A/QuartzCore 0x7fff8f981000 - 0x7fff8f98cff7 com.apple.bsd.ServiceManagement (2.0 - 2.0) /System/Library/Frameworks/ServiceManagement.framework/Versions/A/ServiceManagement 0x7fff8f99b000 - 0x7fff8f99bfff com.apple.ApplicationServices (45 - 45) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/ApplicationServices 0x7fff90251000 - 0x7fff90252fff libsystem_blocks.dylib (59) /usr/lib/system/libsystem_blocks.dylib 0x7fff90253000 - 0x7fff902afff7 com.apple.Symbolication (1.3 - 93) /System/Library/PrivateFrameworks/Symbolication.framework/Versions/A/Symbolication 0x7fff902b6000 - 0x7fff90367fff com.apple.LaunchServices (539.7 - 539.7) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/LaunchServices.framework/Versions/A/LaunchServices 0x7fff90368000 - 0x7fff903d0fff libvDSP.dylib (380.6) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvDSP.dylib 0x7fff903d1000 - 0x7fff907c8fff libLAPACK.dylib (1073.4) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libLAPACK.dylib 0x7fff907c9000 - 0x7fff907cbfff libCVMSPluginSupport.dylib (8.6.1) <7EFDA31E-E463-3897-A8DC-7FD266EB713E> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCVMSPluginSupport.dylib 0x7fff907cc000 - 0x7fff90803ff7 libssl.0.9.8.dylib (47) <923945E6-C489-3406-903B-A362410753F8> /usr/lib/libssl.0.9.8.dylib 0x7fff90848000 - 0x7fff9085ffff com.apple.CFOpenDirectory (10.8 - 151.10) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/Frameworks/CFOpenDirectory.framework/Versions/A/CFOpenDirectory 0x7fff90860000 - 0x7fff9087dfff com.apple.openscripting (1.3.6 - 148.2) <33B87CFB-CACC-3EBC-893D-38AECB94FB8A> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/OpenScripting.framework/Versions/A/OpenScripting 0x7fff9087e000 - 0x7fff90893fff com.apple.ImageCapture (8.0 - 8.0) <17A45CE6-7DA3-36A5-B7EF-72BC136981AE> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/ImageCapture.framework/Versions/A/ImageCapture 0x7fff90894000 - 0x7fff90921ff7 com.apple.SearchKit (1.4.0 - 1.4.0) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/SearchKit.framework/Versions/A/SearchKit 0x7fff90922000 - 0x7fff90961ff7 com.apple.QD (3.42 - 285) <8DF36FCA-C06B-30F4-A631-7BE2FF7E56D1> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/QD.framework/Versions/A/QD 0x7fff90e58000 - 0x7fff910fcfff com.apple.CoreImage (8.2.2 - 1.0.1) <930B0B23-DD84-3B0C-B5A9-C09B7068A6F0> /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/CoreImage.framework/Versions/A/CoreImage 0x7fff911a5000 - 0x7fff9124bff7 com.apple.CoreServices.OSServices (557.4 - 557.4) <841878A8-6F3E-300D-8F01-444B3CC1F41D> /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/OSServices.framework/Versions/A/OSServices 0x7fff9124c000 - 0x7fff91271ff7 libc++abi.dylib (24.4) /usr/lib/libc++abi.dylib 0x7fff91272000 - 0x7fff912beff7 libauto.dylib (185.1) <73CDC482-16E3-3FC7-9BB4-FBA2DA44DBC2> /usr/lib/libauto.dylib 0x7fff912bf000 - 0x7fff91341fff com.apple.Heimdal (3.0 - 2.0) <660A6C64-4912-32C8-A332-B64164032A2D> /System/Library/PrivateFrameworks/Heimdal.framework/Versions/A/Heimdal 0x7fff91342000 - 0x7fff91577ff7 com.apple.CoreData (106.1 - 407.7) <24E0A6B4-9ECA-3D12-B26A-72B9DCF09768> /System/Library/Frameworks/CoreData.framework/Versions/A/CoreData 0x7fff91578000 - 0x7fff91635ff7 com.apple.ColorSync (4.8.0 - 4.8.0) <6CE333AE-EDDB-3768-9598-9DB38041DC55> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ColorSync.framework/Versions/A/ColorSync 0x7fff91735000 - 0x7fff91a65ff7 com.apple.HIToolbox (2.0 - 625) <317F75F7-4B0F-35F5-89A7-F20BA60AC944> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox 0x7fff91a92000 - 0x7fff91ad5ff7 com.apple.bom (12.0 - 192) <0BF1F2D2-3648-36B7-BE4B-551A0173209B> /System/Library/PrivateFrameworks/Bom.framework/Versions/A/Bom 0x7fff91d6c000 - 0x7fff91dc3ff7 com.apple.ScalableUserInterface (1.0 - 1) /System/Library/Frameworks/QuartzCore.framework/Versions/A/Frameworks/ScalableUserInterface.framework/Versions/A/ScalableUserInterface 0x7fff91e52000 - 0x7fff91e61ff7 libxar.1.dylib (105) <370ED355-E516-311E-BAFD-D80633A84BE1> /usr/lib/libxar.1.dylib 0x7fff91e62000 - 0x7fff91f7a92f libobjc.A.dylib (532.2) <90D31928-F48D-3E37-874F-220A51FD9E37> /usr/lib/libobjc.A.dylib 0x7fff91f7b000 - 0x7fff91f7cfff libDiagnosticMessagesClient.dylib (8) <8548E0DC-0D2F-30B6-B045-FE8A038E76D8> /usr/lib/libDiagnosticMessagesClient.dylib 0x7fff91f96000 - 0x7fff91f97ff7 libsystem_sandbox.dylib (220) <3C3B03CF-C525-3CB3-8557-62E91B93AC95> /usr/lib/system/libsystem_sandbox.dylib 0x7fff9204c000 - 0x7fff9204fff7 libdyld.dylib (210.2.3) /usr/lib/system/libdyld.dylib 0x7fff92050000 - 0x7fff92059fff com.apple.CommerceCore (1.0 - 26) <997CD214-BC78-3C61-A1B8-813EA1CB9997> /System/Library/PrivateFrameworks/CommerceKit.framework/Versions/A/Frameworks/CommerceCore.framework/Versions/A/CommerceCore 0x7fff9205a000 - 0x7fff9215cfff libcrypto.0.9.8.dylib (47) <74F165AD-4572-3B26-B0E2-A97477FE59D0> /usr/lib/libcrypto.0.9.8.dylib 0x7fff9224f000 - 0x7fff92261ff7 libz.1.dylib (43) <2A1551E8-A272-3DE5-B692-955974FE1416> /usr/lib/libz.1.dylib 0x7fff92262000 - 0x7fff92364fff libJP2.dylib (845) <405CAF25-0AA5-3C6B-A4A6-94471A1EDD2F> /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJP2.dylib 0x7fff92365000 - 0x7fff92366ff7 libSystem.B.dylib (169.3) <365477AB-D641-389D-B8F4-A1FAE9657EEE> /usr/lib/libSystem.B.dylib 0x7fff9236b000 - 0x7fff92378fff libbz2.1.0.dylib (29) /usr/lib/libbz2.1.0.dylib 0x7fff92379000 - 0x7fff923a7fff com.apple.CoreServicesInternal (154.2 - 154.2) <3E6196E6-F3B4-316F-9E1F-13B6B9694C7E> /System/Library/PrivateFrameworks/CoreServicesInternal.framework/Versions/A/CoreServicesInternal 0x7fff923a8000 - 0x7fff923aafff com.apple.TrustEvaluationAgent (2.0 - 23) /System/Library/PrivateFrameworks/TrustEvaluationAgent.framework/Versions/A/TrustEvaluationAgent 0x7fff923ab000 - 0x7fff923b0fff com.apple.OpenDirectory (10.8 - 151.10) /System/Library/Frameworks/OpenDirectory.framework/Versions/A/OpenDirectory 0x7fff92590000 - 0x7fff925b2ff7 com.apple.Kerberos (2.0 - 1) /System/Library/Frameworks/Kerberos.framework/Versions/A/Kerberos 0x7fff925b3000 - 0x7fff925b3fff com.apple.Accelerate.vecLib (3.8 - vecLib 3.8) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff92638000 - 0x7fff92646fff com.apple.Librarian (1.1 - 1) <1635162F-239A-341E-83C7-710C55E254AF> /System/Library/PrivateFrameworks/Librarian.framework/Versions/A/Librarian 0x7fff92647000 - 0x7fff926afff7 libc++.1.dylib (65.1) <20E31B90-19B9-3C2A-A9EB-474E08F9FE05> /usr/lib/libc++.1.dylib 0x7fff92717000 - 0x7fff929e7fff com.apple.security (7.0 - 55179.1) <639641EF-8156-3190-890C-1053658E044A> /System/Library/Frameworks/Security.framework/Versions/A/Security 0x7fff929e8000 - 0x7fff92af3fff libFontParser.dylib (84.5) <617A7D30-C7BC-39FC-A1FE-59367B4A5719> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libFontParser.dylib 0x7fff92af4000 - 0x7fff92b09ff7 libdispatch.dylib (228.23) /usr/lib/system/libdispatch.dylib 0x7fff92e96000 - 0x7fff92ebdfff com.apple.framework.familycontrols (4.1 - 410) /System/Library/PrivateFrameworks/FamilyControls.framework/Versions/A/FamilyControls 0x7fff92f3a000 - 0x7fff92f44fff com.apple.speech.recognition.framework (4.1.5 - 4.1.5) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/SpeechRecognition.framework/Versions/A/SpeechRecognition 0x7fff92f45000 - 0x7fff92f9ffff com.apple.print.framework.PrintCore (8.1 - 387.1) <1FA17B75-33E6-35BD-9198-35F92E37B248> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/PrintCore.framework/Versions/A/PrintCore 0x7fff930c8000 - 0x7fff930f4ff7 libRIP.A.dylib (324.6) <5A7EB5C2-BA60-36D7-BF41-9853F37837AA> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libRIP.A.dylib 0x7fff9335f000 - 0x7fff93363fff libCGXType.A.dylib (324.6) <2FC25246-A69F-3F81-9AC6-0A1753E1C6A8> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCGXType.A.dylib 0x7fff93493000 - 0x7fff934a7fff com.apple.speech.synthesis.framework (4.1.12 - 4.1.12) <94EDF2AB-809C-3D15-BED5-7AD45B2A7C16> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/SpeechSynthesis.framework/Versions/A/SpeechSynthesis 0x7fff93533000 - 0x7fff93534ff7 libremovefile.dylib (23.1) /usr/lib/system/libremovefile.dylib 0x7fff93586000 - 0x7fff935b4ff7 libsystem_m.dylib (3022.6) /usr/lib/system/libsystem_m.dylib 0x7fff935f0000 - 0x7fff93625ff7 libTrueTypeScaler.dylib (84.5) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/ATS.framework/Versions/A/Resources/libTrueTypeScaler.dylib 0x7fff93626000 - 0x7fff93632fff com.apple.CrashReporterSupport (10.8.2 - 415) <55783BF9-125E-3F9C-A412-6A095ECD9353> /System/Library/PrivateFrameworks/CrashReporterSupport.framework/Versions/A/CrashReporterSupport 0x7fff936ca000 - 0x7fff936cafff com.apple.Cocoa (6.7 - 19) <1F77945C-F37A-3171-B22E-F7AB0FCBB4D4> /System/Library/Frameworks/Cocoa.framework/Versions/A/Cocoa 0x7fff93712000 - 0x7fff93729fff com.apple.GenerationalStorage (1.1 - 132.2) <3F5C87BD-D866-3732-8CB9-D23ED9784D6E> /System/Library/PrivateFrameworks/GenerationalStorage.framework/Versions/A/GenerationalStorage 0x7fff943b3000 - 0x7fff9444dfff libvMisc.dylib (380.6) <714336EA-1C0E-3735-B31C-19DFDAAF6221> /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libvMisc.dylib 0x7fff9444e000 - 0x7fff9446dff7 com.apple.ChunkingLibrary (2.0 - 133.2) /System/Library/PrivateFrameworks/ChunkingLibrary.framework/Versions/A/ChunkingLibrary 0x7fff948ab000 - 0x7fff948abfff libkeymgr.dylib (25) /usr/lib/system/libkeymgr.dylib 0x7fff948ac000 - 0x7fff948b1fff libcache.dylib (57) <65187C6E-3FBF-3EB8-A1AA-389445E2984D> /usr/lib/system/libcache.dylib 0x7fff948b2000 - 0x7fff94933fff com.apple.Metadata (10.7.0 - 707.3) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/Metadata.framework/Versions/A/Metadata 0x7fff94934000 - 0x7fff94934ffd com.apple.audio.units.AudioUnit (1.8 - 1.8) <29E2C990-3617-3FA2-BDD7-DB7DF493E443> /System/Library/Frameworks/AudioUnit.framework/Versions/A/AudioUnit 0x7fff94935000 - 0x7fff94942ff7 com.apple.NetAuth (4.0 - 4.0) /System/Library/PrivateFrameworks/NetAuth.framework/Versions/A/NetAuth 0x7fff94985000 - 0x7fff949f2fff com.apple.datadetectorscore (4.0 - 269.1) /System/Library/PrivateFrameworks/DataDetectorsCore.framework/Versions/A/DataDetectorsCore 0x7fff94d4d000 - 0x7fff94d6cff7 libresolv.9.dylib (51) <0882DC2D-A892-31FF-AD8C-0BB518C48B23> /usr/lib/libresolv.9.dylib 0x7fff94d6e000 - 0x7fff94d7afff libCSync.A.dylib (324.6) <2033247A-CABC-3E20-8498-7367A8F44A08> /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/Resources/libCSync.A.dylib 0x7fff94ec7000 - 0x7fff94ec7fff com.apple.vecLib (3.8 - vecLib 3.8) <794317C7-4E38-338A-A874-5E18001C8503> /System/Library/Frameworks/vecLib.framework/Versions/A/vecLib 0x7fff94ec8000 - 0x7fff94ed0ff7 libsystem_dnssd.dylib (379.32.1) <62AA0B84-188A-348B-8F9E-3E2DB08DB93C> /usr/lib/system/libsystem_dnssd.dylib 0x7fff94ed1000 - 0x7fff94ed2fff liblangid.dylib (116) <864C409D-D56B-383E-9B44-A435A47F2346> /usr/lib/liblangid.dylib 0x7fff94f11000 - 0x7fff958a1c67 com.apple.CoreGraphics (1.600.0 - 324.6) /System/Library/Frameworks/ApplicationServices.framework/Versions/A/Frameworks/CoreGraphics.framework/Versions/A/CoreGraphics 0x7fff958a2000 - 0x7fff9590fff7 com.apple.framework.IOKit (2.0 - 755.18.10) <142E19DD-1C8D-3D61-ABC8-83994A73279F> /System/Library/Frameworks/IOKit.framework/Versions/A/IOKit 0x7fff95910000 - 0x7fff959eaff7 com.apple.backup.framework (1.4.1 - 1.4.1) /System/Library/PrivateFrameworks/Backup.framework/Versions/A/Backup 0x7fff959eb000 - 0x7fff959f0fff libcompiler_rt.dylib (30) <08F8731D-5961-39F1-AD00-4590321D24A9> /usr/lib/system/libcompiler_rt.dylib 0x7fff95a45000 - 0x7fff95a59fff libGL.dylib (8.6.1) <2E00615F-97F5-34EB-BE07-75A24F3C18D7> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libGL.dylib 0x7fff95ba7000 - 0x7fff95d2dfff libBLAS.dylib (1073.4) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vecLib.framework/Versions/A/libBLAS.dylib 0x7fff95d40000 - 0x7fff95d6aff7 com.apple.CoreVideo (1.8 - 99.3) /System/Library/Frameworks/CoreVideo.framework/Versions/A/CoreVideo 0x7fff95d6b000 - 0x7fff95d71fff libmacho.dylib (829) /usr/lib/system/libmacho.dylib 0x7fff95d72000 - 0x7fff95ee6fff com.apple.CFNetwork (596.2.3 - 596.2.3) <6A16C2BD-1035-30F9-AE96-D9E3BB54A976> /System/Library/Frameworks/CFNetwork.framework/Versions/A/CFNetwork 0x7fff96ea9000 - 0x7fff96eb7ff7 libkxld.dylib (2050.18.24) <7027CE49-007D-3553-8FFA-3E3B428B2316> /usr/lib/system/libkxld.dylib 0x7fff96eb8000 - 0x7fff96efbfff com.apple.RemoteViewServices (2.0 - 80.5) /System/Library/PrivateFrameworks/RemoteViewServices.framework/Versions/A/RemoteViewServices 0x7fff971c0000 - 0x7fff971cdfff com.apple.AppleFSCompression (49 - 1.0) <5508344A-2A7E-3122-9562-6F363910A80E> /System/Library/PrivateFrameworks/AppleFSCompression.framework/Versions/A/AppleFSCompression 0x7fff971ce000 - 0x7fff975ebfff FaceCoreLight (2.4.1) /System/Library/PrivateFrameworks/FaceCoreLight.framework/Versions/A/FaceCoreLight 0x7fff975ec000 - 0x7fff976e9fff libsqlite3.dylib (138.1) /usr/lib/libsqlite3.dylib 0x7fff976ed000 - 0x7fff97700ff7 libbsm.0.dylib (32) /usr/lib/libbsm.0.dylib 0x7fff97afb000 - 0x7fff97b23fff libJPEG.dylib (845) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libJPEG.dylib 0x7fff97b24000 - 0x7fff97b7aff7 com.apple.opencl (2.1.20 - 2.1.20) /System/Library/Frameworks/OpenCL.framework/Versions/A/OpenCL 0x7fff97bed000 - 0x7fff97bf3ff7 libunwind.dylib (35.1) <21703D36-2DAB-3D8B-8442-EAAB23C060D3> /usr/lib/system/libunwind.dylib 0x7fff97bf4000 - 0x7fff97bfbfff com.apple.NetFS (5.0 - 4.0) <82E24B9A-7742-3DA3-9E99-ED267D98C05E> /System/Library/Frameworks/NetFS.framework/Versions/A/NetFS 0x7fff97ca5000 - 0x7fff97ca7ff7 com.apple.print.framework.Print (8.0 - 258) <34666CC2-B86D-3313-B3B6-A9977AD593DA> /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/Print.framework/Versions/A/Print 0x7fff97ca8000 - 0x7fff97fbfff7 com.apple.CoreServices.CarbonCore (1037.3 - 1037.3) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/CarbonCore.framework/Versions/A/CarbonCore 0x7fff97fc0000 - 0x7fff97fd6fff com.apple.MultitouchSupport.framework (235.28 - 235.28) /System/Library/PrivateFrameworks/MultitouchSupport.framework/Versions/A/MultitouchSupport 0x7fff98040000 - 0x7fff98043fff libRadiance.dylib (845) /System/Library/Frameworks/ImageIO.framework/Versions/A/Resources/libRadiance.dylib 0x7fff98044000 - 0x7fff980adfff libstdc++.6.dylib (56) /usr/lib/libstdc++.6.dylib 0x7fff98137000 - 0x7fff98194ff7 com.apple.AE (645.3 - 645.3) /System/Library/Frameworks/CoreServices.framework/Versions/A/Frameworks/AE.framework/Versions/A/AE 0x7fff98214000 - 0x7fff98218fff libCoreVMClient.dylib (24.4) <55F71158-ADEE-3863-92E9-4772DCEA8E31> /System/Library/Frameworks/OpenGL.framework/Versions/A/Libraries/libCoreVMClient.dylib 0x7fff98219000 - 0x7fff98234ff7 libsystem_kernel.dylib (2050.18.24) /usr/lib/system/libsystem_kernel.dylib 0x7fff98251000 - 0x7fff982cfff7 com.apple.securityfoundation (6.0 - 55115.4) /System/Library/Frameworks/SecurityFoundation.framework/Versions/A/SecurityFoundation 0x7fff98370000 - 0x7fff9837fff7 com.apple.opengl (1.8.6 - 1.8.6) <720CC06C-0D01-37AE-BB3D-D7F0242B262A> /System/Library/Frameworks/OpenGL.framework/Versions/A/OpenGL 0x7fff983b9000 - 0x7fff983b9fff libOpenScriptingUtil.dylib (148.2) /usr/lib/libOpenScriptingUtil.dylib 0x7fff983ba000 - 0x7fff983bbff7 libdnsinfo.dylib (453.18) /usr/lib/system/libdnsinfo.dylib 0x7fff983bc000 - 0x7fff983f2fff libsystem_info.dylib (406.17) <4FFCA242-7F04-365F-87A6-D4EFB89503C1> /usr/lib/system/libsystem_info.dylib 0x7fff983f3000 - 0x7fff98414fff com.apple.Ubiquity (1.2 - 243.10) /System/Library/PrivateFrameworks/Ubiquity.framework/Versions/A/Ubiquity 0x7fff986dc000 - 0x7fff98712fff com.apple.DebugSymbols (98 - 98) <14E788B1-4EB2-3FD7-934B-849534DFC198> /System/Library/PrivateFrameworks/DebugSymbols.framework/Versions/A/DebugSymbols 0x7fff9872e000 - 0x7fff98732ff7 com.apple.TCC (1.0 - 1) /System/Library/PrivateFrameworks/TCC.framework/Versions/A/TCC 0x7fff98766000 - 0x7fff98901fef com.apple.vImage (6.0 - 6.0) /System/Library/Frameworks/Accelerate.framework/Versions/A/Frameworks/vImage.framework/Versions/A/vImage 0x7fff98e0d000 - 0x7fff98ea7fff com.apple.CoreSymbolication (3.0 - 87) <75F2C0DD-549A-36F6-BD9E-FB40A924344F> /System/Library/PrivateFrameworks/CoreSymbolication.framework/Versions/A/CoreSymbolication 0x7fff98ea8000 - 0x7fff98ea8fff com.apple.Carbon (154 - 155) <372716D2-6FA1-3611-8501-3DD1D4A6E8C8> /System/Library/Frameworks/Carbon.framework/Versions/A/Carbon 0x7fff98ea9000 - 0x7fff98eabfff libquarantine.dylib (52) <4BE2E642-A14F-340A-B482-5BD2AEFD9C24> /usr/lib/system/libquarantine.dylib 0x7fff98f6c000 - 0x7fff9903eff7 com.apple.CoreText (260.0 - 275.16) <5BFC1D67-6A6F-38BC-9D90-9C712684EDAC> /System/Library/Frameworks/CoreText.framework/Versions/A/CoreText 0x7fff9906b000 - 0x7fff99073fff liblaunch.dylib (442.26.2) <2F71CAF8-6524-329E-AC56-C506658B4C0C> /usr/lib/system/liblaunch.dylib 0x7fff99074000 - 0x7fff990aefff com.apple.GSS (3.0 - 2.0) <0BDF8090-5EF4-3759-94DE-8521D74188AA> /System/Library/Frameworks/GSS.framework/Versions/A/GSS 0x7fff99155000 - 0x7fff991a6ff7 com.apple.SystemConfiguration (1.12.2 - 1.12.2) /System/Library/Frameworks/SystemConfiguration.framework/Versions/A/SystemConfiguration 0x7fff991a7000 - 0x7fff991abff7 com.apple.CommonPanels (1.2.5 - 94) /System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/CommonPanels.framework/Versions/A/CommonPanels External Modification Summary: Calls made by other processes targeting this process: task_for_pid: 2 thread_create: 0 thread_set_state: 0 Calls made by this process: task_for_pid: 0 thread_create: 0 thread_set_state: 0 Calls made by all processes on this machine: task_for_pid: 84208 thread_create: 5 thread_set_state: 0 VM Region Summary: ReadOnly portion of Libraries: Total=153.5M resident=92.7M(60%) swapped_out_or_unallocated=60.8M(40%) Writable regions: Total=124.0M written=12.6M(10%) resident=32.5M(26%) swapped_out=1332K(1%) unallocated=91.4M(74%) REGION TYPE VIRTUAL =========== ======= CG backing stores 3244K CG image 4K CG shared images 224K CoreServices 2672K MALLOC 91.1M MALLOC guard page 48K MALLOC_LARGE (reserved) 512K reserved VM address space (unallocated) Memory tag=240 4K Memory tag=242 12K Memory tag=251 8K STACK GUARD 56.0M Stack 9820K VM_ALLOCATE 16.1M __DATA 11.6M __IMAGE 528K __LINKEDIT 54.4M __TEXT 99.2M __UNICODE 544K mapped file 41.5M shared memory 308K =========== ======= TOTAL 387.3M TOTAL, minus reserved VM space 386.8M Model: MacBookPro8,2, BootROM MBP81.0047.B27, 4 processors, Intel Core i7, 2.2 GHz, 8 GB, SMC 1.69f3 Graphics: Intel HD Graphics 3000, Intel HD Graphics 3000, Built-In, 512 MB Graphics: AMD Radeon HD 6750M, AMD Radeon HD 6750M, PCIe, 1024 MB Memory Module: BANK 0/DIMM0, 4 GB, DDR3, 1333 MHz, 0x80CE, 0x4D34373142353237334448302D4348392020 Memory Module: BANK 1/DIMM0, 4 GB, DDR3, 1333 MHz, 0x80CE, 0x4D34373142353237334448302D4348392020 AirPort: spairport_wireless_card_type_airport_extreme (0x14E4, 0xD6), Broadcom BCM43xx 1.0 (5.106.98.81.22) Bluetooth: Version 4.0.9f33 10885, 2 service, 18 devices, 1 incoming serial ports Network Service: Ethernet, Ethernet, en0 Network Service: AirPort, AirPort, en1 Serial ATA Device: TOSHIBA MK7559GSXF, 750.16 GB Serial ATA Device: MATSHITADVD-R UJ-898 USB Device: FaceTime HD Camera (Built-in), apple_vendor_id, 0x8509, 0xfa200000 / 3 USB Device: hub_device, 0x0424 (SMSC), 0x2513, 0xfa100000 / 2 USB Device: BRCM2070 Hub, 0x0a5c (Broadcom Corp.), 0x4500, 0xfa110000 / 5 USB Device: Bluetooth USB Host Controller, apple_vendor_id, 0x821a, 0xfa113000 / 7 USB Device: Apple Internal Keyboard / Trackpad, apple_vendor_id, 0x0245, 0xfa120000 / 4 USB Device: hub_device, 0x0424 (SMSC), 0x2513, 0xfd100000 / 2 USB Device: USB2.0 Hub, 0x05e3 (Genesys Logic, Inc.), 0x0608, 0xfd120000 / 4 USB Device: USB Receiver, 0x046d (Logitech Inc.), 0xc508, 0xfd122000 / 7 USB Device: DualHead2Go-DP, 0x18ea, 0x0009, 0xfd121000 / 6 USB Device: USB2.0 Hub, 0x05e3 (Genesys Logic, Inc.), 0x0608, 0xfd123000 / 5 USB Device: Backup+ Desk, 0x0bc2 (Seagate LLC), 0xa0a1, 0xfd123200 / 9 USB Device: IR Receiver, apple_vendor_id, 0x8242, 0xfd110000 / 3 ---------- components: IDLE messages: 177010 nosy: Steve.OBrien priority: normal severity: normal status: open title: IDLE crashes on parentheses type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 22:24:53 2012 From: report at bugs.python.org (Chris Kaynor) Date: Wed, 05 Dec 2012 21:24:53 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354742693.5.0.157057971605.issue16619@psf.upfronthosting.co.za> Changes by Chris Kaynor : ---------- nosy: +DragonFireCK versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 22:35:44 2012 From: report at bugs.python.org (Chris Rebert) Date: Wed, 05 Dec 2012 21:35:44 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354743344.85.0.249885713557.issue16619@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 22:47:46 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Wed, 05 Dec 2012 21:47:46 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354744066.98.0.30584033481.issue16619@psf.upfronthosting.co.za> Bruno Dupuis added the comment: This first patch spots the issue, but doesn't solve it if the bytecode of the function is > 32700 (see PyCode_Optimize comment). However with this patch, we get the LOAD_CONST anytime for None, True and False. There is two questions : 1- is it safe to strip all the code after RETURN_VALUE as the patch does? 2- to correct this bug, we will need a deep refactoring of PyCode_Optimize (so that it accepts any code length). The other way, is not to rely on PyCode_Optimize to compile return None/True/False, but do modifictations in the compiler itself. This must be the right way to do this, but it's far beyond my C skills and python core knowledge. ---------- keywords: +patch Added file: http://bugs.python.org/file28217/16619-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 23:03:21 2012 From: report at bugs.python.org (Roy Smith) Date: Wed, 05 Dec 2012 22:03:21 +0000 Subject: [issue16623] argparse help formatter does not honor non-breaking space Message-ID: <1354745001.59.0.580615965604.issue16623@psf.upfronthosting.co.za> New submission from Roy Smith: Running this code: --------------------------------------- import argparse p = argparse.ArgumentParser() p.add_argument('--foo', help=u'This is a very long help string. ex: "--s3\u00A0s3://my.bucket/dir1/dir2"') p.parse_args() --------------------------------------- produces: --------------------------------------- $ ./arg.py --help usage: arg.py [-h] [--foo FOO] optional arguments: -h, --help show this help message and exit --foo FOO This is a very long help string. ex: "--s3 s3://my.bucket/dir1/dir2" --------------------------------------- It should not be breaking the line at a non-breaking space. I'm running: Python 2.7.3 (default, Aug 1 2012, 05:14:39) [GCC 4.6.3] on linux2 ---------- components: Library (Lib) messages: 177012 nosy: roysmith priority: normal severity: normal status: open title: argparse help formatter does not honor non-breaking space type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 23:39:06 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 05 Dec 2012 22:39:06 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354747146.96.0.0540996081195.issue16619@psf.upfronthosting.co.za> Terry J. Reedy added the comment: (2.6 is security fix only) Stripping truly dead code after return is really tricky in general because a) it might be in a conditional block, and b) unreachable yield and assignment can affect compilation. Assignments that make names local are detected on a first pass, but I do not know about yield. Anyway, I believe the policy has been to not do it. The final patch will need a cpython-only test based on g(x), with dead code. Possibly intersecting issues are proposals to change where optimization is done and, for testing, to add a generator to dis so its output can be directly captured and analyzed instead of having to redirect, capture, and parse stdout. ---------- nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan, terry.reedy stage: -> patch review type: -> behavior versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 5 23:54:17 2012 From: report at bugs.python.org (Zack Weinberg) Date: Wed, 05 Dec 2012 22:54:17 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string Message-ID: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> New submission from Zack Weinberg: subprocess.check_output calls Popen.communicate but does not allow you to specify its argument (i.e. data to send to the child process's stdin). It would be nice if it were enhanced to allow this. Proposed patch attached (to the 2.7 subprocess.py; should apply with trivial changes in 3.x). ---------- components: Library (Lib) files: subprocess-check-output-allow-input.diff keywords: patch messages: 177014 nosy: zwol priority: normal severity: normal status: open title: subprocess.check_output should allow specifying stdin as a string type: enhancement Added file: http://bugs.python.org/file28218/subprocess-check-output-allow-input.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 00:22:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 05 Dec 2012 23:22:49 +0000 Subject: [issue16623] argparse help formatter does not honor non-breaking space In-Reply-To: <1354745001.59.0.580615965604.issue16623@psf.upfronthosting.co.za> Message-ID: <1354749769.52.0.656152891436.issue16623@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 01:16:34 2012 From: report at bugs.python.org (Roger Serwy) Date: Thu, 06 Dec 2012 00:16:34 +0000 Subject: [issue16622] IDLE crashes on parentheses In-Reply-To: <1354742003.92.0.600931221581.issue16622@psf.upfronthosting.co.za> Message-ID: <1354752994.27.0.634960310537.issue16622@psf.upfronthosting.co.za> Roger Serwy added the comment: Steve, please verify that you are using the correct version of Tkinter with IDLE. See http://www.python.org/download/mac/tcltk/ ---------- nosy: +ned.deily, serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 01:18:32 2012 From: report at bugs.python.org (Meador Inge) Date: Thu, 06 Dec 2012 00:18:32 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354753112.68.0.694097151881.issue16619@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 01:21:35 2012 From: report at bugs.python.org (Steve OBrien) Date: Thu, 06 Dec 2012 00:21:35 +0000 Subject: [issue16622] IDLE crashes on parentheses In-Reply-To: <1354742003.92.0.600931221581.issue16622@psf.upfronthosting.co.za> Message-ID: <1354753295.4.0.471417201187.issue16622@psf.upfronthosting.co.za> Steve OBrien added the comment: I have tried both 8.5.11.1 and 8.5.11.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 01:37:02 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Thu, 06 Dec 2012 00:37:02 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354754222.39.0.578816578228.issue16619@psf.upfronthosting.co.za> Bruno Dupuis added the comment: We definitely need to put the code that loads constants with LOAD_CONST out of the optimization code. It's not optim, it's a language feature: None *is* a 'singleton' constant. I'm trying to figure out how to change compile.c to achieve this, as it's my first dive into the compiler code, it's not that easy. Another approch is to strip unreachable nodes in AST, but a) it's quite complex, as Terry said b) it solves only this particular bug, not the general assertion "None, True and False are reserved words bound to constants. It can not ever be loaded with LOAD_NAME or LOAD_GLOBAL" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 01:46:34 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 06 Dec 2012 00:46:34 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354754794.51.0.346133027093.issue16619@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Here's what I think we should do for 3.4. Nick, care to commment? ---------- Added file: http://bugs.python.org/file28219/const-node.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 01:52:08 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 06 Dec 2012 00:52:08 +0000 Subject: [issue15516] exception-handling bug in PyString_Format In-Reply-To: <1343764780.71.0.604975878578.issue15516@psf.upfronthosting.co.za> Message-ID: <1354755128.65.0.165157941963.issue15516@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Wouldn't it be easier to write a Python class that raises an error from __int__() but succeeds in __long__()? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 02:19:26 2012 From: report at bugs.python.org (Roger Serwy) Date: Thu, 06 Dec 2012 01:19:26 +0000 Subject: [issue16622] IDLE crashes on parentheses In-Reply-To: <1354742003.92.0.600931221581.issue16622@psf.upfronthosting.co.za> Message-ID: <1354756766.27.0.494417421393.issue16622@psf.upfronthosting.co.za> Roger Serwy added the comment: This looks like a duplicate of issue16177, but for version 3.3.0 instead of 2.7.3. I'm closing this in favor of the prior report. Steve, can you try the suggestion from msg172501 in #16177 ? ---------- resolution: -> duplicate status: open -> closed superseder: -> IDLE Crash on Open Parens _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 02:20:16 2012 From: report at bugs.python.org (Roger Serwy) Date: Thu, 06 Dec 2012 01:20:16 +0000 Subject: [issue16177] IDLE Crash on Open Parens In-Reply-To: <1349800735.66.0.856769538072.issue16177@psf.upfronthosting.co.za> Message-ID: <1354756816.34.0.276985994415.issue16177@psf.upfronthosting.co.za> Roger Serwy added the comment: Added version 3.3 as reported in #16622. ---------- nosy: +Steve.OBrien versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 02:24:11 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 06 Dec 2012 01:24:11 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354757051.6.0.866055628793.issue16612@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 02:25:46 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 06 Dec 2012 01:25:46 +0000 Subject: [issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins In-Reply-To: <1353123389.46.0.245856363901.issue16490@psf.upfronthosting.co.za> Message-ID: <1354757146.59.0.658327444552.issue16490@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: David, please subscribe to Issue #16612. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 02:29:36 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Thu, 06 Dec 2012 01:29:36 +0000 Subject: [issue887237] Machine integers Message-ID: <1354757376.11.0.94246120073.issue887237@psf.upfronthosting.co.za> Changes by Bruno Dupuis : ---------- nosy: +bruno.dupuis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 02:38:11 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Thu, 06 Dec 2012 01:38:11 +0000 Subject: [issue11299] Allow deepcopying and pickling paused generators In-Reply-To: <1298477739.0.0.699409651893.issue11299@psf.upfronthosting.co.za> Message-ID: <1354757891.88.0.0431543377585.issue11299@psf.upfronthosting.co.za> Changes by Bruno Dupuis : ---------- nosy: +bruno.dupuis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 02:44:06 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Thu, 06 Dec 2012 01:44:06 +0000 Subject: [issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip() In-Reply-To: <1339421358.2.0.611530152115.issue15045@psf.upfronthosting.co.za> Message-ID: <1354758246.97.0.762640160036.issue15045@psf.upfronthosting.co.za> Changes by Bruno Dupuis : ---------- nosy: +bruno.dupuis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 03:07:04 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Thu, 06 Dec 2012 02:07:04 +0000 Subject: [issue1294232] Error in metaclass search order Message-ID: <1354759624.76.0.862320173274.issue1294232@psf.upfronthosting.co.za> Changes by Bruno Dupuis : ---------- nosy: +bruno.dupuis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 03:55:01 2012 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 06 Dec 2012 02:55:01 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354762501.94.0.324594703849.issue16619@psf.upfronthosting.co.za> Nick Coghlan added the comment: First reaction is +1 for finally switching to real constant nodes in the AST for 3.4+. This is an inherited behaviour from 2.x where these were ordinary names rather than true keywords, so we weren't able to completely disallow overwriting them. As a smaller impact change for earlier versions, we should be able to do something in compiler_nameop [1] that picks up the 3 singleton names and allows only LOAD_CONST, erroring out otherwise. http://hg.python.org/cpython/file/default/Python/compile.c#l2625 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 03:56:14 2012 From: report at bugs.python.org (Alex Gaynor) Date: Thu, 06 Dec 2012 02:56:14 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354762574.27.0.429090753136.issue16619@psf.upfronthosting.co.za> Alex Gaynor added the comment: Nick, None was a constant even in 2k ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 04:56:13 2012 From: report at bugs.python.org (pmoody) Date: Thu, 06 Dec 2012 03:56:13 +0000 Subject: [issue16531] Allow IPNetwork to take a tuple In-Reply-To: <1353621566.3.0.0992835206333.issue16531@psf.upfronthosting.co.za> Message-ID: <1354766173.59.0.433554429148.issue16531@psf.upfronthosting.co.za> pmoody added the comment: on it. I'm not a huge fan of integer args for the first argument because of possible confusion between v4/v6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 05:09:40 2012 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 06 Dec 2012 04:09:40 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354766980.06.0.420210482755.issue16619@psf.upfronthosting.co.za> Nick Coghlan added the comment: True and False weren't, though (and even None wasn't a proper keyword) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 05:17:13 2012 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 06 Dec 2012 04:17:13 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354767433.27.0.103075776427.issue16619@psf.upfronthosting.co.za> Nick Coghlan added the comment: The difference in the errors below is the reason the systematic fix in Benjamin's patch simply wasn't practical in 2.x (as it would have required a complex deprecation dance to turn None, True and False into real keywords): Python 2.7.3 (default, Jul 24 2012, 10:05:38) [GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class C: pass ... >>> C.None Traceback (most recent call last): File "", line 1, in AttributeError: class C has no attribute 'None' >>> Python 3.2.3 (default, Jun 8 2012, 05:36:09) [GCC 4.7.0 20120507 (Red Hat 4.7.0-5)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> class C: pass ... >>> C.None File "", line 1 C.None ^ SyntaxError: invalid syntax ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 07:43:23 2012 From: report at bugs.python.org (Sworddragon) Date: Thu, 06 Dec 2012 06:43:23 +0000 Subject: [issue16625] Exception on mode 'br' Message-ID: <1354776203.28.0.947074059507.issue16625@psf.upfronthosting.co.za> New submission from Sworddragon: The mode 'br' on open() can cause an exception with the following message: "ValueError: mode string must begin with one of 'r', 'w', 'a' or 'U', not 'br'". Curriously most times the mode 'br' is working fine and I'm not able to create a simple test case where it fails. Only in one of my scripts it fails with an exception (in the attachments is an example). ---------- components: Interpreter Core files: error.log messages: 177028 nosy: Sworddragon priority: normal severity: normal status: open title: Exception on mode 'br' type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file28220/error.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 07:55:27 2012 From: report at bugs.python.org (Marius Gedminas) Date: Thu, 06 Dec 2012 06:55:27 +0000 Subject: [issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules In-Reply-To: <1353062789.06.0.457819088795.issue16484@psf.upfronthosting.co.za> Message-ID: <1354776927.82.0.158623575596.issue16484@psf.upfronthosting.co.za> Marius Gedminas added the comment: Considering many existing Python installations out there would it be possible to fix this on the server side? I.e. lowercase the URL while redirecting? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 08:28:15 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 06 Dec 2012 07:28:15 +0000 Subject: [issue16625] Exception on mode 'br' In-Reply-To: <1354776203.28.0.947074059507.issue16625@psf.upfronthosting.co.za> Message-ID: <1354778895.13.0.258313143874.issue16625@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 08:57:41 2012 From: report at bugs.python.org (Ben Hoyt) Date: Thu, 06 Dec 2012 07:57:41 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1354780661.42.0.455104301647.issue15207@psf.upfronthosting.co.za> Ben Hoyt added the comment: Ah, thanks for making this an issue of its own! As I commented over at Issue10551, it's a serious problem, and makes mimetypes.guess_type() unusable out of the box on Windows. Yes, the fix in Issue4969 uses "MIME\Database\Content Type", which is a mime type -> file extension mapping, *not the other way around*. So while this patch is definitely an improvement (for the most part it doesn't produce wrong values!), but I'm not sure it's the way to go, for a few reasons: 1) Many of the most important keys aren't in the Windows registry (in HKEY_CLASSES_ROOT, where this patch looks). This includes .png, .jpg, and .gif. All of these important types fall back to the hard-coded "types_map" in mimetypes.py anyway. 2) Some that do exist are wrong in the registry (or at the least, different from the built-in "types_map"). This includes .zip, which is "application/x-zip-compressed" (at least in my registry) but should be "application/zip". 3) It's slowish, as it has to load about 6000 registry keys (and more as you install more stuff on your system), but only about 200 of those have the "Content Type" subkey. On my machine (Windows 7, 64 bit CPython) this adds over 100ms to the startup time even on subsequent runs when cached -- and I think 100ms is pretty significant. Issue4969's version takes about 25ms, and reverting this completely would of course take 0ms. 4) Users and other programs can (and sometimes do!) change the Content Type keys in the registry -- whereas one wants mime type mappings to be consistent across systems. This last point is debatable for various reasons, and I think the above three points should carry the day, but I include it here for completeness. ;-) For these reasons, I think we should revert the fix for Issue4969 and leave Windows users to get the default types_map as before, which is at least consisent -- and for mimetypes.guess_type(), you want consistency. ---------- nosy: +benhoyt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 09:43:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 06 Dec 2012 08:43:18 +0000 Subject: [issue16625] Exception on mode 'br' In-Reply-To: <1354776203.28.0.947074059507.issue16625@psf.upfronthosting.co.za> Message-ID: <1354783398.69.0.780956893517.issue16625@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Is this issue just for 2.7? 3.3 was selected as the affected version, but the error message text seems limited to 2.7: http://hg.python.org/cpython/file/0adfbafe8a99/Objects/fileobject.c#l303 The exception can be reproduced simply using 2.7: >>> open('foo', 'br') ValueError: mode string must begin with one of 'r', 'w', 'a' or 'U', not 'br' Moreover, the 2.7 documentation says that "b" must be appended (in particular occurring after "r"), which to me means that the exception and message is correct: http://docs.python.org/2/library/functions.html#open ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 10:00:43 2012 From: report at bugs.python.org (Sworddragon) Date: Thu, 06 Dec 2012 09:00:43 +0000 Subject: [issue16625] Exception on mode 'br' In-Reply-To: <1354776203.28.0.947074059507.issue16625@psf.upfronthosting.co.za> Message-ID: <1354784443.49.0.134189150568.issue16625@psf.upfronthosting.co.za> Sworddragon added the comment: > Is this issue just for 2.7? 3.3 was selected as the affected version, but the error message text seems limited to 2.7 You have given me a good hint. My script is running on python3 with the shbang line "#!/usr/bin/python3 -OOtt". But it makes a subcall to python (which defaults to python2.7) instead of python3. This explains why I couldn't even reproduce this with a simple script. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 10:02:03 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 06 Dec 2012 09:02:03 +0000 Subject: [issue16625] Exception on mode 'br' In-Reply-To: <1354776203.28.0.947074059507.issue16625@psf.upfronthosting.co.za> Message-ID: <1354784523.21.0.191183751975.issue16625@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 11:05:13 2012 From: report at bugs.python.org (Sven Deichmann) Date: Thu, 06 Dec 2012 10:05:13 +0000 Subject: [issue12853] global name 'r' is not defined in upload.py In-Reply-To: <1314637700.16.0.440169429003.issue12853@psf.upfronthosting.co.za> Message-ID: <1354788313.32.0.535821577634.issue12853@psf.upfronthosting.co.za> Sven Deichmann added the comment: result seems indeed to be what is expected here. One additional note: This only occurs if you use the --show-response option for the upload command. if you omit that, you get no error message ---------- nosy: +Sven.Deichmann _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 11:24:00 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 06 Dec 2012 10:24:00 +0000 Subject: [issue10589] I/O ABC docs should specify which methods have implementations In-Reply-To: <1291143953.85.0.0204032538698.issue10589@psf.upfronthosting.co.za> Message-ID: <1354789440.93.0.732674075484.issue10589@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed in a58204570a7c, 3cb85250a0a3, 93742b046519. ---------- assignee: stutzbach -> asvetlov resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 11:25:08 2012 From: report at bugs.python.org (Daniel Urban) Date: Thu, 06 Dec 2012 10:25:08 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354789508.99.0.0684635138297.issue16619@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- nosy: +daniel.urban _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 11:26:24 2012 From: report at bugs.python.org (Georg Brandl) Date: Thu, 06 Dec 2012 10:26:24 +0000 Subject: [issue16484] pydoc generates invalid docs.python.org link for xml.etree.ElementTree and other modules In-Reply-To: <1353062789.06.0.457819088795.issue16484@psf.upfronthosting.co.za> Message-ID: <1354789584.64.0.639616599819.issue16484@psf.upfronthosting.co.za> Georg Brandl added the comment: Adding a redirect should be easy, yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 11:32:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2012 10:32:52 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1354789972.21.0.332997756572.issue16624@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: 2.7 is in bugfix only mode. Please update your patch to 3.4. ---------- nosy: +serhiy.storchaka stage: -> needs patch versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 11:48:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2012 10:48:08 +0000 Subject: [issue16569] Preventing errors of simultaneous access in zipfile In-Reply-To: <1354112511.94.0.436567820333.issue16569@psf.upfronthosting.co.za> Message-ID: <1354790888.59.0.542324719052.issue16569@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > Seek can be very cheap. Anybody could actually measure it??? I am waiting for an updated patch for issue14099 to make benchmarks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 12:17:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2012 11:17:20 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows Message-ID: <1354792639.08.0.445639143612.issue16626@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: glob.glob() can fall in infinite recursion (causing stack overflow) on Windows with patterns which contains metacharacters in drive or UNC path ('*:foo', r'\\?\c:\bar'). This is my assumption, someone should confirm it on Windows. Here is a patch, which fix an infinite recursion. ---------- components: Library (Lib), Windows files: glob_magic_in_drive.patch keywords: patch messages: 177038 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Infinite recursion in glob.glob('*:') on Windows type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28221/glob_magic_in_drive.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 12:29:27 2012 From: report at bugs.python.org (Singer Song) Date: Thu, 06 Dec 2012 11:29:27 +0000 Subject: [issue16627] comparison problem of two 'dict' objects Message-ID: <1354793367.35.0.329772791063.issue16627@psf.upfronthosting.co.za> New submission from Singer Song: #python code: a={600072:1, 80000880:2, 600243:3, 600495:4, 80002529:5} b={600072:1, 80000880:2, 600243:3, 80002529:5, 600495:4} print(a) print(b) print(a==b) print(str(a)==str(b)) print(a.keys()==b.keys()) #output in python2.7.3: {600072: 1, 80000880: 2, 600243: 3, 80002529: 5, 600495: 4} {600072: 1, 80000880: 2, 600243: 3, 600495: 4, 80002529: 5} True False False #output in python3.2.3: {600072: 1, 80000880: 2, 600243: 3, 80002529: 5, 600495: 4} {600072: 1, 80000880: 2, 600243: 3, 600495: 4, 80002529: 5} True False True #two questions: 1)str(a) and str(b) are different, why? 2)keys method returns different result between python2.7.3 and python3.2.3 ---------- components: Interpreter Core messages: 177039 nosy: singer priority: normal severity: normal status: open title: comparison problem of two 'dict' objects type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 12:32:20 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 06 Dec 2012 11:32:20 +0000 Subject: [issue16627] comparison problem of two 'dict' objects In-Reply-To: <1354793367.35.0.329772791063.issue16627@psf.upfronthosting.co.za> Message-ID: <1354793540.09.0.111225546151.issue16627@psf.upfronthosting.co.za> Ezio Melotti added the comment: That's because dicts are not ordered. You might want to use collections.OrderedDict if the order matters to you. ---------- nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 14:39:47 2012 From: report at bugs.python.org (Roman Evstifeev) Date: Thu, 06 Dec 2012 13:39:47 +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: <1354801187.5.0.00683351754661.issue9291@psf.upfronthosting.co.za> Changes by Roman Evstifeev : ---------- nosy: +Roman.Evstifeev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 15:20:16 2012 From: report at bugs.python.org (Berker Peksag) Date: Thu, 06 Dec 2012 14:20:16 +0000 Subject: [issue11797] 2to3 does not correct "reload" In-Reply-To: <1302191844.85.0.922084217825.issue11797@psf.upfronthosting.co.za> Message-ID: <1354803616.81.0.302098763105.issue11797@psf.upfronthosting.co.za> Berker Peksag added the comment: > Could you try to share could with fix_intern? Maybe by moving some > things to fixer_utils. Thanks for the suggestion. Here's a new patch. I'm not sure the name of the helper is correct. ---------- Added file: http://bugs.python.org/file28222/issue11797_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 15:26:29 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 06 Dec 2012 14:26:29 +0000 Subject: [issue16580] Add examples to int.to_bytres and int.from_bytes In-Reply-To: <1354217109.61.0.534443148437.issue16580@psf.upfronthosting.co.za> Message-ID: <1354803989.65.0.844875855055.issue16580@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Your example is comprehensive but not simple and obvious. I think better to keep it out of doc. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 15:31:38 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 06 Dec 2012 14:31:38 +0000 Subject: [issue16580] Add examples to int.to_bytres and int.from_bytes In-Reply-To: <1354217109.61.0.534443148437.issue16580@psf.upfronthosting.co.za> Message-ID: <1354804298.05.0.63730141766.issue16580@psf.upfronthosting.co.za> Ezio Melotti added the comment: I agree. The examples in the doc seem clear to me, whereas the ones you proposed are not as clear. Do you think there's something that they don't currently cover that should be added? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 15:53:31 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 06 Dec 2012 14:53:31 +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: <1354805611.38.0.155250764983.issue9291@psf.upfronthosting.co.za> STINNER Victor added the comment: > 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) The encoding is wrong. We should read the registry using Unicode, or at least use the correct encoding. The correct encoding is the ANSI code page: sys.getfilesystemencoding(). Can you please try with: default_encoding = sys.getfilesystemencoding() ? > python 3.1.2 mimetypes initialization also fails in redhat linux: (...) In Python 3.3, MimeTypes.read() opens files in UTF-8. The issue #13025 explains why UTF-8 is used instead the locale encoding, or another encoding. I see that read_mime_types() uses the locale encoding, it looks like a bug, it should also use UTF-8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 16:12:29 2012 From: report at bugs.python.org (Daniel Swanson) Date: Thu, 06 Dec 2012 15:12:29 +0000 Subject: [issue15346] Tkinter extention modules have no documentation In-Reply-To: <1342198047.2.0.619885102312.issue15346@psf.upfronthosting.co.za> Message-ID: <1354806749.8.0.638566226959.issue15346@psf.upfronthosting.co.za> Daniel Swanson added the comment: There is documentation of these modules, it's just that it's in the modules themselves. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 16:37:03 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 06 Dec 2012 15:37:03 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1354808223.01.0.0127447207455.issue16619@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I claim that this is not a bug in the existing versions. It is documented as "illegal" to assign to None: http://docs.python.org/2.7/library/constants.html?highlight=none#None So what exactly happens if you manage to bypass the existing checks is implementation-specific (or, in the C sense, "undefined behavior"). Therefore, the reaction of Python 2.7 (e.g.) is perfectly fine. ---------- nosy: +loewis versions: -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 17:24:23 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 06 Dec 2012 16:24:23 +0000 Subject: [issue2785] alternate fast builtin sum In-Reply-To: <1210190023.19.0.40382803719.issue2785@psf.upfronthosting.co.za> Message-ID: <1354811063.57.0.365539836647.issue2785@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- versions: +Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 18:40:42 2012 From: report at bugs.python.org (Tom Tromey) Date: Thu, 06 Dec 2012 17:40:42 +0000 Subject: [issue15516] exception-handling bug in PyString_Format In-Reply-To: <1343764780.71.0.604975878578.issue15516@psf.upfronthosting.co.za> Message-ID: <1354815642.41.0.662675928522.issue15516@psf.upfronthosting.co.za> Tom Tromey added the comment: It sure would. Here's a new patch. ---------- Added file: http://bugs.python.org/file28223/P _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:10:25 2012 From: report at bugs.python.org (Ashish Nitin Patil) Date: Thu, 06 Dec 2012 19:10:25 +0000 Subject: [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1354821025.89.0.745939179393.issue14901@psf.upfronthosting.co.za> Ashish Nitin Patil added the comment: Is anyone currently working on this issue? I am a newbie & am really looking forward to contributing, but, quite unsure of what exact changes need to be made to the FAQ documentation. The previous comments are very helpful & I am going to proceed with the same. Senior or Core developer suggestions/corrections are welcome anytime. ---------- nosy: +ashishnitinpatil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:32:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2012 19:32:01 +0000 Subject: [issue15539] Fixing Tools/scripts/pindent.py In-Reply-To: <1343924676.33.0.76595941249.issue15539@psf.upfronthosting.co.za> Message-ID: <1354822321.56.0.576585202951.issue15539@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Tests added. I am not sure tests will be passed on Windows. ---------- Added file: http://bugs.python.org/file28224/pindent_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:44:21 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 06 Dec 2012 19:44:21 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1354823061.62.0.657058835156.issue16596@psf.upfronthosting.co.za> Xavier de Gaye added the comment: In the test named 'test_pdb_return_command_for_generator' in the patch, the return command does not cause pdb to stop at the StopIteration debug event as expected. Instead the following step command steps into the generator. With the patch applied, in the following debugging session, pdb does not stop after the 'next' command. Pdb should stop to stay consistent with the way 'next' behaves in the same case on a plain function. === bar.py === def g(): yield 0 it = g() while True: try: x = next(it) print(x) except StopIteration: break ================== $ ./python -m pdb /tmp/bar.py > /tmp/bar.py(1)() -> def g(): (Pdb) break g Breakpoint 1 at /tmp/bar.py:1 (Pdb) continue > /tmp/bar.py(2)g() -> yield 0 (Pdb) next 0 The program finished and will be restarted > /tmp/bar.py(1)() -> def g(): (Pdb) ================== ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:45:38 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 06 Dec 2012 19:45:38 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1354823138.7.0.885276562299.issue16596@psf.upfronthosting.co.za> Xavier de Gaye added the comment: This new patch fixes the two problems described in my previous message. The patch is different from Andrew's patch in that it does not use a new state variable, and the test cases in the patch are a copy of Andrew's patch except for test_pdb_return_command_for_generator. ---------- Added file: http://bugs.python.org/file28225/issue16596_nostate.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:58:48 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 06 Dec 2012 19:58:48 +0000 Subject: [issue16628] leak in ctypes.resize() Message-ID: <1354823928.79.0.806934333118.issue16628@psf.upfronthosting.co.za> New submission from Antoine Pitrou: ctypes.resize() (and/or the deallocator) can leak because of a logic error. Attached patch seems to fix it. ---------- components: Library (Lib) files: ctypesresizeleak.patch keywords: patch messages: 177052 nosy: amaury.forgeotdarc, belopolsky, meador.inge, pitrou priority: normal severity: normal stage: patch review status: open title: leak in ctypes.resize() type: resource usage versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28226/ctypesresizeleak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 20:59:10 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 06 Dec 2012 19:59:10 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: <1321140269.61.0.335726830367.issue13390@psf.upfronthosting.co.za> Message-ID: <1354823950.6.0.197808691438.issue13390@psf.upfronthosting.co.za> Antoine Pitrou added the comment: As it turns out, ctypes does leak memory: see issue 16628. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 21:07:50 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 06 Dec 2012 20:07:50 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: <1321140269.61.0.335726830367.issue13390@psf.upfronthosting.co.za> Message-ID: <1354824470.59.0.492791751563.issue13390@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Updated patch with doc. If noone objects, I will commit soon. ---------- Added file: http://bugs.python.org/file28227/debugblocks6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 21:19:06 2012 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 06 Dec 2012 20:19:06 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: <1321140269.61.0.335726830367.issue13390@psf.upfronthosting.co.za> Message-ID: <1354825146.22.0.270364120902.issue13390@psf.upfronthosting.co.za> Dave Malcolm added the comment: Minor bikeshedding/spelling nit: should "_Py_AllocedBlocks" be changed to "_Py_AllocatedBlocks" (and s/_Py_GetAllocedBlocks/_Py_GetAllocatedBlocks/)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 21:19:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 06 Dec 2012 20:19:16 +0000 Subject: [issue6912] Add 'with' block support to Tools/Scripts/pindent.py In-Reply-To: <1252951048.2.0.53684997295.issue6912@psf.upfronthosting.co.za> Message-ID: <1354825156.59.0.555176490789.issue6912@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Actually without "next['with'] = 'end'" "with" support is broken. See issue15539. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 21:59:48 2012 From: report at bugs.python.org (Steve OBrien) Date: Thu, 06 Dec 2012 20:59:48 +0000 Subject: [issue16622] IDLE crashes on parentheses In-Reply-To: <1354742003.92.0.600931221581.issue16622@psf.upfronthosting.co.za> Message-ID: <1354827588.55.0.116356128322.issue16622@psf.upfronthosting.co.za> Steve OBrien added the comment: I have tried renaming my .idlerc file and it seemed yesterday not to work, I just did it again and it is working for the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 22:04:37 2012 From: report at bugs.python.org (Roger Serwy) Date: Thu, 06 Dec 2012 21:04:37 +0000 Subject: [issue16622] IDLE crashes on parentheses In-Reply-To: <1354827588.55.0.116356128322.issue16622@psf.upfronthosting.co.za> Message-ID: <50C10876.6030800@gmail.com> Roger Serwy added the comment: Steve, could you post the contents of your .idlerc directory? I wonder if "encoding = locale" is the culprit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 22:04:43 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Thu, 06 Dec 2012 21:04:43 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1354827883.66.0.0419724430279.issue16596@psf.upfronthosting.co.za> Xavier de Gaye added the comment: When the generator is used in a for loop, the interpreter handles the StopIteration in its eval loop, and the exception is not raised. So it may be considered as confusing to have pdb behave differently with a generator depending on its context. A way to fix this would be to not ignore the return debug events, with the drawback of a more verbose debug process with generators. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 22:10:57 2012 From: report at bugs.python.org (Steve OBrien) Date: Thu, 06 Dec 2012 21:10:57 +0000 Subject: [issue16622] IDLE crashes on parentheses In-Reply-To: <1354742003.92.0.600931221581.issue16622@psf.upfronthosting.co.za> Message-ID: <1354828257.09.0.0404508591179.issue16622@psf.upfronthosting.co.za> Changes by Steve OBrien : Added file: http://bugs.python.org/file28228/idlerc.tar.gz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 22:22:31 2012 From: report at bugs.python.org (Arthur Petitpierre) Date: Thu, 06 Dec 2012 21:22:31 +0000 Subject: [issue4643] cgitb.html fails if getattr call raises exception In-Reply-To: <1229093313.68.0.275889144486.issue4643@psf.upfronthosting.co.za> Message-ID: <1354828951.84.0.0536554649477.issue4643@psf.upfronthosting.co.za> Arthur Petitpierre added the comment: I attached a patch containing both the fix suggested by Allan and a test case. Tested against trunk and python2.7. ---------- keywords: +patch nosy: +arthur.petitpierre Added file: http://bugs.python.org/file28229/issue4643.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 22:25:09 2012 From: report at bugs.python.org (Roger Serwy) Date: Thu, 06 Dec 2012 21:25:09 +0000 Subject: [issue16622] IDLE crashes on parentheses In-Reply-To: <1354828257.11.0.654913521393.issue16622@psf.upfronthosting.co.za> Message-ID: <50C10D45.90702@gmail.com> Roger Serwy added the comment: You only have an empty "recent-files.lst" file in your posted archive. From what I can tell, there is nothing in common with the other posted .idlerc that had these problems. Please do report if the crashes with open parens reoccurs and what was changed in IDLE to trigger it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 6 23:41:12 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 06 Dec 2012 22:41:12 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <3YHWxg69MTzRfs@mail.python.org> Roundup Robot added the comment: New changeset 03f92a9f0875 by Benjamin Peterson in branch 'default': create NameConstant AST class for None, True, and False literals (closes #16619) http://hg.python.org/cpython/rev/03f92a9f0875 ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 00:56:39 2012 From: report at bugs.python.org (David Villa Alises) Date: Thu, 06 Dec 2012 23:56:39 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354838199.03.0.37586391288.issue16612@psf.upfronthosting.co.za> Changes by David Villa Alises : ---------- nosy: +david.villa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 02:29:31 2012 From: report at bugs.python.org (Roger Serwy) Date: Fri, 07 Dec 2012 01:29:31 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change Message-ID: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> New submission from Roger Serwy: Revision e4598364ea29 changed the docstring for "int", causing the CallTips test to fail in IDLE. The attached patch fixes the problem. ---------- components: IDLE files: calltips_test_update.patch keywords: easy, patch messages: 177063 nosy: serwy, terry.reedy priority: normal severity: normal stage: patch review status: open title: IDLE: Calltips test fails due to int docstring change type: behavior versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28230/calltips_test_update.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 02:46:15 2012 From: report at bugs.python.org (Roger Serwy) Date: Fri, 07 Dec 2012 01:46:15 +0000 Subject: [issue16630] IDLE: Calltip fails if __getattr__ raises exception Message-ID: <1354844775.58.0.855877358898.issue16630@psf.upfronthosting.co.za> New submission from Roger Serwy: The calltip fails if __getattr__ raises an exception. Take as an example: Python 3.4.0a0 (default:0238cc842805+, Dec 6 2012, 19:17:04) [GCC 4.7.2] on linux Type "copyright", "credits" or "license()" for more information. >>> class Test: def __getattr__(self, name): raise Exception() >>> a = Test() >>> a( This traceback is sent to stderr: Exception in Tkinter callback Traceback (most recent call last): File "/home/serwy/Code/python/cpython/Lib/tkinter/__init__.py", line 1442, in __call__ return self.func(*args) File "/home/serwy/Code/python/cpython/Lib/idlelib/MultiCall.py", line 166, in handler r = l[i](event) File "/home/serwy/Code/python/cpython/Lib/idlelib/CallTips.py", line 56, in try_open_calltip_event self.open_calltip(False) File "/home/serwy/Code/python/cpython/Lib/idlelib/CallTips.py", line 75, in open_calltip argspec = self.fetch_tip(expression) File "/home/serwy/Code/python/cpython/Lib/idlelib/CallTips.py", line 101, in fetch_tip (expression,), {}) File "/home/serwy/Code/python/cpython/Lib/idlelib/rpc.py", line 216, in remotecall return self.asyncreturn(seq) File "/home/serwy/Code/python/cpython/Lib/idlelib/rpc.py", line 247, in asyncreturn return self.decoderesponse(response) File "/home/serwy/Code/python/cpython/Lib/idlelib/rpc.py", line 267, in decoderesponse raise what Exception The attached patch fixes the issue. ---------- components: IDLE files: calltips_getattr_error.patch keywords: easy, needs review, patch messages: 177064 nosy: serwy, terry.reedy priority: normal severity: normal stage: patch review status: open title: IDLE: Calltip fails if __getattr__ raises exception type: behavior versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28231/calltips_getattr_error.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 05:41:16 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 07 Dec 2012 04:41:16 +0000 Subject: [issue16631] tarfile.extractall() doesn't extract everything if .next() was used Message-ID: <1354855276.1.0.878015275431.issue16631@psf.upfronthosting.co.za> New submission from anatoly techtonik: If tarfile.next() is used before .extractall(), the latter fails to extract files that were accessed. ---------- components: Library (Lib) messages: 177065 nosy: techtonik priority: normal severity: normal status: open title: tarfile.extractall() doesn't extract everything if .next() was used versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 05:43:49 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 07 Dec 2012 04:43:49 +0000 Subject: [issue16631] tarfile.extractall() doesn't extract everything if .next() was used In-Reply-To: <1354855276.1.0.878015275431.issue16631@psf.upfronthosting.co.za> Message-ID: <1354855429.39.0.78496927694.issue16631@psf.upfronthosting.co.za> anatoly techtonik added the comment: Attached is patch with test. Test needs valid extractable .tar file. The testtar.tar that is currently present fails to unpack on Windows because of too long filenames inside. ---------- keywords: +patch Added file: http://bugs.python.org/file28232/16631.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 05:50:58 2012 From: report at bugs.python.org (pmoody) Date: Fri, 07 Dec 2012 04:50:58 +0000 Subject: [issue16531] Allow IPNetwork to take a tuple In-Reply-To: <1353621566.3.0.0992835206333.issue16531@psf.upfronthosting.co.za> Message-ID: <1354855858.8.0.468164184764.issue16531@psf.upfronthosting.co.za> pmoody added the comment: This patch is for (address, prefixlen). I now see that the original request was (address, netmask). I'll fix this up. In the meantime, let me know if this is what you had in mind. Cheers, peter ---------- keywords: +patch Added file: http://bugs.python.org/file28233/issue16531.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 06:49:57 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 07 Dec 2012 05:49:57 +0000 Subject: [issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__ In-Reply-To: <1348615231.16.0.514985949274.issue16049@psf.upfronthosting.co.za> Message-ID: <1354859397.77.0.706266032753.issue16049@psf.upfronthosting.co.za> ?ric Araujo added the comment: Bruno: do you want to propose an idea for the doc part? Or even a full patch for this request? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 08:13:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 07:13:27 +0000 Subject: [issue16631] tarfile.extractall() doesn't extract everything if .next() was used In-Reply-To: <1354855276.1.0.878015275431.issue16631@psf.upfronthosting.co.za> Message-ID: <1354864407.0.0.130532308266.issue16631@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Possible this is a duplicate of issue16601. ---------- nosy: +serhiy.storchaka versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 08:21:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 07:21:11 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354864871.86.0.0981009182764.issue16629@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, I also noticed this. However, "int(x=0) -> integer" is not enough. The right calltip should be "int(x=0) -> integer\nint(x, base=10) -> integer". ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 08:31:48 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 07 Dec 2012 07:31:48 +0000 Subject: [issue16631] tarfile.extractall() doesn't extract everything if .next() was used In-Reply-To: <1354855276.1.0.878015275431.issue16631@psf.upfronthosting.co.za> Message-ID: <1354865508.08.0.705356392174.issue16631@psf.upfronthosting.co.za> anatoly techtonik added the comment: issue16601 is about restarting iterations from zero if interrupted. This one is that extractall() should not use public iteration API at all. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 08:50:07 2012 From: report at bugs.python.org (Ashish Nitin Patil) Date: Fri, 07 Dec 2012 07:50:07 +0000 Subject: [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1354866607.14.0.884993969961.issue14901@psf.upfronthosting.co.za> Ashish Nitin Patil added the comment: Found this - http://docs.python.org/3/using/windows.html Seems like my work got a bit easy. Need to truncate the bits & bytes oof the document so as to fit with FAQ system. I think I will also need to do changes to the official wiki (online) too. Any help/suggestion is appreciated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 10:04:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 09:04:00 +0000 Subject: [issue16631] tarfile.extractall() doesn't extract everything if .next() was used In-Reply-To: <1354855276.1.0.878015275431.issue16631@psf.upfronthosting.co.za> Message-ID: <1354871040.56.0.190755299777.issue16631@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: OK. Then those issues are just related. ---------- nosy: +lars.gustaebel stage: -> patch review type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 10:07:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 09:07:45 +0000 Subject: [issue16601] Restarting iteration over tarfile continues from where it left off. In-Reply-To: <1354564872.87.0.0661195327337.issue16601@psf.upfronthosting.co.za> Message-ID: <1354871265.44.0.127729714808.issue16601@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Related issue: issue16631. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 10:08:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 09:08:32 +0000 Subject: [issue16601] Restarting iteration over tarfile continues from where it left off. In-Reply-To: <1354564872.87.0.0661195327337.issue16601@psf.upfronthosting.co.za> Message-ID: <1354871312.63.0.111423299853.issue16601@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +lars.gustaebel versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 10:08:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 09:08:49 +0000 Subject: [issue16601] Restarting iteration over tarfile continues from where it left off. In-Reply-To: <1354564872.87.0.0661195327337.issue16601@psf.upfronthosting.co.za> Message-ID: <1354871329.1.0.707708515123.issue16601@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 10:28:19 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 07 Dec 2012 09:28:19 +0000 Subject: [issue16555] Add es_cu to locale aliases In-Reply-To: <1353900143.47.0.688085135262.issue16555@psf.upfronthosting.co.za> Message-ID: <1354872499.55.0.433069913296.issue16555@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +patch Added file: http://bugs.python.org/file28234/issue16555.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 10:34:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 09:34:37 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354872877.62.0.698769765458.issue16629@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch, which adds multiline calltips support. ---------- Added file: http://bugs.python.org/file28235/idle_calltips_multiline.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:02:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 10:02:51 +0000 Subject: [issue16630] IDLE: Calltip fails if __getattr__ raises exception In-Reply-To: <1354844775.58.0.855877358898.issue16630@psf.upfronthosting.co.za> Message-ID: <1354874571.82.0.424292740583.issue16630@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: 1. rpcclt.remotecall also can raise an exception. 2. I think fetch_tip() should return '' in case of exception as for non-existent arguments or for non-callables. You can add tests for this cases too. 3. "break" is a reserved word. It's not a good name for an attribute. 4. It will be better test for exception an instance of the special class and not break TC. class Broken: def __getattr__(self, name): raise Exception('Broken __getattr__') brocken = Broken() test('brocken', '') ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:08:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 10:08:29 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354874909.19.0.677306218738.issue16629@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:23:01 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 07 Dec 2012 10:23:01 +0000 Subject: [issue16632] Enable DEP and ASLR Message-ID: <1354875781.46.0.686705865065.issue16632@psf.upfronthosting.co.za> New submission from Christian Heimes: Python 3.3 doesn't use address space layout randomization [1] and data execution prevention [2] on Windows. ASLR and DEP make certain kinds of attacks harder. An attacker can't predict the address of functions or globals anymore and DEP helps against NOP sled attacks. Python's test suite runs fine with DEP and ASLR on AMD64. I see a crash in test_capi and a couple of crashes in test_faulthandler but these don't seem to be related. [1] http://en.wikipedia.org/wiki/ASLR [2] http://en.wikipedia.org/wiki/Data_Execution_Prevention ---------- components: Windows files: depaslr.patch keywords: patch messages: 177077 nosy: christian.heimes priority: normal severity: normal stage: test needed status: open title: Enable DEP and ASLR type: security versions: Python 3.4 Added file: http://bugs.python.org/file28236/depaslr.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:23:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 07 Dec 2012 10:23:18 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354875798.84.0.273596308372.issue16629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Here is a patch, which adds multiline calltips support. Serhiy, it looks like this issue/patch is just to fix the test and not to add "support." Also, it looks like the test only checks the first line, so that the second line shouldn't be added to the expected value. For example, the code comment for test_builtins() says: # if first line of a possibly multiline compiled docstring changes, # must change corresponding test string ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:27:24 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 07 Dec 2012 10:27:24 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354876044.97.0.309370835474.issue16629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Sorry, I see that you changed the logic of get_argspec(). In that case, you should probably update the docstring of get_argspec() as well as the code comment I referenced (so that both say which lines are checked rather than the first line). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:53:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 10:53:34 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354877614.52.0.015398529766.issue16629@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Done. Here is an updated patch. ---------- Added file: http://bugs.python.org/file28237/idle_calltips_multiline_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 11:54:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 10:54:09 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354877649.72.0.473577832535.issue16629@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28235/idle_calltips_multiline.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 13:01:44 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Fri, 07 Dec 2012 12:01:44 +0000 Subject: [issue16633] os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv) Message-ID: <1354881703.99.0.276690917603.issue16633@psf.upfronthosting.co.za> New submission from V?clav ?milauer: On windows, environment variables exist in two copies: one is manipulated using win32 API (GetEnvironmentVariable, SetEnvironmentVariable), and another one is maintained by the C runtime (getenv, _putenv). This is explained in more depth in [1]. os.environ manipulates win32 environment variables, but *not* those seen by the CRT. This means that if I set an environment variable using os.environ and later read it, in the same process, using getenv in an extension module, it will not give the expected result. Child processes *do* see those vars in CRT, since it is copied over from the win32 version at process startup. Setting env vars has legitimate uses, since it is one of the few ways to influence initialization of extension modules: for instance, setting OMP_NUM_THREADS sets number of threads for OpenMP runtime (which cannot be changed once the module using it is loaded). It would be ideal to keep both CRT and win32 env vars in sync transparently. If that is not realistically achievable, this gotcha should be documented as a warning in the os.environ documentation. A workaround to this problem to set variables in both win32 and CRT using something like import ctypes, ctypes.util, os.environ ctypes.cdll[ctypes.util.find_msvcrt()]._putenv("%s=%s"%(name,value)) os.environ[name]=value [1] http://msmvps.com/blogs/senthil/archive/2009/10/13/when-what-you-set-is-not-what-you-get-setenvironmentvariable-and-getenv.aspx ---------- assignee: docs at python components: Documentation messages: 177081 nosy: docs at python, eudoxos priority: normal severity: normal status: open title: os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv) type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 13:30:36 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 07 Dec 2012 12:30:36 +0000 Subject: [issue15701] AttributeError from HTTPError when using digest auth In-Reply-To: <1345149357.77.0.903430006119.issue15701@psf.upfronthosting.co.za> Message-ID: <1354883436.27.0.127593402824.issue15701@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +patch versions: +Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28238/issue15701.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 13:41:39 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Fri, 07 Dec 2012 12:41:39 +0000 Subject: [issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__ In-Reply-To: <1348615231.16.0.514985949274.issue16049@psf.upfronthosting.co.za> Message-ID: <1354884099.18.0.416095607768.issue16049@psf.upfronthosting.co.za> Bruno Dupuis added the comment: ?ric, here is a full patch. I hope the doc isn't too confuse. I think we lack a word meaning 'has XXX as metaclass', we should imagine a term for that. ---------- keywords: +patch Added file: http://bugs.python.org/file28239/16049.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 13:50:46 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Fri, 07 Dec 2012 12:50:46 +0000 Subject: [issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__ In-Reply-To: <1348615231.16.0.514985949274.issue16049@psf.upfronthosting.co.za> Message-ID: <1354884646.15.0.609756654835.issue16049@psf.upfronthosting.co.za> Changes by Bruno Dupuis : Added file: http://bugs.python.org/file28240/16049.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 13:50:56 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 07 Dec 2012 12:50:56 +0000 Subject: [issue16634] urllib.error.HTTPError.reason is not documented Message-ID: <1354884656.5.0.110910747898.issue16634@psf.upfronthosting.co.za> New submission from Berker Peksag: The "reason" attribute has been added to urllib.error.HTTPError in issue 13211. Related changeset: http://hg.python.org/cpython/rev/deb60efd32eb ---------- assignee: docs at python components: Documentation files: httperror-reason.diff keywords: patch messages: 177083 nosy: berker.peksag, docs at python priority: normal severity: normal status: open title: urllib.error.HTTPError.reason is not documented versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28241/httperror-reason.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 13:52:56 2012 From: report at bugs.python.org (Bruno Dupuis) Date: Fri, 07 Dec 2012 12:52:56 +0000 Subject: [issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__ In-Reply-To: <1348615231.16.0.514985949274.issue16049@psf.upfronthosting.co.za> Message-ID: <1354884776.39.0.0713517862153.issue16049@psf.upfronthosting.co.za> Changes by Bruno Dupuis : Removed file: http://bugs.python.org/file28239/16049.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 13:56:53 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 07 Dec 2012 12:56:53 +0000 Subject: [issue16632] Enable DEP and ASLR In-Reply-To: <1354875781.46.0.686705865065.issue16632@psf.upfronthosting.co.za> Message-ID: <1354885013.96.0.443963829993.issue16632@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I'm +0. There is a risk that this may break 3rd-party extension modules. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 14:01:40 2012 From: report at bugs.python.org (Dave Chambers) Date: Fri, 07 Dec 2012 13:01:40 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1354885300.9.0.739684572276.issue15207@psf.upfronthosting.co.za> Dave Chambers added the comment: Disappointing that "faster but broken" is preferable to "slower but fixed" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 14:11:02 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Dec 2012 13:11:02 +0000 Subject: [issue16631] tarfile.extractall() doesn't extract everything if .next() was used In-Reply-To: <1354855276.1.0.878015275431.issue16631@psf.upfronthosting.co.za> Message-ID: <1354885862.8.0.142548772972.issue16631@psf.upfronthosting.co.za> R. David Murray added the comment: I wonder if both bugs are symptoms of an underlying bug: if you call 'iter' twice on a tarfile, are the iterators independent? Is that even a sensible thing to be able to do? ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 14:23:28 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 07 Dec 2012 13:23:28 +0000 Subject: [issue16633] os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv) In-Reply-To: <1354881703.99.0.276690917603.issue16633@psf.upfronthosting.co.za> Message-ID: <1354886608.08.0.537927591429.issue16633@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I think the problem is: windows process can contain single shared win32 API and several CRT copies ? one for Visual Studio 2008, other for VS 2010 etc. We cannot know which CRT version is used by particular extension, so I doubt we can initialize it properly. Your workaround has the same problem. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 14:30:17 2012 From: report at bugs.python.org (Tim Golden) Date: Fri, 07 Dec 2012 13:30:17 +0000 Subject: [issue16633] os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv) In-Reply-To: <1354881703.99.0.276690917603.issue16633@psf.upfronthosting.co.za> Message-ID: <50C1EF67.7050606@timgolden.me.uk> Tim Golden added the comment: Does the same problem obtain if you use os.putenv (which calls the crt putenv under the covers)? ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 14:33:44 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Dec 2012 13:33:44 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1354887224.55.0.18677282731.issue15207@psf.upfronthosting.co.za> R. David Murray added the comment: I will note that on unix the user is also free to update the machine's mime types registry (that's more than half the point of the mimetypes module). Usually this is only done by installed software...as I believe is the case on Windows as well. That said, there should be a way to explicitly bypass this loading of local data for a program that wishes to use only the Python supplied types. And indeed, this is possible: just pass an empty list of filenames to init. This bypasses the windows registry lookup. (Note that this could be better documented...it is not made explicit that an empty list is different from not specifying a list or specifying it as None, but it is). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 14:33:50 2012 From: report at bugs.python.org (Filip Zyzniewski) Date: Fri, 07 Dec 2012 13:33:50 +0000 Subject: [issue16635] Interpreter not closing stdout/stderr on exit Message-ID: <1354887230.33.0.111304282824.issue16635@psf.upfronthosting.co.za> New submission from Filip Zyzniewski: When using a Python script as a unix pipe filter with its stdout redirected to a file: python script.py > /nfs/foo user is not notified of some writing problems on NFS, because these are sometimes reported on close(), and the interpreter never does neither close(1) nor close(2): $ strace -eclose python -c '' 2>&1 | grep 'close([12])' $ ---------- components: IO messages: 177090 nosy: filip.zyzniewski priority: normal severity: normal status: open title: Interpreter not closing stdout/stderr on exit type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 14:37:00 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Dec 2012 13:37:00 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1354887420.43.0.418430579174.issue15207@psf.upfronthosting.co.za> R. David Murray added the comment: That said, the fact that windows is just *wrong* about some mimetypes is definitely an issue. We could call it a platform bug, but that would be a disservice to the user community. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 14:46:06 2012 From: report at bugs.python.org (Dave Chambers) Date: Fri, 07 Dec 2012 13:46:06 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1354887966.44.0.426722006612.issue15207@psf.upfronthosting.co.za> Dave Chambers added the comment: Seems to me that some hybrid would be a good solution: Hardcode the known types (which solves the "windows is just wrong" case) then as a default look in the registry for those that aren't hardcoded. Therefore the hit of additional time would only be for lesser-known types. In any case, it's pretty bad that python allows the wrong mimetype for PNG , even if it is a Windows registry issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 14:52:51 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 07 Dec 2012 13:52:51 +0000 Subject: [issue16635] Interpreter not closing stdout/stderr on exit In-Reply-To: <1354887230.33.0.111304282824.issue16635@psf.upfronthosting.co.za> Message-ID: <1354888371.6.0.0313714756398.issue16635@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: stdout and stderr are not closed, because in 99.9999% of cases it's useless: they are closed upon the program exit. Also, imagine what would happend if an error occured after closing them, we would be unable to log it. If you want to avoid this kind of problem, you should call: """ os.fsync(1) os.fsync(2) """ when you're done. Note that you'll have the same problem with shell scripts and any other executable... ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 15:08:03 2012 From: report at bugs.python.org (Filip Zyzniewski) Date: Fri, 07 Dec 2012 14:08:03 +0000 Subject: [issue16635] Interpreter not closing stdout/stderr on exit In-Reply-To: <1354887230.33.0.111304282824.issue16635@psf.upfronthosting.co.za> Message-ID: <1354889283.34.0.359637854781.issue16635@psf.upfronthosting.co.za> Filip Zyzniewski added the comment: If stdout was closed before closing stderr, then stdout problems could be reported, and that is what I would expect when using Python this way. os.fsync(1) helps, but only if preceeded by sys.stdout.flush() and it seems a bit cumbersome. Is there any downside to doing close(1) explicitely? cat, grep, dd and echo close their stdout, why couldn't Python do this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 15:26:48 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 14:26:48 +0000 Subject: [issue16631] tarfile.extractall() doesn't extract everything if .next() was used In-Reply-To: <1354855276.1.0.878015275431.issue16631@psf.upfronthosting.co.za> Message-ID: <1354890408.28.0.0920732626397.issue16631@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Since you iterated to the end any iterators are independent (they are just indices in the list of members). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 15:51:13 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Dec 2012 14:51:13 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1354891873.84.0.866412108097.issue15207@psf.upfronthosting.co.za> R. David Murray added the comment: To be consistent with the overall philosophy of the mimetypes module, it should be instead a list of "windows fixes" which are applied if the broken mimetype is found in the windows registry. If you want to avoid the overhead, pass an empty list to init. A note about the overhead and fixes should be added to the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 15:57:56 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 07 Dec 2012 14:57:56 +0000 Subject: [issue16635] Interpreter not closing stdout/stderr on exit In-Reply-To: <1354889283.34.0.359637854781.issue16635@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > If stdout was closed before closing stderr, then stdout problems > could be reported, and that is what I would expect when using Python > this way. To be consistent, we should also close stderr, and then we couldn't report any subsequent error. > os.fsync(1) helps, but only if preceeded by sys.stdout.flush() and it > seems a bit cumbersome. You should complain to the POSIX committee ;-) The thing is simply that if you want to make sure that data is committed (or get an error otherwise), you should call fsync() on the file descriptor. Just having close return 0 doesn't guarantee that data is committed, in the general case (NFS is a special case with its close-to-open cache consistency). > cat, grep, dd and echo close their stdout, why couldn't Python do this? bash, dmesg, ifconfig and many others don't. It could probably be possible, but I don't think the benefit is worth the trouble. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 17:28:50 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 07 Dec 2012 16:28:50 +0000 Subject: [issue15539] Fixing Tools/scripts/pindent.py In-Reply-To: <1343924676.33.0.76595941249.issue15539@psf.upfronthosting.co.za> Message-ID: <1354897730.38.0.355011413514.issue15539@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:01:38 2012 From: report at bugs.python.org (Laurynas Speicys) Date: Fri, 07 Dec 2012 17:01:38 +0000 Subject: [issue16636] codecs: readline() followed by readlines() returns trunkated results Message-ID: <1354899698.79.0.269419302823.issue16636@psf.upfronthosting.co.za> New submission from Laurynas Speicys: codecs.readlines() does not read to the end of the file if called after codecs.readline(). Skimmed through tasks containing codecs in title and could not find a candidate that sounded identical. Repro follows: $ cat sample_text.txt Subject: Incorrect email address RATER EMAIL rejected an invitation from SUBJECT NAME in the PROJECT TITLE project. Notification was sent to , but the email address was no longer valid. $ python Python 2.7.3 (default, Sep 26 2012, 21:53:58) [GCC 4.7.2] on linux2 >>> >>> import codecs >>> >>> # No problem if readlines() are run at the beginning: >>> >>> f_in = codecs.open('sample_text.txt', 'rb', 'utf-8') >>> f_in.readlines() [u'Subject: Incorrect email address\n', u'\n', u'RATER EMAIL rejected an invitation from SUBJECT NAME in\n', u'the PROJECT TITLE project. Notification was sent to ,\n', u'but the email address was no longer valid.'] >>> f_in.close() >>> >>> # Let us try to read the first line separately, >>> # and then read the remainder of the file: >>> >>> f_in = codecs.open('sample_text.txt', 'rb', 'utf-8') >>> f_in.readline() u'Subject: Incorrect email address\n' >>> f_in.readlines() [u'\n', u'RATER EMAIL rejected an invitation fro'] The first readlines() does not read to the end. Subsequent readlines() returns what's left to read. sample_text.txt attached. ---------- files: sample_text.txt messages: 177098 nosy: laurynas priority: normal severity: normal status: open title: codecs: readline() followed by readlines() returns trunkated results type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file28242/sample_text.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:11:50 2012 From: report at bugs.python.org (=?utf-8?b?VsOhY2xhdiDFoG1pbGF1ZXI=?=) Date: Fri, 07 Dec 2012 17:11:50 +0000 Subject: [issue16633] os.environ updates only one copy of env vars under Windows (GetEnvironmentVariable vs. getenv) In-Reply-To: <1354881703.99.0.276690917603.issue16633@psf.upfronthosting.co.za> Message-ID: <1354900310.58.0.891014642915.issue16633@psf.upfronthosting.co.za> V?clav ?milauer added the comment: I checked on Windows 7 64bit with python 2.7 (sorry, not python 3.3 installed here) with the script attached. Each line sets a variable using the method in the very left column, then it attempts to read it back using all methods. os.environ win32 os.?etenv msvcrt msvcr? os.environ OK OK OK -- -- win32 -- OK -- -- -- os.?etenv -- OK -- -- -- msvcrt -- OK -- OK -- msvcr? -- OK -- -- -- Methods which can read back what they also set are os.environ, win32api, msvcrt. OTOH, msvcr? (which is ctypes.util.find_msvcr(), in my case msvcr90.dll) does not read its own values, just like os.getenv/os.putenv. It *seems* that reading with win32 API is very reliable (that is not a good news for writing cross-platform extension modules), though, but perhaps it just asks the CRT if it does not find the variable defined (my testing did not go that far). @Andrew: you're probably right, though it does not explain, why msvcr90.dll does not read back the values I set in there - that is the CRT python27.dll itself links to -- ---------- Added file: http://bugs.python.org/file28243/tryenv2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:15:55 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 07 Dec 2012 17:15:55 +0000 Subject: [issue16495] bytes_decode() unnecessarily examines encoding In-Reply-To: <1353187789.37.0.881944433109.issue16495@psf.upfronthosting.co.za> Message-ID: <1354900555.11.0.633090154304.issue16495@psf.upfronthosting.co.za> Andrew Svetlov added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:32:20 2012 From: report at bugs.python.org (Roger Serwy) Date: Fri, 07 Dec 2012 17:32:20 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354901540.92.0.795823081528.issue16629@psf.upfronthosting.co.za> Roger Serwy added the comment: The number of lines in the return value of get_argspec should be limited, otherwise the calltip window can become too large. For example, many functions in the numpy project have very long doc strings. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:34:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 17:34:36 +0000 Subject: [issue16636] codecs: readline() followed by readlines() returns trunkated results In-Reply-To: <1354899698.79.0.269419302823.issue16636@psf.upfronthosting.co.za> Message-ID: <1354901676.45.0.688273674368.issue16636@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Confirm for 3.x. See also issue8260, issue12446, and issue14475. ---------- components: +IO, Unicode nosy: +ezio.melotti, serhiy.storchaka stage: -> needs patch versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 18:48:50 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 07 Dec 2012 17:48:50 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354902530.59.0.163457820669.issue16629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I would separate the issue of fixing the test (behavior) from adding support for multi-line tool tips (enhancement). Unless the policy for IDLE is different, it seems the latter should be limited to 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 19:00:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 18:00:09 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354903209.58.0.994128662233.issue16629@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The number of lines in the return value of get_argspec should be limited, otherwise the calltip window can become too large. Calltip limited by first empty line. But I?agree, some reasonable hard limit (say 10 lines) should be. > I would separate the issue of fixing the test (behavior) from adding support for multi-line tool tips (enhancement). Then calltip will be wrong. `int` can accept two arguments, not only one. Alternative consistent solution is to revert all changes which were convert oneline signatures to multiline (I think you won't like this ;) ). > Unless the policy for IDLE is different, it seems the latter should be limited to 3.4. The policy for IDLE is different. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 19:04:52 2012 From: report at bugs.python.org (Mark Shroyer) Date: Fri, 07 Dec 2012 18:04:52 +0000 Subject: [issue16637] py-bt, py-locals, etc. GDB commands fail with output-radix 16 Message-ID: <1354903492.9.0.822155625877.issue16637@psf.upfronthosting.co.za> New submission from Mark Shroyer: When debugging a Python process in GDB with output-radix 16, the py-bt, py-locals, py-value, etc. commands from python-gdb.py fail with messages like "(unable to read python frame information)". The problem comes down to the int_from_int function attempting to convert its string argument from a base-10 integer representation, even if that string is something like "0xf". The attached patch fixes this. ---------- components: Demos and Tools files: python_gdb_fix.patch keywords: patch messages: 177105 nosy: mshroyer priority: normal severity: normal status: open title: py-bt, py-locals, etc. GDB commands fail with output-radix 16 versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file28244/python_gdb_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 19:07:31 2012 From: report at bugs.python.org (Mark Shroyer) Date: Fri, 07 Dec 2012 18:07:31 +0000 Subject: [issue16637] py-bt, py-locals, etc. GDB commands fail with output-radix 16 In-Reply-To: <1354903492.9.0.822155625877.issue16637@psf.upfronthosting.co.za> Message-ID: <1354903651.65.0.230299166754.issue16637@psf.upfronthosting.co.za> Mark Shroyer added the comment: Example of GDB session exhibiting this error: https://gist.github.com/4228342#file_gdb_output.txt Thread on python-list: http://mail.python.org/pipermail/python-list/2012-December/636244.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 19:21:45 2012 From: report at bugs.python.org (Ashish Nitin Patil) Date: Fri, 07 Dec 2012 18:21:45 +0000 Subject: [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1354904505.25.0.27926238811.issue14901@psf.upfronthosting.co.za> Ashish Nitin Patil added the comment: Made most of the relevant changes & updation to the FAQ. 1. Updated references to Windows 7/XP/Vista & dropped all references & solutions on older Windows. 2. Also, many of the ending FAQs like cw3215mt.dll, CTL3D32 were completely dropped as I found that the googled pages show most results(pages) dating back more than 10 years. 3. Modified the questioon on 'freeze' to 'conversion from py to exe' 4. Did not touch questions that I am not familiar with, like CGI, os.kill(), etc. 5. Dropped questions that were directly in respect to older (unsupported) Windows. Any suggestion/correction is wel-received. My first patch! :-) \m/ ---------- keywords: +patch Added file: http://bugs.python.org/file28245/faq.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 19:25:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 18:25:09 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354904709.17.0.71520451917.issue16629@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Added hard limit (10) for number of calltip lines. ---------- Added file: http://bugs.python.org/file28246/idle_calltips_multiline_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 19:26:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 18:26:40 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354904800.64.0.127180288404.issue16629@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28237/idle_calltips_multiline_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 19:39:56 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 07 Dec 2012 18:39:56 +0000 Subject: [issue16637] py-bt, py-locals, etc. GDB commands fail with output-radix 16 In-Reply-To: <1354903492.9.0.822155625877.issue16637@psf.upfronthosting.co.za> Message-ID: <1354905596.63.0.0968168334444.issue16637@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 19:50:51 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 07 Dec 2012 18:50:51 +0000 Subject: [issue16507] Patch selectmodule.c to support WSAPoll on Windows In-Reply-To: <1353277974.19.0.012295377293.issue16507@psf.upfronthosting.co.za> Message-ID: <1354906251.02.0.112484253474.issue16507@psf.upfronthosting.co.za> Richard Oudkerk added the comment: It seems that the return code of WSAPoll() does not include the count of array items with revents == POLLNVAL. In the case where all of them are POLLNVAL, instead of returning 0 (which usually indicates a timeout) it returns -1 and WSAGetLastError() == WSAENOTSOCK. This does not match the MSDN documentation which claims that the return code is the number of descriptors for which revents is non-zero. But it arguably does agree with the FreeBSD and MacOSX man pages which say that it returns the number of descriptors that are "ready for I/O". BTW, the implementation of select_poll() assumes that the return code of poll() (if non-negative) is equal to the number of non-zero revents fields. But select_have_broken_poll() considers a MacOSX poll() implementation to be good even in cases where this assumption is not true: static int select_have_broken_poll(void) { int poll_test; int filedes[2]; struct pollfd poll_struct = { 0, POLLIN|POLLPRI|POLLOUT, 0 }; if (pipe(filedes) < 0) { return 1; } poll_struct.fd = filedes[0]; close(filedes[0]); close(filedes[1]); poll_test = poll(&poll_struct, 1, 0); if (poll_test < 0) { return 1; } else if (poll_test == 0 && poll_struct.revents != POLLNVAL) { return 1; } return 0; } Note that select_have_broken_poll() == FALSE if poll_test == 0 and poll_struct.revents == POLLNVAL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 19:52:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 07 Dec 2012 18:52:06 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354906326.73.0.470776389758.issue16629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I don't think it was ever a requirement of docstrings that their signature fit on one line or that they render fully in IDLE. Other built-in functions have multi-line signatures going back 10+ years (e.g. 32e7d0898eab). I still think that the rendering of multi-line signatures should be considered separately. The discussion and issues are different, and people may have different opinions. For example, why not be smarter about detecting the end of the signature (e.g. first line not having "->")? Would you object to creating a new issue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 19:53:45 2012 From: report at bugs.python.org (Laurynas Speicys) Date: Fri, 07 Dec 2012 18:53:45 +0000 Subject: [issue16636] codecs: readline() followed by readlines() returns trunkated results In-Reply-To: <1354899698.79.0.269419302823.issue16636@psf.upfronthosting.co.za> Message-ID: <1354906425.55.0.45154402864.issue16636@psf.upfronthosting.co.za> Laurynas Speicys added the comment: Thank you! This is indeed a duplicate of issues #8260, #12446. ---------- resolution: -> duplicate _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 20:17:53 2012 From: report at bugs.python.org (Meador Inge) Date: Fri, 07 Dec 2012 19:17:53 +0000 Subject: [issue16628] leak in ctypes.resize() In-Reply-To: <1354823928.79.0.806934333118.issue16628@psf.upfronthosting.co.za> Message-ID: <1354907873.44.0.120048449408.issue16628@psf.upfronthosting.co.za> Meador Inge added the comment: This is the same as issue13091. I proposed a similar fix there, but yours is more complete and seems reasonable to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 20:20:41 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 07 Dec 2012 19:20:41 +0000 Subject: [issue13091] ctypes: memory leak In-Reply-To: <1317546718.25.0.742978918789.issue13091@psf.upfronthosting.co.za> Message-ID: <1354908041.46.0.662589826959.issue13091@psf.upfronthosting.co.za> Antoine Pitrou added the comment: See patch in issue 16628. ---------- nosy: +pitrou resolution: -> duplicate status: open -> closed superseder: -> leak in ctypes.resize() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 20:20:51 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 07 Dec 2012 19:20:51 +0000 Subject: [issue16628] leak in ctypes.resize() In-Reply-To: <1354823928.79.0.806934333118.issue16628@psf.upfronthosting.co.za> Message-ID: <1354908051.56.0.695187965039.issue16628@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 20:22:57 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 07 Dec 2012 19:22:57 +0000 Subject: [issue16531] Allow IPNetwork to take a tuple In-Reply-To: <1353621566.3.0.0992835206333.issue16531@psf.upfronthosting.co.za> Message-ID: <1354908177.54.0.40452295565.issue16531@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > This patch is for (address, prefixlen). I now see that the original > request was (address, netmask). I'll fix this up. In the meantime, let > me know if this is what you had in mind. This is what I had in mind indeed (except that I was mostly interested in the netmask case :-)). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 20:24:38 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 07 Dec 2012 19:24:38 +0000 Subject: [issue16531] Allow IPNetwork to take a tuple In-Reply-To: <1353621566.3.0.0992835206333.issue16531@psf.upfronthosting.co.za> Message-ID: <1354908278.36.0.331035153547.issue16531@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Oh, I was also interested in IPNetwork((ip_address_object, netmask)). (that is, given an existing IPAddress object, build a IPNetwork by passing that object + a netmask) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 20:26:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 19:26:27 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354908387.43.0.843305087626.issue16629@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I don't think it was ever a requirement of docstrings that their signature fit on one line or that they render fully in IDLE. I think this is a requirement of IDLE. > I still think that the rendering of multi-line signatures should be considered separately. The discussion and issues are different, and people may have different opinions. Then what about this issue? Legalize the current invalid behavior in the tests? I think that the tests should check the valid behavior and if tests failed then the behavior should be corrected, not tests should be faked. > For example, why not be smarter about detecting the end of the signature (e.g. first line not having "->")? This is a reasonable proposal. Let's discuss it. The objection is that there are such signatures: foo(a, b, c, e, f, g) -> some result > Would you object to creating a new issue? There is no difference for me what issue it will be, but if it will be a different issue, then I do not see any sense in this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 20:49:22 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 07 Dec 2012 19:49:22 +0000 Subject: [issue16555] Add es_cu to locale aliases In-Reply-To: <1353900143.47.0.688085135262.issue16555@psf.upfronthosting.co.za> Message-ID: <1354909762.49.0.146434097043.issue16555@psf.upfronthosting.co.za> ?ric Araujo added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 20:49:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 07 Dec 2012 19:49:36 +0000 Subject: [issue16638] support multi-line docstring signatures in IDLE calltips Message-ID: <1354909776.12.0.96265352257.issue16638@psf.upfronthosting.co.za> New submission from Chris Jerdonek: This issue is to add support for rendering multi-line docstring signatures in IDLE calltips (e.g. iter(), min(), int(), etc). This was suggested by Serhiy in the comments to issue 16629. ---------- components: IDLE messages: 177118 nosy: chris.jerdonek, serhiy.storchaka, serwy, terry.reedy priority: normal severity: normal status: open title: support multi-line docstring signatures in IDLE calltips type: enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 20:52:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 19:52:34 +0000 Subject: [issue8260] When I use codecs.open(...) and f.readline() follow up by f.read() return bad result In-Reply-To: <1269875395.81.0.132261115225.issue8260@psf.upfronthosting.co.za> Message-ID: <1354909954.46.0.868432657554.issue8260@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think the patch is wrong or is not optimal for case when chars is -1, but size is not. If we want to read all data in any case, then we should call self.stream.read() without argument if chars _______________________________________ From report at bugs.python.org Fri Dec 7 20:57:52 2012 From: report at bugs.python.org (Zack Weinberg) Date: Fri, 07 Dec 2012 19:57:52 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1354910272.71.0.943582215364.issue16624@psf.upfronthosting.co.za> Zack Weinberg added the comment: OK, here is a patch against the latest development version. Now also with tests and documentation updates. ---------- Added file: http://bugs.python.org/file28247/issue16624-v34.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 20:58:18 2012 From: report at bugs.python.org (Zack Weinberg) Date: Fri, 07 Dec 2012 19:58:18 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1354910298.69.0.0153966209695.issue16624@psf.upfronthosting.co.za> Changes by Zack Weinberg : Removed file: http://bugs.python.org/file28218/subprocess-check-output-allow-input.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 21:03:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 20:03:22 +0000 Subject: [issue12446] StreamReader Readlines behavior odd In-Reply-To: <1309398206.26.0.914481831308.issue12446@psf.upfronthosting.co.za> Message-ID: <1354910602.67.0.496320132978.issue12446@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, this is obviously a duplicate of issue8260. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> When I use codecs.open(...) and f.readline() follow up by f.read() return bad result _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 21:03:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 20:03:38 +0000 Subject: [issue14475] codecs.StreamReader.read behaves differently from regular files In-Reply-To: <1333372414.16.0.496350307965.issue14475@psf.upfronthosting.co.za> Message-ID: <1354910618.9.0.0577327298255.issue14475@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is obviously a duplicate of issue8260 and issue12446. ---------- nosy: +serhiy.storchaka resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> When I use codecs.open(...) and f.readline() follow up by f.read() return bad result _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 21:03:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 20:03:53 +0000 Subject: [issue16636] codecs: readline() followed by readlines() returns trunkated results In-Reply-To: <1354899698.79.0.269419302823.issue16636@psf.upfronthosting.co.za> Message-ID: <1354910633.21.0.741486049356.issue16636@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> committed/rejected status: open -> closed superseder: -> When I use codecs.open(...) and f.readline() follow up by f.read() return bad result _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 21:04:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 20:04:06 +0000 Subject: [issue8260] When I use codecs.open(...) and f.readline() follow up by f.read() return bad result In-Reply-To: <1269875395.81.0.132261115225.issue8260@psf.upfronthosting.co.za> Message-ID: <1354910646.05.0.540227462924.issue8260@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As showed in issue12446, issue14475 and issue16636 there are different methods to reproduce this bug (read(size, chars) + readlines(), readline() + readlines()). All this cases should be tested. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 21:09:55 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 07 Dec 2012 20:09:55 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354910995.08.0.422398456709.issue16629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I created issue 16638 to add support for multi-line signatures. > Then what about this issue? This issue is to fix the failing test. The test that is failing is to check that fetch_tip correctly returns the first line of a built-in's docstring and that it handles inheritance correctly, etc. Its purpose is not to check that the docstrings are written a certain way. Otherwise, for example, it would be checking all built-ins rather than just choosing one example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 21:21:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 20:21:18 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1354911678.03.0.724139596153.issue16624@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a beautiful patch. LGTM. However it should be tested on Windows. I'm not sure that reading not closed file in different process works on Windows. Zack, can you please submit a contributor form? http://python.org/psf/contrib/contrib-form/ http://python.org/psf/contrib/ ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 21:28:10 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 07 Dec 2012 20:28:10 +0000 Subject: [issue16638] support multi-line docstring signatures in IDLE calltips In-Reply-To: <1354909776.12.0.96265352257.issue16638@psf.upfronthosting.co.za> Message-ID: <1354912090.49.0.978290021351.issue16638@psf.upfronthosting.co.za> Chris Jerdonek added the comment: [Continuing a discussion/question from the issue 16629 comments] > > For example, why not be smarter about detecting the end of the signature (e.g. first line not having "->")? > The objection is that there are such signatures: > foo(a, b, c, e, f, g) -> some result I meant the first line after the first line without a "->", but good point. What are some examples of "false positives" that we would want to exclude? If there are examples of docstrings beginning with large amounts of text and no signature, we could look for a string of the form "func(" at the beginning of a line to know whether a signature has actually begun. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 21:28:43 2012 From: report at bugs.python.org (Larry Hastings) Date: Fri, 07 Dec 2012 20:28:43 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354912123.52.0.226997284547.issue16612@psf.upfronthosting.co.za> Larry Hastings added the comment: Sorry for the delay; this head cold is slowing me down. Here's the current state of Argument Clinic as a patch for review. I look forward to your comments! ---------- Added file: http://bugs.python.org/file28248/larry.clinic.patch.1.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 21:35:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 20:35:22 +0000 Subject: [issue16638] support multi-line docstring signatures in IDLE calltips In-Reply-To: <1354909776.12.0.96265352257.issue16638@psf.upfronthosting.co.za> Message-ID: <1354912522.43.0.792416656511.issue16638@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch moved from issue16629. I think this is a bugfix, because current behavior is wrong. Many functions (i.e. int, str, list, dict) have multiline signatures and IDLE shows only first line in a tip. I.e. "int(x=0) -> integer" showed for int(), but int() accepts up to two arguments. This is a regression comparing with times when the signature was oneline. ---------- keywords: +patch stage: -> patch review type: enhancement -> behavior versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28249/idle_calltips_multiline_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 21:37:47 2012 From: report at bugs.python.org (Ashish Nitin Patil) Date: Fri, 07 Dec 2012 20:37:47 +0000 Subject: [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1354912667.92.0.149439764366.issue14901@psf.upfronthosting.co.za> Ashish Nitin Patil added the comment: Just added my name to the Misc/ACKS. ---------- Added file: http://bugs.python.org/file28250/faq+ack.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 21:53:26 2012 From: report at bugs.python.org (Zack Weinberg) Date: Fri, 07 Dec 2012 20:53:26 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1354913606.77.0.169429514786.issue16624@psf.upfronthosting.co.za> Zack Weinberg added the comment: I don't have the ability to test on Windows, but the construct you are concerned about was copied from other tests in the same file which were not marked as Unix-only. I have faxed in a contributor agreement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 21:53:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 07 Dec 2012 20:53:40 +0000 Subject: [issue16638] support multi-line docstring signatures in IDLE calltips In-Reply-To: <1354909776.12.0.96265352257.issue16638@psf.upfronthosting.co.za> Message-ID: <1354913620.62.0.758226159883.issue16638@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think we should add empty lines after signatures in all docstrings where it needed (i.e. for super()). Here is a command which shows calltips for all builtins: ./python -c "from idlelib.CallTips import get_argspec, get_entity; import builtins for name in sorted(builtins.__dict__): print('%s:\t%s' % (name, get_argspec(get_entity(name)).replace('\n', '\n\t')))" And for dict methods: ./python -c "from idlelib.CallTips import get_argspec, get_entity; import builtins;^Mfor name in sorted(vars(dict)):^M print('%s:\t%s' % (name, get_argspec(get_entity('{}.'+name)).replace('\n', '\n\t')))" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 22:01:46 2012 From: report at bugs.python.org (Roger Serwy) Date: Fri, 07 Dec 2012 21:01:46 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354914106.48.0.75293009484.issue16629@psf.upfronthosting.co.za> Roger Serwy added the comment: So, is the original patch which fixes the original issue OK to apply? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 22:05:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 07 Dec 2012 21:05:58 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1354914358.41.0.134846726684.issue16629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Yes, I think so. I should be able to get to it in the next few days unless someone else beats me to it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 23:23:23 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Fri, 07 Dec 2012 22:23:23 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1354919003.89.0.645840927968.issue16076@psf.upfronthosting.co.za> Daniel Shahaf added the comment: TreeBuilder was also pickleable in 3.2 but now isn't so; updating summary accordingly. Attaching a checkpoint patch. It addresses both Element and TreeBuilder, and adds tests. The added tests fail if test___all__ is included in the test run, so the patch should not be applied as-is. Thanks to Ezio Melotti for preliminary review and suggestions on IRC. ---------- title: xml.etree.ElementTree.Element is no longer pickleable -> xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable Added file: http://bugs.python.org/file28251/i16076-v2-combined.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 23:26:47 2012 From: report at bugs.python.org (Nurhusien Hasen) Date: Fri, 07 Dec 2012 22:26:47 +0000 Subject: [issue16639] not your all issuse send Message-ID: New submission from Nurhusien Hasen: Not find python all issuse pleas pleas find one issuse ---------- messages: 177135 nosy: Nurhusien2 priority: normal severity: normal status: open title: not your all issuse send _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 23:36:39 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Fri, 07 Dec 2012 22:36:39 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1354919799.74.0.550056752767.issue16076@psf.upfronthosting.co.za> Daniel Shahaf added the comment: Reattaching without the unrelated Python-ast.c change. ---------- Added file: http://bugs.python.org/file28252/i16076-v3-combined.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 23:37:52 2012 From: report at bugs.python.org (Ross Lagerwall) Date: Fri, 07 Dec 2012 22:37:52 +0000 Subject: [issue16639] not your all issuse send In-Reply-To: Message-ID: <1354919872.36.0.375609942362.issue16639@psf.upfronthosting.co.za> Changes by Ross Lagerwall : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 23:40:15 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Fri, 07 Dec 2012 22:40:15 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1354920015.52.0.103580041554.issue16076@psf.upfronthosting.co.za> Changes by Daniel Shahaf : Removed file: http://bugs.python.org/file28251/i16076-v2-combined.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 7 23:42:12 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 07 Dec 2012 22:42:12 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1354920132.73.0.697429585793.issue16076@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +georg.brandl, larry priority: high -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 00:02:01 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 07 Dec 2012 23:02:01 +0000 Subject: [issue16600] small py3k issue in rlcompleter In-Reply-To: <1354528529.28.0.687527154306.issue16600@psf.upfronthosting.co.za> Message-ID: <1354921321.84.0.53145559551.issue16600@psf.upfronthosting.co.za> ?ric Araujo added the comment: Actually the module was named __builtin__ in 2.x; __builtins__ was an optimization done for module globals, as an implementation detail of CPython. ---------- nosy: +eric.araujo versions: -Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 00:54:13 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 07 Dec 2012 23:54:13 +0000 Subject: [issue16495] bytes_decode() unnecessarily examines encoding In-Reply-To: <1353187789.37.0.881944433109.issue16495@psf.upfronthosting.co.za> Message-ID: <3YJ9WS4fSTzQW2@mail.python.org> Roundup Robot added the comment: New changeset 3fb9e38b00e8 by Chris Jerdonek in branch 'default': Issue #16495: remove extraneous NULL encoding check from bytes_decode(). http://hg.python.org/cpython/rev/3fb9e38b00e8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 00:55:53 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 07 Dec 2012 23:55:53 +0000 Subject: [issue16495] bytes_decode() unnecessarily examines encoding In-Reply-To: <1353187789.37.0.881944433109.issue16495@psf.upfronthosting.co.za> Message-ID: <1354924553.3.0.233723934387.issue16495@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 01:12:49 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 08 Dec 2012 00:12:49 +0000 Subject: [issue1191964] asynchronous Subprocess Message-ID: <1354925569.15.0.836398751358.issue1191964@psf.upfronthosting.co.za> anatoly techtonik added the comment: Can anybody write a sum up on this? ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 01:25:10 2012 From: report at bugs.python.org (=?utf-8?q?Marek_=C5=A0uppa?=) Date: Sat, 08 Dec 2012 00:25:10 +0000 Subject: [issue15948] Unchecked return value of I/O functions In-Reply-To: <1347722947.26.0.499070360065.issue15948@psf.upfronthosting.co.za> Message-ID: <1354926310.52.0.278308810384.issue15948@psf.upfronthosting.co.za> Marek ?uppa added the comment: Hi, Sorry for the long delay. The attached patch should fix all the relevant occurrences of I/O functions I was able to find. Please review. Thanks! ---------- Added file: http://bugs.python.org/file28253/unchecked_return_values.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 04:15:19 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 08 Dec 2012 03:15:19 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1354936519.13.0.784529004066.issue16076@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks for working on it, Daniel. Unfortunately I won't have time to look at it in the near future, but I will definitely look at the patch once I get some free time to hack on Python again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 04:32:23 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 08 Dec 2012 03:32:23 +0000 Subject: [issue15516] exception-handling bug in PyString_Format In-Reply-To: <1343764780.71.0.604975878578.issue15516@psf.upfronthosting.co.za> Message-ID: <1354937543.61.0.145284214015.issue15516@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Hmm, well I dont't think that test will fail without the patch. You probably need to add a special function to _testcapi to check if an exception is set (PyErr_Occurred()). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 04:44:17 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Dec 2012 03:44:17 +0000 Subject: [issue11797] 2to3 does not correct "reload" In-Reply-To: <1302191844.85.0.922084217825.issue11797@psf.upfronthosting.co.za> Message-ID: <3YJGcw0sknzQb4@mail.python.org> Roundup Robot added the comment: New changeset 3576c0c6f860 by Benjamin Peterson in branch 'default': add fixer for reload() -> imp.reload() (closes #11797)\n\nPatch by Laurie Clark-Michalek and Berker Peksag http://hg.python.org/cpython/rev/3576c0c6f860 ---------- nosy: +python-dev resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:19:01 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Dec 2012 05:19:01 +0000 Subject: [issue16584] unhandled IOError filecmp.cmpfiles() if file not readable In-Reply-To: <1354300040.38.0.588944499058.issue16584@psf.upfronthosting.co.za> Message-ID: <1354943941.66.0.566319456991.issue16584@psf.upfronthosting.co.za> Terry J. Reedy added the comment: 3.3.0, Win 7, 64 bit, with print() and exception as e (which also works in 2.7 for more portable code ;-) >>> (['testfile'], [], []) It this correct for Windows, where I believe chmod is a no-op? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:25:45 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Dec 2012 05:25:45 +0000 Subject: [issue16598] Docs: double newlines printed in some file iteration examples In-Reply-To: <1354506102.98.0.373990465676.issue16598@psf.upfronthosting.co.za> Message-ID: <1354944345.25.0.27221729671.issue16598@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:30:50 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Dec 2012 05:30:50 +0000 Subject: [issue16609] float loses precision when passed to str() In-Reply-To: <1354647787.87.0.344652748044.issue16609@psf.upfronthosting.co.za> Message-ID: <1354944650.05.0.565527862299.issue16609@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:32:22 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Dec 2012 05:32:22 +0000 Subject: [issue16614] argparse should have an option to require un-abbreviated option names In-Reply-To: <1354714087.56.0.314171831729.issue16614@psf.upfronthosting.co.za> Message-ID: <1354944742.89.0.79040840468.issue16614@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:40:12 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Dec 2012 05:40:12 +0000 Subject: [issue16623] argparse help formatter does not honor non-breaking space In-Reply-To: <1354745001.59.0.580615965604.issue16623@psf.upfronthosting.co.za> Message-ID: <1354945212.56.0.92664888292.issue16623@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +bethard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:52:17 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Dec 2012 05:52:17 +0000 Subject: [issue16634] urllib.error.HTTPError.reason is not documented In-Reply-To: <1354884656.5.0.110910747898.issue16634@psf.upfronthosting.co.za> Message-ID: <1354945937.03.0.8432313381.issue16634@psf.upfronthosting.co.za> Terry J. Reedy added the comment: And it was added to all of 2.7, 3.2, and 3.3, so doc patch should be also. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 06:54:40 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 08 Dec 2012 05:54:40 +0000 Subject: [issue13211] urllib2.HTTPError does not have 'reason' attribute. In-Reply-To: <1318943168.93.0.520705450261.issue13211@psf.upfronthosting.co.za> Message-ID: <1354946080.47.0.266545026503.issue13211@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 10:07:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 09:07:23 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <1354957642.99.0.868198613941.issue16165@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file27826/sched_unblock_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 10:09:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 09:09:23 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <1354957763.85.0.204499420202.issue16165@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Oh, I submitted wrong patch (it contained unrelated changes). Here is a right one. ---------- Added file: http://bugs.python.org/file28254/sched_unblock_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 10:33:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 09:33:59 +0000 Subject: [issue16640] Less code under lock in sched.scheduler Message-ID: <1354959239.11.0.372090079452.issue16640@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: In additional to issue16165 I think that sched.scheduler runs more code under a lock than needed. The proposed patch moves this code outside a lock. This unlikely a bug, may be only small enhancement and cleanup. ---------- components: Library (Lib) files: sched_less_lock.patch keywords: patch messages: 177147 nosy: giampaolo.rodola, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Less code under lock in sched.scheduler type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28255/sched_less_lock.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 10:44:43 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Dec 2012 09:44:43 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354959883.14.0.693450534469.issue16612@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Can't you propose a PEP for this? I'd like to see the DSL officially discussed (or at least validated). ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:10:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Dec 2012 10:10:20 +0000 Subject: [issue16628] leak in ctypes.resize() In-Reply-To: <1354823928.79.0.806934333118.issue16628@psf.upfronthosting.co.za> Message-ID: <3YJRBM6j2YzLtK@mail.python.org> Roundup Robot added the comment: New changeset 1996171cfb96 by Antoine Pitrou in branch '3.2': Issue #16628: Fix a memory leak in ctypes.resize(). http://hg.python.org/cpython/rev/1996171cfb96 New changeset cae5f3266b81 by Antoine Pitrou in branch '3.3': Issue #16628: Fix a memory leak in ctypes.resize(). http://hg.python.org/cpython/rev/cae5f3266b81 New changeset def01022870a by Antoine Pitrou in branch 'default': Issue #16628: Fix a memory leak in ctypes.resize(). http://hg.python.org/cpython/rev/def01022870a New changeset df5a86a22310 by Antoine Pitrou in branch '2.7': Issue #16628: Fix a memory leak in ctypes.resize(). http://hg.python.org/cpython/rev/df5a86a22310 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:10:40 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Dec 2012 10:10:40 +0000 Subject: [issue16628] leak in ctypes.resize() In-Reply-To: <1354823928.79.0.806934333118.issue16628@psf.upfronthosting.co.za> Message-ID: <1354961440.54.0.395468419915.issue16628@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Should be fixed now. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:14:21 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 10:14:21 +0000 Subject: [issue16641] sched.scheduler.enter arguments should be modifiable Message-ID: <1354961661.69.0.670095014649.issue16641@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Example: >>> import sched >>> s=sched.scheduler() >>> s.enter(10, 1, print) Event(time=7452.676787873, priority=1, action=, argument=[], kwargs={}) >>> next(s.queue).argument.append("spam") >>> s.enter(5, 1, print) Event(time=7473.326011725, priority=1, action=, argument=['spam'], kwargs={}) >>> s.run() spam spam Now every s.enter() call (even for other schedulers) without explicit "argument" use ['spam'] as "argument". Usually functions should not have modifiable arguments (unless it is intentional). We should use non-modifiable value or a sentinel for default. For example an empty tuple as default for "argument" and None as default for "kwargs". ---------- components: Library (Lib) files: sched_nonmodifiable_args.patch keywords: patch messages: 177151 nosy: giampaolo.rodola, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: sched.scheduler.enter arguments should be modifiable type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28256/sched_nonmodifiable_args.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:15:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 10:15:36 +0000 Subject: [issue16641] sched.scheduler.enter arguments should not be modifiable In-Reply-To: <1354961661.69.0.670095014649.issue16641@psf.upfronthosting.co.za> Message-ID: <1354961736.4.0.590490201513.issue16641@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: sched.scheduler.enter arguments should be modifiable -> sched.scheduler.enter arguments should not be modifiable _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:15:59 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Dec 2012 10:15:59 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: <1321140269.61.0.335726830367.issue13390@psf.upfronthosting.co.za> Message-ID: <1354961759.55.0.224274113336.issue13390@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Minor bikeshedding/spelling nit: should > "_Py_AllocedBlocks" > be changed to > "_Py_AllocatedBlocks" > (and s/_Py_GetAllocedBlocks/_Py_GetAllocatedBlocks/)? Right indeed. I'll do the change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:18:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 10:18:23 +0000 Subject: [issue16641] sched.scheduler.enter arguments should not be modifiable In-Reply-To: <1354961661.69.0.670095014649.issue16641@psf.upfronthosting.co.za> Message-ID: <1354961903.64.0.374388293704.issue16641@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28256/sched_nonmodifiable_args.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:18:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 10:18:59 +0000 Subject: [issue16641] sched.scheduler.enter arguments should not be modifiable In-Reply-To: <1354961661.69.0.670095014649.issue16641@psf.upfronthosting.co.za> Message-ID: <1354961939.72.0.768576625504.issue16641@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, wrong patch. ---------- Added file: http://bugs.python.org/file28257/sched_nonmodifiable_args.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:39:08 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Dec 2012 10:39:08 +0000 Subject: [issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__ In-Reply-To: <1227464493.77.0.130820783094.issue4395@psf.upfronthosting.co.za> Message-ID: <1354963148.35.0.071123828536.issue4395@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:39:52 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Dec 2012 10:39:52 +0000 Subject: [issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__ In-Reply-To: <1227464493.77.0.130820783094.issue4395@psf.upfronthosting.co.za> Message-ID: <1354963192.05.0.143423021345.issue4395@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +antocuni _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:52:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 10:52:50 +0000 Subject: [issue16642] Mention new "kwargs" named tuple parameter in sched module Message-ID: <1354963970.59.0.876106484214.issue16642@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch which adds missed mentions of "kwargs" named tuple parameter. ---------- assignee: docs at python components: Documentation files: sched_docs_kwargs.patch keywords: patch messages: 177154 nosy: docs at python, giampaolo.rodola, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Mention new "kwargs" named tuple parameter in sched module type: behavior versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28258/sched_docs_kwargs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 11:59:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 10:59:41 +0000 Subject: [issue16643] Wrong documented default value for timefunc parameter in sched.scheduler() Message-ID: <1354964381.71.0.639628706124.issue16643@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: sched.scheduler() prefers to use time.monotonic as a default value for timefunc parameter, and time.time used only as a fallback. But time.time documented as a default value. ---------- assignee: docs at python components: Documentation messages: 177155 nosy: docs at python, giampaolo.rodola, haypo, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Wrong documented default value for timefunc parameter in sched.scheduler() type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 12:01:54 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 08 Dec 2012 11:01:54 +0000 Subject: [issue4395] Document auto __ne__ generation; provide a use case for non-trivial __ne__ In-Reply-To: <1227464493.77.0.130820783094.issue4395@psf.upfronthosting.co.za> Message-ID: <1354964514.04.0.0693146877691.issue4395@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 12:39:31 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 08 Dec 2012 11:39:31 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354966771.53.0.686404660074.issue16612@psf.upfronthosting.co.za> Chris Jerdonek added the comment: It seems the clinic.txt DSL document should be proofread for proper/consistent use of argument/parameter (e.g. as described in the recently added http://docs.python.org/dev/glossary.html#term-parameter ). To choose a couple random examples-- +Argument declaration | type name = default +Argument flags | flag flag2 flag3=value Shouldn't this be "Type declaration", etc? +Functions With Positional-Only Arguments +======================================== Positional-Only Parameters ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 12:41:11 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 08 Dec 2012 11:41:11 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354966871.49.0.706441626448.issue16612@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 13:24:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Dec 2012 12:24:42 +0000 Subject: [issue15209] Re-raising exceptions from an expression In-Reply-To: <1340821665.84.0.121596566188.issue15209@psf.upfronthosting.co.za> Message-ID: <3YJV9P6NfVzQcr@mail.python.org> Roundup Robot added the comment: New changeset 8ba3c975775b by Nick Coghlan in branch '3.3': Issue #15209: Clarify exception chaining description http://hg.python.org/cpython/rev/8ba3c975775b New changeset 5854101552c2 by Nick Coghlan in branch 'default': Merge from 3.3 (Issue #15209) http://hg.python.org/cpython/rev/5854101552c2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 13:27:30 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Dec 2012 12:27:30 +0000 Subject: [issue15209] Re-raising exceptions from an expression In-Reply-To: <1340821665.84.0.121596566188.issue15209@psf.upfronthosting.co.za> Message-ID: <1354969650.24.0.954338949246.issue15209@psf.upfronthosting.co.za> Nick Coghlan added the comment: I rewrote the relevant section of the module docs (since they were a bit murky in other ways as well). Since I didn't answer the question earlier, the main reason a bare raise is permitted is because it's designed to be used to a bare except clause (e.g. when rolling back a database transaction as a result of an error). While you could achieve the same thing now with "except BaseException", the requirement for all exceptions to inherit from BaseException is relatively recent - back in the days of string exceptions there was simply no way to catch arbitrary exceptions *and* give them a name. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 13:57:33 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Dec 2012 12:57:33 +0000 Subject: [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <3YJVvJ3GXdzQgs@mail.python.org> Roundup Robot added the comment: New changeset 3345afd6dc61 by Nick Coghlan in branch '3.3': Close issue #16267: better docs for @abstractmethod composition http://hg.python.org/cpython/rev/3345afd6dc61 New changeset be7202c38089 by Nick Coghlan in branch 'default': Merge from 3.3 (issue #16267) http://hg.python.org/cpython/rev/be7202c38089 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 16:19:40 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 08 Dec 2012 15:19:40 +0000 Subject: [issue7741] Allow multiple statements in code.InteractiveConsole.push In-Reply-To: <1263912723.35.0.93131684665.issue7741@psf.upfronthosting.co.za> Message-ID: <1354979980.72.0.932711619444.issue7741@psf.upfronthosting.co.za> Nick Coghlan added the comment: OK, after a long detour that delved deep into codeop and the vagaries of PyCF_DONT_IMPLY_DEDENT (due to a problem that turned out to be due to a missing "\n" in a test case I added), my main conclusion is: Coupling the "single vs multiple statement" decision to the "implicit print after every call" decision is *really* annoying. The latter should be its own flag *or else* also implied by the "DONT_IMPLY_DEDENT" flag that is already passed to the compiler by codeop. If *that* gets fixed, then the code module could simply switch over to compiling in exec mode always, without any side effects on the implicit display of expression results. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 17:05:17 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 08 Dec 2012 16:05:17 +0000 Subject: [issue16598] Docs: double newlines printed in some file iteration examples In-Reply-To: <1354506102.98.0.373990465676.issue16598@psf.upfronthosting.co.za> Message-ID: <1354982717.05.0.370787806406.issue16598@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed, except whatsnew files. That ones should be untouched from my perspective ? the issue is not bugfix but improvement and I see no reason why we need to backedit whatsnew for old outdated versions. Changesetes fed7306f26ce, 268ead8ae46b, 9e4b003a4d7a, 29627bd5b333. Thanks for patches! ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 17:38:37 2012 From: report at bugs.python.org (Stefan Krah) Date: Sat, 08 Dec 2012 16:38:37 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354984717.85.0.486402032996.issue16612@psf.upfronthosting.co.za> Stefan Krah added the comment: I second Antoine's request for a PEP. I'm not only concerned about the DSL: This approach may work for modules like posixmodule.c, where each function is largely a self-contained unit wrapping some API function. On the other hand, I don't want to imagine how _decimal.c will look like: There are > 100 functions that are closely related. Many of those functions are *already* generated by macros. I think that vertical space is a precious resource, so all docstrings (cruft as far as understanding the program is concerned) are in a header file. The clinic.py preprocessor would add at least 3000 lines to an already large module, tearing apart groups of functions that form logical units. Apologies for sounding negative, but IIRC this hasn't been brought up in the python-dev discussion at all. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 17:59:16 2012 From: report at bugs.python.org (Ethan Furman) Date: Sat, 08 Dec 2012 16:59:16 +0000 Subject: [issue15209] Re-raising exceptions from an expression In-Reply-To: <1340821665.84.0.121596566188.issue15209@psf.upfronthosting.co.za> Message-ID: <1354985956.6.0.815394333998.issue15209@psf.upfronthosting.co.za> Ethan Furman added the comment: There is one typo and one error in the first paragraph of the patch: > When raising a new exception (rather than > using to bare ``raise`` to re-raise the ^ should be an 'a' > exception currently being handled), the > implicit exception chain can be made explicit > by using :keyword:`from` with :keyword:`raise`. > The single argument to :keyword:`from` must be > an exception or ``None``. It will be set as > :attr:`__cause__` on the raised exception. > Setting :attr:`__cause__` also implicitly sets > the :attr:`__suppress_context__` attribute to ``True``. The last sentence is incorrect -- __suppress_context__ is only set to True if __cause__ is set to None; if __cause__ is set to any other exception __suppress_context__ remains False and the new exception chain will be printed: >>> try: ... raise ValueError ... except: ... raise NameError from KeyError ... KeyError The above exception was the direct cause of the following exception: Traceback (most recent call last): File "", line 4, in NameError This is easily fixed by adding 'to ``None``': > Setting :attr:`__cause__` to ``None`` also implicitly sets > the :attr:`__suppress_context__` attribute to ``True``. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 18:03:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 17:03:55 +0000 Subject: [issue16644] Wrong code in ContextManagerTests.test_invalid_args() in test_subprocess.py Message-ID: <1354986235.92.0.873586035968.issue16644@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Test ContextManagerTests.test_invalid_args() in file Lib/test/test_subprocess.py contains code which has no sense. When Popen() fail then this code will not reachable. When Popen() success then c.exception will not assigned. Here is a patch with right test. ---------- components: Tests files: test_subprocess_test_invalid_args.patch keywords: patch messages: 177164 nosy: ezio.melotti, michael.foord, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Wrong code in ContextManagerTests.test_invalid_args() in test_subprocess.py type: behavior versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28259/test_subprocess_test_invalid_args.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 18:55:52 2012 From: report at bugs.python.org (Larry Hastings) Date: Sat, 08 Dec 2012 17:55:52 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354989352.4.0.937207161041.issue16612@psf.upfronthosting.co.za> Larry Hastings added the comment: Antoine, Stefan: There doesn't appear to be a bright line separating "this should get a PEP" from "this doesn't need a PEP". That said, changes to the C API for CPython don't seem to merit PEPs very often, the recent "Stable ABI" being the lone exception to the rule I can recall. Also, Guido already said (in python-dev) he didn't think it merited a PEP, and I tend to agree. What I don't understand is what advantage writing a PEP would bring. If you're worried that it needs discussion--okay, let's discuss it. Surely we can do that here? Or in python-dev? What's on your mind? Stefan: It sounds like Argument Clinic won't work well for _cdecimal, nor would any alternate DSL grammar work any better, really. But have no fear--I doubt anyone is going to force you to accept Argument-Clinic-ization of _cdecimal against your will. If you're comfortable maintaining the _cdecimal code without it, you certainly have my blessing. Though I do hope you'll add the data needed to generate Signature objects once we figure out what that looks like. Chris: clinic.txt is available for review as part of the patch I posted, please feel free to make your comments there. I could file a new patch with the two changes you already suggest if you prefer. (Though I'm not changing the name of the project to "Parameter Clinic"--the Monty Python reference is simply irresistible.) Finally, an admission. I wrote "Argument Clinic" thinking that the inspect.Signature Parameter objects had a per-Parameter docstring. Well, they don't. (I feel like an idiot.) So we could theoretically remove the per-parameter docstrings from the DSL. However, I'm pretty happy with the current structure of the DSL. My inclination therefore is to leave them in. (And who knows, maybe the Parameter object could grow a docstring.) Still, if you're going to propose changes to the DSL, I submit that removing the per-parameter docstring is wholly viable. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 19:02:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 18:02:08 +0000 Subject: [issue16645] Wrong test_extract_hardlink() in test_tarfile.py Message-ID: <1354989728.58.0.0717635689948.issue16645@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Test test_extract_hardlink() in Lib/test/test_tarfile.py ran 4 times. First time (uncompressed tarfile) it extract symbolic and hard links successfully, but in other 3 times (gzipped, bzipped and lzma'ed tarfile) extracting fails becouse this links already exists (left from first test). The test just ignore this error and other possible errors (error EEXIST raised, but ignored all except ENOENT). Here is a patch, which adds a right cleanup of extracted links. ---------- components: Tests files: test_tarfile_test_extract_hardlink.patch keywords: patch messages: 177166 nosy: ezio.melotti, michael.foord, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Wrong test_extract_hardlink() in test_tarfile.py type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28260/test_tarfile_test_extract_hardlink.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 19:30:19 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Dec 2012 18:30:19 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354989352.4.0.937207161041.issue16612@psf.upfronthosting.co.za> Message-ID: <1354991335.3318.19.camel@localhost.localdomain> Antoine Pitrou added the comment: > Antoine, Stefan: There doesn't appear to be a bright line separating > "this should get a PEP" from "this doesn't need a PEP". That said, > changes to the C API for CPython don't seem to merit PEPs very often, > the recent "Stable ABI" being the lone exception to the rule I can > recall. Also, Guido already said (in python-dev) he didn't think it > merited a PEP, and I tend to agree. My argument for requiring a PEP is that this change will not only affect the people maintaining the clinic code. It will affect everyone contributing and maintaining code in the CPython codebase. It's much more than "just an addition to the C API", it's a change in how CPython is developed. Writing and proposing a PEP brings public scrutiny in a much more visible, and also better-recorded, way than a bug entry on a tracker. Note that writing a PEP doesn't mean that there'll be a huge discussion about it. And you needn't post it on python-ideas, you can post it on python-dev instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 19:32:51 2012 From: report at bugs.python.org (Alex Gaynor) Date: Sat, 08 Dec 2012 18:32:51 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1354991571.87.0.786157821887.issue16612@psf.upfronthosting.co.za> Alex Gaynor added the comment: For what it's worth, I'm not as concerned with the process of the PEP, as having a single document we can review and discuss. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 19:33:06 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Dec 2012 18:33:06 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354991335.3318.19.camel@localhost.localdomain> Message-ID: <1354991503.3318.20.camel@localhost.localdomain> Antoine Pitrou added the comment: (and, oh, I agree there isn't a bright line separating "this should get a PEP" from "this doesn't need a PEP") ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 19:50:45 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sat, 08 Dec 2012 18:50:45 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1354992645.87.0.228552622144.issue16076@psf.upfronthosting.co.za> Daniel Shahaf added the comment: @Eli, thanks. In the meantime, attaching a patch addressing Ezio's review; the caveats from msg 177134 still apply. ---------- Added file: http://bugs.python.org/file28261/i16076-v4-combined.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 19:51:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 18:51:28 +0000 Subject: [issue16646] FTP.makeport() loses socket error details Message-ID: <1354992688.45.0.00340883588323.issue16646@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: In FTP.makeport() a socket error catched and saved but then raised a new error with saved error as argument. Here is a patch which reraises an original error. ---------- components: Library (Lib) files: ftplib_makeport_raise_err.patch keywords: patch messages: 177171 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: FTP.makeport() loses socket error details type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28262/ftplib_makeport_raise_err.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 19:56:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 18:56:46 +0000 Subject: [issue16646] FTP.makeport() loses socket error details In-Reply-To: <1354992688.45.0.00340883588323.issue16646@psf.upfronthosting.co.za> Message-ID: <1354993006.21.0.707008166381.issue16646@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28262/ftplib_makeport_raise_err.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 19:57:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 18:57:34 +0000 Subject: [issue16646] FTP.makeport() loses socket error details In-Reply-To: <1354992688.45.0.00340883588323.issue16646@psf.upfronthosting.co.za> Message-ID: <1354993054.5.0.970986776955.issue16646@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28263/ftplib_makeport_raise_err.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 20:09:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 19:09:43 +0000 Subject: [issue16647] LMTP.connect() loses socket error details Message-ID: <1354993783.87.0.258604768595.issue16647@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: In LMTP.connect() a socket error catched and saved but then raised a new error with saved error as argument. Here is a patch which reraises an original error. ---------- components: Library (Lib) files: smtplib_LMTP_connect_raise_err.patch keywords: patch messages: 177172 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: LMTP.connect() loses socket error details type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28264/smtplib_LMTP_connect_raise_err.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 20:14:51 2012 From: report at bugs.python.org (Carsten Grohmann) Date: Sat, 08 Dec 2012 19:14:51 +0000 Subject: [issue11159] Sax parser crashes if given unicode file name In-Reply-To: <1297261203.08.0.513476017898.issue11159@psf.upfronthosting.co.za> Message-ID: <1354994091.68.0.323849060989.issue11159@psf.upfronthosting.co.za> Changes by Carsten Grohmann : ---------- nosy: +cgrohmann _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 20:22:39 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Dec 2012 19:22:39 +0000 Subject: [issue16644] Wrong code in ContextManagerTests.test_invalid_args() in test_subprocess.py In-Reply-To: <1354986235.92.0.873586035968.issue16644@psf.upfronthosting.co.za> Message-ID: <1354994559.35.0.63473882408.issue16644@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The test comes from e02021fbfe22 ("Fix #10554. Added context manager support to Popen objects."). ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 20:23:52 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Dec 2012 19:23:52 +0000 Subject: [issue16632] Enable DEP and ASLR In-Reply-To: <1354875781.46.0.686705865065.issue16632@psf.upfronthosting.co.za> Message-ID: <1354994632.55.0.779038531925.issue16632@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brian.curtin, tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 20:35:47 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 08 Dec 2012 19:35:47 +0000 Subject: [issue16648] stdib should use new exception types from PEP 3151 Message-ID: <1354995347.5.0.732021100427.issue16648@psf.upfronthosting.co.za> New submission from Andrew Svetlov: http://www.python.org/dev/peps/pep-3151 define exception classes like ConnectionError and BrokenPipeError We need to refactor stdlib to use that shiny new exceptions instead of checking errno values if possible. Also maybe we need to add some absent exceptions. I guess NotConnectedError for ENOTCONN, which should be ConnectionError subclass. ---------- components: Library (Lib) messages: 177174 nosy: asvetlov priority: normal severity: normal stage: needs patch status: open title: stdib should use new exception types from PEP 3151 type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 20:44:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 08 Dec 2012 19:44:17 +0000 Subject: [issue16648] stdib should use new exception types from PEP 3151 In-Reply-To: <1354995347.5.0.732021100427.issue16648@psf.upfronthosting.co.za> Message-ID: <1354995857.58.0.949313801167.issue16648@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Right now I'm working on a patch. ;) A pack of issues were produced in process. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 20:54:46 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 08 Dec 2012 19:54:46 +0000 Subject: [issue16648] stdib should use new exception types from PEP 3151 In-Reply-To: <1354995347.5.0.732021100427.issue16648@psf.upfronthosting.co.za> Message-ID: <1354996486.75.0.927957707128.issue16648@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Please, feel free to add me in nosylist for any issue related to this one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 21:20:28 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Dec 2012 20:20:28 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> Message-ID: <3YJhkM4v2czRQs@mail.python.org> Roundup Robot added the comment: New changeset 0748c22b37e5 by Antoine Pitrou in branch '3.2': Issue #16602: When a weakref's target was part of a long deallocation chain, the object could remain reachable through its weakref even though its refcount had dropped to zero. http://hg.python.org/cpython/rev/0748c22b37e5 New changeset 259c1636c884 by Antoine Pitrou in branch '3.3': Issue #16602: When a weakref's target was part of a long deallocation chain, the object could remain reachable through its weakref even though its refcount had dropped to zero. http://hg.python.org/cpython/rev/259c1636c884 New changeset 17e5acad302e by Antoine Pitrou in branch 'default': Issue #16602: When a weakref's target was part of a long deallocation chain, the object could remain reachable through its weakref even though its refcount had dropped to zero. http://hg.python.org/cpython/rev/17e5acad302e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 21:23:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 08 Dec 2012 20:23:57 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> Message-ID: <3YJhpN63s2zQS5@mail.python.org> Roundup Robot added the comment: New changeset 7e771f0363e2 by Antoine Pitrou in branch '2.7': Issue #16602: When a weakref's target was part of a long deallocation chain, the object could remain reachable through its weakref even though its refcount had dropped to zero. http://hg.python.org/cpython/rev/7e771f0363e2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 21:24:31 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Dec 2012 20:24:31 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> Message-ID: <1354998271.67.0.0930079603542.issue16602@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you very much for reporting this issue. I believe it is now fixed. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 21:29:32 2012 From: report at bugs.python.org (Daniel Urban) Date: Sat, 08 Dec 2012 20:29:32 +0000 Subject: [issue11159] Sax parser crashes if given unicode file name In-Reply-To: <1297261203.08.0.513476017898.issue11159@psf.upfronthosting.co.za> Message-ID: <1354998572.43.0.274830977831.issue11159@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 21:42:00 2012 From: report at bugs.python.org (Eugene Toder) Date: Sat, 08 Dec 2012 20:42:00 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> Message-ID: <1354999320.29.0.836434182607.issue16602@psf.upfronthosting.co.za> Eugene Toder added the comment: Thank you, Antoine. This change has one effect that's worth highlighting in NEWS at least -- the PyWeakref_GET_OBJECT() macro now evaluates its argument twice. This can break existing code where the argument has side-effects, e.g. o = PyWeakref_GET_OBJECT(p++). I found one such case in our code base, but I don't know how common this is. So this is something to watch out for when upgrading. I don't think there's a way to write PyWeakref_GET_OBJECT() in standard C90 without double evaluation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 21:46:09 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Dec 2012 20:46:09 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> Message-ID: <1354999569.54.0.936869538068.issue16602@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > I don't think there's a way to write PyWeakref_GET_OBJECT() in standard > C90 without double evaluation. Agreed. We generally don't document whether our macros are compatible with side effects in parameters, and I think we'd like to keep it that way. People should simply avoid doing this kind of thing, as it's knowingly fragile, and trivial to avoid anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 21:53:21 2012 From: report at bugs.python.org (Eugene Toder) Date: Sat, 08 Dec 2012 20:53:21 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> Message-ID: <1355000001.33.0.0190993825636.issue16602@psf.upfronthosting.co.za> Eugene Toder added the comment: > People should simply avoid doing this kind of thing, as it's knowingly fragile, and trivial to avoid anyway. Is this documented in the C API guide, or somewhere else? In any case, notifying people so they can quickly check their code seems much nicer than having them figure this out the hard way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 21:58:03 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Dec 2012 20:58:03 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1355000001.33.0.0190993825636.issue16602@psf.upfronthosting.co.za> Message-ID: <1355000198.3318.22.camel@localhost.localdomain> Antoine Pitrou added the comment: > > People should simply avoid doing this kind of thing, as it's > > knowingly fragile, and trivial to avoid anyway. > Is this documented in the C API guide, or somewhere else? I don't think so, but it's common C wisdom that you shouldn't pass arguments which have side effects to a macro, except if you are sure the macro allows it. > In any case, notifying people so they can quickly check their code > seems much nicer than having them figure this out the hard way. I see it as a double-edged sword: if we start adding a warning for this macro, people will expect us to do it for every other macro, which we aren't doing right now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 22:00:37 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 08 Dec 2012 21:00:37 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1355000198.3318.22.camel@localhost.localdomain> Message-ID: <1355000353.3318.23.camel@localhost.localdomain> Antoine Pitrou added the comment: > > In any case, notifying people so they can quickly check their code > > seems much nicer than having them figure this out the hard way. > > I see it as a double-edged sword: if we start adding a warning for this > macro, people will expect us to do it for every other macro, which we > aren't doing right now. And also, as this issue shows, we may have to change it in a bugfix release, which means people shouldn't trust the fact that there's no such warning, anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 22:44:56 2012 From: report at bugs.python.org (Aaron Iles) Date: Sat, 08 Dec 2012 21:44:56 +0000 Subject: [issue7741] Allow multiple statements in code.InteractiveConsole.push In-Reply-To: <1354979980.72.0.932711619444.issue7741@psf.upfronthosting.co.za> Message-ID: Aaron Iles added the comment: Should a new issue be created to decouple "print after every call" from the single vs multiple statement condition that is a blocker for this issue? Or can it be resolved here? On Sunday, 9 December 2012, Nick Coghlan wrote: > > Nick Coghlan added the comment: > > OK, after a long detour that delved deep into codeop and the vagaries of > PyCF_DONT_IMPLY_DEDENT (due to a problem that turned out to be due to a > missing "\n" in a test case I added), my main conclusion is: > > Coupling the "single vs multiple statement" decision to the "implicit > print after every call" decision is *really* annoying. The latter should be > its own flag *or else* also implied by the "DONT_IMPLY_DEDENT" flag that is > already passed to the compiler by codeop. > > If *that* gets fixed, then the code module could simply switch over to > compiling in exec mode always, without any side effects on the implicit > display of expression results. > > ---------- > > _______________________________________ > Python tracker > > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 8 23:56:47 2012 From: report at bugs.python.org (Bradley Froehle) Date: Sat, 08 Dec 2012 22:56:47 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1355007407.35.0.465183638335.issue16612@psf.upfronthosting.co.za> Changes by Bradley Froehle : ---------- nosy: +bfroehle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 01:09:03 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 09 Dec 2012 00:09:03 +0000 Subject: [issue16346] readline problem In-Reply-To: <1351414135.83.0.205698336567.issue16346@psf.upfronthosting.co.za> Message-ID: <1355011743.15.0.237657607934.issue16346@psf.upfronthosting.co.za> ?ric Araujo added the comment: On a Ubuntu system you don?t need to install readline from PyPI: CPython has a readline module, which gets compiled if the headers are available. That said, the error you report is still strange. Can you attach the full console output as a text file? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 01:24:10 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 09 Dec 2012 00:24:10 +0000 Subject: [issue16326] distutils build_ext fails to set library_dirs in 2.7.2 on Linux In-Reply-To: <1351194264.28.0.869819451271.issue16326@psf.upfronthosting.co.za> Message-ID: <1355012650.69.0.401958434942.issue16326@psf.upfronthosting.co.za> ?ric Araujo added the comment: Vinay, do you think dereferencing sys.executable could lead to trouble with venvs? ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 01:29:30 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 09 Dec 2012 00:29:30 +0000 Subject: [issue14894] distutils.LooseVersion fails to compare number and a word In-Reply-To: <1337805749.61.0.661955519892.issue14894@psf.upfronthosting.co.za> Message-ID: <1355012970.18.0.638560908994.issue14894@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks Dwayne. I think that most tools (e.g. setuptools) generate things like 1.0.2+gitab25c6fe95ee92fac3187dcd90e0560ccacb084a i.e. real version set by maintainer + hash, not just the hash, so I am still not convinced a change is needed. ---------- stage: needs patch -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 01:31:43 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 09 Dec 2012 00:31:43 +0000 Subject: [issue16406] move the "Uploading Packages" section to distutils/packageindex.rst In-Reply-To: <1352055793.2.0.149261948913.issue16406@psf.upfronthosting.co.za> Message-ID: <1355013103.94.0.640460531154.issue16406@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m reluctant to break links. I think the issues you report could be fixed or mitigated with changes to text, clarifications, interlinks. What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 01:42:34 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 09 Dec 2012 00:42:34 +0000 Subject: [issue16406] move the "Uploading Packages" section to distutils/packageindex.rst In-Reply-To: <1352055793.2.0.149261948913.issue16406@psf.upfronthosting.co.za> Message-ID: <1355013754.21.0.230067573269.issue16406@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I've been meaning to ask Georg or anyone else knowledgeable about what options we have for redirects, etc. -- specifically for this issue. Maybe something similar can even be done using Sphinx. If we can't redirect, I was thinking even a stub page with a manual link to the PyPI page might be an improvement (to prevent the broken external link issue you mention). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 04:46:05 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Dec 2012 03:46:05 +0000 Subject: [issue13614] setup.py register fails if long_description contains ReST In-Reply-To: <1324069250.69.0.136486094973.issue13614@psf.upfronthosting.co.za> Message-ID: <3YJtcW57cCzRSx@mail.python.org> Roundup Robot added the comment: New changeset 692be1f9fa1d by ?ric Araujo in branch '2.7': Fix setup.py register failure with invalid rst in description (#13614). http://hg.python.org/cpython/rev/692be1f9fa1d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 04:57:19 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Dec 2012 03:57:19 +0000 Subject: [issue7719] distutils: ignore .nfsXXXX files In-Reply-To: <1263669405.52.0.706975841329.issue7719@psf.upfronthosting.co.za> Message-ID: <3YJtsV5hyVzRTN@mail.python.org> Roundup Robot added the comment: New changeset d978828bfd0e by ?ric Araujo in branch '3.2': Ignore .nfs* files in distutils (#7719). http://hg.python.org/cpython/rev/d978828bfd0e New changeset 10ab746f55fb by ?ric Araujo in branch '3.3': Merge fixes for #13614, #13512 and #7719 from 3.2 http://hg.python.org/cpython/rev/10ab746f55fb New changeset b10c1c6f869f by ?ric Araujo in branch 'default': Merge fixes for #13614, #13512 and #7719 from 3.3 http://hg.python.org/cpython/rev/b10c1c6f869f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 04:57:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Dec 2012 03:57:20 +0000 Subject: [issue13614] setup.py register fails if long_description contains ReST In-Reply-To: <1324069250.69.0.136486094973.issue13614@psf.upfronthosting.co.za> Message-ID: <3YJtsW45KkzRTN@mail.python.org> Roundup Robot added the comment: New changeset 99c80e8a721e by ?ric Araujo in branch '3.2': Fix setup.py register failure with invalid rst in description (#13614). http://hg.python.org/cpython/rev/99c80e8a721e New changeset 10ab746f55fb by ?ric Araujo in branch '3.3': Merge fixes for #13614, #13512 and #7719 from 3.2 http://hg.python.org/cpython/rev/10ab746f55fb New changeset b10c1c6f869f by ?ric Araujo in branch 'default': Merge fixes for #13614, #13512 and #7719 from 3.3 http://hg.python.org/cpython/rev/b10c1c6f869f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 04:57:21 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Dec 2012 03:57:21 +0000 Subject: [issue13512] ~/.pypirc created insecurely In-Reply-To: <1322695403.24.0.389183798564.issue13512@psf.upfronthosting.co.za> Message-ID: <3YJtsX2YYczRTN@mail.python.org> Roundup Robot added the comment: New changeset 4a2814f24a10 by ?ric Araujo in branch '3.2': Create ~/.pypirc securely (#13512). http://hg.python.org/cpython/rev/4a2814f24a10 New changeset 10ab746f55fb by ?ric Araujo in branch '3.3': Merge fixes for #13614, #13512 and #7719 from 3.2 http://hg.python.org/cpython/rev/10ab746f55fb New changeset b10c1c6f869f by ?ric Araujo in branch 'default': Merge fixes for #13614, #13512 and #7719 from 3.3 http://hg.python.org/cpython/rev/b10c1c6f869f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 05:02:20 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 09 Dec 2012 04:02:20 +0000 Subject: [issue7719] distutils: ignore .nfsXXXX files In-Reply-To: <1263669405.52.0.706975841329.issue7719@psf.upfronthosting.co.za> Message-ID: <1355025740.81.0.55891739417.issue7719@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks all! ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 05:03:26 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 09 Dec 2012 04:03:26 +0000 Subject: [issue13614] setup.py register fails if long_description contains ReST In-Reply-To: <1324069250.69.0.136486094973.issue13614@psf.upfronthosting.co.za> Message-ID: <1355025806.24.0.351258780582.issue13614@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 05:06:08 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 09 Dec 2012 04:06:08 +0000 Subject: [issue13512] ~/.pypirc created insecurely In-Reply-To: <1322695403.24.0.389183798564.issue13512@psf.upfronthosting.co.za> Message-ID: <1355025968.52.0.703144935352.issue13512@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 06:01:11 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Dec 2012 05:01:11 +0000 Subject: [issue16267] order of decorators @abstractmethod and @classmethod is significant (is not documented to be in @abstractclassmethod which advises their combined use) In-Reply-To: <1350488481.01.0.487550684008.issue16267@psf.upfronthosting.co.za> Message-ID: <1355029271.64.0.240479302452.issue16267@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:22:30 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Dec 2012 06:22:30 +0000 Subject: [issue15209] Re-raising exceptions from an expression In-Reply-To: <1340821665.84.0.121596566188.issue15209@psf.upfronthosting.co.za> Message-ID: <3YJy511HtKzQKy@mail.python.org> Roundup Robot added the comment: New changeset 3b67247f0bbb by Nick Coghlan in branch '3.3': Issue #15209: Fix typo and some additional wording tweaks http://hg.python.org/cpython/rev/3b67247f0bbb New changeset 04eb89e078b5 by Nick Coghlan in branch 'default': Merge from 3.3 (issue #15209) http://hg.python.org/cpython/rev/04eb89e078b5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:24:12 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Dec 2012 06:24:12 +0000 Subject: [issue15209] Re-raising exceptions from an expression In-Reply-To: <1354985956.6.0.815394333998.issue15209@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: On Sun, Dec 9, 2012 at 2:59 AM, Ethan Furman wrote: > > Ethan Furman added the comment: > > There is one typo and one error in the first paragraph of the patch: > > > When raising a new exception (rather than > > using to bare ``raise`` to re-raise the > ^ should be an 'a' > Fixed. > > Setting :attr:`__cause__` also implicitly sets > > the :attr:`__suppress_context__` attribute to ``True``. > > The last sentence is incorrect -- __suppress_context__ is only set to True > if __cause__ is set to None; if __cause__ is set to any other exception > __suppress_context__ remains False and the new exception chain will be > printed: > > >>> try: > ... raise ValueError > ... except: > ... raise NameError from KeyError > ... > KeyError > > The above exception was the direct cause of the following exception: > > Traceback (most recent call last): > File "", line 4, in > NameError > Not true: __suppress_context__ is always set as a side effect of setting __cause__ (it's built into the setter for the __cause__ descriptor). What you're seeing in the traceback above is the explicit cause, not the implicit context. >>> e = Exception() >>> e.__cause__ = Exception() >>> e.__suppress_context__ True The only mechanism we offer to suppress an explicit __cause__ is setting __cause__ to None. Cheers, Nick. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:30:48 2012 From: report at bugs.python.org (Sean Ochoa) Date: Sun, 09 Dec 2012 06:30:48 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1355034648.73.0.274885421527.issue13349@psf.upfronthosting.co.za> Sean Ochoa added the comment: Update based on Taggnostr's (Ezio on IRC, if I recall correctly) feedback from 11/12/2012 around 11:57 PST. * Added check for index result in positive tests. * Added assertIn check for remove result in positive tests. * Removed extra whitespace. * Formatted comments to be more concise. ---------- Added file: http://bugs.python.org/file28265/issue13349.patch.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:34:28 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Dec 2012 06:34:28 +0000 Subject: [issue16649] Add a PyCF_PRINT_EXPRESSION_RESULTS flag Message-ID: <1355034868.91.0.795623819186.issue16649@psf.upfronthosting.co.za> New submission from Nick Coghlan: code.InteractiveConsole.push attempts to support multi-line input when using an input method that doesn't reliably split on newlines. This support fails as soon as the multi-line input contains multiple statements (including when the last statement is incomplete). However, switching to 'exec' instead of 'single' causes other problems - specifically, it turns off the expression printing. While expression printing could be implied by the PyCF_DONT_IMPLY_DEDENT flag in addition to the "single" evaluation mode, it seems cleaner to break out the expression printing behaviour into its own flag and setting it appropriately in the code and/or codeop modules. ---------- components: Interpreter Core messages: 177199 nosy: aliles, kristjan.jonsson, ncoghlan priority: low severity: normal status: open title: Add a PyCF_PRINT_EXPRESSION_RESULTS flag versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:34:59 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Dec 2012 06:34:59 +0000 Subject: [issue16649] Add a PyCF_PRINT_EXPRESSION_RESULTS flag In-Reply-To: <1355034868.91.0.795623819186.issue16649@psf.upfronthosting.co.za> Message-ID: <1355034899.39.0.921629562657.issue16649@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:36:30 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Dec 2012 06:36:30 +0000 Subject: [issue16649] Add a PyCF_DISPLAY_EXPRESSION_RESULTS flag In-Reply-To: <1355034868.91.0.795623819186.issue16649@psf.upfronthosting.co.za> Message-ID: <1355034990.3.0.861792747872.issue16649@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- title: Add a PyCF_PRINT_EXPRESSION_RESULTS flag -> Add a PyCF_DISPLAY_EXPRESSION_RESULTS flag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:36:46 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Dec 2012 06:36:46 +0000 Subject: [issue16649] Add a PyCF_DISPLAY_EXPRESSION_RESULTS flag In-Reply-To: <1355034868.91.0.795623819186.issue16649@psf.upfronthosting.co.za> Message-ID: <1355035006.1.0.957171255127.issue16649@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 07:37:41 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Dec 2012 06:37:41 +0000 Subject: [issue7741] Allow multiple statements in code.InteractiveConsole.push In-Reply-To: <1263912723.35.0.93131684665.issue7741@psf.upfronthosting.co.za> Message-ID: <1355035061.73.0.643189953883.issue7741@psf.upfronthosting.co.za> Nick Coghlan added the comment: More implicit magic seems like a bad idea, so I've split out a proposal for an explicit PyCF_DISPLAY_EXPRESSION_RESULTS flag as #16649. The behaviour would then be selectable regardless of the compilation mode, but would remain the default for "single". ---------- dependencies: +Add a PyCF_DISPLAY_EXPRESSION_RESULTS flag priority: normal -> low versions: +Python 3.4 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 08:03:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Dec 2012 07:03:20 +0000 Subject: [issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope Message-ID: <1355036600.83.0.376355184043.issue16650@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: As noted in Popen._internal_poll() docstring this method cannot reference anything outside of the local scope. However it references errno.ECHILD. The proposed patch fixes this. Is it good that Popen._handle_exitstatus() references building SubprocessError? ---------- components: Library (Lib) files: subprocess_reference_nonlocal.patch keywords: patch messages: 177201 nosy: asvetlov, pitrou, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Popen._internal_poll() references errno.ECHILD outside of the local scope type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28266/subprocess_reference_nonlocal.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 08:03:51 2012 From: report at bugs.python.org (Mathieu Dutour Sikiric) Date: Sun, 09 Dec 2012 07:03:51 +0000 Subject: [issue16346] readline problem In-Reply-To: <1355011743.15.0.237657607934.issue16346@psf.upfronthosting.co.za> Message-ID: Mathieu Dutour Sikiric added the comment: Well, that was the points, the headers were not available. Mathieu On Sunday, December 9, 2012, ?ric Araujo wrote: > > ?ric Araujo added the comment: > > On a Ubuntu system you don?t need to install readline from PyPI: CPython > has a readline module, which gets compiled if the headers are available. > > That said, the error you report is still strange. Can you attach the full > console output as a text file? > > ---------- > > _______________________________________ > Python tracker > > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 08:16:18 2012 From: report at bugs.python.org (Sean Ochoa) Date: Sun, 09 Dec 2012 07:16:18 +0000 Subject: [issue13349] Non-informative error message in index() and remove() functions In-Reply-To: <1320526177.89.0.678573577515.issue13349@psf.upfronthosting.co.za> Message-ID: <1355037378.91.0.639725960464.issue13349@psf.upfronthosting.co.za> Sean Ochoa added the comment: * Fixed issue with test name in Lib/test/test_tuple.py * Fixed issue with test_remove in Lib/test/test_list.py to assertNotIn instead of assertIn for positive case. Confirmed with Ezio that issue #7330 will need to be fixed/approved before this issue can be closed. ---------- Added file: http://bugs.python.org/file28267/issue13349.patch.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 08:18:03 2012 From: report at bugs.python.org (Sean Ochoa) Date: Sun, 09 Dec 2012 07:18:03 +0000 Subject: [issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1355037483.39.0.319132351965.issue7330@psf.upfronthosting.co.za> Changes by Sean Ochoa : ---------- nosy: +Sean.Ochoa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 08:33:45 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 09 Dec 2012 07:33:45 +0000 Subject: [issue16406] move the "Uploading Packages" section to distutils/packageindex.rst In-Reply-To: <1352055793.2.0.149261948913.issue16406@psf.upfronthosting.co.za> Message-ID: <1355038425.0.0.367965781818.issue16406@psf.upfronthosting.co.za> Georg Brandl added the comment: Redirects are no problem in principle, but it should not get out of hand. A simple "this was here but now isn't" page might be better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 10:30:50 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 09 Dec 2012 09:30:50 +0000 Subject: [issue7741] Allow multiple statements in code.InteractiveConsole.push In-Reply-To: <1263912723.35.0.93131684665.issue7741@psf.upfronthosting.co.za> Message-ID: <1355045450.17.0.822360263835.issue7741@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Sounds fine. Just a note to my original intent in #7741: We were using the InteractiveConsole class to implement a remote web-based console for our EVE servers. Often, as a means to hot-fix certain issues, we would paste code snippets into these windows to define functions, execute code, etc. Previously we had our own console like implementation, but the interactive features of the InteractiveConsole were _really_ nice, but lacking in multi-line support. We have had the stdlib patched as per my original suggestion for the past few years to support it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 11:24:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Dec 2012 10:24:11 +0000 Subject: [issue7330] PyUnicode_FromFormat: implement width and precision for %s, %S, %R, %V, %U, %A In-Reply-To: <1258314153.95.0.978747695294.issue7330@psf.upfronthosting.co.za> Message-ID: <1355048651.48.0.338552512698.issue7330@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I found one bug and add some nitpicks and optimization suggestion on Rietveld. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 11:34:49 2012 From: report at bugs.python.org (Paddy McCarthy) Date: Sun, 09 Dec 2012 10:34:49 +0000 Subject: [issue16580] Add examples to int.to_bytres and int.from_bytes In-Reply-To: <1354804298.05.0.63730141766.issue16580@psf.upfronthosting.co.za> Message-ID: <50C468F0.6020301@googlemail.com> Paddy McCarthy added the comment: On 06/12/2012 14:31, Ezio Melotti wrote: > Ezio Melotti added the comment: > > I agree. The examples in the doc seem clear to me, whereas the ones you proposed are not as clear. Do you think there's something that they don't currently cover that should be added? > > ---------- > nosy: +ezio.melotti > > _______________________________________ > Python tracker > > _______________________________________ > First, Thanks Ezio and Andrew for your replies. My problem was that when working on bitcoin address validation I saw code that was shifting and &'ing with 0xFF to convert to multiple bytes and half remembered that there might be a Python function to do that. On finding the .to_bytes method and its parameter "big" or "little", the only way I had of working out which to use was to try each until I found out which worked. I therefore thought that what would have helped me was code that showed the equivalent "expanded Python" for the method in a similar way to what is done for some of the itertools functions etc. If we split my request into two: 1. Is such extra explanation necessary. 2. Is my specific code that extra explanation. I can work on the code a bit more. Have I persuaded you that an extra explanation is necessary? Thanks, Paddy. P.S. I guess what is currently present shows the result of the methods but nothing on how it could be generated. I am stating that the generation can aid comprehension. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 11:55:36 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 09 Dec 2012 10:55:36 +0000 Subject: [issue16580] Add examples to int.to_bytres and int.from_bytes In-Reply-To: <1354217109.61.0.534443148437.issue16580@psf.upfronthosting.co.za> Message-ID: <1355050536.14.0.511880853298.issue16580@psf.upfronthosting.co.za> Ezio Melotti added the comment: Usually we add plain Python equivalents when they are simple enough that the code equivalent is as understandable as the prose or more (see for example http://docs.python.org/3/library/functions.html#all, or the itertools functions you mentioned). For this case I think it would help if you presented an equivalent function, e.g.: def to_bytes(n, length, order): if order == 'little': return bytes((n >> i*8) & 0xff for i in range(length)) elif order == 'big': return bytes((n >> i*8) & 0xff for i in reversed(range(length))) or even: def to_bytes(n, length, order): indexes = range(length) if order == 'little' else reversed(range(length)) return bytes((n >> i*8) & 0xff for i in indexes) This is also done for http://docs.python.org/3.3/library/stdtypes.html#int.bit_length just above to/from_bytes, so it might be a good addition. If this is done, the equivalent function can also be added to the test suite, so we can verify that it's indeed equivalent. ---------- keywords: +easy stage: -> needs patch versions: +Python 2.7, Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 12:38:22 2012 From: report at bugs.python.org (Vinay Sajip) Date: Sun, 09 Dec 2012 11:38:22 +0000 Subject: [issue16326] distutils build_ext fails to set library_dirs in 2.7.2 on Linux In-Reply-To: <1351194264.28.0.869819451271.issue16326@psf.upfronthosting.co.za> Message-ID: <1355053102.64.0.296091476306.issue16326@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Vinay, do you think dereferencing sys.executable could lead to trouble with venvs? It could - the venv code looks for a venv configuration file relative to sys.executable, which could be a symlink into a system-wide Python installation. Resolving the symlink would mean that the venv can't be found. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 12:42:50 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Dec 2012 11:42:50 +0000 Subject: [issue7741] Allow multiple statements in code.InteractiveConsole.push In-Reply-To: <1263912723.35.0.93131684665.issue7741@psf.upfronthosting.co.za> Message-ID: <1355053370.19.0.43956450171.issue7741@psf.upfronthosting.co.za> Nick Coghlan added the comment: Good to know - I guess in most circumstances copy-and-paste already works, because the input will be arriving via a line-buffered IO stream. I was thinking that with #16649 implemented, it would be possible to simply switch from "single" to "exec", without users needing to request the multi-statement support explicitly. However, I'm now back to wondering if such a change might have a few unforeseen consequences I haven't thought of. So if that seems like too much of a risk to backwards compatibility, how about moving the "symbol" argument to __init__, rather than needing to supply it with each call to push? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 13:18:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Dec 2012 12:18:19 +0000 Subject: [issue11159] Sax parser crashes if given unicode file name In-Reply-To: <1297261203.08.0.513476017898.issue11159@psf.upfronthosting.co.za> Message-ID: <1355055499.21.0.310857087662.issue11159@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: However Python doesn't work with bytes filenames (I don't think this is a bug). The proposed patch allows unicode filenames be used in SAX parser. ---------- keywords: +patch nosy: +serhiy.storchaka stage: -> patch review Added file: http://bugs.python.org/file28268/sax_unicode_fn-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:03:58 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 09 Dec 2012 13:03:58 +0000 Subject: [issue13512] ~/.pypirc created insecurely In-Reply-To: <1322695403.24.0.389183798564.issue13512@psf.upfronthosting.co.za> Message-ID: <1355058237.99.0.86704326798.issue13512@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you Eric! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:04:19 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 09 Dec 2012 13:04:19 +0000 Subject: [issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope In-Reply-To: <1355036600.83.0.376355184043.issue16650@psf.upfronthosting.co.za> Message-ID: <1355058259.03.0.120071719205.issue16650@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:11:55 2012 From: report at bugs.python.org (Nadeem Vawda) Date: Sun, 09 Dec 2012 13:11:55 +0000 Subject: [issue15955] gzip, bz2, lzma: add option to limit output size In-Reply-To: <1347884562.79.0.801674791772.issue15955@psf.upfronthosting.co.za> Message-ID: <1355058715.45.0.527712147983.issue15955@psf.upfronthosting.co.za> Nadeem Vawda added the comment: >> # Using zlib's interface >> while not d.eof: >> compressed = d.unconsumed_tail or f.read(8192) >> if not compressed: >> raise ValueError('End-of-stream marker not found') >> output = d.decompress(compressed, 8192) >> # > > This is not usable with bzip2. Bzip2 uses large block size and unconsumed_tail > can be non empty but decompress() will return b''. With zlib you possible can > see the same effect on some input when read by one byte. I don't see how this is a problem. If (for some strange reason) the application-specific processing code can't handle empty blocks properly, you can just stick "if not output: continue" before it. > Actually it should be: > > # Using zlib's interface > while not d.eof: > output = d.decompress(d.unconsumed_tail, 8192) > while not output and not d.eof: > compressed = f.read(8192) > if not compressed: > raise ValueError('End-of-stream marker not found') > output = d.decompress(d.unconsumed_tail + compressed, 8192) > # > > Note that you should use d.unconsumed_tail + compressed as input, and therefore > do an unnecessary copy of the data. Why is this necessary? If unconsumed_tail is b'', then there's no need to prepend it (and the concatenation would be a no-op anyway). If unconsumed_tail does contain data, then we don't need to read additional compressed data from the file until we've finished decompressing the data we already have. > Without explicit unconsumed_tail you can write input data in the internal > mutable buffer, it will be more effective for large buffer (handreds of KB) > and small input chunks (several KB). Are you proposing that the decompressor object maintain its own buffer, and copy the input data into it before passing it to the decompression library? Doesn't that just duplicate work that the library is already doing for us? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:29:58 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Dec 2012 13:29:58 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: <1321140269.61.0.335726830367.issue13390@psf.upfronthosting.co.za> Message-ID: <3YK7ZF4x4jzRR7@mail.python.org> Roundup Robot added the comment: New changeset c40f4c19d20b by Antoine Pitrou in branch 'default': Issue #13390: New function :func:`sys.getallocatedblocks()` returns the number of memory blocks currently allocated. http://hg.python.org/cpython/rev/c40f4c19d20b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:30:47 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 09 Dec 2012 13:30:47 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: <1321140269.61.0.335726830367.issue13390@psf.upfronthosting.co.za> Message-ID: <1355059847.6.0.244804356422.issue13390@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed and pushed! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:34:58 2012 From: report at bugs.python.org (Lukas Lueg) Date: Sun, 09 Dec 2012 13:34:58 +0000 Subject: [issue16632] Enable DEP and ASLR In-Reply-To: <1354875781.46.0.686705865065.issue16632@psf.upfronthosting.co.za> Message-ID: <1355060098.29.0.457500612816.issue16632@psf.upfronthosting.co.za> Lukas Lueg added the comment: Only way to be sure: Enable & announce for 3.5 and wait for bug reports ---------- nosy: +ebfe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:45:23 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 09 Dec 2012 13:45:23 +0000 Subject: [issue16632] Enable DEP and ASLR In-Reply-To: <1354875781.46.0.686705865065.issue16632@psf.upfronthosting.co.za> Message-ID: <1355060723.57.0.485918958858.issue16632@psf.upfronthosting.co.za> Christian Heimes added the comment: DEP isn't much of an issue. It's automatically disabled for the entire process when one library w/o DEP is loaded. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:48:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Dec 2012 13:48:57 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <3YK8086NdpzRSX@mail.python.org> Roundup Robot added the comment: New changeset d8300842a0e9 by Antoine Pitrou in branch '3.2': Issue #16248: Disable code execution from the user's home directory by tkinter when the -E flag is passed to Python. http://hg.python.org/cpython/rev/d8300842a0e9 New changeset 10d04bdb05ab by Antoine Pitrou in branch '3.3': Issue #16248: Disable code execution from the user's home directory by tkinter when the -E flag is passed to Python. http://hg.python.org/cpython/rev/10d04bdb05ab New changeset a4fc52da295b by Antoine Pitrou in branch 'default': Issue #16248: Disable code execution from the user's home directory by tkinter when the -E flag is passed to Python. http://hg.python.org/cpython/rev/a4fc52da295b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 14:51:25 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Dec 2012 13:51:25 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <3YK8311FygzRTP@mail.python.org> Roundup Robot added the comment: New changeset 822b472eff13 by Antoine Pitrou in branch '2.7': Issue #16248: Disable code execution from the user's home directory by tkinter when the -E flag is passed to Python. http://hg.python.org/cpython/rev/822b472eff13 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 15:03:48 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 09 Dec 2012 14:03:48 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <1355061828.35.0.869372056998.issue16248@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Fixed. I will let Benjamin and Barry decide whether this deserves backporting to security branches. Benjamin, Barry, please do your job :) ---------- nosy: +barry, benjamin.peterson resolution: -> fixed stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 15:14:25 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 09 Dec 2012 14:14:25 +0000 Subject: [issue16490] "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins In-Reply-To: <1353123389.46.0.245856363901.issue16490@psf.upfronthosting.co.za> Message-ID: <1355062465.11.0.359158680488.issue16490@psf.upfronthosting.co.za> Berker Peksag added the comment: This looks like a duplicate of issue 1748064. ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 16:17:50 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Dec 2012 15:17:50 +0000 Subject: [issue16248] Security bug in tkinter allows for untrusted, arbitrary code execution. In-Reply-To: <1350401361.69.0.96754494265.issue16248@psf.upfronthosting.co.za> Message-ID: <3YK9yj3yp5zMyy@mail.python.org> Roundup Robot added the comment: New changeset 03b3124e9ea3 by Antoine Pitrou in branch '3.1': Issue #16248: Disable code execution from the user's home directory by tkinter when the -E flag is passed to Python. http://hg.python.org/cpython/rev/03b3124e9ea3 ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 16:29:10 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 09 Dec 2012 15:29:10 +0000 Subject: [issue16649] Add a PyCF_DISPLAY_EXPRESSION_RESULTS flag In-Reply-To: <1355034868.91.0.795623819186.issue16649@psf.upfronthosting.co.za> Message-ID: <1355066950.15.0.57026052799.issue16649@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm sort of surprised "single" doesn't handle that already. Should it not? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 17:10:19 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Dec 2012 16:10:19 +0000 Subject: [issue16616] test_poll.PollTests.poll_unit_tests() is dead code In-Reply-To: <1354724728.62.0.359623055954.issue16616@psf.upfronthosting.co.za> Message-ID: <3YKC7H18sNzRSB@mail.python.org> Roundup Robot added the comment: New changeset 5a022c21ad84 by Richard Oudkerk in branch 'default': Issue #16616: Enable test in test_poll which was (accidentally?) disabled http://hg.python.org/cpython/rev/5a022c21ad84 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 17:16:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Dec 2012 16:16:40 +0000 Subject: [issue16647] LMTP.connect() loses socket error details In-Reply-To: <1354993783.87.0.258604768595.issue16647@psf.upfronthosting.co.za> Message-ID: <1355069800.43.0.412505339828.issue16647@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. It can be simpler. ---------- Added file: http://bugs.python.org/file28269/smtplib_LMTP_connect_raise_err_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 17:17:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Dec 2012 16:17:01 +0000 Subject: [issue16647] LMTP.connect() loses socket error details In-Reply-To: <1354993783.87.0.258604768595.issue16647@psf.upfronthosting.co.za> Message-ID: <1355069821.72.0.557646183118.issue16647@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28264/smtplib_LMTP_connect_raise_err.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 17:50:20 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 09 Dec 2012 16:50:20 +0000 Subject: [issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope In-Reply-To: <1355036600.83.0.376355184043.issue16650@psf.upfronthosting.co.za> Message-ID: <1355071820.06.0.585178860103.issue16650@psf.upfronthosting.co.za> Andrew Svetlov added the comment: The patch LGTM. About _handle_exitstatus: I guess nothing wrong to fix it also. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 17:58:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Dec 2012 16:58:32 +0000 Subject: [issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope In-Reply-To: <1355036600.83.0.376355184043.issue16650@psf.upfronthosting.co.za> Message-ID: <1355072312.72.0.352082830587.issue16650@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm just asking if this is a bug. If using building exceptions is safe, then we can get rid of _os_error and _ECHILD in 3.3+, using OSError and ChildProcessError instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 18:20:48 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Dec 2012 17:20:48 +0000 Subject: [issue15955] gzip, bz2, lzma: add option to limit output size In-Reply-To: <1355058715.45.0.527712147983.issue15955@psf.upfronthosting.co.za> Message-ID: <201212091920.32086.storchaka@gmail.com> Serhiy Storchaka added the comment: > you can just stick "if not output: continue" before it. And then hang. Because d.unconsumed_tail is not empty and no new data will be read. > Why is this necessary? If unconsumed_tail is b'', then there's no need to > prepend it (and the concatenation would be a no-op anyway). If > unconsumed_tail does contain data, then we don't need to read additional > compressed data from the file until we've finished decompressing the data > we already have. What if unconsumed_tail is not empty but less than needed to decompress at least one byte? We need read more data until unconsumed_tail grow enought to be decompressed. > Are you proposing that the decompressor object maintain its own buffer, and > copy the input data into it before passing it to the decompression library? > Doesn't that just duplicate work that the library is already doing for us? unconsumed_tail is such buffer and when we call decompressor with new chunk of data we should allocate buffer of size (len(unconsumed_tail)+len(compressed)) and copy len(unconsumed_tail) bytes from unconsumed_tail and len(compressed) from gotten data. But when you use internal buffer, you should only copy new data. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 19:00:09 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 09 Dec 2012 18:00:09 +0000 Subject: [issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope In-Reply-To: <1355036600.83.0.376355184043.issue16650@psf.upfronthosting.co.za> Message-ID: <1355076009.0.0.786776519063.issue16650@psf.upfronthosting.co.za> Gregory P. Smith added the comment: it's a potential bug. your patch looks good. as for _handle_exitstatus referring to SubprocessError, that is fine. In that situation it is trying to raise the exception and the only time that would ever be a problem is when called by the gc during a __del__ where such an exception for this "impossible" situation cannot be caught anyways. It would effectively become an uncaught NameError instead of an uncaught SubprocessError; not a big deal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 19:39:53 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 09 Dec 2012 18:39:53 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation Message-ID: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> New submission from Brett Cannon: I'm wondering which modules in the stdlib lack pure Python implementations (and could legitimately have one, e.g. sqlite can't really have a pure Python implementation). Once we know how big/small the list is a decision could be made as to whether to take on the effort to bring over some pure Python version from another VM or something for any of these modules. To start the list: csv itertools ---------- components: Library (Lib) keywords: easy messages: 177230 nosy: brett.cannon priority: low severity: normal status: open title: Find out what stdlib modules lack a pure Python implementation versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 20:03:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 09 Dec 2012 19:03:07 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355079787.0.0.982869695771.issue16651@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: array audioop binascii random re struct xml.parsers.expat cjkcodecs zlib, bz2, lzma and crypts also can be implemented in pure Python. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 20:03:52 2012 From: report at bugs.python.org (Alex Gaynor) Date: Sun, 09 Dec 2012 19:03:52 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355079832.6.0.442000792424.issue16651@psf.upfronthosting.co.za> Changes by Alex Gaynor : ---------- nosy: +alex _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 20:17:57 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 09 Dec 2012 19:17:57 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355080677.78.0.688281756403.issue16651@psf.upfronthosting.co.za> Christian Heimes added the comment: hashlib backends (md5, sha1, sha256 / 384 / 512) either through openssl wrappers or implementations based on libtomcrypt. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 20:20:51 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 09 Dec 2012 19:20:51 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1355080851.95.0.338218480753.issue16612@psf.upfronthosting.co.za> Stefan Krah added the comment: Here are some things that I'm interested in right now: 1) From what kind of data structure are signature objects generated? 2) Is there an easy way to do this manually? 3) Can at least part of the verboseness go into header files (virtually all compilers support "static inline" in header files)? 4) Why don't approaches work that look simpler on the surface, like http://mail.python.org/pipermail/python-dev/2012-December/122934.html ? 5) Are C contributors in general happy (or at least tolerate) the new verboseness? Sure, we can discuss 1) to 3) here. For recording objections or approaches that don't work (think FAQ "Why don't you just do X?") a PEP would be nice to have. If I'm the only one who is slightly bothered by the aesthetic and readability aspects, then 5) obviously need not be discussed. Most people, however, will probably find out about the change only once Python 3.4 is released. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 20:52:55 2012 From: report at bugs.python.org (Larry Hastings) Date: Sun, 09 Dec 2012 19:52:55 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1355082775.33.0.402883944693.issue16612@psf.upfronthosting.co.za> Larry Hastings added the comment: I disagree that the Clinic DSL is "verbose". Certainly I find it more succinct than what we do now. On the other hand, the syntax you proposed in the python-dev message you cite is insufficient to the task. Consider a function that takes a "char *". How might you want Python to convert the Python value into that char *? Should it only accept bytes? Should it accept bytes and Unicode? Should it accept objects exposing the buffer protocol? Do you want the length too? If you want the length, does that mean that you accept nulls inside the string? If it's Unicode, do you want to use a default encoding, or do you want to specify an encoding? Or do you want to specify your own conversion function? My solution for the above is to add "flags". Which is, semantically, the only important distinction between what you propose and Clinic's DSL. (That and the per-argument docstrings, which I already suggest are negotiable.) The remaining differences are that you want to cram everything onto one line, wheras Clinic's DSL spreads things over multiple lines. I suggest the latter is more readable, particularly when the number of arguments grows large. To answer 5), you're the only C contributor who comes to mind who seems unhappy. Do I understand you correctly that your main pain point is that you generate scores of identical functions with the C preprocessor, and you see no way to do that with Clinic? If we figured out a way to make that work with Clinic, would that reduce your concerns? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 20:59:52 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 09 Dec 2012 19:59:52 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1355080851.95.0.338218480753.issue16612@psf.upfronthosting.co.za> Message-ID: <1355083105.3342.3.camel@localhost.localdomain> Antoine Pitrou added the comment: Le dimanche 09 d?cembre 2012 ? 19:20 +0000, Stefan Krah a ?crit : > > If I'm the only one who is slightly bothered by the aesthetic and readability > aspects, then 5) obviously need not be discussed. You're not the only one. The vertical space argument also resonates with me, although I'm not sure how easy it would be to put the generated boilerplate into separate include files. The DSL is a bit weird, it doesn't seem to have consistent typography rules, some lines end with a colon, some lines don't, some assignment signs ("=") have spaces around them, some don't. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 22:21:51 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 09 Dec 2012 21:21:51 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355088111.6.0.88678046039.issue16651@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 22:44:41 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 09 Dec 2012 21:44:41 +0000 Subject: [issue16652] socket.getfqdn docs are not explicit enough about the algorithm. Message-ID: <1355089481.55.0.645096435972.issue16652@psf.upfronthosting.co.za> New submission from R. David Murray: >From the docs it isn't quite clear if getfqnd() does the equivalent of: gethostbyaddr('127.0.0.1') or gethostbyaddr(gethostbyname(gethostname())) It matters which it is, when debugging a host's name configuration and DNS server problems. ---------- assignee: docs at python components: Documentation messages: 177236 nosy: docs at python, r.david.murray priority: normal severity: normal status: open title: socket.getfqdn docs are not explicit enough about the algorithm. type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 22:45:11 2012 From: report at bugs.python.org (telmich) Date: Sun, 09 Dec 2012 21:45:11 +0000 Subject: [issue16308] Undocumented (?) behaviour change in argparse from 3.2.3 to 3.3.0 In-Reply-To: <1351070553.1.0.217274613803.issue16308@psf.upfronthosting.co.za> Message-ID: <1355089511.61.0.599143680253.issue16308@psf.upfronthosting.co.za> telmich added the comment: Anyone alive at bugs.python.org? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 22:53:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Dec 2012 21:53:24 +0000 Subject: [issue13211] urllib2.HTTPError does not have 'reason' attribute. In-Reply-To: <1318943168.93.0.520705450261.issue13211@psf.upfronthosting.co.za> Message-ID: <3YKLl72PyyzRVw@mail.python.org> Roundup Robot added the comment: New changeset e1ba514ddcd2 by Senthil Kumaran in branch '3.2': Fix issue13211 - Document the reason attribute for urllib.error.HTTPError http://hg.python.org/cpython/rev/e1ba514ddcd2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 22:54:13 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 09 Dec 2012 21:54:13 +0000 Subject: [issue16634] urllib.error.HTTPError.reason is not documented In-Reply-To: <1354884656.5.0.110910747898.issue16634@psf.upfronthosting.co.za> Message-ID: <1355090053.81.0.578575186348.issue16634@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Thanks for raising the bug and patch, Berker Peksag. Fixed in all versions. ---------- nosy: +orsenthil resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:01:58 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 09 Dec 2012 22:01:58 +0000 Subject: [issue16653] reference kept in f_locals prevents the tracing/profiling of a destructor Message-ID: <1355090518.29.0.154365424175.issue16653@psf.upfronthosting.co.za> New submission from Xavier de Gaye: The following debugging session, run with python on the default branch, shows that pdb does not stop in __del__ when it is invoked. The reason is: - The destructor is not called when processing the 'c = 1' statement because foo frame.f_locals owns a reference to the C instance. - When the interpreter is about to invoke the trace function with the ensuing debug event, the call to PyFrame_LocalsToFast in call_trampoline causes the destructor to be invoked (as shown by gdb), and the destructor is not traced because at that time tstate->use_tracing is false. This is confirmed by the fact that when 'c = 1' is replaced with 'c = 1; locals()' (on one single line so as not to trigger the trace function before the call to locals()), then pdb stops in __del__. === foo.py ================ class C: def __del__(self): print("Calling C destructor.") def foo(): c = C() import pdb; pdb.set_trace() c = 1 foo() =============================== $ ./python /tmp/foo.py > /tmp/foo.py(8)foo() -> c = 1 (Pdb) step Calling C destructor. --Return-- > /tmp/foo.py(8)foo()->None -> c = 1 (Pdb) =============================== ---------- components: Interpreter Core messages: 177240 nosy: xdegaye priority: normal severity: normal status: open title: reference kept in f_locals prevents the tracing/profiling of a destructor type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:02:45 2012 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 09 Dec 2012 22:02:45 +0000 Subject: [issue11122] bdist_rpm should use rpmbuild, not rpm In-Reply-To: <1296854362.61.0.538085175842.issue11122@psf.upfronthosting.co.za> Message-ID: <1355090565.9.0.275490980564.issue11122@psf.upfronthosting.co.za> Eric V. Smith added the comment: I agree on just switching to rpmbuild, at least for 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:05:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 09 Dec 2012 22:05:22 +0000 Subject: [issue16582] Tkinter calls SystemExit with string In-Reply-To: <1354298633.36.0.337905476432.issue16582@psf.upfronthosting.co.za> Message-ID: <3YKM0x2wlnzRTP@mail.python.org> Roundup Robot added the comment: New changeset fed68e0bce53 by Andrew Svetlov in branch '3.2': Issue #16582: use int exit code in tkinter._exit http://hg.python.org/cpython/rev/fed68e0bce53 New changeset e39677feabe0 by Andrew Svetlov in branch '3.3': Issue #16582: use int exit code in tkinter._exit http://hg.python.org/cpython/rev/e39677feabe0 New changeset 5ad5efc847c7 by Andrew Svetlov in branch 'default': Issue #16582: use int exit code in tkinter._exit http://hg.python.org/cpython/rev/5ad5efc847c7 New changeset 37c1d20facd7 by Andrew Svetlov in branch '2.7': Issue #16582: use int exit code in tkinter._exit http://hg.python.org/cpython/rev/37c1d20facd7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:05:52 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 09 Dec 2012 22:05:52 +0000 Subject: [issue16582] Tkinter calls SystemExit with string In-Reply-To: <1354298633.36.0.337905476432.issue16582@psf.upfronthosting.co.za> Message-ID: <1355090752.45.0.353901106546.issue16582@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:07:45 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Sun, 09 Dec 2012 22:07:45 +0000 Subject: [issue16653] reference kept in f_locals prevents the tracing/profiling of a destructor In-Reply-To: <1355090518.29.0.154365424175.issue16653@psf.upfronthosting.co.za> Message-ID: <1355090865.91.0.012936635958.issue16653@psf.upfronthosting.co.za> Xavier de Gaye added the comment: Tracing/profiling is disabled when tstate->tracing is true or tstate->use_tracing is false. The proposed patch fixes the problem by reducing the scope where this condition is true. As a consequence call_trace, profile_trampoline, trace_trampoline and call_trampoline may now be called recursively. The patch includes a test case. ---------- keywords: +patch Added file: http://bugs.python.org/file28270/issue_16653.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:38:31 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 09 Dec 2012 22:38:31 +0000 Subject: [issue16653] reference kept in f_locals prevents the tracing/profiling of a destructor In-Reply-To: <1355090518.29.0.154365424175.issue16653@psf.upfronthosting.co.za> Message-ID: <1355092711.49.0.912533802464.issue16653@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +georg.brandl versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:46:07 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 09 Dec 2012 22:46:07 +0000 Subject: [issue16649] Add a PyCF_DISPLAY_EXPRESSION_RESULTS flag In-Reply-To: <1355066950.15.0.57026052799.issue16649@psf.upfronthosting.co.za> Message-ID: Nick Coghlan added the comment: Not when the string is provided as one big block of text. I haven't checked yet if including a blank line after compound statements makes a difference, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 9 23:47:37 2012 From: report at bugs.python.org (Chris Withers) Date: Sun, 09 Dec 2012 22:47:37 +0000 Subject: [issue7741] Allow multiple statements in code.InteractiveConsole.push In-Reply-To: <1263912723.35.0.93131684665.issue7741@psf.upfronthosting.co.za> Message-ID: <1355093257.49.0.203509488015.issue7741@psf.upfronthosting.co.za> Changes by Chris Withers : ---------- nosy: -cjw296 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 01:39:36 2012 From: report at bugs.python.org (stephenhohs) Date: Mon, 10 Dec 2012 00:39:36 +0000 Subject: [issue16654] IDLE problems with Mac OS 10.6.8 ("print syntax") Message-ID: <1355099976.92.0.551820682272.issue16654@psf.upfronthosting.co.za> New submission from stephenhohs: Numerous attempts were made to install (and deinstall) IDLE along with getting the recommended version of ActiveTCL. IDLE will always give a print syntax error with one liners print "hello, world". This is occurring for Mac OS 10.6.8 ---------- components: IDLE messages: 177246 nosy: stephenhohs priority: normal severity: normal status: open title: IDLE problems with Mac OS 10.6.8 ("print syntax") versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 02:32:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 10 Dec 2012 01:32:56 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355103176.77.0.38011123602.issue16651@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Would it make sense for this list to be somehow reflected in or be reconstructible from the documentation? ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 02:47:10 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 10 Dec 2012 01:47:10 +0000 Subject: [issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__ In-Reply-To: <1348615231.16.0.514985949274.issue16049@psf.upfronthosting.co.za> Message-ID: <1355104030.91.0.560069305023.issue16049@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 The patch looks fine. ?ric do you want to apply it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 03:01:39 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 10 Dec 2012 02:01:39 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1355104899.89.0.756294976871.issue16629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: FYI, in the 3.2 branch I get 4 failures rather than just the one due to int: $ ./python.exe Lib/idlelib/CallTips.py int - expected 'int(x[, base]) -> integer' - but got 'int(x=0) -> integer' list.append - expected 'L.append(object) -> None -- append object to end' - but got 'L.append(object) -- append object to end' [].append - expected 'L.append(object) -> None -- append object to end' - but got 'L.append(object) -- append object to end' List.append - expected 'L.append(object) -> None -- append object to end' - but got 'L.append(object) -- append object to end' 4 of 41 tests failed Also, what is the recommended way to run IDLE tests? It doesn't seem to be a part of regrtest, and I didn't see this information in the devguide. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 03:25:05 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Dec 2012 02:25:05 +0000 Subject: [issue14783] Make int() and str() docstrings correct In-Reply-To: <1336751413.58.0.519130225761.issue14783@psf.upfronthosting.co.za> Message-ID: <3YKSmc4mYFzRZH@mail.python.org> Roundup Robot added the comment: New changeset 181c170c6270 by Chris Jerdonek in branch '3.2': Issue #16629: Fix IDLE idlelib.CallTips test. Patch by Roger Serwy. http://hg.python.org/cpython/rev/181c170c6270 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 03:25:06 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Dec 2012 02:25:06 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <3YKSmd38G1zRZ3@mail.python.org> Roundup Robot added the comment: New changeset 181c170c6270 by Chris Jerdonek in branch '3.2': Issue #16629: Fix IDLE idlelib.CallTips test. Patch by Roger Serwy. http://hg.python.org/cpython/rev/181c170c6270 New changeset 5182cc18b7b4 by Chris Jerdonek in branch '3.3': Issue #16629: Merge IDLE test fix from 3.2. http://hg.python.org/cpython/rev/5182cc18b7b4 New changeset db17a49395c2 by Chris Jerdonek in branch 'default': Issue #16629: Merge IDLE test fix from 3.3. http://hg.python.org/cpython/rev/db17a49395c2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 03:27:39 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 10 Dec 2012 02:27:39 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1355106459.95.0.00606887373263.issue16629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks a lot, Roger! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 03:31:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 10 Dec 2012 02:31:20 +0000 Subject: [issue16655] IDLE list.append calltips test failures Message-ID: <1355106680.63.0.980843765647.issue16655@psf.upfronthosting.co.za> New submission from Chris Jerdonek: There are three IDLE test failures in the 3.2 branch: $ ./python.exe Lib/idlelib/CallTips.py list.append - expected 'L.append(object) -> None -- append object to end' - but got 'L.append(object) -- append object to end' [].append - expected 'L.append(object) -> None -- append object to end' - but got 'L.append(object) -- append object to end' List.append - expected 'L.append(object) -> None -- append object to end' - but got 'L.append(object) -- append object to end' 3 of 41 tests failed ---------- components: IDLE messages: 177253 nosy: chris.jerdonek, kbk priority: normal severity: normal status: open title: IDLE list.append calltips test failures type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 03:32:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 10 Dec 2012 02:32:18 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1355106738.92.0.468925665252.issue16629@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I created issue 16655 for the three test failures I observed above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 03:43:24 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 10 Dec 2012 02:43:24 +0000 Subject: [issue16654] IDLE problems with Mac OS 10.6.8 ("print syntax") In-Reply-To: <1355099976.92.0.551820682272.issue16654@psf.upfronthosting.co.za> Message-ID: <1355107404.51.0.985053142225.issue16654@psf.upfronthosting.co.za> R. David Murray added the comment: The statement print "hello world" is indeed invalid syntax in Python3. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 03:49:49 2012 From: report at bugs.python.org (stephenhohs) Date: Mon, 10 Dec 2012 02:49:49 +0000 Subject: [issue16654] IDLE problems with Mac OS 10.6.8 ("print syntax") In-Reply-To: <1355107404.51.0.985053142225.issue16654@psf.upfronthosting.co.za> Message-ID: <8CFA49826CD720B-20CC-10EEB@webmail-d040.sysops.aol.com> stephenhohs added the comment: You are right. Thanks Stephen M. Hohs smhohs at aol.com ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 04:18:31 2012 From: report at bugs.python.org (Ben Hoyt) Date: Mon, 10 Dec 2012 03:18:31 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1355109511.45.0.92150877157.issue15207@psf.upfronthosting.co.za> Ben Hoyt added the comment: Either way -- this needs to be reverted or fixed. It's a nasty gotcha for folks writing Python web services at the moment. I'm still for reverting, per my reasons above. Dave Chambers, I'm not for "faster but broken" but for "faster and fixed" -- from what I've shown above, it's the Windows registry that's broken, so removing read_windows_registry() entirely would fix this (and as a bonus, be faster and simplify the code :-). Per your suggestion http://bugs.python.org/issue15207#msg177092 -- I don't understand how mimetypes.py would know the types "that aren't hardcoded". R. David Murray, I don't understand the advantage of trying to maintain a list of "Windows fixes". What if this list was wrong, or there was a Windows update which broke more mime types? Why can't we just avoid the complication and go back to the hardcoded types for Windows? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 04:30:25 2012 From: report at bugs.python.org (danblack) Date: Mon, 10 Dec 2012 03:30:25 +0000 Subject: [issue8109] Server-side support for TLS Server Name Indication extension In-Reply-To: <1268234047.5.0.702223567094.issue8109@psf.upfronthosting.co.za> Message-ID: <1355110225.7.0.649982805505.issue8109@psf.upfronthosting.co.za> danblack added the comment: I've added a full set of alert descriptions and cleaned up the doco some more. The reference counting when the SNI callback comes in is my greatest worry. ---------- Added file: http://bugs.python.org/file28271/issue-8109-sni-serverside.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 04:31:56 2012 From: report at bugs.python.org (Dave Chambers) Date: Mon, 10 Dec 2012 03:31:56 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1355110316.78.0.875667888122.issue15207@psf.upfronthosting.co.za> Dave Chambers added the comment: > removing read_windows_registry() If you're suggesting hardcoding *ALL* the mimetypes for *ALL* OSes, I think that's probably the best overall solution. No variability, as fast as can be. The downside is that there would occasionally be an unrecognized type, thus there'd need to be diligence to keep the hardcoded list up to date, but overall I think Ben Hoyt's suggestion is best. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 04:35:24 2012 From: report at bugs.python.org (Ben Hoyt) Date: Mon, 10 Dec 2012 03:35:24 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1355110524.15.0.395069399986.issue15207@psf.upfronthosting.co.za> Ben Hoyt added the comment: Actually, I was suggesting using the hardcoded types for Windows only (i.e., only removing read_windows_registry). Several bugs have been opened on problems with the Windows registry mimetypes, but as far as I know this isn't an issue on Linux -- in other words, if Linux/other systems ain't broke, no need to fix them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 04:41:37 2012 From: report at bugs.python.org (danblack) Date: Mon, 10 Dec 2012 03:41:37 +0000 Subject: [issue10852] SSL/TLS sni use in smtp, pop, imap, nntp, ftp client libs by default In-Reply-To: <1294375380.08.0.187691378511.issue10852@psf.upfronthosting.co.za> Message-ID: <1355110897.8.0.285050529531.issue10852@psf.upfronthosting.co.za> danblack added the comment: the one error in the previous review corrected. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 06:57:39 2012 From: report at bugs.python.org (Paddy McCarthy) Date: Mon, 10 Dec 2012 05:57:39 +0000 Subject: [issue16580] Add examples to int.to_bytres and int.from_bytes In-Reply-To: <1355050536.14.0.511880853298.issue16580@psf.upfronthosting.co.za> Message-ID: <50C57977.7020506@googlemail.com> Paddy McCarthy added the comment: On 09/12/2012 10:55, Ezio Melotti wrote: > Ezio Melotti added the comment: > > Usually we add plain Python equivalents when they are simple enough that the code equivalent is as understandable as the prose or more (see for example http://docs.python.org/3/library/functions.html#all, or the itertools functions you mentioned). > For this case I think it would help if you presented an equivalent function, e.g.: > > def to_bytes(n, length, order): > if order == 'little': > return bytes((n >> i*8) & 0xff for i in range(length)) > elif order == 'big': > return bytes((n >> i*8) & 0xff for i in reversed(range(length))) > > or even: > > def to_bytes(n, length, order): > indexes = range(length) if order == 'little' else reversed(range(length)) > return bytes((n >> i*8) & 0xff for i in indexes) > > This is also done for http://docs.python.org/3.3/library/stdtypes.html#int.bit_length just above to/from_bytes, so it might be a good addition. > If this is done, the equivalent function can also be added to the test suite, so we can verify that it's indeed equivalent. > > ---------- > keywords: +easy > stage: -> needs patch > versions: +Python 2.7, Python 3.2, Python 3.4 > > _______________________________________ > Python tracker > > _______________________________________ > The second example looks great. I like the dual use for testing too and will try and remember both the next time I find I have ireas about the documentation. Thanks guys. It's appreciated! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 07:50:15 2012 From: report at bugs.python.org (Larry Hastings) Date: Mon, 10 Dec 2012 06:50:15 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1355122215.87.0.889189764575.issue16612@psf.upfronthosting.co.za> Larry Hastings added the comment: What lines end with a colon? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 08:03:00 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 10 Dec 2012 07:03:00 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1355122980.14.0.472275874843.issue16612@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > What lines end with a colon? He probably means semicolon, for example: + int dir_fd = DEFAULT_DIR_FD; + default=None ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 08:05:39 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Dec 2012 07:05:39 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1355122980.14.0.472275874843.issue16612@psf.upfronthosting.co.za> Message-ID: <1355123052.3279.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > > What lines end with a colon? > > He probably means semicolon, for example: > > + int dir_fd = DEFAULT_DIR_FD; > + default=None Oops, yes, sorry. Semicolon indeed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 09:00:46 2012 From: report at bugs.python.org (Berker Peksag) Date: Mon, 10 Dec 2012 08:00:46 +0000 Subject: [issue1218234] inspect.getsource doesn't update when a module is reloaded Message-ID: <1355126446.16.0.275752314005.issue1218234@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: +Python 3.3, Python 3.4 -Python 3.1 Added file: http://bugs.python.org/file28272/issue1218234.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 09:01:48 2012 From: report at bugs.python.org (Berker Peksag) Date: Mon, 10 Dec 2012 08:01:48 +0000 Subject: [issue1218234] inspect.getsource doesn't update when a module is reloaded Message-ID: <1355126508.47.0.184960419154.issue1218234@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 09:18:32 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Dec 2012 08:18:32 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <3YKccS0ckFzRYV@mail.python.org> Roundup Robot added the comment: New changeset c9b9f786ec25 by Hynek Schlawack in branch '3.2': #15872: Add tests for a 3.3 regression in the new fd-based shutil.rmtree http://hg.python.org/cpython/rev/c9b9f786ec25 New changeset fc394216c724 by Hynek Schlawack in branch '3.3': #15872: Fix 3.3 regression introduced by the new fd-based shutil.rmtree http://hg.python.org/cpython/rev/fc394216c724 New changeset c70d964b26fe by Hynek Schlawack in branch 'default': #15872: Fix 3.3 regression introduced by the new fd-based shutil.rmtree http://hg.python.org/cpython/rev/c70d964b26fe ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:11:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Dec 2012 09:11:29 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <3YKdnY1GTBzMBr@mail.python.org> Roundup Robot added the comment: New changeset 5211391928bc by Hynek Schlawack in branch '3.2': #15872: Fix shutil.rmtree error tests for Windows http://hg.python.org/cpython/rev/5211391928bc New changeset 4b2fca8ad07b by Hynek Schlawack in branch '3.3': #15872: Fix shutil.rmtree error tests for Windows http://hg.python.org/cpython/rev/4b2fca8ad07b New changeset ae1ef62954f7 by Hynek Schlawack in branch 'default': #15872: Fix shutil.rmtree error tests for Windows http://hg.python.org/cpython/rev/ae1ef62954f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:29:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2012 09:29:07 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <1355131747.08.0.555489820132.issue15872@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you, Hynek, for review and committing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:29:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2012 09:29:14 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <1355131754.25.0.692196169781.issue15872@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you, Hynek, for review and committing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:31:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2012 09:31:49 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <1355131909.43.0.769207387718.issue15872@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- Removed message: http://bugs.python.org/msg177269 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 10:35:36 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 10 Dec 2012 09:35:36 +0000 Subject: [issue15701] AttributeError from HTTPError when using digest auth In-Reply-To: <1345149357.77.0.903430006119.issue15701@psf.upfronthosting.co.za> Message-ID: <1355132136.08.0.944221495978.issue15701@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Even though 2.x is in security fix mode, this can be fixed by a overriding the base class's info method in the HTTPError class and returning the .hdrs attribute instead of .headers. ---------- Added file: http://bugs.python.org/file28273/Issue1571.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 11:09:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Dec 2012 10:09:47 +0000 Subject: [issue15701] AttributeError from HTTPError when using digest auth In-Reply-To: <1345149357.77.0.903430006119.issue15701@psf.upfronthosting.co.za> Message-ID: <3YKg4p3dBFzRNx@mail.python.org> Roundup Robot added the comment: New changeset ad1c1164f68b by Senthil Kumaran in branch 'default': Fix Issue15701 : add .headers attribute to urllib.error.HTTPError http://hg.python.org/cpython/rev/ad1c1164f68b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 11:13:13 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 10 Dec 2012 10:13:13 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> Message-ID: <1355134393.26.0.0609033862182.issue16602@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: PyWeakref_GET_OBJECT is also potentially dangerous: since the refcount is not incremented, it's very possible that the GC collects it. The only safe operation after PyWeakref_GET_OBJECT is to Py_XINCREF the result. Should we provide a PyWeakRef_LockObject()? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 11:27:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Dec 2012 10:27:15 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <3YKgSy3xnLzMHR@mail.python.org> Roundup Robot added the comment: New changeset 7ce8f4a70ccd by Hynek Schlawack in branch '3.2': #15872: More shutil test fixes for Windows http://hg.python.org/cpython/rev/7ce8f4a70ccd New changeset a05e2d4094ea by Hynek Schlawack in branch '3.3': #15872: More shutil test fixes for Windows http://hg.python.org/cpython/rev/a05e2d4094ea New changeset c23659e2ec1a by Hynek Schlawack in branch 'default': #15872: More shutil test fixes for Windows http://hg.python.org/cpython/rev/c23659e2ec1a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 11:39:30 2012 From: report at bugs.python.org (Robin Schreiber) Date: Mon, 10 Dec 2012 10:39:30 +0000 Subject: [issue15390] PEP 3121, 384 refactoring applied to datetime module In-Reply-To: <1342647232.82.0.0763290244077.issue15390@psf.upfronthosting.co.za> Message-ID: <1355135970.92.0.137553812426.issue15390@psf.upfronthosting.co.za> Robin Schreiber added the comment: I have updated the patch to work again with the current version of the _datetimemodule. Regarding the suggestion of separating PEP3121 and PEP384. It might be true that datetime and other modules do not benefit directly from PEP 384, however it is still a fact that the stdlib modules should be seen as a set of reference modules, that are all implemented in a way that complies with the implementation fo the xxmodules. I have talked with Martin von L?wis about this, and as far as I understood him correctly he also sees the PEP384 refactoring applied to the whole stdlib as a nessecary "signal" to other developers to refactor their modules accordingly. Anyway I am planning to start to commit all of the open changes that I have created during my GSOC in the next few months. So a decision regarding this separation concern might be helpful. :-) ---------- keywords: +patch Added file: http://bugs.python.org/file28274/_datetimemodule_pep3121-384_v3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 11:58:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2012 10:58:31 +0000 Subject: [issue16645] Wrong test_extract_hardlink() in test_tarfile.py In-Reply-To: <1354989728.58.0.0717635689948.issue16645@psf.upfronthosting.co.za> Message-ID: <1355137111.27.0.221947700023.issue16645@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28260/test_tarfile_test_extract_hardlink.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 11:59:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2012 10:59:42 +0000 Subject: [issue16645] Wrong test_extract_hardlink() in test_tarfile.py In-Reply-To: <1354989728.58.0.0717635689948.issue16645@psf.upfronthosting.co.za> Message-ID: <1355137182.1.0.59503412886.issue16645@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28275/test_tarfile_test_extract_hardlink.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:07:01 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Dec 2012 11:07:01 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <3YKhLr3Jv6zMQq@mail.python.org> Roundup Robot added the comment: New changeset 2d953d47d634 by Hynek Schlawack in branch '3.2': #15872: Be flexible with appending *.* in shutil.rmtree test case http://hg.python.org/cpython/rev/2d953d47d634 New changeset edb747c6c479 by Hynek Schlawack in branch '3.3': #15872: Be flexible with appending *.* in shutil.rmtree test case http://hg.python.org/cpython/rev/edb747c6c479 New changeset a0a25ffdec9d by Hynek Schlawack in branch 'default': #15872: Be flexible with appending *.* in shutil.rmtree test case http://hg.python.org/cpython/rev/a0a25ffdec9d ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:23:14 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 10 Dec 2012 11:23:14 +0000 Subject: [issue16653] reference kept in f_locals prevents the tracing/profiling of a destructor In-Reply-To: <1355090518.29.0.154365424175.issue16653@psf.upfronthosting.co.za> Message-ID: <1355138594.35.0.849200264177.issue16653@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:41:44 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 10 Dec 2012 11:41:44 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows Message-ID: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> New submission from anatoly techtonik: This critical bug is one of the reasons that non-English speaking communities doesn't adopt Python as broadly as it happens in English world compared to other technologies (PHP etc.). # -*- coding: utf-8 -*- import os os.mkdir(u'??????? ???') os.mkdir(u'English name') for r, dirs, files in os.walk('.'): print dirs This gives: ['English name'] [] Windows Vista. >dir /b English name test.py ??????? ??? ---------- components: Library (Lib) messages: 177276 nosy: techtonik priority: normal severity: normal status: open title: os.walk ignores international dirs on Windows versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:48:41 2012 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 10 Dec 2012 11:48:41 +0000 Subject: [issue15390] PEP 3121, 384 refactoring applied to datetime module In-Reply-To: <1355135970.92.0.137553812426.issue15390@psf.upfronthosting.co.za> Message-ID: <50C5CC16.3080306@egenix.com> Marc-Andre Lemburg added the comment: On 10.12.2012 11:39, Robin Schreiber wrote: > > Robin Schreiber added the comment: > > I have updated the patch to work again with the current version of the _datetimemodule. Please use "_Py_" prefixes for private symbols you put in the header files, e.g. _datetimemodulestate and the macros. Question: What happens if PyModule_GetState() or PyState_FindModule() raise an exception and return NULL ? The current code will segfault in such a situation. Thanks, -- Marc-Andre Lemburg eGenix.com ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:48:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2012 11:48:49 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355140129.23.0.000527853841247.issue16656@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is reproduced on 3.x? ---------- nosy: +serhiy.storchaka type: -> behavior versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:49:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2012 11:49:13 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355140153.11.0.472797560449.issue16656@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- Removed message: http://bugs.python.org/msg177278 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 12:49:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2012 11:49:29 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355140169.13.0.699930964756.issue16656@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Is it reproduced on 3.x? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 13:03:53 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 10 Dec 2012 12:03:53 +0000 Subject: [issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope In-Reply-To: <1355036600.83.0.376355184043.issue16650@psf.upfronthosting.co.za> Message-ID: <1355141032.99.0.00456986266136.issue16650@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 13:19:47 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 10 Dec 2012 12:19:47 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1355141987.44.0.608265295551.issue15207@psf.upfronthosting.co.za> R. David Murray added the comment: I'm personally OK with the option of removing the registry support (or making it optional-by-default), but I'm not going to make that call, we need a windows dev opinion. Maintaining the list of windows exceptions shouldn't be much worse than maintaining the list of mime types. I can't imagine that Microsoft changes it all that often, given that you say they haven't bothered to update the zip type yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 13:23:01 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 10 Dec 2012 12:23:01 +0000 Subject: [issue1748064] inspect.getargspec fails on built-in or slot wrapper methods Message-ID: <1355142181.94.0.729920707291.issue1748064@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 13:28:13 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 10 Dec 2012 12:28:13 +0000 Subject: [issue16645] Wrong test_extract_hardlink() in test_tarfile.py In-Reply-To: <1354989728.58.0.0717635689948.issue16645@psf.upfronthosting.co.za> Message-ID: <1355142493.84.0.514515172381.issue16645@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 13:28:56 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 10 Dec 2012 12:28:56 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355142536.13.0.483272275591.issue16656@psf.upfronthosting.co.za> R. David Murray added the comment: No. ---------- nosy: +r.david.murray resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 13:29:39 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 10 Dec 2012 12:29:39 +0000 Subject: [issue16647] LMTP.connect() loses socket error details In-Reply-To: <1354993783.87.0.258604768595.issue16647@psf.upfronthosting.co.za> Message-ID: <1355142579.94.0.962158938103.issue16647@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 13:30:33 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 10 Dec 2012 12:30:33 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355142633.88.0.516498033886.issue16656@psf.upfronthosting.co.za> R. David Murray added the comment: Oops, clicked submit too soon. It isn't likely to get fixed in 2.7, because 2.7's unicode support problems is the major reason python3 was developed. ---------- stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 13:34:17 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 10 Dec 2012 12:34:17 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355142857.53.0.281055009079.issue16656@psf.upfronthosting.co.za> R. David Murray added the comment: For that matter, it isn't reproduced in python2.7, either: >>> for r, dirs, files in os.walk(u'.'): ... print dirs ... [u'\u0420\u0443\u0441\u0441\u043a\u043e\u0435 \u0438\u043c\u044f'] [] ---------- resolution: out of date -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 13:34:55 2012 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 10 Dec 2012 12:34:55 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355142895.05.0.369984879204.issue16656@psf.upfronthosting.co.za> Jeremy Kloth added the comment: The problem exhibited is not coming from the os.walk() implementation, but from the use of a byte-string as the argument to it. The directories are created with unicode literals and therefore the argument must also be a unicode literal (u'.') for them to be shown. See the note in the listdir() documentation. As it stands, I suggest that this is closed as invalid, or at the minimum that it could be a documentation bug for walk() not also having a similar note as listdir(). ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 13:39:13 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 10 Dec 2012 12:39:13 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355143153.93.0.144613542693.issue16656@psf.upfronthosting.co.za> R. David Murray added the comment: Works for me without the u'.', too, though less usefully: >>> for r, dirs, files in os.walk('.'): ... print dirs ... ['\xd0\xa0\xd1\x83\xd1\x81\xd1\x81\xd0\xba\xd0\xbe\xd0\xb5 \xd0\xb8\xd0\xbc\xd1\x8f'] Maybe that doesn't work on Windows, though. I am, of course, assuming that python3 does the right thing on Windows, but I can't imagine Victor would have overlooked that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 14:02:03 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 10 Dec 2012 13:02:03 +0000 Subject: [issue16631] tarfile.extractall() doesn't extract everything if .next() was used In-Reply-To: <1354855276.1.0.878015275431.issue16631@psf.upfronthosting.co.za> Message-ID: <1355144523.78.0.98288726621.issue16631@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 14:05:32 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 10 Dec 2012 13:05:32 +0000 Subject: [issue16632] Enable DEP and ASLR In-Reply-To: <1354875781.46.0.686705865065.issue16632@psf.upfronthosting.co.za> Message-ID: <1355144732.44.0.531592438872.issue16632@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 14:09:14 2012 From: report at bugs.python.org (Dave Chambers) Date: Mon, 10 Dec 2012 13:09:14 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1355144954.58.0.0805545786734.issue15207@psf.upfronthosting.co.za> Dave Chambers added the comment: (I'm a windows dev type) I would say that there are 2 issues with relying on the registry: 1) Default values (ie. set by Windows upon OS install) are broken and MS never fixes them. 2) The values can be changed at any time, by any app. Thus the values are unreliable. If I were to code it from scratch today, I'd create a three-pronged approach: a) Hardcode a list of known types (fast & reliable). b) Have a default case where unknown types are pulled from the registry. Whatever value is retrieved is likely better than returning e.g. "application/octet-stream". c) When we neither find it in hardcoded list or in the registry, return a default value (e.g. "application/octet-stream") For what it's worth, my workaround will be to have my app delete the HKCR\MIME\Database\Content Type\image/x-png regkey, thus forcing the original braindead mimetypes.py code to use HKCR\MIME\Database\Content Type\image/png And, for what it's worth, my patch is actually faster than the current mimetypes.py code because I'm not doing reverse lookups. Thus any argument about a difference in speed is moot. Arguments about the speed of pulling mimetypes from registry are valid. Another registry based approach would be to build a dictionary of mimetypes on demand. In this scenario, at startup, the dictionary would be empty. When python needs the mimetype for ".png", on the 1st request it would cause a "slow" registry lookup for only that type but on all subsequent requests for the type it would use the "fast" value from the dictionary. Given that an app will probably use only a handful of mimetypes but will use that same handful over and over, such a solution would have the benefits of (a) not using hardcoded values (thus no ongoing maintenance), (b) performing slow stuff only on demand, (c) optimizing repeat calls, and (d) consuming zero startup time. I'll code his up & run some timing tests if anyone thinks it's worthwhile. BTW, who makes the final determination as to if/when any such changes would be incorporated? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 14:33:11 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 10 Dec 2012 13:33:11 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <1355146391.19.0.679930070813.issue15872@psf.upfronthosting.co.za> Hynek Schlawack added the comment: ?I wish I were wrangling inconsistent Windows buildbots.? Nobody. Ever. *sigh* It appears they are appeased now, so finally closing. Thanks for the patches everyone! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 14:33:20 2012 From: report at bugs.python.org (Marius Gedminas) Date: Mon, 10 Dec 2012 13:33:20 +0000 Subject: [issue16657] traceback.format_tb incorrect docsting Message-ID: <1355146400.65.0.00525928914729.issue16657@psf.upfronthosting.co.za> New submission from Marius Gedminas: The docstring for traceback.format_tb says """A shorthand for 'format_list(extract_stack(f, limit)).""" which is incorrect -- it's actually a shorthand for format_list(extract_tb(tb, limit)). Patch attached. ---------- components: Library (Lib) files: fix-format_tb-docstring.patch keywords: patch messages: 177288 nosy: mgedmin priority: normal severity: normal status: open title: traceback.format_tb incorrect docsting versions: Python 2.7, Python 3.5 Added file: http://bugs.python.org/file28276/fix-format_tb-docstring.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 14:35:12 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 10 Dec 2012 13:35:12 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1355146512.78.0.346061166978.issue15207@psf.upfronthosting.co.za> R. David Murray added the comment: I would say Brian Curtin, Tim Golden, and/or Martin von L?wis, as they are the currently active committers with significant Windows expertise. Other committers may have opinions as well. If you don't get an answer here in a reasonable amount of time, please post a discussion of the issue to python-dev (it may end up there anyway). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 14:38:38 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 10 Dec 2012 13:38:38 +0000 Subject: [issue16632] Enable DEP and ASLR In-Reply-To: <1354875781.46.0.686705865065.issue16632@psf.upfronthosting.co.za> Message-ID: <1355146718.89.0.950465292841.issue16632@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I don't think much caution is needed. If problems don't show up in the beta releases, we can still revert the change for 3.4.1. Christian, please go ahead and check this in. ---------- stage: test needed -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 14:48:06 2012 From: report at bugs.python.org (Berker Peksag) Date: Mon, 10 Dec 2012 13:48:06 +0000 Subject: [issue12915] Add inspect.locate and inspect.resolve In-Reply-To: <1315326633.9.0.910127000285.issue12915@psf.upfronthosting.co.za> Message-ID: <1355147286.63.0.680548465473.issue12915@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +patch nosy: +berker.peksag versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file28277/issue12915.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 15:26:27 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 10 Dec 2012 14:26:27 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355149587.17.0.345874753405.issue16651@psf.upfronthosting.co.za> Brett Cannon added the comment: So expat doesn't count as that literally wraps the expat library. Random also requires accessing the system randomization libraries to work properly so I don't think that is a candidate either. As for the compression libraries, those could be re-implemented, but I view those as wrappers around the libraries (same as the crypto stuff). I mean it doesn't have to be that way, but I'm trying to keep this framed in a tractable problem to start. So to summarize the non-contentious modules (including adding functools) in alphabetical order, that puts us at: array audioop binascii cjkcodecs csv functools itertools re struct I would be curious to see what frequency these modules are used to know what might be higher priority so that the least used modules could eventually be marked as CPython-specific. And to answer Chris' question, there is no need to be able to generate this from the docs until there is some PEP listing what modules must be implemented by a VM in order to considers its stdlib complete. And thanks for the help so far, everyone! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 15:32:55 2012 From: report at bugs.python.org (Berker Peksag) Date: Mon, 10 Dec 2012 14:32:55 +0000 Subject: [issue3073] Cookie.Morsel breaks in parsing cookie values with whitespace In-Reply-To: <1213092703.97.0.622811170151.issue3073@psf.upfronthosting.co.za> Message-ID: <1355149975.65.0.784107535493.issue3073@psf.upfronthosting.co.za> Berker Peksag added the comment: The bug has been fixed in issue 8826. Related changeset: - http://hg.python.org/cpython/rev/cb231b79693e/ - Backport: http://hg.python.org/cpython/rev/84363c747c21 In Python 2.7.3: >>> from Cookie import SimpleCookie >>> cookies = SimpleCookie() >>> cookies.load('foo=baz; expires=Sat, 10-Jun-1978 09:41:04 GMT') >>> cookies >>> cookies['foo']['expires'] 'Sat, 10-Jun-1978 09:41:04 GMT' >>> cookies.load('foo=baz; expires=2008-06-10T09:44:45.963024') >>> cookies['foo']['expires'] '2008-06-10T09:44:45.963024' ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 15:32:58 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 10 Dec 2012 14:32:58 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355149978.63.0.888109738148.issue16651@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 15:37:33 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 10 Dec 2012 14:37:33 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355150253.34.0.63110337892.issue16651@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: PyPy has a pure Python implementation of sqlite (using ctypes): https://bitbucket.org/pypy/pypy/src/default/lib_pypy/_sqlite3.py It most probably works on CPython as well. Does it belong to this list? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 15:39:44 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 10 Dec 2012 14:39:44 +0000 Subject: [issue16308] Undocumented (?) behaviour change in argparse from 3.2.3 to 3.3.0 In-Reply-To: <1351070553.1.0.217274613803.issue16308@psf.upfronthosting.co.za> Message-ID: <1355150384.93.0.817559009208.issue16308@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 15:40:07 2012 From: report at bugs.python.org (Christian Heimes) Date: Mon, 10 Dec 2012 14:40:07 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355150407.71.0.968958079234.issue16651@psf.upfronthosting.co.za> Christian Heimes added the comment: All cryptographic hash function are available as pure Python implementations. Although the Python based variants are super slow (except maybe on PyPy), they still serve as an academic show case. IIRC PyPy has pure Python implementations of MD5, SHA-1 and SHA-2 family. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 15:48:57 2012 From: report at bugs.python.org (Daniel Urban) Date: Mon, 10 Dec 2012 14:48:57 +0000 Subject: [issue12915] Add inspect.locate and inspect.resolve In-Reply-To: <1315326633.9.0.910127000285.issue12915@psf.upfronthosting.co.za> Message-ID: <1355150937.17.0.113650078527.issue12915@psf.upfronthosting.co.za> Changes by Daniel Urban : ---------- stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 15:51:10 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 10 Dec 2012 14:51:10 +0000 Subject: [issue16616] test_poll.PollTests.poll_unit_tests() is dead code In-Reply-To: <1354724728.62.0.359623055954.issue16616@psf.upfronthosting.co.za> Message-ID: <1355151070.26.0.38876767852.issue16616@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 16:12:25 2012 From: report at bugs.python.org (Larry Hastings) Date: Mon, 10 Dec 2012 15:12:25 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1355152345.1.0.501128204186.issue16612@psf.upfronthosting.co.za> Larry Hastings added the comment: Ah. In that case, may I rewrite your critique as "[...] some lines may end with a semicolon, some lines may not, some assignment signs ("=") permit spaces around them, some don't." The semicolon is optional, permitted explicitly so you can copy-and-paste the original C variable declarations in and you don't have to go hunting for semicolons. The spaces are permitted on those lines for the same reason; they aren't on the "flag" lines because of how flags are parsed. I concede that this is inconsistent. If this inconsistency bothers you, I invite you to propose a different (and presumably more consistent) syntax for the DSL. I happen to think the current syntax has a motley "practicality beats purity" charm, but then I would, wouldn't I. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 16:21:58 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 10 Dec 2012 15:21:58 +0000 Subject: [issue15526] test_startfile crash on Windows 7 AMD64 In-Reply-To: <1343827804.07.0.425515249327.issue15526@psf.upfronthosting.co.za> Message-ID: <1355152918.0.0.951895079661.issue15526@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 16:37:11 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 10 Dec 2012 15:37:11 +0000 Subject: [issue15872] shutil.rmtree(..., ignore_errors=True) doesn't ignore all errors In-Reply-To: <1346962035.48.0.664042204164.issue15872@psf.upfronthosting.co.za> Message-ID: <3YKpLZ308NzRXh@mail.python.org> Roundup Robot added the comment: New changeset cb8274e1ebfa by Hynek Schlawack in branch '3.2': #15872: Some more Windows related tuning to shutil.rmtree tests http://hg.python.org/cpython/rev/cb8274e1ebfa New changeset 561c4012929a by Hynek Schlawack in branch '3.3': #15872: Some more Windows related tuning to shutil.rmtree tests http://hg.python.org/cpython/rev/561c4012929a New changeset 451559508c54 by Hynek Schlawack in branch 'default': #15872: Some more Windows related tuning to shutil.rmtree tests http://hg.python.org/cpython/rev/451559508c54 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 17:02:23 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Dec 2012 16:02:23 +0000 Subject: [issue16602] weakref can return an object with 0 refcount In-Reply-To: <1354603828.49.0.407579608192.issue16602@psf.upfronthosting.co.za> Message-ID: <1355155343.64.0.392755939068.issue16602@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > The only safe operation after PyWeakref_GET_OBJECT is to Py_XINCREF the > result. Should we provide a PyWeakRef_LockObject()? There's already a warning in the docs about that. I don't think an additional function is useful here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 17:05:02 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Dec 2012 16:05:02 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1355152345.1.0.501128204186.issue16612@psf.upfronthosting.co.za> Message-ID: <1526518431.306280934.1355155496003.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > The semicolon is optional, permitted explicitly so you can > copy-and-paste the original C variable declarations in and you don't > have to go hunting for semicolons. The spaces are permitted on > those lines for the same reason; they aren't on the "flag" lines > because of how flags are parsed. The syntax being liberal sounds ok, but I think our coding style should be consistent. > I happen to think the current > syntax has a motley "practicality beats purity" charm, but then I > would, wouldn't I. Are we a motley crew? ---------- title: Integrate "Argument Clinic" specialized preprocessor into CPython trunk -> Integrate "Argument Clinic" specialized preprocessor into CPython trunk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 17:25:33 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 10 Dec 2012 16:25:33 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355156733.45.0.252827101243.issue16651@psf.upfronthosting.co.za> Brett Cannon added the comment: No, sqlite does not belong on this list as it wraps a C library. Plus there is an explicit block for ctypes-based modules in the stdlib which would prevent moving over the PyPy implementation. And I'm sure pure Python versions of all the crypto libraries are out there, but I would be worried about them being implemented wrong, too slow to care, etc. Plus short of PyPy all of the other VMs have access to those crypto libraries in their own standard library so there is no need to provide it in Python's in pure Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 17:27:05 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Dec 2012 16:27:05 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355156825.69.0.613674873617.issue16651@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Agreed with Brett. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 17:39:25 2012 From: report at bugs.python.org (Dwayne Litzenberger) Date: Mon, 10 Dec 2012 16:39:25 +0000 Subject: [issue14894] distutils.LooseVersion fails to compare number and a word In-Reply-To: <1337805749.61.0.661955519892.issue14894@psf.upfronthosting.co.za> Message-ID: <1355157564.99.0.188680499288.issue14894@psf.upfronthosting.co.za> Dwayne Litzenberger added the comment: "git describe --tags --always" will return a bare commit id if there is no previous tag. This is pretty common to have when you're working on a new package that hasn't been released yet: $ git init Initialized empty Git repository in /tmp/repo/.git/ $ touch foo $ git add foo $ git commit -m 'Initial commit' [master (root-commit) cd7dd74] Initial commit 0 files changed create mode 100644 foo $ git describe --tags --always cd7dd74 $ git tag v1.0 $ git describe --tags --always v1.0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 19:35:54 2012 From: report at bugs.python.org (Philip Jenvey) Date: Mon, 10 Dec 2012 18:35:54 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355164554.21.0.853796503164.issue16651@psf.upfronthosting.co.za> Philip Jenvey added the comment: zipimport ---------- nosy: +pjenvey _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 19:50:52 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 10 Dec 2012 18:50:52 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355165452.64.0.640870776848.issue16651@psf.upfronthosting.co.za> Brian Curtin added the comment: winreg does not have a pure equivalent, nor could it ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 19:54:24 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Dec 2012 18:54:24 +0000 Subject: [issue14894] distutils.LooseVersion fails to compare number and a word In-Reply-To: <1337805749.61.0.661955519892.issue14894@psf.upfronthosting.co.za> Message-ID: <1355165664.04.0.26290093754.issue14894@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > As far as a real-world example is concerned, if you're using > git-describe to generate your version numbers, you can pretty easily > end up with something like "ab25c6fe95ee92fac3187dcd90e0560ccacb084a". And how are you supposed to compare that with anything else? I think `V("a") > V("b")` should raise TypeError in Python 3. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 20:01:51 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 10 Dec 2012 19:01:51 +0000 Subject: [issue14894] distutils.LooseVersion fails to compare number and a word In-Reply-To: <1337805749.61.0.661955519892.issue14894@psf.upfronthosting.co.za> Message-ID: <1355166111.74.0.786588405462.issue14894@psf.upfronthosting.co.za> ?ric Araujo added the comment: Don?t know if you?ve seen my previous message: I think that most tools (e.g. setuptools) generate things like 1.0.2+gitab25c6fe95ee92fac3187dcd90e0560ccacb084a i.e. real version set by maintainer + hash, not just the hash. I was talking about a version number set by the author, typically 0.1, not a VCS tag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 20:03:36 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Dec 2012 19:03:36 +0000 Subject: [issue14894] distutils.LooseVersion fails to compare number and a word In-Reply-To: <1337805749.61.0.661955519892.issue14894@psf.upfronthosting.co.za> Message-ID: <1355166216.03.0.129913596157.issue14894@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Don?t know if you?ve seen my previous message: I'm a bit lost, how are you replying to? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 20:03:53 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Dec 2012 19:03:53 +0000 Subject: [issue14894] distutils.LooseVersion fails to compare number and a word In-Reply-To: <1337805749.61.0.661955519892.issue14894@psf.upfronthosting.co.za> Message-ID: <1355166233.44.0.609305404056.issue14894@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Or, rather, who :-S ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 20:04:28 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 10 Dec 2012 19:04:28 +0000 Subject: [issue14894] distutils.LooseVersion fails to compare number and a word In-Reply-To: <1337805749.61.0.661955519892.issue14894@psf.upfronthosting.co.za> Message-ID: <1355166268.14.0.929069263742.issue14894@psf.upfronthosting.co.za> ?ric Araujo added the comment: I was replying to Dwayne. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 20:53:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2012 19:53:13 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355149587.17.0.345874753405.issue16651@psf.upfronthosting.co.za> Message-ID: <201212102152.55638.storchaka@gmail.com> Serhiy Storchaka added the comment: > So expat doesn't count as that literally wraps the expat library. XML parser can be implemented in pure Python. There are a lot of XML parsers implemented in different programming languages. > Random > also requires accessing the system randomization libraries to work > properly so I don't think that is a candidate either. No, random have C implemented some basic methods only for speed. It uses time() system function for initial seeding, but time() is accessible from pure Python too. Some OS-specific modules (pwd, grp, spwd, resource, ossaudiodev, etc) can be implemented in pure Python on some platforms (using I/O and ioctl on special files in /etc, /dev or /proc). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 21:06:33 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 10 Dec 2012 20:06:33 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355169993.93.0.250845979845.issue16651@psf.upfronthosting.co.za> Brett Cannon added the comment: Sure, a general XML parsing library could be written in Python, but they wouldn't be named expat. =) The expat module wraps a specific XML parser (expat) so I still do not consider it applicable for this list. As for random, you are right that it doesn't use platform-specific random code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 21:09:48 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 10 Dec 2012 20:09:48 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1355170188.5.0.788044344508.issue15207@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Gabriel and Antoine: As I understand it, the claim in this issue is that the patch in #4969 (G. wrote, A. committed) is unsatisfactory. I think it would help if either of you commented. ---------- nosy: +gagenellina, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 21:14:32 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 10 Dec 2012 20:14:32 +0000 Subject: [issue16658] Missing "return" in HTTPConnection.send() Message-ID: <1355170472.23.0.747956680603.issue16658@psf.upfronthosting.co.za> New submission from Amaury Forgeot d'Arc: HTTPConnection.send() accepts a bytes string, a file, and any iterable. When a file is passed, data is read in blocks until read() returns an empty string. But because a "return" statement is missing, execution continues with an attempt to iterate the file again... This exits quickly most of the time, but this can lead to surprising behavior if more data is available, or for custom implementations of the file object. ---------- keywords: easy messages: 177312 nosy: amaury.forgeotdarc priority: normal severity: normal status: open title: Missing "return" in HTTPConnection.send() versions: Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 21:21:17 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Dec 2012 20:21:17 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1355170877.76.0.268480616897.issue15207@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I'll leave it to a Windows expert. ---------- versions: -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 21:21:26 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 10 Dec 2012 20:21:26 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1340813009.36.0.80214060404.issue15207@psf.upfronthosting.co.za> Message-ID: <1355170886.24.0.182772353372.issue15207@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: commit review -> patch review versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 21:22:55 2012 From: report at bugs.python.org (Tim Golden) Date: Mon, 10 Dec 2012 20:22:55 +0000 Subject: [issue15207] mimetypes.read_windows_registry() uses the wrong regkey, creates wrong mappings In-Reply-To: <1355170877.76.0.268480616897.issue15207@psf.upfronthosting.co.za> Message-ID: <50C6449D.8060506@timgolden.me.uk> Tim Golden added the comment: Sorry; late to the party. I'll try to take a look at the patches. Basically I'm sympathetic to the problem (which seems quite straightforwardly buggish) but I want to take a look around the issue first. TJG ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 10 23:21:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 10 Dec 2012 22:21:06 +0000 Subject: [issue16659] Pure Python implementation of random Message-ID: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: C implemented part of random module does not depend on any specific C level abilities. Here is a patch which implements this part on pure Python. May be this is not a best implementation. And I don't know how write tests for both implementations. ---------- components: Library (Lib) files: random_pure_python.patch keywords: patch messages: 177315 nosy: brett.cannon, rhettinger, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Pure Python implementation of random type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28278/random_pure_python.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 00:12:17 2012 From: report at bugs.python.org (Alex Gaynor) Date: Mon, 10 Dec 2012 23:12:17 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355181137.33.0.260490175136.issue16651@psf.upfronthosting.co.za> Alex Gaynor added the comment: A lot of builtins :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 00:52:48 2012 From: report at bugs.python.org (ashwani) Date: Mon, 10 Dec 2012 23:52:48 +0000 Subject: [issue16660] Segmentation fault when importing hashlib Message-ID: <1355183568.14.0.00662853136149.issue16660@psf.upfronthosting.co.za> New submission from ashwani: Hello, I did a local installation of python 3.3.0 on my organization's CentOS machine. We also have Python 2.6.6 installed for every users on this machine. Python 3.3.0 crashes when I import the hash lib. Following is snapshot of the crash. ir[63] [~/]$ python3 -X faulthandler Python 3.3.0 (default, Dec 9 2012, 20:13:58) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib Fatal Python error: Segmentation fault Current thread 0x00007f0362784700: File "/usa/arao/Python-3.3.0/lib/python3.3/hashlib.py", line 99 in __get_openssl_constructor File "/usa/arao/Python-3.3.0/lib/python3.3/hashlib.py", line 141 in File "", line 313 in _call_with_frames_removed File "", line 869 in _load_module File "", line 562 in module_for_loader_wrapper File "", line 1004 in load_module File "", line 1023 in load_module File "", line 586 in _check_name_wrapper File "", line 1525 in _find_and_load_unlocked File "", line 1558 in _find_and_load File "", line 1 in Segmentation fault Can someone help me on this? Thanks, Ashwin ---------- components: Library (Lib) messages: 177317 nosy: nixdash priority: normal severity: normal status: open title: Segmentation fault when importing hashlib type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 00:56:28 2012 From: report at bugs.python.org (ashwani) Date: Mon, 10 Dec 2012 23:56:28 +0000 Subject: [issue16660] Segmentation fault when importing hashlib In-Reply-To: <1355183568.14.0.00662853136149.issue16660@psf.upfronthosting.co.za> Message-ID: <1355183788.79.0.0517309510804.issue16660@psf.upfronthosting.co.za> ashwani added the comment: Following is the behavior on the same machine with Python 2.6.6 ir[65] [~/]$ python Python 2.6.6 (r266:84292, Dec 7 2011, 20:48:22) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:03:37 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 11 Dec 2012 00:03:37 +0000 Subject: [issue16660] Segmentation fault when importing hashlib In-Reply-To: <1355183568.14.0.00662853136149.issue16660@psf.upfronthosting.co.za> Message-ID: <1355184217.35.0.93106546394.issue16660@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 01:34:50 2012 From: report at bugs.python.org (Guido van Rossum) Date: Tue, 11 Dec 2012 00:34:50 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1355186090.69.0.584552291581.issue16596@psf.upfronthosting.co.za> Guido van Rossum added the comment: It looks like xdegaye's patch breaks 'n' when not debugging a generator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 04:46:16 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 11 Dec 2012 03:46:16 +0000 Subject: [issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results Message-ID: <1355197575.99.0.863883653591.issue16661@psf.upfronthosting.co.za> New submission from Gregory P. Smith: test_posix.test_getgrouplist is failing for me on my Linux (ubuntu precise) based desktop at work. It looks like posix.getgrouplist() is returning all of the larger GIDs. The lowest one it is reporting for my user is 499 but the more distro specific groups that I am are not included in its 18 element long list it returns so the test fails: test test_posix failed -- Traceback (most recent call last): File "cpython/default/Lib/test/test_posix.py", line 660, in test_getgrouplist pwd.getpwuid(os.getuid())[3]))) AssertionError: Items in the first set but not the second: 128 4 104 44 46 20 24 25 strace reveals that the 'id -G' command this test is trying to compare against calls getgroups() while posix.getgrouplist() appears to do something else that does not make that syscall. posix.getgroups() does the same thing as 'id -G', this test for posix.getgrouplist(username, uid) is making an incorrect assertion. ---------- components: Library (Lib) messages: 177320 nosy: gregory.p.smith priority: normal severity: normal stage: needs patch status: open title: test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 07:09:15 2012 From: report at bugs.python.org (Meador Inge) Date: Tue, 11 Dec 2012 06:09:15 +0000 Subject: [issue9974] tokenizer.untokenize not invariant with line continuations In-Reply-To: <1285695065.99.0.439423855227.issue9974@psf.upfronthosting.co.za> Message-ID: <1355206155.82.0.00890505624353.issue9974@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 07:19:46 2012 From: report at bugs.python.org (Meador Inge) Date: Tue, 11 Dec 2012 06:19:46 +0000 Subject: [issue16576] ctypes: structure with bitfields as argument In-Reply-To: <1354164812.19.0.708202681719.issue16576@psf.upfronthosting.co.za> Message-ID: <1355206786.38.0.0728617700859.issue16576@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 07:20:05 2012 From: report at bugs.python.org (Meador Inge) Date: Tue, 11 Dec 2012 06:20:05 +0000 Subject: [issue16575] ctypes: unions as arguments In-Reply-To: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> Message-ID: <1355206805.24.0.555661035723.issue16575@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 07:32:34 2012 From: report at bugs.python.org (Meador Inge) Date: Tue, 11 Dec 2012 06:32:34 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <1355207554.36.0.903071195995.issue16447@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:03:16 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 11 Dec 2012 07:03:16 +0000 Subject: [issue16660] Segmentation fault when importing hashlib In-Reply-To: <1355183568.14.0.00662853136149.issue16660@psf.upfronthosting.co.za> Message-ID: <1355209396.75.0.658201734296.issue16660@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:08:00 2012 From: report at bugs.python.org (Ross Lagerwall) Date: Tue, 11 Dec 2012 07:08:00 +0000 Subject: [issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results In-Reply-To: <1355197575.99.0.863883653591.issue16661@psf.upfronthosting.co.za> Message-ID: <20121211070754.GA724@hobo.wolfson.cam.ac.uk> Ross Lagerwall added the comment: It seems like getgrouplist returns the information from the system database whereas getgroups (and consequently id -G) returns the supplementary groups for the calling process. I'm not exactly sure how getgrouplist() can be effectively tested then. ---------- nosy: +rosslagerwall title: test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results -> test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:23:35 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 11 Dec 2012 07:23:35 +0000 Subject: [issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results In-Reply-To: <20121211070754.GA724@hobo.wolfson.cam.ac.uk> Message-ID: Gregory P. Smith added the comment: would the values returned by getgrouplist always be a non empty subset of getgroups? (regardless, I expect the id -G process output parsing can be removed) ---------- title: test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results -> test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:34:25 2012 From: report at bugs.python.org (Ross Lagerwall) Date: Tue, 11 Dec 2012 07:34:25 +0000 Subject: [issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results In-Reply-To: Message-ID: <20121211073419.GA1478@hobo.wolfson.cam.ac.uk> Ross Lagerwall added the comment: I wouldn't think so. A call to setgroups can add or remove groups for the calling process. If it removes groups, then getgrouplist() won't return a subset of getgroups(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:36:30 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 11 Dec 2012 07:36:30 +0000 Subject: [issue16660] Segmentation fault when importing hashlib In-Reply-To: <1355183568.14.0.00662853136149.issue16660@psf.upfronthosting.co.za> Message-ID: <1355211390.39.0.652674145636.issue16660@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Given where the crash is occurring and that faulthandler traceback it makes me wonder if it was compiled with a set of openssl headers that don't make the library it is using at runtime. If you recompile the interpreter in debug mode (--with-pydebug on your ./configure) does it still happen? Can you run it under gdb and get the C stacktrace? that'll tell more than faulthandler alone does. [I'm glad to see you're using faulthandler though!] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:38:46 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 11 Dec 2012 07:38:46 +0000 Subject: [issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results In-Reply-To: <20121211073419.GA1478@hobo.wolfson.cam.ac.uk> Message-ID: Gregory P. Smith added the comment: Given this is more of a code coverage test than any need to test the functionality of the OS library call, just asserting that it returns a non-empty list is a decent test. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 08:39:25 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 11 Dec 2012 07:39:25 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1355211565.43.0.0933129099633.issue16659@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 09:06:14 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 11 Dec 2012 08:06:14 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1355213174.25.0.197319890192.issue16659@psf.upfronthosting.co.za> Mark Dickinson added the comment: I wonder whether it would make sense to use an array to hold the MT state, for a closer match with the C code. (Not sure whether this would have a noticeable effect on performance.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 10:14:51 2012 From: report at bugs.python.org (Robert Collins) Date: Tue, 11 Dec 2012 09:14:51 +0000 Subject: [issue16662] load_tests not invoked in package/__init__.py Message-ID: <1355217291.85.0.41912767842.issue16662@psf.upfronthosting.co.za> New submission from Robert Collins: In loader.py: if fnmatch(path, pattern): # only check load_tests if the package directory itself matches the filter name = self._get_name_from_path(full_path) package = self._get_module_from_name(name) load_tests = getattr(package, 'load_tests', None) tests = self.loadTestsFromModule(package, use_load_tests=False) But pattern is test*.py by default, and packages will never match that. Its not at all clear why this is special cased at all, but if it is, we'll need a separate pattern. (Its not special cased in the bzrlib implementation that acted as the initial implementation). ---------- messages: 177327 nosy: rbcollins priority: normal severity: normal status: open title: load_tests not invoked in package/__init__.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 10:19:07 2012 From: report at bugs.python.org (Robert Collins) Date: Tue, 11 Dec 2012 09:19:07 +0000 Subject: [issue12600] Add example of using load_tests to parameterise Test Cases In-Reply-To: <1311226769.48.0.369455670372.issue12600@psf.upfronthosting.co.za> Message-ID: <1355217547.79.0.906838458082.issue12600@psf.upfronthosting.co.za> Robert Collins added the comment: BTW I'm very happy with testscenarios (on pypi) for this, modulo one small issue which is the use of __str__ by the stdlib [which isn't easily overridable - there is a separate issue on that]. I'd be delighted to have testscenarios be in the stdlib, if thats desirable. ---------- nosy: +rbcollins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 11:07:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2012 10:07:47 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1355220467.42.0.875605097096.issue16659@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Tests now test both implementation. Thank Ezio for tip. ---------- Added file: http://bugs.python.org/file28279/random_pure_python_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 11:42:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2012 10:42:17 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355222537.0.0.145370385377.issue16651@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Pure Python implementation of random _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 11:42:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2012 10:42:51 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1355222571.92.0.595644225736.issue16659@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > I wonder whether it would make sense to use an array to hold the MT state, for a closer match with the C code. I don't think it makes sense. The algorithm is same and list is more natural for Python. Also arrays a little slower than lists, but it doesn't matter, because Python implementation of random slower C implementation anyway. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 11:51:17 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 11 Dec 2012 10:51:17 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355223077.8.0.393704767782.issue16656@psf.upfronthosting.co.za> anatoly techtonik added the comment: In Python 3 it fails with UnicodeEncodeError in "C:\Python33\lib\encodings\cp437.py", while Vista's 'dir' command shows everything correctly in the same console, so somebody definitely overlooked that aspect. This bug is clearly an issue for developers who write products for international markets. It is neither out of date, nor it is invalid. Note in documentation in red is a must have, also a warning should be issued in warning mode when os.walk() ignores international dirs. I doubt there are many people who aware of this racist behavior and want it be default. ---------- resolution: invalid -> status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 12:03:13 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 11 Dec 2012 11:03:13 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355223793.55.0.569047755026.issue16651@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: What's the purpose of these alternate implementations? For education, experiments? As a replacement for other VMs? Other modules that could be considered: marshal operator unicodedata ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 12:09:25 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 11 Dec 2012 11:09:25 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355224165.52.0.841783247622.issue16656@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: - Do you have a full traceback of the failing os.walk() in Python3.3? - What's the result of os.listdir(u'.') ? ---------- nosy: +amaury.forgeotdarc status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 12:11:46 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 11 Dec 2012 11:11:46 +0000 Subject: [issue1748064] inspect.getargspec fails on built-in or slot wrapper methods Message-ID: <1355224306.77.0.281256821052.issue1748064@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Close the issue as duplicate for #16490 ---------- nosy: +asvetlov resolution: -> duplicate stage: test needed -> committed/rejected status: open -> closed superseder: -> "inspect.getargspec()" and "inspect.getcallargs()" don't work for builtins _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 12:24:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2012 11:24:34 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355225074.93.0.676230063818.issue16656@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What are the results of os.listdir(b'.') and os.listdir(u'.') on Python 2.7 and Python 3.3+? What are the results of os.stat(b'??????? ???') and os.stat(b'??????? ???') on Python 2.7 and Python 3.3+? What are the results of sys.getdefaultencoding(), sys.getfilesystemencoding(), locale.getpreferredencoding(False) and locale.getpreferredencoding(True) on Python 2.7 and Python 3.3+? If any of those calls fail, please provide a full traceback. ---------- stage: committed/rejected -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 12:35:54 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 11 Dec 2012 11:35:54 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1355225754.65.0.803959118307.issue16612@psf.upfronthosting.co.za> Andrew Svetlov added the comment: How Argument Clinic solves problems like #16490? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 15:11:01 2012 From: report at bugs.python.org (Brett Cannon) Date: Tue, 11 Dec 2012 14:11:01 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1355235061.77.0.655313334929.issue16659@psf.upfronthosting.co.za> Brett Cannon added the comment: To see how to write tests that exercise both the C and Python versions look at test_heapq and test_warnings as examples. It will require some refactoring, but it's easy to do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 15:16:43 2012 From: report at bugs.python.org (Brett Cannon) Date: Tue, 11 Dec 2012 14:16:43 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355235403.4.0.904671744211.issue16651@psf.upfronthosting.co.za> Brett Cannon added the comment: Alex: yes, the builtins could almost all be re-implemented in pure Python, but there is a performance consideration vs. benefit (e.g. if we re-implemented map() in Python which VMs would use it vs. implement it in some native way for performance?). But one place I think there could be a benefit w/o performance issues is the built-in exceptions as you should be able to store references to the classes to help minimize the added cost of startup creating the exceptions from Python code. Amaury: other VMs and easier extensibility in the future. We might as well all share the burden of maintaining pure Python versions instead of re-implementing the same thing over and over in little VM silos. And if some new thing needs to be added for a module it's easier to do it in Python than C (which then also continues to benefit other VMs). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 15:35:12 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 11 Dec 2012 14:35:12 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355236512.41.0.756286241184.issue16656@psf.upfronthosting.co.za> R. David Murray added the comment: My guess is that your unicode issue is issue 1602, which is non-trivial to solve. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 15:41:52 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 11 Dec 2012 14:41:52 +0000 Subject: [issue16662] load_tests not invoked in package/__init__.py In-Reply-To: <1355217291.85.0.41912767842.issue16662@psf.upfronthosting.co.za> Message-ID: <1355236912.52.0.228729677626.issue16662@psf.upfronthosting.co.za> R. David Murray added the comment: test_email is a package, and has a load_tests in its __init__.py that I had to add in order to make "python -m unittest test.test_email" work. So I'm not sure what bug you are reporting here. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:16:31 2012 From: report at bugs.python.org (r3m0t) Date: Tue, 11 Dec 2012 16:16:31 +0000 Subject: [issue16663] Poor documentation for METH_KEYWORDS Message-ID: <1355242591.45.0.999993608815.issue16663@psf.upfronthosting.co.za> New submission from r3m0t: http://docs.python.org/3.3/c-api/structures.html#METH_KEYWORDS "Methods with these flags must be of type PyCFunctionWithKeywords. The function expects three parameters: self, args, and a dictionary of all the keyword arguments. The flag is typically combined with METH_VARARGS, and the parameters are typically processed using PyArg_ParseTupleAndKeywords()." The documentation doesn't mention the args/dictionary arguments will be NULL when there are no positional/keyword arguments. It might also be worth mentioning the arguments are in effect "borrowed" references. ---------- assignee: docs at python components: Documentation messages: 177341 nosy: docs at python, r3m0t priority: normal severity: normal status: open title: Poor documentation for METH_KEYWORDS 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 Dec 11 17:52:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2012 16:52:44 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1355244764.5.0.283277924299.issue16659@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, I used test_heapq and test_decimal as an example. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:53:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2012 16:53:06 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1355244786.14.0.669783678275.issue16659@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28278/random_pure_python.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 17:56:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2012 16:56:45 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355245005.41.0.586682619396.issue16656@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > My guess is that your unicode issue is issue 1602, which is non-trivial to solve. In such case the output will be something like: ['English name', ''] [] [] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 18:04:39 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Tue, 11 Dec 2012 17:04:39 +0000 Subject: [issue16596] Skip stack unwinding when "next", "until" and "return" pdb commands executed in generator context In-Reply-To: <1354490584.78.0.706210856716.issue16596@psf.upfronthosting.co.za> Message-ID: <1355245479.82.0.271890290108.issue16596@psf.upfronthosting.co.za> Xavier de Gaye added the comment: The 'until' command is also broken (by xdegaye's patch) when issued at a return debug event and not debugging a generator. This new patch fixes both problems. The patch also adds another test case to check that pdb stops after a 'next', 'until' or 'return' command has been issued at a return debug event. ---------- Added file: http://bugs.python.org/file28280/issue16596_nostate_2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 19:25:32 2012 From: report at bugs.python.org (Sebastian Kreft) Date: Tue, 11 Dec 2012 18:25:32 +0000 Subject: [issue16664] [PATCH] Test Glob: files starting with . Message-ID: <1355250332.3.0.793167258455.issue16664@psf.upfronthosting.co.za> New submission from Sebastian Kreft: Please find attached a patch to improve the test cases for the glob module. It adds test cases for files starting with '.'. ---------- components: Tests files: python.patch keywords: patch messages: 177345 nosy: Sebastian.Kreft priority: normal severity: normal status: open title: [PATCH] Test Glob: files starting with . versions: Python 3.4, Python 3.5 Added file: http://bugs.python.org/file28281/python.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 19:59:09 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 11 Dec 2012 18:59:09 +0000 Subject: [issue16662] load_tests not invoked in package/__init__.py In-Reply-To: <1355217291.85.0.41912767842.issue16662@psf.upfronthosting.co.za> Message-ID: <1355252349.25.0.910530265971.issue16662@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I think he's saying that a test package will never be discovered by default, because the default value of discover()'s pattern argument is test*.py: http://hg.python.org/cpython/file/bc322469a7a8/Lib/unittest/loader.py#l152 So I think he wants package directories with names of the form test* to match by default. The discover() docstring touches on this special case: If a test package name (directory with '__init__.py') matches the pattern then the package will be checked for a 'load_tests' function. If this exists then it will be called with loader, tests, pattern. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 20:04:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2012 19:04:11 +0000 Subject: [issue16664] [PATCH] Test Glob: files starting with . In-Reply-To: <1355250332.3.0.793167258455.issue16664@psf.upfronthosting.co.za> Message-ID: <1355252651.78.0.600549468425.issue16664@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue16618. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 20:45:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2012 19:45:58 +0000 Subject: [issue16641] sched.scheduler.enter arguments should not be modifiable In-Reply-To: <1354961661.69.0.670095014649.issue16641@psf.upfronthosting.co.za> Message-ID: <1355255158.33.0.0962552855822.issue16641@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Thanks Amaury for nits. ---------- Added file: http://bugs.python.org/file28282/sched_nonmodifiable_args_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:27:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2012 20:27:24 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1355257644.56.0.627201231155.issue16659@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28283/random_pure_python_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:28:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2012 20:28:59 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1355257739.7.0.834605567417.issue16659@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28279/random_pure_python_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:31:18 2012 From: report at bugs.python.org (Jayden Kneller) Date: Tue, 11 Dec 2012 20:31:18 +0000 Subject: [issue11290] ttk.Combobox['values'] String Conversion to Tcl In-Reply-To: <1298394325.28.0.0845611659637.issue11290@psf.upfronthosting.co.za> Message-ID: <1355257878.01.0.850985318806.issue11290@psf.upfronthosting.co.za> Jayden Kneller added the comment: I also ran into this issue in python 3.3 64bit on windows 7. I was adding paths into a combo box and was escaping all \'s myself. When I created a folder with a space I noticed the paths with the space had double the \'s I wanted. I removed my escaping and tested the patch and the attached image shows that it works. The top of the image was before, the bottom of the image was after. ---------- nosy: +PendulumDreams versions: -Python 3.1, Python 3.2 Added file: http://bugs.python.org/file28284/tested_patch.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:32:36 2012 From: report at bugs.python.org (Robert Collins) Date: Tue, 11 Dec 2012 20:32:36 +0000 Subject: [issue16662] load_tests not invoked in package/__init__.py In-Reply-To: <1355217291.85.0.41912767842.issue16662@psf.upfronthosting.co.za> Message-ID: <1355257956.22.0.572013938119.issue16662@psf.upfronthosting.co.za> Robert Collins added the comment: I have a package with tests in it. If the tests match test*.py, they are loaded, and load_tests within each one called. But load_tests on the package isn't called. If I change the pattern supplied by the user to match the package, then the tests within adjacent packages that don't have a load_tests hook but have files called test*.py will no longer match, but the package will match. My preference would be for the special case to just be removed, and load_tests called if it exists: its existence is enough of an opt-in. Failing that, having two distinct fn patterns, one for packages and one for filenames (note the difference: one operates in the python namespace, one the filesystem namespace), would suffice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:33:14 2012 From: report at bugs.python.org (Jayden Kneller) Date: Tue, 11 Dec 2012 20:33:14 +0000 Subject: [issue11290] ttk.Combobox['values'] String Conversion to Tcl In-Reply-To: <1298394325.28.0.0845611659637.issue11290@psf.upfronthosting.co.za> Message-ID: <1355257994.66.0.554890037877.issue11290@psf.upfronthosting.co.za> Jayden Kneller added the comment: I should also add that I yellow highlighed where the space is in the image I attached so it easier to see. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:33:17 2012 From: report at bugs.python.org (rurpy the second) Date: Tue, 11 Dec 2012 20:33:17 +0000 Subject: [issue16665] doc for builtin hex() is poor Message-ID: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> New submission from rurpy the second: The documentation of the hex() builtin function is poor. Specifically it does not say (directly) that: 1. The resulting string is prefixed with "0x". 2. Any a-f characters used are lower case. 3. Negative integers are converted by prefixing a minus sign to hex() of the absolute value of the argument. 4. It should have a cross reference to the %x format of the "%" operator with a note that it is more veratile than the hex() builtin. 5. It should have a cross reference to the way of performing the inverse operation: hex->int I am not a good writer but here is an attempt at improving it: -------- Convert an integer number to a hexadecimal string. The resulting string is prefixed with "0x" and any alpha characters a-f are lowercase ascii. Negative integers are converted to hex(abs(x)) prefixed with "-". In all cases the result is a valid Python expression. If x is not a Python int object, it has to define an __index__() method that returns an integer. Note: For another more flexible way of converting an integer to hexadecimal see the "x" and "X" conversion types in link:[4.7.2 - printf-style String Formatting] and link:[6.1.3.1 - Format Specification Mini-Language] Note: To convert a hexadecimal string to an integer, use link:[int()] with a radix argument of 16. Note: To obtain a hexadecimal string representation for a float, use the link:[float.hex()] method. -------- ---------- assignee: docs at python components: Documentation messages: 177352 nosy: docs at python, rurpy2 priority: normal severity: normal status: open title: doc for builtin hex() is poor versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:36:24 2012 From: report at bugs.python.org (Jayden Kneller) Date: Tue, 11 Dec 2012 20:36:24 +0000 Subject: [issue11290] ttk.Combobox['values'] String Conversion to Tcl In-Reply-To: <1298394325.28.0.0845611659637.issue11290@psf.upfronthosting.co.za> Message-ID: <1355258184.91.0.962636823657.issue11290@psf.upfronthosting.co.za> Jayden Kneller added the comment: On a side note: If you pass raw string literals into the combo box as values this issue doesn't happen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:42:05 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 11 Dec 2012 20:42:05 +0000 Subject: [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1355258525.04.0.29116398919.issue16665@psf.upfronthosting.co.za> Ezio Melotti added the comment: +1 ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch type: -> enhancement versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 21:49:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 11 Dec 2012 20:49:27 +0000 Subject: [issue11290] ttk.Combobox['values'] String Conversion to Tcl In-Reply-To: <1298394325.28.0.0845611659637.issue11290@psf.upfronthosting.co.za> Message-ID: <1355258967.54.0.174194838518.issue11290@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Issue15861 has a more general patch which fixes also this issue. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 11 22:10:59 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 11 Dec 2012 21:10:59 +0000 Subject: [issue2516] Instance methods are misreporting the number of arguments In-Reply-To: <1206915815.51.0.55915619351.issue2516@psf.upfronthosting.co.za> Message-ID: <1355260259.14.0.670880598436.issue2516@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 00:00:09 2012 From: report at bugs.python.org (Mikel Ward) Date: Tue, 11 Dec 2012 23:00:09 +0000 Subject: [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x Message-ID: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> New submission from Mikel Ward: The docs for 2.6 and 2.7 say socket.getaddrinfo takes keyword arguments. http://docs.python.org/release/2.6.6/library/socket.html?highlight=socket#socket.getaddrinfo > socket.getaddrinfo(host, port, family=0, socktype=0, proto=0, flags=0) But that doesn't actually work in Python 2.7. $ ./python Python 2.7.3+ (2.7:ec4ea40be2f6, Dec 11 2012, 14:43:35) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> s = socket.getaddrinfo('localhost', 999, family=socket.AF_INET) Traceback (most recent call last): File "", line 1, in TypeError: getaddrinfo() takes no keyword arguments Looks like it was introduced in 61999:c963478b9092. ---------- assignee: docs at python components: Documentation messages: 177356 nosy: Mikel.Ward, docs at python priority: normal severity: normal status: open title: docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 00:36:31 2012 From: report at bugs.python.org (Stefan Krah) Date: Tue, 11 Dec 2012 23:36:31 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1355082775.33.0.402883944693.issue16612@psf.upfronthosting.co.za> Message-ID: <20121211233632.GA28462@sleipnir.bytereef.org> Stefan Krah added the comment: Larry Hastings wrote: > I disagree that the Clinic DSL is "verbose". Certainly I find it > more succinct than what we do now. I was referring to the total size of the generated output, not to the DSL. > On the other hand, the syntax you proposed in the python-dev message > you cite is insufficient to the task. [...] Actually this was Stefan Behnel's suggestion. Thanks for the explanation. > To answer 5), you're the only C contributor who comes to mind who > seems unhappy. Do I understand you correctly that your main pain > point is that you generate scores of identical functions with the > C preprocessor, and you see no way to do that with Clinic? If we > figured out a way to make that work with Clinic, would that reduce > your concerns? No, the main problem is the amount of vertical space that's consumed. I've looked at os_access etc., and it seems that about 100 lines will be produced per function. The size of _decimal.c would go up from 5700 to something like 15000 lines. You can do similar math for posixmodule.c. Even with tools like ctags, I find code with a huge proportion of boilerplate harder to understand and to navigate. Also, I think that specifications of a declarative nature logically belong into header files, but currently I don't see a nice way to make that happen. ---------- title: Integrate "Argument Clinic" specialized preprocessor into CPython trunk -> Integrate "Argument Clinic" specialized preprocessor into CPython trunk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 01:30:02 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 12 Dec 2012 00:30:02 +0000 Subject: [issue16667] timezone docs need "versionadded: 3.2" Message-ID: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> New submission from Nick Coghlan: The docs for the fixed offset timezone objects added in 3.2 need a versionadded tag. Also, the "see also" link for pytz in the preceding section still incorrectly states that the stdlib only provides UTC as a timezone, rather than handling arbitrary fixed offsets from UTC. ---------- messages: 177358 nosy: ncoghlan priority: normal severity: normal stage: needs patch status: open title: timezone docs need "versionadded: 3.2" type: enhancement versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 01:53:08 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 12 Dec 2012 00:53:08 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1355273588.07.0.579789218909.issue16612@psf.upfronthosting.co.za> Gregory P. Smith added the comment: doesn't the size of code setting up ParseTupleWithKeywords and checking the values afterwards bother you? that's the same thing only much less consistent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 02:00:18 2012 From: report at bugs.python.org (Nick Coghlan) Date: Wed, 12 Dec 2012 01:00:18 +0000 Subject: [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355274018.14.0.661703293833.issue16667@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 02:11:46 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Wed, 12 Dec 2012 01:11:46 +0000 Subject: [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355274706.5.0.898253169746.issue16667@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +easy nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 02:22:23 2012 From: report at bugs.python.org (Roger Serwy) Date: Wed, 12 Dec 2012 01:22:23 +0000 Subject: [issue16629] IDLE: Calltips test fails due to int docstring change In-Reply-To: <1354843771.05.0.636250293313.issue16629@psf.upfronthosting.co.za> Message-ID: <1355275343.09.0.683088721144.issue16629@psf.upfronthosting.co.za> Roger Serwy added the comment: @Chris: Thanks for applying the patch. As for IDLE tests, there are no official tests. Issue15392 calls for the creation of a unit test framework. There are a few "tests" in some of IDLE, such as the ones in CallTips. Terry added much needed improvement for those tests in issue12510. I will look at these issues with 3.2 as soon as I get a chance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 02:33:41 2012 From: report at bugs.python.org (Roger Serwy) Date: Wed, 12 Dec 2012 01:33:41 +0000 Subject: [issue12510] IDLE: calltips mishandle raw strings and other examples In-Reply-To: <1309994842.51.0.029840708446.issue12510@psf.upfronthosting.co.za> Message-ID: <1355276021.93.0.236076281037.issue12510@psf.upfronthosting.co.za> Roger Serwy added the comment: I haven't had any serious problems with calltips on the dev branches for 2.7 and 3.4, except for issue16630. I think this issue can be closed as being completed in order to avoid further expanding its scope. Feel free to reopen if anyone disagrees. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 04:25:11 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 12 Dec 2012 03:25:11 +0000 Subject: [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1355282711.95.0.138529260398.issue16666@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This might be a good place to use the newly-documented "positional-only" nomenclature: http://docs.python.org/2.7/glossary.html#term-parameter ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 05:00:14 2012 From: report at bugs.python.org (Ezra Berch) Date: Wed, 12 Dec 2012 04:00:14 +0000 Subject: [issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip() In-Reply-To: <1339421358.2.0.611530152115.issue15045@psf.upfronthosting.co.za> Message-ID: <1355284814.59.0.0369628860239.issue15045@psf.upfronthosting.co.za> Ezra Berch added the comment: Here's a patch to do this, including some tests for the changed behavior. ---------- keywords: +patch nosy: +ezberch Added file: http://bugs.python.org/file28285/issue15045.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 05:55:11 2012 From: report at bugs.python.org (joelpitt) Date: Wed, 12 Dec 2012 04:55:11 +0000 Subject: [issue2980] Pickle stream for unicode object may contain non-ASCII characters. In-Reply-To: <1211902695.6.0.958731947697.issue2980@psf.upfronthosting.co.za> Message-ID: <1355288111.91.0.901998605539.issue2980@psf.upfronthosting.co.za> joelpitt added the comment: Just ran into this problem using Python 2.7.3 and the issue others mention in conjunction with Django. Note the 2.7 docs still imply it's ASCII: http://docs.python.org/2/library/pickle.html#data-stream-format It has a weak caveat "(and of some other characteristics of pickle?s representation)", but if you only skim read the bullet points below you'll miss that. Yes I will use base64 to get around this, but the point is the documentation is still unclear and should probably completely remove the reference to ASCII in favour of "human-readable"... or even better, explicitly mention what will happen with unicode. ---------- nosy: +joelpitt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 07:11:35 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 12 Dec 2012 06:11:35 +0000 Subject: [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1355292695.4.0.729297041495.issue16665@psf.upfronthosting.co.za> Raymond Hettinger added the comment: -1 for the suggested text. For some of the points, a couple examples will do a better job of explaining hex() that trying to write-out the full code specification in prose. Overly wordy documentation is harder to use than something short that addresses the primary use case. Also, the suggested "notes" editorialize and venture into the realm of personal coding preferences. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 07:24:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 12 Dec 2012 06:24:48 +0000 Subject: [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1355293488.87.0.938405447635.issue16665@psf.upfronthosting.co.za> Ezio Melotti added the comment: FTR my +1 was about the suggestion, not the proposed text. The first 3 points can be explained with an example, the last 2 can be added in the prose. I also agree that notes are not necessary (especially if they use the "note" rst directive). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 09:22:22 2012 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 12 Dec 2012 08:22:22 +0000 Subject: [issue12600] Add example of using load_tests to parameterise Test Cases In-Reply-To: <1311226769.48.0.369455670372.issue12600@psf.upfronthosting.co.za> Message-ID: <1355300542.55.0.406565915898.issue12600@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 10:23:17 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2012 09:23:17 +0000 Subject: [issue15861] ttk.Treeview "unmatched open brace in list" In-Reply-To: <1346794903.35.0.326071924778.issue15861@psf.upfronthosting.co.za> Message-ID: <1355304197.43.0.382383367673.issue15861@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28011/tkinter_quoting_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 10:42:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2012 09:42:38 +0000 Subject: [issue15861] ttk.Treeview "unmatched open brace in list" In-Reply-To: <1346794903.35.0.326071924778.issue15861@psf.upfronthosting.co.za> Message-ID: <1355305358.76.0.934537913708.issue15861@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Added additional tests for ttk.Combobox (see issue11290). ---------- Added file: http://bugs.python.org/file28286/tkinter_quoting_3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 10:44:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2012 09:44:16 +0000 Subject: [issue15861] ttk.Treeview "unmatched open brace in list" In-Reply-To: <1346794903.35.0.326071924778.issue15861@psf.upfronthosting.co.za> Message-ID: <1355305456.36.0.405359704177.issue15861@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch for 2.7 added. ---------- Added file: http://bugs.python.org/file28287/tkinter_quoting_3-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 10:46:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2012 09:46:01 +0000 Subject: [issue11290] ttk.Combobox['values'] String Conversion to Tcl In-Reply-To: <1298394325.28.0.0845611659637.issue11290@psf.upfronthosting.co.za> Message-ID: <1355305561.68.0.0853604813046.issue11290@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- superseder: -> ttk.Treeview "unmatched open brace in list" versions: +Python 2.7, Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 11:41:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2012 10:41:10 +0000 Subject: [issue15045] Make textwrap.dedent() consistent with str.splitlines(True) and str.strip() In-Reply-To: <1339421358.2.0.611530152115.issue15045@psf.upfronthosting.co.za> Message-ID: <1355308870.23.0.026166543377.issue15045@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ezra's patch is working, but a little non-optimal. However, I'm not sure, that it is right to extend a set of whitespace characters. See comments at the top of the file. Also this approach should be slower, especially for trivial case (no changes). ---------- nosy: +serhiy.storchaka stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 12:04:15 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 12 Dec 2012 11:04:15 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355224165.52.0.841783247622.issue16656@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: > > - Do you have a full traceback of the failing os.walk() in Python3.3? > Traceback (most recent call last): File "test.py", line 9, in print(dirs) File "C:\Python33\lib\encodings\cp437.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_map)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 18-24: character maps to > - What's the result of os.listdir(u'.') ? > >python3 -c "import os; print(os.listdir(u'.'))" Traceback (most recent call last): File "", line 1, in File "C:\Python33\lib\encodings\cp437.py", line 19, in encode return codecs.charmap_encode(input,self.errors,encoding_map)[0] UnicodeEncodeError: 'charmap' codec can't encode characters in position 41-47: character maps to >python2 -c "import os; print(os.listdir(u'.'))" [u'English name', u'test.py', u'test2.py', u'\u0420\u0443\u0441\u0441\u043a\u043e\u0435 \u0438\u043c\u044f'] >python2 -c "import os; print(os.listdir('.'))" ['English name', 'test.py', 'test2.py', '??????? ???'] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 12:22:25 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Wed, 12 Dec 2012 11:22:25 +0000 Subject: [issue13590] extension module builds fail with python.org OS X installers on OS X 10.7 and 10.6 with Xcode 4.2 In-Reply-To: <1323724978.51.0.015987933964.issue13590@psf.upfronthosting.co.za> Message-ID: <1355311345.29.0.402917045253.issue13590@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Ned: do you have time to backport this to 3.2 and 2.7? Also, the code might not be entirely correct for all machines: on my machine 'gcc-4.2' still exists in /usr/bin but doesn't work because the actual compiler (/usr/bin/i686-apple-darwin11-gcc-4.2.1) is no longer present. This is with Xcode 4.5.2. I haven't checked yet if that actually causes a problem with the binary installer for Python 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 12:43:10 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 12 Dec 2012 11:43:10 +0000 Subject: [issue16668] Remove python3dll.vcxproj from pcbuild.sln Message-ID: <1355312590.66.0.754548661845.issue16668@psf.upfronthosting.co.za> New submission from Trent Nelson: As far as I can tell, the python3dll.vcxproj is bitrot and should be removed from pcbuild.sln. It's a makefile target project that invokes ..\PC\python3.mak, which builds a target named python3.dll; however, pythoncore.vxcproj builds python34[_d].dll as a proper VS project. (Additionally, the python3dll.vxcproj has no Debug configuration, which is what brought it to my attention in the first place.) Christian/Martin: is this python3dll.vcxproj and resulting python3.dll still used or can it be safely removed from pcbuild.sln? ---------- assignee: trent components: Build messages: 177372 nosy: christian.heimes, loewis, trent priority: normal severity: normal status: open title: Remove python3dll.vcxproj from pcbuild.sln versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 12:46:56 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 12 Dec 2012 11:46:56 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355312816.05.0.371984208099.issue16656@psf.upfronthosting.co.za> anatoly techtonik added the comment: I attach tests.py file used to run the tests. Results are in python2.out.txt and python3.out.txt also attached. > What are the results of os.stat(b'??????? ???') and os.stat(b'??????? ???') on Python 2.7 and Python 3.3+? b'??????? ???' is not a valid syntax construct in Python 3 even though I have correct 'coding: utf-8' header and expect characters to be utf-8 bytes. Therefore I skipped this test for Python 3. > python test.py File "tests.py", line 23 print(os.stat(b'\u0420\u0443\u0441\u0441\u043a\u043e\u0435 \u0438\u043c\u044f')) ^ SyntaxError: bytes can only contain ASCII literal characters. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 12:47:10 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 12 Dec 2012 11:47:10 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355312830.82.0.21935328455.issue16656@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file28288/tests.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 12:47:22 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 12 Dec 2012 11:47:22 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355312842.48.0.233794411417.issue16656@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file28289/python2.out.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 12:47:31 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 12 Dec 2012 11:47:31 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355312851.88.0.80976894041.issue16656@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file28290/python3.out.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 12:54:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2012 11:54:56 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355313296.42.0.421841282184.issue16656@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you, Anatoly, for report. I'll try to investigate this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 13:10:34 2012 From: report at bugs.python.org (Matthias Klose) Date: Wed, 12 Dec 2012 12:10:34 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1355314234.81.0.731336471028.issue16480@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 13:28:20 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 12 Dec 2012 12:28:20 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355315300.92.0.186077041426.issue16656@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: So, it seems that os.walk() and os.listdir() work correctly with Python3.3, but print(u'??????? ???') fails because the terminal encoding is cp437. See issue1602 for the print issue. As a quick workaround, try to set PYTHONIOENCODING=cp437:backslashreplace as suggested in http://wiki.python.org/moin/PrintFails If nothing is wrong with os.walk() and os.listdir(), this issue should be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 13:59:37 2012 From: report at bugs.python.org (Stefan Krah) Date: Wed, 12 Dec 2012 12:59:37 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1355273588.07.0.579789218909.issue16612@psf.upfronthosting.co.za> Message-ID: <20121212125939.GA3357@sleipnir.bytereef.org> Stefan Krah added the comment: Gregory, I'm talking about the size of the *total output* of the tool, not about the size of the actual DSL parts: posixmodule.c: 11382 11514 +132 (2 functions) _cursesmodule.c: 3434 3499 +65 (1 function) zlibmodule.c: 1295 1336 +41 (1 function) _dbmmodule.c: 437 488 +51 (1 function) To this you have to add the proposed data structure for the signature information (one per function, if I understand correctly). For _decimal.c the situation is worse, since all docstrings are currently in a header file. So I think that my estimate of +100 lines per function is not exaggerated. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 14:19:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2012 13:19:26 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355318366.73.0.325660756516.issue16656@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Anatoly, can you please run the attached test? ---------- Added file: http://bugs.python.org/file28291/test_unicode_fname.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 14:22:18 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 12 Dec 2012 13:22:18 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355318538.87.0.772185953126.issue16656@psf.upfronthosting.co.za> R. David Murray added the comment: Based on the pasted results I'm pretty sure there's nothing wrong with walk and listdir. But it sounds like Serhiy will check to make sure, so we'll wait for his report. The byte string vs the coding cookie is an interesting observation, but is a separate issue and should probably be raised on python-ideas, since I'm guessing it the current behavior was a conscious design choice. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 14:24:16 2012 From: report at bugs.python.org (Berker Peksag) Date: Wed, 12 Dec 2012 13:24:16 +0000 Subject: [issue14266] pyunit script as shorthand for python -m unittest In-Reply-To: <1331586037.12.0.876793471383.issue14266@psf.upfronthosting.co.za> Message-ID: <1355318656.89.0.981168451066.issue14266@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +patch nosy: +berker.peksag versions: +Python 3.4 -Python 3.3 Added file: http://bugs.python.org/file28292/issue14266.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 15:14:51 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 12 Dec 2012 14:14:51 +0000 Subject: [issue16668] Remove python3dll.vcxproj from pcbuild.sln In-Reply-To: <1355312590.66.0.754548661845.issue16668@psf.upfronthosting.co.za> Message-ID: <1355321691.6.0.130356407953.issue16668@psf.upfronthosting.co.za> Changes by Trent Nelson : ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 17:15:53 2012 From: report at bugs.python.org (Andy Salnikov) Date: Wed, 12 Dec 2012 16:15:53 +0000 Subject: [issue16326] distutils build_ext fails to set library_dirs in 2.7.2 on Linux In-Reply-To: <1351194264.28.0.869819451271.issue16326@psf.upfronthosting.co.za> Message-ID: <1355328953.76.0.402975763886.issue16326@psf.upfronthosting.co.za> Andy Salnikov added the comment: OK, I see the problem. Do you think it would help if it tested both sys.executable and its symlynk-resolved path against sys.exec_prefix like this: if sys.executable.startswith(os.path.join(sys.exec_prefix, "bin")) or os.path.realpath(sys.executable).startswith(os.path.join(sys.exec_prefix, "bin")): # building third party extensions self.library_dirs.append(sysconfig.get_config_var('LIBDIR')) else: # building python standard extensions self.library_dirs.append('.') Alternatively one can reverse the test. I guess that 'else:' is supposed to apply when one builds new Python installation? Where does the sys.executable points to in this case? Is there any other (more reliable) way to figure out that the standard extensions are being built instead of third-party modules? Andy ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 17:19:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2012 16:19:06 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355329146.43.0.680194356061.issue16656@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28293/test_unicode_fname.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 17:19:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2012 16:19:40 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355329180.44.0.933483319302.issue16656@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28291/test_unicode_fname.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 17:38:24 2012 From: report at bugs.python.org (Jeremy Kloth) Date: Wed, 12 Dec 2012 16:38:24 +0000 Subject: [issue16668] Remove python3dll.vcxproj from pcbuild.sln In-Reply-To: <1355312590.66.0.754548661845.issue16668@psf.upfronthosting.co.za> Message-ID: <1355330304.05.0.428317668229.issue16668@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 17:39:59 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 12 Dec 2012 16:39:59 +0000 Subject: [issue16668] Remove python3dll.vcxproj from pcbuild.sln In-Reply-To: <1355312590.66.0.754548661845.issue16668@psf.upfronthosting.co.za> Message-ID: <1355330399.18.0.208147298528.issue16668@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Yes, it's still used. python3.dll is different from python3X.dll, and specified in PEP 384. It will remain in Python until Python 4 comes along (and then likely be replaced by python4.dll). ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 18:31:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2012 17:31:35 +0000 Subject: [issue16669] Docstrings for namedtuple Message-ID: <1355333495.19.0.152758378027.issue16669@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here are two patches which implementation two different interface for same feature. In first patch you can use *doc* and *field_docs* arguments to specify namedtuple class docstring and field docstrings. For example: Point = namedtuple('Point', 'x y', doc='Point: 2-dimensional coordinate', field_docs=['abscissa', 'ordinate']) In second patch you can use *doc* argument to specify namedtuple class docstring and *field_names* argument can be a sequence of pairs: field name and field docstring. For example: Point = namedtuple('Point', [('x', 'absciss'), ('y', 'ordinate')], doc='Point: 2-dimensional coordinate') What approach is better? Feel free to correct a documentation. I know that it need a correction. ---------- components: Library (Lib) files: namedtuple_docstrings_field_docs.patch keywords: patch messages: 177381 nosy: rhettinger, serhiy.storchaka priority: normal severity: normal status: open title: Docstrings for namedtuple type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28294/namedtuple_docstrings_field_docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 18:33:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2012 17:33:40 +0000 Subject: [issue16669] Docstrings for namedtuple In-Reply-To: <1355333495.19.0.152758378027.issue16669@psf.upfronthosting.co.za> Message-ID: <1355333620.78.0.621726499052.issue16669@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28295/namedtuple_docstrings_tuples_seq.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 18:39:54 2012 From: report at bugs.python.org (julien tayon) Date: Wed, 12 Dec 2012 17:39:54 +0000 Subject: [issue16670] [docs] class Point in collections.namedtuples may be not that good example Message-ID: <1355333994.73.0.927546875612.issue16670@psf.upfronthosting.co.za> New submission from julien tayon: Priority: low Keywords: documentation After watching http://www.youtube.com/watch?v=o9pEzgHorH0 (Stop writing classes by diedrich) I think the class Point example for the named tuples may be a wrong practice: http://docs.python.org/2/library/collections.html#collections.namedtuple Since complex basic types 1* does the same, (if x is real and y is imag) 2* does more (rotation, norms, symbolic notation with i) At my opnion pointing some code to http://bugs.python.org/issue1818 (if it is accepted) may be the case of use of the named tuple. ---------- assignee: docs at python components: Documentation messages: 177382 nosy: docs at python, julien.tayon priority: normal severity: normal status: open title: [docs] class Point in collections.namedtuples may be not that good example versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 19:02:54 2012 From: report at bugs.python.org (Trent Nelson) Date: Wed, 12 Dec 2012 18:02:54 +0000 Subject: [issue16668] Remove python3dll.vcxproj from pcbuild.sln In-Reply-To: <1355312590.66.0.754548661845.issue16668@psf.upfronthosting.co.za> Message-ID: <1355335374.05.0.748172372583.issue16668@psf.upfronthosting.co.za> Trent Nelson added the comment: Thanks Martin, I wasn't aware of that PEP. Explains why there isn't a debug configuration, too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 19:20:17 2012 From: report at bugs.python.org (rurpy) Date: Wed, 12 Dec 2012 18:20:17 +0000 Subject: [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1355336417.49.0.893154208266.issue16665@psf.upfronthosting.co.za> rurpy added the comment: Raymond Hettinger (rhettinger) msg177365: > For some of the points, a couple examples will do a better job of explaining hex() that trying to write-out the full code specification in prose. Examples should never substitute for a clear, complete and concise description. Examples serve to illustrate and clarify a description. An example can only describe usage at a single point in the solution space. The prose description (when well written) describes the total solution space. > Overly wordy documentation is harder to use than something short that addresses the primary use case. No comments in this issue have suggested providing an "overly wordy" description. The suggestion was for wording that accurately and concisely describes the behavior of the hex() function. That is what good reference material is supposed to do. Reference documentation should describe the behavior of its subject including any corner cases. Addressing only "the primary use case" is not sufficient. For addressing the primary use case, supplement the prose with an example. > Also, the suggested "notes" editorialize and venture into the realm of personal coding preferences. That characterization is incorrect. There is no editorializing (if this in reference to the word "flexible" in the note). It is a fact that string formatting with the %x specifier also converts to hex and offers more control over the output than the hex() function does. A reader interested in the hex() function should be apprised of this alternative. Perhaps there is some other word that you would find more neutral than "flexible"? There is no venturing into personal coding preferences -- only the factual and appropriate mention of an alternative. One of the cheapest, easiest ways of improving documentation is good cross-referencing to related items. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 19:28:09 2012 From: report at bugs.python.org (Andras Szalai) Date: Wed, 12 Dec 2012 18:28:09 +0000 Subject: [issue16671] logging.handlers.QueueListener sentinel should not be None Message-ID: <1355336889.66.0.674591387362.issue16671@psf.upfronthosting.co.za> New submission from Andras Szalai: In the class `logging.handlers.QueueListener` the `_sentinel` is `None`. But >>> a = None >>> b = None >>> a is b True Because of this, the QueueListener stops if it receives a `None`. Were the sentinel a proper instance, like: _sentinel = {} This would not happen. ---------- messages: 177385 nosy: Andras.Szalai priority: normal severity: normal status: open title: logging.handlers.QueueListener sentinel should not be None type: behavior versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 20:46:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 12 Dec 2012 19:46:35 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1355341595.6.0.207145203591.issue16659@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. Comments and docstrings a little enhanced. Thanks Brett for review. Also Python implementation of core generator now is threadsafe (in particular random() and getrandbits() methods) as its C implementation and its private members now are more hidden (to prevent unintentional conflicts). See differences between patches for details. ---------- Added file: http://bugs.python.org/file28296/random_pure_python_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 21:11:25 2012 From: report at bugs.python.org (myreallycoolname) Date: Wed, 12 Dec 2012 20:11:25 +0000 Subject: [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1355343085.4.0.844103031692.issue16607@psf.upfronthosting.co.za> myreallycoolname added the comment: I am updating my bug report unfortunatly I am unable to give you a specific link due to the fact that I can not find the python3.2 documentation online. I do assure you that the docs from my computer are for python3.2 (as I have no other docs installed.) To find the docs I'm complaining about go to the index select tutorial and click on the classes section. The bad code along with the start of the chapter it is located in and the trace backs follow. Please note that errors are cumulative. In other words if you use variable a and variable a has no value (not created deffined etc.) then every time you use it you will get an error. Code follows: 9.2.1. Scopes and Namespaces Example This is an example demonstrating how to reference the different scopes and namespaces, and howglobal and nonlocal affect variable binding: >>> def scope_test(): ... def do_local(): ... spam = "local spam" ... def do_nonlocal(): ... nonlocal spam ... spam = "nonlocal spam" ... def do_global(): ... global spam ... spam = "global spam" ... SyntaxError: no binding for nonlocal 'spam' found >>> spam = "test spam" File "", line 1 spam = "test spam" ^ IndentationError: unexpected indent >>> do_local() File "", line 1 do_local() ^ IndentationError: unexpected indent >>> print("After local assignment:", spam) File "", line 1 print("After local assignment:", spam) ^ IndentationError: unexpected indent >>> do_nonlocal() File "", line 1 do_nonlocal() ^ IndentationError: unexpected indent >>> print("After nonlocal assignment:", spam) File "", line 1 print("After nonlocal assignment:", spam) ^ IndentationError: unexpected indent >>> do_global() File "", line 1 do_global() ^ IndentationError: unexpected indent >>> print("After global assignment:", spam) File "", line 1 print("After global assignment:", spam) ^ IndentationError: unexpected indent >>> >>> scope_test() Traceback (most recent call last): File "", line 1, in NameError: name 'scope_test' is not defined >>> print("In global scope:", spam) Traceback (most recent call last): File "", line 1, in NameError: name 'spam' is not defined 9.3.3. Instance Objects Now what can we do with instance objects? The only operations understood by instance objects are attribute references. There are two kinds of valid attribute names, data attributes and methods. data attributes correspond to ?instance variables? in Smalltalk, and to ?data members? in C++. Data attributes need not be declared; like local variables, they spring into existence when they are first assigned to. For example, if x is the instance of MyClass created above, the following piece of code will print the value 16, without leaving a trace: >>> x.counter = 1 >>> while x.counter < 10: ... x.counter = x.counter * 2 ... print(x.counter) File "", line 3 print(x.counter) ^ SyntaxError: invalid syntax >>> del x.counter 9.9. Iterators By now you have probably noticed that most container objects can be looped over using a forstatement: >>> for element in [1, 2, 3]: ... print(element) ... for element in (1, 2, 3): File "", line 3 for element in (1, 2, 3): ^ SyntaxError: invalid syntax >>> print(element) File "", line 1 print(element) ^ IndentationError: unexpected indent >>> for key in {'one':1, 'two':2}: ... print(key) ... for char in "123": File "", line 3 for char in "123": ^ SyntaxError: invalid syntax >>> print(char) File "", line 1 print(char) ^ IndentationError: unexpected indent >>> for line in open("myfile.txt"): ... print(line) ... Traceback (most recent call last): File "", line 1, in IOError: [Errno 2] No such file or directory: 'myfile.txt' >>> This is one html page of errors not just one section. You may also want to check the python 3.3 docs for these errors. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 22:12:54 2012 From: report at bugs.python.org (John Hampton) Date: Wed, 12 Dec 2012 21:12:54 +0000 Subject: [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1355346774.64.0.278724663939.issue16607@psf.upfronthosting.co.za> John Hampton added the comment: The documentation is correct. The problem that you seem to be having are due to copy and pasting in the interpreter. The source of you first error is that after you copy >>> def scope_test(): ... def do_local(): ... spam = "local spam" ... def do_nonlocal(): ... nonlocal spam ... spam = "nonlocal spam" ... def do_global(): ... global spam ... spam = "global spam" ... into the interpreter, you press enter and the blank line tells the interpreter that you're done defining the class. However, if you look at the docs, the following statements: spam = "test spam" do_local() print("After local assignment:", spam) do_nonlocal() print("After nonlocal assignment:", spam) do_global() print("After global assignment:", spam) are supposed to be part of the class. A similar issue exists for the issues you're experiencing with the loops. Except it's the opposite. In this case: >>> for element in [1, 2, 3]: ... print(element) ... for element in (1, 2, 3): File "", line 3 for element in (1, 2, 3): ^ SyntaxError: invalid syntax the interpreter is expecting a blank line after the print statement to indicate that the loop is done. Since the second loop starts on the lien after "print", it thinks there is an indentation error. ---------- nosy: +pacopablo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 22:23:24 2012 From: report at bugs.python.org (Roy Jacobson) Date: Wed, 12 Dec 2012 21:23:24 +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: <1355347404.78.0.613656311329.issue6792@psf.upfronthosting.co.za> Roy Jacobson added the comment: This bug is a really annoying one, any chance it will be fixed in 2.7? It's really a matter when you want to deploy a program using distutils (my case), because you cannot really require your clients to edit the registry themselves :/ Is there any problem with just adding the x32 compatibility path entry to the python x64 .msi? It's a very easy fix that shouldn't cause any harm. ---------- nosy: +Roy.Jacobson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 22:25:22 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 12 Dec 2012 21:25:22 +0000 Subject: [issue16671] logging.handlers.QueueListener sentinel should not be None In-Reply-To: <1355336889.66.0.674591387362.issue16671@psf.upfronthosting.co.za> Message-ID: <1355347522.2.0.455986309626.issue16671@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 22:37:38 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 12 Dec 2012 21:37:38 +0000 Subject: [issue16672] improve tracing performances when f_trace is NULL Message-ID: <1355348258.81.0.121484844419.issue16672@psf.upfronthosting.co.za> New submission from Xavier de Gaye: When f_trace is NULL, only PyTrace_CALL tracing events trigger the invocation of the trace function (see trace_trampoline). maybe_call_line_trace() does quite some work though _PyCode_CheckLineNumber to find out if the instruction should be traced, and all this work is useless when f_trace is NULL. The patch checks for f_trace on all tracing events that are not PyTrace_CALL. The performance gain with the following test is about 30%. The first test is with python on the default branch, the second one with the patch applied. Note: a breakpoint is set at line 1 to ensure that tracing is enabled, without any breakpoint, pdb sets the trace function to None after a continue. $ ./python -m pdb /tmp/foo.py > /tmp/foo.py(1)() -> import timeit (Pdb) break 1 Breakpoint 1 at /tmp/foo.py:1 (Pdb) continue 9.226385930000106 The program finished and will be restarted > /tmp/foo.py(1)() -> import timeit (Pdb) q [62276 refs] $ ./python -m pdb /tmp/foo.py > /tmp/foo.py(1)() -> import timeit (Pdb) break 1 Breakpoint 1 at /tmp/foo.py:1 (Pdb) continue 7.199809867001022 The program finished and will be restarted > /tmp/foo.py(1)() -> import timeit (Pdb) ---------- components: Interpreter Core files: f_trace_perfs.diff keywords: patch messages: 177390 nosy: xdegaye priority: normal severity: normal status: open title: improve tracing performances when f_trace is NULL type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28297/f_trace_perfs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 22:38:01 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 12 Dec 2012 21:38:01 +0000 Subject: [issue16672] improve tracing performances when f_trace is NULL In-Reply-To: <1355348258.81.0.121484844419.issue16672@psf.upfronthosting.co.za> Message-ID: <1355348281.15.0.605188080497.issue16672@psf.upfronthosting.co.za> Changes by Xavier de Gaye : Added file: http://bugs.python.org/file28298/foo.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 22:38:10 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 12 Dec 2012 21:38:10 +0000 Subject: [issue16672] improve tracing performances when f_trace is NULL In-Reply-To: <1355348258.81.0.121484844419.issue16672@psf.upfronthosting.co.za> Message-ID: <1355348290.84.0.0256827779741.issue16672@psf.upfronthosting.co.za> Changes by Xavier de Gaye : Added file: http://bugs.python.org/file28299/bar.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 22:48:51 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Wed, 12 Dec 2012 21:48:51 +0000 Subject: [issue16672] improve tracing performances when f_trace is NULL In-Reply-To: <1355348258.81.0.121484844419.issue16672@psf.upfronthosting.co.za> Message-ID: <1355348931.03.0.35406235463.issue16672@psf.upfronthosting.co.za> Xavier de Gaye added the comment: > When f_trace is NULL, only PyTrace_CALL tracing events trigger the invocation > of the trace function (see trace_trampoline). This may be confusing. I meant that when f_trace is NULL, PyTrace_LINE, PyTrace_RETURN and PyTrace_EXCEPTION are not traced. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 12 23:57:27 2012 From: report at bugs.python.org (ashwani) Date: Wed, 12 Dec 2012 22:57:27 +0000 Subject: [issue16660] Segmentation fault when importing hashlib In-Reply-To: <1355183568.14.0.00662853136149.issue16660@psf.upfronthosting.co.za> Message-ID: <1355353047.96.0.733895762072.issue16660@psf.upfronthosting.co.za> ashwani added the comment: Ok , It did not crash when I recompiled with --with-pydebug. I observed crash when I was working with the urllib.request. It was crashing when I imported urllib.request. I drill down the code of urllib.request and found that it was crashing because of hashlib import. Now, it is not crashing when I import hashlib and urllib.request. But urllib.request.urlopen fails to open a site. It does open few other sites. Now this might be completely different issue. I think we first need to find why it is not crashing after the recompilation. Following is comparison of urlopen on the same machine using two different python versions. ir[40] [~/Python-3.3.0/]$ python3 Python 3.3.0 (default, Dec 12 2012, 17:26:56) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import hashlib [71516 refs] >>> import urllib [71550 refs] >>> import urllib.request [123410 refs] >>> u = urllib.request.urlopen('http://en.wikipedia.org/wiki/Wikipedia') ]Traceback (most recent call last): File "", line 1, in File "/usa/arao/Python-3.3.0/lib/python3.3/urllib/request.py", line 160, in urlopen return opener.open(url, data, timeout) File "/usa/arao/Python-3.3.0/lib/python3.3/urllib/request.py", line 479, in open response = meth(req, response) File "/usa/arao/Python-3.3.0/lib/python3.3/urllib/request.py", line 591, in http_response 'http', request, response, code, msg, hdrs) File "/usa/arao/Python-3.3.0/lib/python3.3/urllib/request.py", line 517, in error return self._call_chain(*args) File "/usa/arao/Python-3.3.0/lib/python3.3/urllib/request.py", line 451, in _call_chain result = func(*args) File "/usa/arao/Python-3.3.0/lib/python3.3/urllib/request.py", line 599, in http_error_default raise HTTPError(req.full_url, code, msg, hdrs, fp) urllib.error.HTTPError: HTTP Error 403: Forbidden [126943 refs] >>> u = urllib.request.urlopen('http://mit.edu/') [127082 refs] >>> len(u.read()) 13857 [127068 refs] It does open some other sites. r[37] [~/Python-3.3.0/]$ python Python 2.6.6 (r266:84292, Dec 7 2011, 20:48:22) [GCC 4.4.6 20110731 (Red Hat 4.4.6-3)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import urllib >>> u = urllib.urlopen('http://en.wikipedia.org/wiki/Wikipedia') >>> len(u.read()) 3000 >>> import hashlib >>> Thanks, Ashwin ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 00:51:45 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 12 Dec 2012 23:51:45 +0000 Subject: [issue16669] Docstrings for namedtuple In-Reply-To: <1355333495.19.0.152758378027.issue16669@psf.upfronthosting.co.za> Message-ID: <1355356305.32.0.839415796912.issue16669@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think it is worth complicating the API for this. There have been zero requests for this functionality. Even the doc field of property() is rarely used. ---------- assignee: -> rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 00:55:22 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 12 Dec 2012 23:55:22 +0000 Subject: [issue16670] [docs] class Point in collections.namedtuples may be not that good example In-Reply-To: <1355333994.73.0.927546875612.issue16670@psf.upfronthosting.co.za> Message-ID: <1355356522.27.0.248206223814.issue16670@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I like the current example. It does a great job teaching people how namedtuples work. Also, I think you've drawn the wrong conclusions from Jack's talk. ---------- assignee: docs at python -> rhettinger nosy: +jackdied, rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 01:33:58 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 13 Dec 2012 00:33:58 +0000 Subject: [issue16671] logging.handlers.QueueListener sentinel should not be None In-Reply-To: <1355336889.66.0.674591387362.issue16671@psf.upfronthosting.co.za> Message-ID: <1355358838.43.0.281683843667.issue16671@psf.upfronthosting.co.za> Vinay Sajip added the comment: Why do you think None is a valid value to send for normal operation? Since the queue is only meant for sending logging events (records), it seems reasonable to send None as a sentinel - it should never be seen during operation. The QueueListener is *supposed* to stop if it sees a None, so don't send those over the queue - just send logging events - until you want to shut the listener down. You can of course set the sentinel to whatever you want, in your own code, and then send that. The default value of None seems OK to me. So I don't believe this is a valid issue - marking as such and as pending, and I will close this shortly unless you come back with some more information. ---------- assignee: -> vinay.sajip resolution: -> invalid status: open -> pending versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 01:35:45 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 13 Dec 2012 00:35:45 +0000 Subject: [issue16326] distutils build_ext fails to set library_dirs in 2.7.2 on Linux In-Reply-To: <1351194264.28.0.869819451271.issue16326@psf.upfronthosting.co.za> Message-ID: <1355358945.34.0.15416625618.issue16326@psf.upfronthosting.co.za> Vinay Sajip added the comment: In terms of the venv code, I don't see how doing the test in that way would cause problems - as long as the value of sys.executable doesn't change, then as I see it, the venv code should operate as it's meant to. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 01:57:27 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 13 Dec 2012 00:57:27 +0000 Subject: [issue16660] Segmentation fault when importing hashlib In-Reply-To: <1355183568.14.0.00662853136149.issue16660@psf.upfronthosting.co.za> Message-ID: <1355360247.38.0.632914932105.issue16660@psf.upfronthosting.co.za> Gregory P. Smith added the comment: given the behavior you are seeing, I'm not inclined to trust your computer or however it is configured. I do not believe this is a Python issue. 3.3 works fine on RHEL 6 so it should work fine on CentOS 6. http://buildbot.python.org/all/builders/x86%20RHEL%206%203.3 next steps as far as debugging the crash goes still stand: run python under gdb and get the C stacktrace from the crash. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 07:26:45 2012 From: report at bugs.python.org (Ned Deily) Date: Thu, 13 Dec 2012 06:26:45 +0000 Subject: [issue13590] extension module builds fail with python.org OS X installers on OS X 10.7 and 10.6 with Xcode 4.2 In-Reply-To: <1323724978.51.0.015987933964.issue13590@psf.upfronthosting.co.za> Message-ID: <1355380005.69.0.696021070798.issue13590@psf.upfronthosting.co.za> Ned Deily added the comment: > Ned: do you have time to backport this to 3.2 and 2.7? Yes, I'll be taking care of it shortly. > Also, the code might not be entirely correct for all machines: on my > machine 'gcc-4.2' still exists in /usr/bin but doesn't work because the > actual compiler (/usr/bin/i686-apple-darwin11-gcc-4.2.1) is no longer > present. This is with Xcode 4.5.2. AFAIK, the file /usr/bin/gcc-4.2 is not installed with any version of Xcode 4, only Xcode 3.x. It should have been removed by the command line tools uninstaller that used to be provided in Xcode, prior to the consolidation under Xcode.app in Xcode 4.2(?): sudo /Developer/Library/uninstall-devtools --mode=unixdev Presumably that functionality should now exist in Xcode.app itself. FWIW, I've not seen /usr/bin/gcc-4.2 left behind with any Xcode 4 installation I've done. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 09:57:42 2012 From: report at bugs.python.org (Daniel Urban) Date: Thu, 13 Dec 2012 08:57:42 +0000 Subject: [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1355389062.54.0.312799616363.issue16607@psf.upfronthosting.co.za> Daniel Urban added the comment: As John Hampton have explained it, the documentation is actually correct. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 10:05:55 2012 From: report at bugs.python.org (Andras Szalai) Date: Thu, 13 Dec 2012 09:05:55 +0000 Subject: [issue16671] logging.handlers.QueueListener sentinel should not be None In-Reply-To: <1355336889.66.0.674591387362.issue16671@psf.upfronthosting.co.za> Message-ID: <1355389555.66.0.953536673114.issue16671@psf.upfronthosting.co.za> Andras Szalai added the comment: What mislead me is: The current code uses `is` and opposed to `==` which I assume is for the very specific reason to match identity and not value. The sentinel starts with a _, which to a casual reader (me) suggests that it's a private implementation detail that I should not have to touch. (am I right on this?) http://plumberjack.blogspot.co.uk/2010/09/improved-queuehandler-queuelistener.html In the introduction of this very same class you are also mentioning that: "... QueueListener is not even especially logging-specific: You can pass it as a handler any object that has a handle method which takes a single argument, and that method will be passed any non-sentinel object which appears on the queue." also "You should be able to paste QueueHandler and QueueListener into your own code..." So suddenly logging in not the only documented use case. And yes, I can override the sentinel in my subclass, yet it is named as `_sentinel`, which again suggests "do not touch" to me. It's a tiny inconsistency that may never come up again for anyone else, but I just used a copy of the class and it came up for me. My tests caught it, I fixed it up for my own use-case, case closed. So honestly it's not the end of the world, but neither is changing it to a safer default, like `{}` or even `self`. I won't be bothering you with this issue anymore, so feel free to close it if you want. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 10:26:07 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 13 Dec 2012 09:26:07 +0000 Subject: [issue16671] logging.handlers.QueueListener sentinel should not be None In-Reply-To: <1355336889.66.0.674591387362.issue16671@psf.upfronthosting.co.za> Message-ID: <1355390767.59.0.666648433412.issue16671@psf.upfronthosting.co.za> Vinay Sajip added the comment: > The sentinel starts with a _, which to a casual reader (me) suggests > that it's a private implementation detail that I should not have to > touch. (am I right on this?) Python is a language for consenting adults, so nothing is off-limits, except that you need to know what you are doing when you make changes to internal attributes, and may not get support from the original author if something breaks. However, notice that I set it up as a class value which could be overridden at an instance level, rather than hard-coding None into the sentinel test. So, it *was* intended to be changed if needed, but it's more appropriate for a subclass to do that than a user of the class (not that a user is *forbidden* - that couldn't be enforced, anyway). ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 11:22:49 2012 From: report at bugs.python.org (Raninho Fernandes) Date: Thu, 13 Dec 2012 10:22:49 +0000 Subject: [issue16673] Corrections in the library OS (PEP8) Message-ID: <1355394168.38.0.46112052435.issue16673@psf.upfronthosting.co.za> New submission from Raninho Fernandes: Community, I realized that there are libraries that do not follow the standard PEP8, in order to start to contribute, I am providing the OS patch. I do not know if has community interest in the corrections (PEP8). thank you ---------- files: os_pep8.patch keywords: patch messages: 177402 nosy: raninho priority: normal severity: normal status: open title: Corrections in the library OS (PEP8) Added file: http://bugs.python.org/file28300/os_pep8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 12:06:46 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 13 Dec 2012 11:06:46 +0000 Subject: [issue16673] Corrections in the library OS (PEP8) In-Reply-To: <1355394168.38.0.46112052435.issue16673@psf.upfronthosting.co.za> Message-ID: <1355396806.73.0.876604651697.issue16673@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks for your contribution, but we don't usually apply this kind of refactoring unless we are already making changes to the a specific part of the code. The reason is that even if they are trivial changes, there's an (admittedly small) chance of introducing bugs, and it makes the output of "hg annotate" more difficult to follow. Unless someone disagrees I think this can be closed as won't fix. ---------- components: +Library (Lib) nosy: +ezio.melotti resolution: -> wont fix stage: -> patch review status: open -> pending type: -> enhancement versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 12:23:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 13 Dec 2012 11:23:35 +0000 Subject: [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1355397815.46.0.866000516385.issue16607@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 12:26:37 2012 From: report at bugs.python.org (Aaron Iles) Date: Thu, 13 Dec 2012 11:26:37 +0000 Subject: [issue5289] ctypes.util.find_library does not work under Solaris In-Reply-To: <1234858635.81.0.426092533899.issue5289@psf.upfronthosting.co.za> Message-ID: <1355397997.79.0.584050215805.issue5289@psf.upfronthosting.co.za> Changes by Aaron Iles : ---------- nosy: +aliles _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 13:28:25 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 13 Dec 2012 12:28:25 +0000 Subject: [issue16673] Corrections in the library OS (PEP8) In-Reply-To: <1355394168.38.0.46112052435.issue16673@psf.upfronthosting.co.za> Message-ID: <1355401705.87.0.256487280091.issue16673@psf.upfronthosting.co.za> R. David Murray added the comment: That is indeed our standard policy. And yes, thank you for trying, Raninho. A good way to make an initial contribution is to look for modules that don't yet have full test coverage (there are a lot) and add tests. The devguide (http://docs.python.org/devguide) contains information about how to go about this task. ---------- nosy: +r.david.murray stage: patch review -> committed/rejected status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 13:35:36 2012 From: report at bugs.python.org (Raninho Fernandes) Date: Thu, 13 Dec 2012 12:35:36 +0000 Subject: [issue16673] Corrections in the library OS (PEP8) In-Reply-To: <1355394168.38.0.46112052435.issue16673@psf.upfronthosting.co.za> Message-ID: <1355402136.21.0.48770474999.issue16673@psf.upfronthosting.co.za> Raninho Fernandes added the comment: I will follow the suggestion of Murray. Thanks Ezio and Murray. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 14:09:14 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Dec 2012 13:09:14 +0000 Subject: [issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__ In-Reply-To: <1348615231.16.0.514985949274.issue16049@psf.upfronthosting.co.za> Message-ID: <1355404154.5.0.908947800257.issue16049@psf.upfronthosting.co.za> Andrew Svetlov added the comment: LGTM ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 14:15:15 2012 From: report at bugs.python.org (Berker Peksag) Date: Thu, 13 Dec 2012 13:15:15 +0000 Subject: [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355404515.32.0.0539455876973.issue16667@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- keywords: +patch Added file: http://bugs.python.org/file28301/issue16667.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 14:15:27 2012 From: report at bugs.python.org (Berker Peksag) Date: Thu, 13 Dec 2012 13:15:27 +0000 Subject: [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355404527.82.0.153034041422.issue16667@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 14:52:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Dec 2012 13:52:40 +0000 Subject: [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355406760.1.0.99366733691.issue16667@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I've reworded patch a bit and made it based on 3.2 for easier merging. ---------- nosy: +asvetlov Added file: http://bugs.python.org/file28302/issue16667_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 15:42:52 2012 From: report at bugs.python.org (Maximiliano Curia) Date: Thu, 13 Dec 2012 14:42:52 +0000 Subject: [issue4955] xml.sax.expatreader.ExpatParser incorrectly silently skips external character entities in attribute values In-Reply-To: <1232058872.83.0.627723376398.issue4955@psf.upfronthosting.co.za> Message-ID: <1355409772.84.0.120884515177.issue4955@psf.upfronthosting.co.za> Changes by Maximiliano Curia : ---------- nosy: +maxy at debian.org _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 16:20:53 2012 From: report at bugs.python.org (Maximiliano Curia) Date: Thu, 13 Dec 2012 15:20:53 +0000 Subject: [issue4955] xml.sax.expatreader.ExpatParser incorrectly silently skips external character entities in attribute values In-Reply-To: <1232058872.83.0.627723376398.issue4955@psf.upfronthosting.co.za> Message-ID: <1355412053.93.0.0667328383206.issue4955@psf.upfronthosting.co.za> Maximiliano Curia added the comment: Hi, There are two issues commented in this bug, both are part of libexpat. The one related the code inconsistency is due the design of Xml_Parser. Reading Modules/expat/xmlparse.c:5036 else if (!entity) { /* Cannot report skipped entity here - see comments on skippedEntityHandler. if (skippedEntityHandler) skippedEntityHandler(handlerArg, name, 0); */ /* Cannot call the default handler because this would be out of sync with the call to the startElementHandler. if ((pool == &tempPool) && defaultHandler) reportDefault(parser, enc, ptr, next); */ break; } That's so because libexpat startElementHandler should be called before the skippedEntityHandler, but this piece of code is processed before the call to startElementHandler. To fix this, it would require a change in the libexpat API, adding the concept of futures to the attributes processing, and a way to obtain them with an iterator. In any case, I don't think this is a python issue, but a known libexpat limitation. It might be forwarded to libexpat developers, but from the python point of view, it should be closed. The second issue, is not really an issue. It's the default behaviour if an entity reference is found but there is no dtd specified (the entities declaration is a xml extension). This part is working as intended. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 16:24:55 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Dec 2012 15:24:55 +0000 Subject: [issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results In-Reply-To: <1355197575.99.0.863883653591.issue16661@psf.upfronthosting.co.za> Message-ID: <3YMdx26X5BzN5J@mail.python.org> Roundup Robot added the comment: New changeset ce85fe971e0a by Ross Lagerwall in branch '3.3': Issue #16661: Fix the os.getgrouplist() test by not assuming that it http://hg.python.org/cpython/rev/ce85fe971e0a New changeset 05a37954a30c by Ross Lagerwall in branch 'default': Merge with 3.3 for #16661 http://hg.python.org/cpython/rev/05a37954a30c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:15:38 2012 From: report at bugs.python.org (Nurhusien Hasen) Date: Thu, 13 Dec 2012 16:15:38 +0000 Subject: [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355404515.32.0.0539455876973.issue16667@psf.upfronthosting.co.za> Message-ID: Nurhusien Hasen added the comment: On 12/14/12, Berker Peksag wrote: > > Changes by Berker Peksag : > > > ---------- > keywords: +patch > Added file: http://bugs.python.org/file28301/issue16667.diff > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: > http://mail.python.org/mailman/options/python-bugs-list/nurhusien.hasen27%40gmail.com > > -- find signatures serves ---------- nosy: +Nurhusien2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:18:47 2012 From: report at bugs.python.org (Ross Lagerwall) Date: Thu, 13 Dec 2012 16:18:47 +0000 Subject: [issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results In-Reply-To: <1355197575.99.0.863883653591.issue16661@psf.upfronthosting.co.za> Message-ID: <1355415527.84.0.00882012320943.issue16661@psf.upfronthosting.co.za> Ross Lagerwall added the comment: Is that fixed now? I simplified the test to check for a non-empty list being returned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:30:39 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 16:30:39 +0000 Subject: [issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__ In-Reply-To: <1348615231.16.0.514985949274.issue16049@psf.upfronthosting.co.za> Message-ID: <1355416239.28.0.394638696208.issue16049@psf.upfronthosting.co.za> ?ric Araujo added the comment: Feel free to commit the patch Andrew. You may want to document the new ABC class before the ABCMeta, as we expect that subclassing will become the preferred way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:30:55 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 16:30:55 +0000 Subject: [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355416255.12.0.561867197885.issue16667@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- Removed message: http://bugs.python.org/msg177410 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:32:06 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Dec 2012 16:32:06 +0000 Subject: [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355416326.89.0.965548441116.issue16667@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:32:55 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 16:32:55 +0000 Subject: [issue16667] timezone docs need "versionadded: 3.2" In-Reply-To: <1355272202.83.0.0809647453086.issue16667@psf.upfronthosting.co.za> Message-ID: <1355416375.25.0.91279380976.issue16667@psf.upfronthosting.co.za> ?ric Araujo added the comment: Second patch has a stray slash character, and the versionadded directive does not seem to be in the same place as the first patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:37:15 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 16:37:15 +0000 Subject: [issue16670] Point class may be not be a good example for namedtuple In-Reply-To: <1355333994.73.0.927546875612.issue16670@psf.upfronthosting.co.za> Message-ID: <1355416635.57.0.940994291921.issue16670@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo title: [docs] class Point in collections.namedtuples may be not that good example -> Point class may be not be a good example for namedtuple versions: +Python 3.4 -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:38:48 2012 From: report at bugs.python.org (myreallycoolname) Date: Thu, 13 Dec 2012 16:38:48 +0000 Subject: [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1355416728.89.0.561890350946.issue16607@psf.upfronthosting.co.za> myreallycoolname added the comment: Ok, but perhaps in order to aviod confusion the documentation could be changed so that the examples are complete or have an additional new line as needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:38:54 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Dec 2012 16:38:54 +0000 Subject: [issue16670] Point class may be not be a good example for namedtuple In-Reply-To: <1355333994.73.0.927546875612.issue16670@psf.upfronthosting.co.za> Message-ID: <1355416734.47.0.160700061106.issue16670@psf.upfronthosting.co.za> Andrew Svetlov added the comment: +1 for leaving the doc as is ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:38:54 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 16:38:54 +0000 Subject: [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1355416734.51.0.828135211244.issue16665@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:40:05 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Dec 2012 16:40:05 +0000 Subject: [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1355416805.92.0.446220093338.issue16666@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:45:16 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 16:45:16 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355417116.83.0.622257255041.issue16656@psf.upfronthosting.co.za> ?ric Araujo added the comment: Anatoly > b'??????? ???' is not a valid syntax construct in Python 3 even though I have > correct 'coding: utf-8' header and expect characters to be utf-8 bytes. David > The byte string vs the coding cookie is an interesting observation, but is a separate > issue and should probably be raised on python-ideas, since I'm guessing it the > current behavior was a conscious design choice. Yes, it works as designed: the coding cookie is used to decode bytes to characters in unicode literals (e.g. if I have u'?ric' in my source file, not a \u escape); bytes literals are independent of the coding cookie and should always contain only bytes, not characters (including \u escapes), e.g. '\xc3\x89ric' for UTF-8 bytes. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:53:58 2012 From: report at bugs.python.org (John Hampton) Date: Thu, 13 Dec 2012 16:53:58 +0000 Subject: [issue16607] Bad examples in documentation In-Reply-To: <1354646907.48.0.243839497772.issue16607@psf.upfronthosting.co.za> Message-ID: <1355417638.0.0.0680403445482.issue16607@psf.upfronthosting.co.za> John Hampton added the comment: Ok, but perhaps in order to aviod confusion the documentation could be changed so that the examples are complete or have an additional new line as needed. Well, they are complete. And it's only an issue with the interpreter. If you were to copy and paste the examples into a file, say example.py, and run that with python via: python example.py then they would work as they are supposed to. If you backup in the tutorial to: http://docs.python.org/3/tutorial/interpreter.html#interactive-mode You will read an explanation of the interpreter prompts. It may be that there is a way to make it clearer, but to update those examples would require similar adjustments all over the docs. It would also only benefit the case where one were trying to run the code in the interpreter, and would make it more annoying to copy and paste into a file. So, I don't think changing anything is worth it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 17:59:08 2012 From: report at bugs.python.org (Eric Snow) Date: Thu, 13 Dec 2012 16:59:08 +0000 Subject: [issue16669] Docstrings for namedtuple In-Reply-To: <1355333495.19.0.152758378027.issue16669@psf.upfronthosting.co.za> Message-ID: <1355417948.69.0.539396210196.issue16669@psf.upfronthosting.co.za> Eric Snow added the comment: What is wrong with the following? class Point(namedtuple('Point', 'x y')): """A 2-dimensional coordinate x - the abscissa y - the ordinate """ This seems more clear to me. namedtuple is in some ways a quick-and-dirty type, essentially a more true implementation of the intended purpose of tuple. The temptation is to keep adding on functionality but we should resist until there is too much imperative. I don't see it here. While I don't have a gauge of how often people use (or would use) docstrings with nametuple, I expect that it's relatively low given the intended simplicity of namedtuple. ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 18:04:30 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 17:04:30 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355418270.39.0.699128006151.issue16651@psf.upfronthosting.co.za> ?ric Araujo added the comment: Should itertools be in the list, as its stated purpose is to provide highly efficient functions? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 18:09:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 13 Dec 2012 17:09:46 +0000 Subject: [issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__ In-Reply-To: <1348615231.16.0.514985949274.issue16049@psf.upfronthosting.co.za> Message-ID: <3YMhG11YmLzRRl@mail.python.org> Roundup Robot added the comment: New changeset 9347869d1066 by Andrew Svetlov in branch 'default': Issue #16049: add abc.ABC helper class. http://hg.python.org/cpython/rev/9347869d1066 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 18:11:53 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 17:11:53 +0000 Subject: [issue16664] [PATCH] Test Glob: files starting with . In-Reply-To: <1355250332.3.0.793167258455.issue16664@psf.upfronthosting.co.za> Message-ID: <1355418713.61.0.160075531707.issue16664@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hm, unix shells have different rules about matching a leading dot or not. Are the docs clear about Python's glob's rules? ---------- nosy: +eric.araujo versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 18:13:40 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 17:13:40 +0000 Subject: [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1355418820.05.0.285885130838.issue16666@psf.upfronthosting.co.za> ?ric Araujo added the comment: There are two or three issues on this tracker where we discuss the parameters notation conventions. I think I remember a proposal to add text explaining that the keyword notation does not imply that the function accepts keyword argument, only that there is a default value. Chris, does that ring a bell? ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 18:14:26 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Dec 2012 17:14:26 +0000 Subject: [issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__ In-Reply-To: <1348615231.16.0.514985949274.issue16049@psf.upfronthosting.co.za> Message-ID: <1355418866.28.0.606462873809.issue16049@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Done. I prefer to leave existing class order in documentation. In general I agree with Eric that ABC should be before ABCMeta in the doc but now it has formalized as helper for metaclass with very short documentation. To put ABC first we need to transplate almost all content of ABCMeta doc int ABC. If somebody want to do it ? please create new issue and feel free to make a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 18:14:52 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 13 Dec 2012 17:14:52 +0000 Subject: [issue16049] Create abstract base classes by inheritance rather than a direct invocation of __metaclass__ In-Reply-To: <1348615231.16.0.514985949274.issue16049@psf.upfronthosting.co.za> Message-ID: <1355418892.24.0.366554186792.issue16049@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks, Bruno. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 18:15:37 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 13 Dec 2012 17:15:37 +0000 Subject: [issue14266] pyunit script as shorthand for python -m unittest In-Reply-To: <1331586037.12.0.876793471383.issue14266@psf.upfronthosting.co.za> Message-ID: <1355418937.01.0.00386457952225.issue14266@psf.upfronthosting.co.za> ?ric Araujo added the comment: Yes, let?s keep the pydoc/pyvenv/etc convention for pyunit. The audience is developers, whom we expect to be able to set up their environment correctly, and the -m fallback still works. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 18:56:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 13 Dec 2012 17:56:06 +0000 Subject: [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1355421366.94.0.0974863188206.issue16666@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Is issue 13386 one of the issues you had in mind, ?ric? I don't know the current best practices for all of the signature edge cases, but Ezio might. Personally, I think explicitly stating in the text that the parameters are positional-only can't hurt, especially since that's the rarer case, no? ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 19:00:15 2012 From: report at bugs.python.org (Sebastian Kreft) Date: Thu, 13 Dec 2012 18:00:15 +0000 Subject: [issue16664] [PATCH] Test Glob: files starting with . In-Reply-To: <1355250332.3.0.793167258455.issue16664@psf.upfronthosting.co.za> Message-ID: <1355421615.67.0.014345141245.issue16664@psf.upfronthosting.co.za> Sebastian Kreft added the comment: The docs don't say anything about it. However the code is there (docs bug probably). See the following lines in glob.py: 57 if pattern[0] != '.': 58 names = [x for x in names if x[0] != '.'] 59 return fnmatch.filter(names, pattern) The documentation is even harder to follow. The glob docs say: "The pattern may contain simple shell-style wildcards a la fnmatch." but the fnmatch docs say: "Similarly, filenames starting with a period are not special for this module, and are matched by the * and ? patterns." The posix standard states that "if a filename begins with a period ( '.' ), the period shall be explicitly matched" (http://pubs.opengroup.org/onlinepubs/009695399/utilities/xcu_chap02.html#tag_02_13_03). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 19:22:02 2012 From: report at bugs.python.org (rurpy) Date: Thu, 13 Dec 2012 18:22:02 +0000 Subject: [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1355422922.83.0.0569505954994.issue16665@psf.upfronthosting.co.za> rurpy added the comment: An ammendment to my proposed doc change. Replace the text (which is unchanged from the current doc), "...the result is a valid Python expression" with, "...the result is a valid Python "hexinteger" literal (see link:[Python Lang Ref, sec 2.4.4. Integer literals]) "Python epression" in the current doc is way more non-specific than it need be. The result is not any old python expression, it is a very specific type of python expression so the doc should say that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 19:24:53 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 13 Dec 2012 18:24:53 +0000 Subject: [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1355423093.41.0.847195849956.issue16666@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Personally, I think explicitly stating in the text that the parameters > are positional-only can't hurt, especially since that's the rarer case, > no? OTOH it's an implementation detail that might be changed at some point. The other option is to use [] in the signature and document the default values in the text, and possibly fix it for 3.4 (or does it work there already?). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 19:46:03 2012 From: report at bugs.python.org (Brett Cannon) Date: Thu, 13 Dec 2012 18:46:03 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355424363.06.0.990342980105.issue16651@psf.upfronthosting.co.za> Brett Cannon added the comment: Eric, I know you didn't just mean to suggest Python != efficient. =) Yes, it should be in the list because other VMs might not want to re-implement that code in some native language to the VM. And I assume all code in the stdlib tries to be efficient, so that label holds no sway with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 20:12:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Dec 2012 19:12:19 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1355425939.75.0.313795484419.issue16659@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28296/random_pure_python_4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 20:16:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Dec 2012 19:16:26 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1355426186.31.0.552113541626.issue16659@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated. One bug fixed. Also I made some benchmarks. The pure Python random() about 100 times slower and getrandbits(32) about 13 times slower than the C implementation. ---------- Added file: http://bugs.python.org/file28303/random_pure_python_5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 20:26:42 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 13 Dec 2012 19:26:42 +0000 Subject: [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1355426802.46.0.263034233188.issue16666@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This issue only applies to 2.7. Keyword arguments are accepted in 3.x. See the interactive example here, for example: http://docs.python.org/3.2/library/socket.html#socket.getaddrinfo ---------- versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 20:28:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Dec 2012 19:28:49 +0000 Subject: [issue16669] Docstrings for namedtuple In-Reply-To: <1355333495.19.0.152758378027.issue16669@psf.upfronthosting.co.za> Message-ID: <1355426929.88.0.790630219108.issue16669@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Yes, we can use inheritance trick/idiom to specify a class docstring. But there are no way to specify attribute docstrings. I encountered this when rewriting some C implemented code to Python. PyStructSequence allows you to specify docstrings for a class and attributes, but namedtuple does not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 21:13:38 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 13 Dec 2012 20:13:38 +0000 Subject: [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1355429618.64.0.218869527015.issue16666@psf.upfronthosting.co.za> Ezio Melotti added the comment: In that case I think it's OK to use the [] and mention the default values in the text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 21:54:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 13 Dec 2012 20:54:36 +0000 Subject: [issue16674] Faster getrandbits() for small integers Message-ID: <1355432076.17.0.54183868892.issue16674@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch adds a fast patch for generating small integers (the most common use case). Microbenchmark: $ ./python -m timeit -s "import random; r=random.getrandbits; n=30" "r(n);r(n);r(n);r(n);r(n);r(n);r(n);r(n);r(n);r(n)" Non patched: 4.27 usec per loop Patched: 2.97 usec per loop ---------- components: Extension Modules files: random_getrandbits_fastpath.patch keywords: patch messages: 177436 nosy: mark.dickinson, rhettinger, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Faster getrandbits() for small integers type: performance versions: Python 3.4 Added file: http://bugs.python.org/file28304/random_getrandbits_fastpath.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 22:23:27 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 13 Dec 2012 21:23:27 +0000 Subject: [issue16674] Faster getrandbits() for small integers In-Reply-To: <1355432076.17.0.54183868892.issue16674@psf.upfronthosting.co.za> Message-ID: <1355433807.9.0.165086060721.issue16674@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 22:53:14 2012 From: report at bugs.python.org (Matt Hickford) Date: Thu, 13 Dec 2012 21:53:14 +0000 Subject: [issue16675] Ship Python with a package manager Message-ID: <1355435594.3.0.516927010626.issue16675@psf.upfronthosting.co.za> New submission from Matt Hickford: Python should ship with a full-featured package manager. Why? 1. Most programmers would rather use a reliable maintained library for a common task than roll their own code. Then the programmer can get on with solving their unique problems. This assumes the library is convenient to install (and licensed appropriately). 2. Other languages ship with package managers - Ruby with Gem, Nodejs with Npm. As a result, these languages have extremely successful open-source communities encouraging sharing. https://github.com/languages Yes, Python has a strong open-source community, but there's a real hurdle to publishing packages. Nodejs is still in short trousers, but https://npmjs.org/ will shortly outnumber Python's package index. If you believe sharing is worthwhile, then you should want to make it easy. Python has a decent package manager (distribute + pip) but it's ironically complicated to install. On Windows 64 bit (a very popular platform), this requires installing a package from source. You, dear Reader, surely find that easy, but it's still a big an ask for anyone new to programming. You perhaps recommend Python to friends wishing to learn programming. Could you explain over the phone how to install a package such as 'requests'? The Django homepage actually forsakes Python package management and encourages new users to build from source. You only have to write 'python install package' into Google or read http://stackoverflow.com/questions/4750806/how-to-install-pip-on-windows to see just how much *pain* new users have with package management. I humbly suggest pip (+ distribute), which happens to be the community's de facto standard. ---------- messages: 177437 nosy: Matt.Hickford priority: normal severity: normal status: open title: Ship Python with a package manager type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 23:25:44 2012 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 13 Dec 2012 22:25:44 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355437544.61.0.108247075068.issue16656@psf.upfronthosting.co.za> anatoly techtonik added the comment: There is one more problem - when I redirect the output with: > py test_unicode_fname.py > test.log 2>&1 In Python 2.7 the traceback is at the end of file, in Python 3.3 it is at the beginning. Therefore I just copied data from the screen, where it appears in correct order. (current mood: Python debugging is a mess) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 23:26:01 2012 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 13 Dec 2012 22:26:01 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355437561.43.0.943585575781.issue16656@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file28305/py27fname.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 13 23:26:09 2012 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 13 Dec 2012 22:26:09 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355437569.15.0.741448043984.issue16656@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file28306/py33fname.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 00:10:55 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 13 Dec 2012 23:10:55 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355440255.0.0.923151915937.issue16656@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Anatoly, please file another issue for the 2>&1 mess. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 00:44:32 2012 From: report at bugs.python.org (Eric V. Smith) Date: Thu, 13 Dec 2012 23:44:32 +0000 Subject: [issue16675] Ship Python with a package manager In-Reply-To: <1355435594.3.0.516927010626.issue16675@psf.upfronthosting.co.za> Message-ID: <1355442272.75.0.631730368645.issue16675@psf.upfronthosting.co.za> Eric V. Smith added the comment: Because this is a new feature, it could only be added to Python 3.4. Changing versions. ---------- components: +Installation nosy: +eric.smith type: behavior -> enhancement versions: -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 02:20:47 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 14 Dec 2012 01:20:47 +0000 Subject: [issue16357] SSLSocket created from SSLContext.wrap_socket doesn't include cert/keyfile In-Reply-To: <1351526039.51.0.105215109749.issue16357@psf.upfronthosting.co.za> Message-ID: <1355448047.06.0.904847031515.issue16357@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 02:31:35 2012 From: report at bugs.python.org (Zachary Ware) Date: Fri, 14 Dec 2012 01:31:35 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355448695.1.0.902865190016.issue16651@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- nosy: +zach.ware _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 03:31:02 2012 From: report at bugs.python.org (Tres Seaver) Date: Fri, 14 Dec 2012 02:31:02 +0000 Subject: [issue16676] Segfault under Python 3.3 after PyType_GenericNew Message-ID: <1355452262.45.0.54382908485.issue16676@psf.upfronthosting.co.za> New submission from Tres Seaver: A test of the 'persistent' package C extension segfaults under 3.3, but completes successfully under 3.2. The C function being tested is a wrapper around PyType_GenericNew: static PyObject * simple_new(PyObject *self, PyObject *type_object) { if (!PyType_Check(type_object)) { PyErr_SetString(PyExc_TypeError, "simple_new argument must be a type object."); return NULL; } return PyType_GenericNew((PyTypeObject *)type_object, NULL, NULL); } The unit test which segfaults just iterates over basic types: def test_w_type(self): for typ in (type, list, dict, tuple, object): self.assertTrue(isinstance(self._callFUT(typ), typ)) Some digging shows that the segfault comes while deallocating the newly-made 'dict' object. #0 dict_dealloc (mp=0x7ffff3f9d248) at Objects/dictobject.c:1392 #1 0x00000000004261cb in tupledealloc (op=0x7ffff3d90ab8) at Objects/tupleobject.c:238 #2 0x000000000048065d in call_function (oparg=, pp_stack=0x7fffffffa6e0) at Python/ceval.c:4064 #3 PyEval_EvalFrameEx (f=, throwflag=) at Python/ceval.c:2679 #4 0x0000000000480b23 in fast_function (nk=, na=1, n=, pp_stack=0x7fffffffa850, func=0x7ffff42284d0) at Python/ceval.c:4150 #5 call_function (oparg=, pp_stack=0x7fffffffa850) at Python/ceval.c:4083 ---------- components: Extension Modules, Interpreter Core messages: 177441 nosy: tseaver priority: normal severity: normal status: open title: Segfault under Python 3.3 after PyType_GenericNew versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 03:41:08 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 14 Dec 2012 02:41:08 +0000 Subject: [issue16478] Fix division in tabnanny In-Reply-To: <1352994418.48.0.449467913759.issue16478@psf.upfronthosting.co.za> Message-ID: <1355452868.2.0.520433095732.issue16478@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 03:56:22 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 14 Dec 2012 02:56:22 +0000 Subject: [issue16675] Ship Python with a package manager In-Reply-To: <1355435594.3.0.516927010626.issue16675@psf.upfronthosting.co.za> Message-ID: <1355453782.76.0.977469174024.issue16675@psf.upfronthosting.co.za> R. David Murray added the comment: Matt, thanks for your interest. This possibility has been discussed, so you aren't the only one who thinks it should happen. However, I don't think this is an appropriate issue for the tracker. This is part of an ongoing discussion and process on distutils-sig and python-dev. It is also a PEP level feature, which pretty much means there should be an approved PEP before there is an open issue for implementing/integrating it. I would recommend you check out the past discussions and join in on the efforts to improve the current situation. If other devs disagree with me the issue can be reopened. ---------- nosy: +r.david.murray resolution: -> later stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 04:53:54 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Dec 2012 03:53:54 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1355457234.13.0.49334521886.issue1818@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 06:26:57 2012 From: report at bugs.python.org (Trent Nelson) Date: Fri, 14 Dec 2012 05:26:57 +0000 Subject: [issue15963] Improve ./configure's support for 32/64-bit debug|release|profiled builds w/ vendor (non-gcc) compilers on proprietary UNIX systems (Solaris/HP-UX/AIX et al). In-Reply-To: <1347975635.66.0.0788814924298.issue15963@psf.upfronthosting.co.za> Message-ID: <1355462817.21.0.793915768209.issue15963@psf.upfronthosting.co.za> Trent Nelson added the comment: I spent a little time on this yesterday. Here's what I came up with. The idea is to have a standalone block in configure.ac that kicks in when --without-gcc is specified (or if $CC != "gcc") *IFF* CFLAGS/CPPFLAGS haven't been provided by the user. If they have, we warn, and skip the block. Rationale is wanting to cover two cases: a) experienced user consciously overriding our attempts at sensible defaults in that block, b) inexperienced user who has no clue what the sensible defaults are but has otherwise inadvertently set CFLAGS/CPPFLAGS (or perhaps just inherited such settings from their existing environment). So, here's what the "block" looks like currently, albeit just for IRIX at the moment (and this was against 2.7). I'll eventually expand it to cover Solaris/SPARC|AMD64, AIX, HP-UX (PA-RISC/IA64) and Tru64. (Also note the new `--enable-64bit` arg, which is intended to be used on these platforms as a way to coerce easy 64-bit builds. The functionality doesn't apply on x86/x64 "free" *nix platforms that use clang/gcc -- those will default to using whatever memory architecture is being used by the underlying system -- if you want something else, that's the job of cross-compilation, which is a different problem this particular issue is attempting to address.) +AC_MSG_CHECKING(for --enable-64bit) +AC_ARG_ENABLE( + 64bit, + AS_HELP_STRING( + [--enable-64bit], + [attempt 64-bit build (use with --without-gcc)] + ) +) +if test -z "$enable_64bit"; then + AC_MSG_RESULT(no) +else + AC_MSG_RESULT(yes) +fi +if test -n "$enable_64bit" && test "$without_gcc" != "yes"; then + AC_MSG_WARN([ + --enable-64bit has no effect unless --without-gcc is also specified + ]) +fi + +# If we're not using GCC, we're probably on a proprietary UNIX, relying +# on a proprietary compiler, running on non-x86/x64 hardware. Autoconf +# is pretty bad at picking sensible defaults for compiler flags in this +# situation, so, let's try and do as much as we can ourselves. The aim +# is to pick the optimal settings for each of the following permutations: +# +# Debug builds, 32-bit and 64-bit: +# ./configure --without-gcc --with-pydebug +# ./configure --without-gcc --with-pydebug --enable-64bit +# +# Optimized release builds, 32-bit and 64-bit: +# ./configure --without-gcc +# ./configure --without-gcc --enable-64bit +# +if test "$without_gcc" = "yes" || test "$CC" != "gcc"; then + # This whole block assumes we know more than a) the user, and b) autoconf. + # If we detect CFLAGS/CPPFLAGS, then we can't safely assume a) anymore, + # so print a message instead of doing any customisation. + if test -n "$CFLAGS" || test -n "$CPPFLAGS"; then + AC_MSG_WARN([ + You have defined CFLAGS and/or CPPFLAGS in conjunction with + --with-gcc; skipping attempt at setting flags to sensible + defaults -- make sure you know what you are doing. + ]) + else + case $MACHDEP in + irix6) + # Trying to separate IRIX from C99 and still end up with a + # working executable is an exercise in futility; it has a + # much greater link between `cc -c99` and available system + # facilities/headers than other OSes (which primarily rely + # on the usual XPG4/XOPEN_SOURCE etc defines). Using the + # c99 compiler is the lesser of two evils. + CC=c99 + CXX=CC + # `-diag_error 1035` makes the compiler treat #error defines + # as actual errors (and abort compilation), and not warnings. + CFLAGS="-diag_error 1035" + # Try to target the underlying host hardware. + _platform=`hinv -c processor | + head -n 1 | + cut -f 4 -d ' '` + _processor=`hinv -c processor | + head -n 2 | + tail -n 1 | + cut -f 3 -d ' '` + CFLAGS="$CFLAGS -TARG:platform=$_platform" + CFLAGS="$CFLAGS -TARG:processor=$_processor" + + if test "$with_pydebug" = "yes"; then + OPT="-O -g2" + else + OPT="-g3 -Ofast=$_platform -OPT:Olimit=5500" + fi + + if test -n "$enable_64bit"; then + CFLAGS="-64 $CFLAGS" + LDFLAGS="-64" + else + CFLAGS="-n32 $CFLAGS" + LDFLAGS="-n32" + fi + ;; + *) ;; + esac fi fi ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:09:55 2012 From: report at bugs.python.org (rurpy) Date: Fri, 14 Dec 2012 06:09:55 +0000 Subject: [issue16677] Hard to find operator precedence in Lang Ref. Message-ID: <1355465395.03.0.430403844231.issue16677@psf.upfronthosting.co.za> New submission from rurpy: Python Language Reference, chapter 6 "Expressions". The last section (6.15) of this is titled, "Summary". That title is misleading -- it is not really a summary of the "Expressions" chapter but rather, as the first sentence makes clear, a table of operator precedences. It is not really even a "summary" of operator precedences since some of the preceeding operator sections don't mention their precedence. And adding to the confusion, none of preceding sections even use the word precedence, referring instead to "binding" or "priority". Operator precedences are something many users frequently look for frequently in a language reference and the lack of an Operator Precedence entry in the ToC makes this section hard to find. There are no index entries for "operators/precedence" or "expressions/order of evaluation". There is an index entry for "evaluation order" but that points to a different section. At a minimum, this section should have its title changed from "Summary" to "Operator Precedence" and get one or more index entries. In other languages operator precedence is often described and indexed under "order of evaluation", often as a subindex of "expressions". In the Python reference, there is a very short section called, 6.14, "Evaluation Order" that immediately preceeds the Operator Precedence section. That section and the Operator Precedence section could be effectively combined into a single section. ---------- assignee: docs at python components: Documentation messages: 177444 nosy: docs at python, rurpy2 priority: normal severity: normal status: open title: Hard to find operator precedence in Lang Ref. type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 07:28:00 2012 From: report at bugs.python.org (Ned Deily) Date: Fri, 14 Dec 2012 06:28:00 +0000 Subject: [issue15963] Improve ./configure's support for 32/64-bit debug|release|profiled builds w/ vendor (non-gcc) compilers on proprietary UNIX systems (Solaris/HP-UX/AIX et al). In-Reply-To: <1347975635.66.0.0788814924298.issue15963@psf.upfronthosting.co.za> Message-ID: <1355466480.62.0.973314955636.issue15963@psf.upfronthosting.co.za> Ned Deily added the comment: Without having reviewed the proposed change in detail, a couple of comments. On current OS X systems and others, the compiler could be clang which perhaps should be treated as gcc for most autoconf purposes. Also, why are we putting any effort into supporting IRIX anymore? Both IRIX and the MIPS processor lines it runs on was retired by SGI in 2007. That's why support for IRIX was pulled from Python 3. It's a dead end. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 08:21:57 2012 From: report at bugs.python.org (Larry Hastings) Date: Fri, 14 Dec 2012 07:21:57 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1355469717.37.0.2845225454.issue16612@psf.upfronthosting.co.za> Larry Hastings added the comment: I don't think we can solve the problem of the output being too long for your liking. Personally I like the output; I find it eminently readable, and making it shorter would impair that. I think in the majority of uses Clinic will be a win for readability. I do have one suggestion that might mitigate the problem for you. What if you put all the argument processing in a separate file (with .c or .h extension) and #include that in _decimal.c? You don't *have* to have the body for the impl function immediately after the DSL block; you could just have a semicolon there after the block and the C compiler would interpret it as a (redundant) declaration. You'd have to maintain declaring the impl yourself in _decimal.c, but I'm guessing you'd rather do that than have all the Clinic stuff blowing up _decimal.c. Finally, since you have not addressed it directly, let me ask you: are you interested in Clinic having a more boilerplate-friendly macro processing mode, with templates or recycling old entries or something? Or do you not care? If it doesn't help you then I may as well not bother. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:20:31 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 14 Dec 2012 08:20:31 +0000 Subject: [issue16676] Segfault under Python 3.3 after PyType_GenericNew In-Reply-To: <1355452262.45.0.54382908485.issue16676@psf.upfronthosting.co.za> Message-ID: <1355473231.31.0.0405496042828.issue16676@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:26:41 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 14 Dec 2012 08:26:41 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1355473601.06.0.0631262929861.issue16659@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:27:36 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 14 Dec 2012 08:27:36 +0000 Subject: [issue16678] optparse: parse only known options Message-ID: <1355473656.34.0.647093207019.issue16678@psf.upfronthosting.co.za> New submission from anatoly techtonik: This following recipe from Optik examples should be added to documentation. It is extremely helpful when porting to optparse from getopt or other option parsing schemes. ---------- assignee: docs at python components: Documentation messages: 177447 nosy: docs at python, techtonik priority: normal severity: normal status: open title: optparse: parse only known options versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:27:43 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 14 Dec 2012 08:27:43 +0000 Subject: [issue16678] optparse: parse only known options In-Reply-To: <1355473656.34.0.647093207019.issue16678@psf.upfronthosting.co.za> Message-ID: <1355473663.25.0.662440522152.issue16678@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file28307/pass_through.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:28:24 2012 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 14 Dec 2012 08:28:24 +0000 Subject: [issue16678] optparse: parse only known options In-Reply-To: <1355473656.34.0.647093207019.issue16678@psf.upfronthosting.co.za> Message-ID: <1355473704.24.0.812938435223.issue16678@psf.upfronthosting.co.za> anatoly techtonik added the comment: It allows to port options to and from optparse incrementally. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:28:30 2012 From: report at bugs.python.org (Claude Paroz) Date: Fri, 14 Dec 2012 08:28:30 +0000 Subject: [issue16679] Wrong URL path decoding Message-ID: <1355473710.36.0.278942451351.issue16679@psf.upfronthosting.co.za> New submission from Claude Paroz: In wsgiref/simple_server.py (WSGIRequestHandler.get_environ), Python 3 is currently populating the env['PATH_INFO'] variable by decoding the URL path, assuming it was encoded with 'iso-8859-1', which appears to be wrong, according to RFC 3986/3987. For example, if you request the path /???? in any modern browser, PATH_INFO will contain "/???????". 'iso-8859-1' should be replaced by 'utf-8' for decoding. Note that this was introduced as part of the fix for http://bugs.python.org/issue10155 ---------- components: Library (Lib) messages: 177449 nosy: claudep priority: normal severity: normal status: open title: Wrong URL path decoding type: behavior versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:29:45 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 14 Dec 2012 08:29:45 +0000 Subject: [issue16447] SEGFAULT when setting type.__name__ In-Reply-To: <1352419760.39.0.728241030951.issue16447@psf.upfronthosting.co.za> Message-ID: <1355473785.62.0.657026741803.issue16447@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:30:32 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 14 Dec 2012 08:30:32 +0000 Subject: [issue16576] ctypes: structure with bitfields as argument In-Reply-To: <1354164812.19.0.708202681719.issue16576@psf.upfronthosting.co.za> Message-ID: <1355473832.61.0.096221351032.issue16576@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:30:56 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 14 Dec 2012 08:30:56 +0000 Subject: [issue16575] ctypes: unions as arguments In-Reply-To: <1354163044.21.0.431588472559.issue16575@psf.upfronthosting.co.za> Message-ID: <1355473856.58.0.479470400594.issue16575@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:33:43 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 14 Dec 2012 08:33:43 +0000 Subject: [issue14894] distutils.LooseVersion fails to compare number and a word In-Reply-To: <1337805749.61.0.661955519892.issue14894@psf.upfronthosting.co.za> Message-ID: <1355474023.19.0.761073718709.issue14894@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:35:58 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 14 Dec 2012 08:35:58 +0000 Subject: [issue16601] Restarting iteration over tarfile continues from where it left off. In-Reply-To: <1354564872.87.0.0661195327337.issue16601@psf.upfronthosting.co.za> Message-ID: <1355474158.31.0.600825547232.issue16601@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:36:08 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 14 Dec 2012 08:36:08 +0000 Subject: [issue16631] tarfile.extractall() doesn't extract everything if .next() was used In-Reply-To: <1354855276.1.0.878015275431.issue16631@psf.upfronthosting.co.za> Message-ID: <1355474168.77.0.791918308998.issue16631@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:42:39 2012 From: report at bugs.python.org (Graham Dumpleton) Date: Fri, 14 Dec 2012 08:42:39 +0000 Subject: [issue16679] Wrong URL path decoding In-Reply-To: <1355473710.36.0.278942451351.issue16679@psf.upfronthosting.co.za> Message-ID: <1355474559.23.0.860505610303.issue16679@psf.upfronthosting.co.za> Graham Dumpleton added the comment: The requirement per PEP 3333 is that the original byte string needs to be converted to native string (Unicode) with the ISO-8891-1 encoding. This is to ensure that the original bytes are preserved so that the WSGI application, with its own knowledge of what encoding the byte string was in, can then properly convert it to the correct encoding. In other words, the WSGI server is not allowed to assume that the original byte string was UTF-8, because in practice it may not be and it cannot know what it is. The WSGI server must use ISO-8859-1. The WSGI application if it needs it in UTF-8, must then convert it back to a byte string using IS0-8859-1 and then from there convert it back to a native string as UTF-8. So if I understand what you are saying, you are suggesting a change which is incompatible with PEP 3333. Please provide a code snippet or patch to show what you are proposing to be changed so it can be determined precisely what you are talking about. ---------- nosy: +grahamd _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:43:22 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 14 Dec 2012 08:43:22 +0000 Subject: [issue16679] Wrong URL path decoding In-Reply-To: <1355473710.36.0.278942451351.issue16679@psf.upfronthosting.co.za> Message-ID: <1355474602.04.0.173344119923.issue16679@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- versions: +Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 09:59:43 2012 From: report at bugs.python.org (Claude Paroz) Date: Fri, 14 Dec 2012 08:59:43 +0000 Subject: [issue16679] Wrong URL path decoding In-Reply-To: <1355473710.36.0.278942451351.issue16679@psf.upfronthosting.co.za> Message-ID: <1355475583.95.0.264212723391.issue16679@psf.upfronthosting.co.za> Claude Paroz added the comment: Attached are my proposed changes. Also, I just came across http://bugs.python.org/issue3300, which finally led Python urllib.parse.quote to default to UTF-8 encoding, after a lengthy discussion. ---------- keywords: +patch Added file: http://bugs.python.org/file28308/issue16679-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 10:10:28 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 14 Dec 2012 09:10:28 +0000 Subject: [issue16680] Line buffering in socket._fileobject is borken Message-ID: <1355476228.38.0.0287776037478.issue16680@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson: socket._fileobject supports line buffering for output with the bufsize=1 option. Unfortunately, it is broken and behaves like no buffering. This patch remedies the situation. ---------- components: Library (Lib) files: _fileobject.diff keywords: patch messages: 177452 nosy: kristjan.jonsson priority: normal severity: normal status: open title: Line buffering in socket._fileobject is borken type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file28309/_fileobject.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 10:10:29 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 14 Dec 2012 09:10:29 +0000 Subject: [issue16677] Hard to find operator precedence in Lang Ref. In-Reply-To: <1355465395.03.0.430403844231.issue16677@psf.upfronthosting.co.za> Message-ID: <1355476229.98.0.108781407765.issue16677@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +chris.jerdonek, ezio.melotti stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 10:11:35 2012 From: report at bugs.python.org (Graham Dumpleton) Date: Fri, 14 Dec 2012 09:11:35 +0000 Subject: [issue16679] Wrong URL path decoding In-Reply-To: <1355473710.36.0.278942451351.issue16679@psf.upfronthosting.co.za> Message-ID: <1355476295.03.0.691371802467.issue16679@psf.upfronthosting.co.za> Graham Dumpleton added the comment: You can't try UTF-8 and then fall back to ISO-8859-1. PEP 3333 requires it always be ISO-8859-1. If an application needs it as something else, it is the web applications job to do it. The relevant part of the PEP is: """On Python platforms where the str or StringType type is in fact Unicode-based (e.g. Jython, IronPython, Python 3, etc.), all "strings" referred to in this specification must contain only code points representable in ISO-8859-1 encoding (\u0000 through \u00FF, inclusive). It is a fatal error for an application to supply strings containing any other Unicode character or code point. Similarly, servers and gateways must not supply strings to an application containing any other Unicode characters.""" By converting as UTF-8 you would be breaking the requirement that only code points representable in ISO-8859-1 encoding (\u0000 through \u00FF, inclusive) are passed through. So it is inconvenient if your expectation is that will always be UTF-8, but is how it has to work. This is because it could be something other than UTF-8, yet still be able to be successfully converted as UTF-8. In that case the application would get something totally different to the original which is wrong. So, the WSGI server cannot ever make any assumptions and the WSGI application always has to be the one which converts it to the correct Unicode string. The only way that can be done and still pass through a native string, is that it is done as ISO-8859-1 (which is byte preserving), allowing the application to go back to bytes and then back to Unicode in correct encoding. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 10:15:37 2012 From: report at bugs.python.org (Berker Peksag) Date: Fri, 14 Dec 2012 09:15:37 +0000 Subject: [issue16680] Line buffering in socket._fileobject is broken In-Reply-To: <1355476228.38.0.0287776037478.issue16680@psf.upfronthosting.co.za> Message-ID: <1355476537.93.0.276553282807.issue16680@psf.upfronthosting.co.za> Changes by Berker Peksag : ---------- title: Line buffering in socket._fileobject is borken -> Line buffering in socket._fileobject is broken _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 10:18:12 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 14 Dec 2012 09:18:12 +0000 Subject: [issue16680] Line buffering in socket._fileobject is broken In-Reply-To: <1355476228.38.0.0287776037478.issue16680@psf.upfronthosting.co.za> Message-ID: <1355476692.91.0.474175560271.issue16680@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: http://www.urbandictionary.com/define.php?term=borken ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 10:51:15 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 14 Dec 2012 09:51:15 +0000 Subject: [issue2771] Test issue In-Reply-To: <1210005645.74.0.283923986194.issue2771@psf.upfronthosting.co.za> Message-ID: <1355478675.69.0.432150561608.issue2771@psf.upfronthosting.co.za> Ezio Melotti added the comment: irker test ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 11:07:33 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 14 Dec 2012 10:07:33 +0000 Subject: [issue16680] Line buffering in socket._fileobject is broken In-Reply-To: <1355476228.38.0.0287776037478.issue16680@psf.upfronthosting.co.za> Message-ID: <1355479653.31.0.952417626209.issue16680@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: It's a duplicate, otherwise the patch LGTM. ---------- nosy: +neologix resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> socket line buffering _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 11:47:22 2012 From: report at bugs.python.org (Claude Paroz) Date: Fri, 14 Dec 2012 10:47:22 +0000 Subject: [issue16679] Wrong URL path decoding In-Reply-To: <1355473710.36.0.278942451351.issue16679@psf.upfronthosting.co.za> Message-ID: <1355482042.3.0.601421917249.issue16679@psf.upfronthosting.co.za> Claude Paroz added the comment: I may understand your reasoning when you cannot make any assumptions about the encoding of a series of bytes. I think that the case of PATH_INFO is different, because it should comply with standards, and then you *can* make the assumption that the original path is 'utf-8'-encoded. So either leave the string undecoded, or decode it to what the standards say. It would put un unneccessary burden on WSGI apps to always require to encode-redecode this string. Wouldn't it be possible to amend PEP 3333? Hopefully we can get some other opinions about this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 12:29:25 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 14 Dec 2012 11:29:25 +0000 Subject: [issue879399] socket line buffering Message-ID: <1355484565.76.0.00799258160769.issue879399@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Here's a patch for the current 2.7 stuff, from issue #16680 (which was deemed duplicate). Unless anyone objects, I'll commit that to 2.7 soon. Eight years, this has taken. ---------- keywords: +patch nosy: +kristjan.jonsson Added file: http://bugs.python.org/file28310/_fileobject.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 12:46:40 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 14 Dec 2012 11:46:40 +0000 Subject: [issue16676] Segfault under Python 3.3 after PyType_GenericNew In-Reply-To: <1355452262.45.0.54382908485.issue16676@psf.upfronthosting.co.za> Message-ID: <1355485600.87.0.207785341401.issue16676@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 14:18:29 2012 From: report at bugs.python.org (Trent Nelson) Date: Fri, 14 Dec 2012 13:18:29 +0000 Subject: [issue15963] Improve ./configure's support for 32/64-bit debug|release|profiled builds w/ vendor (non-gcc) compilers on proprietary UNIX systems (Solaris/HP-UX/AIX et al). In-Reply-To: <1355466480.62.0.973314955636.issue15963@psf.upfronthosting.co.za> Message-ID: <20121214131821.GA48990@snakebite.org> Trent Nelson added the comment: On Thu, Dec 13, 2012 at 10:28:00PM -0800, Ned Deily wrote: > > Ned Deily added the comment: > > Without having reviewed the proposed change in detail, a couple of > comments. On current OS X systems and others, the compiler could be > clang which perhaps should be treated as gcc for most autoconf > purposes. I'm not intending to target OS X in the autoconf block I referred to; it's a popular platform for developers and users, and doesn't have any of the problems that the proprietary *NIXes/compilers have. This work is solely aimed at Solaris, Tru64, HP-UX, AIX and IRIX. > Also, why are we putting any effort into supporting IRIX > anymore? We? It's just me :-) So a more appropriate question might be why am I bothering to put effort into supporting it? And the answer to that is simply because I can; Snakebite has an SGI Origin running the latest version of IRIX with the MIPSpro compiler suite, which is all the hardware I need to keep things chugging along. (IRIX also has a huge active "fan" base of users that run a lot of OSS software -- nekoware et al.) > Both IRIX and the MIPS processor lines it runs on was retired by SGI > in 2007. That's why support for IRIX was pulled from Python 3. Support was pulled for, to quote PEP 11, "IRIX 4 and --with-sgi-dl"; PEP 11 also has a nice clause that basically says platform support is primarily based on having an active maintainer willing to keep everything in shape -- I'm happy to be marked as the maintainer for all the aforementioned *NIX platforms. Martin made a good point a few weeks ago when we discussed this on infrastructure@; his concern was the effort involved in supporting additional platforms could detract developers from more important tasks. I agree -- they're esoteric platforms at best, EOL at worst, and just because I'm maintaining them shouldn't mean other developers have to worry about breaking them. They're not anywhere near as important as the big 3 (Linux/Windows/OSX). If they do break, though, I'll keep fixing them as long as I'm actively maintaining support for that platform. The motivation behind this particular change is simple: it took about three days to nail down the exact flags to use on Solaris SPARC 32-bit to get a working ./python (with lots of referring to various Sun/Oracle compiler docs). No-one else should have to go through this much effort -- ./configure should pick the right flags out of the box for the following permutations: 32/64 bit debug builds: ./configure --without-gcc --with-pydebug ./configure --without-gcc --with-pydebug --enable-64bit 32/64 bit release builds: ./configure --without-gcc ./configure --without-gcc --enable-64bit (And again, just to clarify, none of this work will remotely affect Linux, OS X or the *BSDs. It doesn't take three days of reading compiler manuals to get working builds on those platforms.) ---------- title: Improve ./configure's support for 32/64-bit debug|release|profiled builds w/ vendor (non-gcc) compilers on proprietary UNIX systems (Solaris/HP-UX/AIX et al). -> Improve ./configure's support for 32/64-bit debug|release|profiled builds w/ vendor (non-gcc) compilers on proprietary UNIX systems (Solaris/HP-UX/AIX et al). _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 15:11:37 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 14 Dec 2012 14:11:37 +0000 Subject: [issue16678] optparse: parse only known options In-Reply-To: <1355473656.34.0.647093207019.issue16678@psf.upfronthosting.co.za> Message-ID: <1355494297.8.0.449740614607.issue16678@psf.upfronthosting.co.za> R. David Murray added the comment: We aren't encouraging people to use optparse any more. The recipe isn't needed in argparse, as that has a "parse_known_args" method that achieves the same end. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:01:44 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 14 Dec 2012 15:01:44 +0000 Subject: [issue16377] Fix bisect unittest In-Reply-To: <1351715490.4.0.45923656466.issue16377@psf.upfronthosting.co.za> Message-ID: <1355497303.99.0.959268731959.issue16377@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:05:09 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 14 Dec 2012 15:05:09 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <3YNFRm57PwzQQk@mail.python.org> Roundup Robot added the comment: New changeset 6eefe4d537b3 by Andrew Svetlov in branch 'default': Issue #16421: allow to load multiple modules from the same shared object. http://hg.python.org/cpython/rev/6eefe4d537b3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 16:06:23 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Dec 2012 15:06:23 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1355497583.95.0.369667113798.issue16421@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed. Sorry for delay. Thanks, Vaclav! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:05:38 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Dec 2012 16:05:38 +0000 Subject: [issue16584] unhandled IOError filecmp.cmpfiles() if file not readable In-Reply-To: <1354300040.38.0.588944499058.issue16584@psf.upfronthosting.co.za> Message-ID: <1355501138.26.0.0943201586042.issue16584@psf.upfronthosting.co.za> Andrew Svetlov added the comment: The error can be reproduced for 2.7 and 3.2. Starting from 3.3 os.error and IOError both aliases for OSError and patch doesn't needed. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:34:12 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 14 Dec 2012 16:34:12 +0000 Subject: [issue879399] socket line buffering Message-ID: <1355502852.72.0.909251336052.issue879399@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Would be nice to add a test... ---------- nosy: +pitrou versions: -Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:37:24 2012 From: report at bugs.python.org (Robin Schreiber) Date: Fri, 14 Dec 2012 16:37:24 +0000 Subject: [issue15651] PEP 3121, 384 refactoring applied to elementtree module In-Reply-To: <1344968721.44.0.689766020196.issue15651@psf.upfronthosting.co.za> Message-ID: <1355503044.73.0.479352438317.issue15651@psf.upfronthosting.co.za> Robin Schreiber added the comment: Patch updated to work with current 3.4 Branch version of elementtree. ---------- keywords: +patch Added file: http://bugs.python.org/file28311/_elementtree_pep3121-384_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:39:12 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2012 16:39:12 +0000 Subject: [issue16619] LOAD_GLOBAL used to load `None` under certain circumstances In-Reply-To: <1354735711.68.0.957152871087.issue16619@psf.upfronthosting.co.za> Message-ID: <1355503152.09.0.457892138436.issue16619@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:42:11 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2012 16:42:11 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1355503331.38.0.850329598574.issue16421@psf.upfronthosting.co.za> STINNER Victor added the comment: Some tests are failing since the changeset 6eefe4d537b3. Example: http://buildbot.python.org/all/builders/x86%20RHEL%206%203.x/builds/1431/steps/test/logs/stdio Please check buildbots. [176/371] test_pkgutil test_getdata_filesys (test.test_pkgutil.PkgutilTests) ... ok test_getdata_zipfile (test.test_pkgutil.PkgutilTests) ... ok test_unreadable_dir_on_syspath (test.test_pkgutil.PkgutilTests) ... ok test_alreadyloaded (test.test_pkgutil.PkgutilPEP302Tests) ... ERROR test_getdata_pep302 (test.test_pkgutil.PkgutilPEP302Tests) ... ERROR test_mixed_namespace (test.test_pkgutil.ExtendPathTests) ... ERROR test_simple (test.test_pkgutil.ExtendPathTests) ... ERROR test_nested (test.test_pkgutil.NestedNamespacePackageTest) ... ok test_get_importer_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) ... ok test_get_loader_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) ... ok test_importer_deprecated (test.test_pkgutil.ImportlibMigrationTests) ... ok test_iter_importers_avoids_emulation (test.test_pkgutil.ImportlibMigrationTests) ... ok test_loader_deprecated (test.test_pkgutil.ImportlibMigrationTests) ... ok ====================================================================== ERROR: test_alreadyloaded (test.test_pkgutil.PkgutilPEP302Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/test/test_pkgutil.py", line 139, in test_alreadyloaded self.assertEqual(foo.loads, 1) AttributeError: 'module' object has no attribute 'loads' ====================================================================== ERROR: test_getdata_pep302 (test.test_pkgutil.PkgutilPEP302Tests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/pkgutil.py", line 502, in find_loader return importlib.find_loader(fullname, path) File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/importlib/__init__.py", line 64, in find_loader loader = sys.modules[name].__loader__ AttributeError: 'module' object has no attribute '__loader__' The above exception was the direct cause of the following exception: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/test/test_pkgutil.py", line 131, in test_getdata_pep302 self.assertEqual(pkgutil.get_data('foo', 'dummy'), "Hello, world!") File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/pkgutil.py", line 625, in get_data loader = get_loader(package) File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/pkgutil.py", line 480, in get_loader return find_loader(fullname) File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/pkgutil.py", line 508, in find_loader raise ImportError(msg.format(fullname, type(ex), ex)) from ex ImportError: Error while finding loader for 'foo' (: 'module' object has no attribute '__loader__') ====================================================================== ERROR: test_mixed_namespace (test.test_pkgutil.ExtendPathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "", line 1523, in _find_and_load_unlocked AttributeError: 'module' object has no attribute '__path__' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/test/test_pkgutil.py", line 198, in test_mixed_namespace import foo.bar ImportError: No module named 'foo.bar'; foo is not a package ====================================================================== ERROR: test_simple (test.test_pkgutil.ExtendPathTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "", line 1523, in _find_and_load_unlocked AttributeError: 'module' object has no attribute '__path__' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/home/buildbot/buildarea/3.x.coghlan-redhat/build/Lib/test/test_pkgutil.py", line 170, in test_simple import foo.bar ImportError: No module named 'foo.bar'; foo is not a package ---------------------------------------------------------------------- Ran 13 tests in 0.027s ---------- nosy: +haypo resolution: fixed -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:51:22 2012 From: report at bugs.python.org (Jason Huntley) Date: Fri, 14 Dec 2012 16:51:22 +0000 Subject: [issue3871] cross and native build of python for mingw* hosts In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1355503882.51.0.285722537036.issue3871@psf.upfronthosting.co.za> Jason Huntley added the comment: I'm attempting to build Python-3.3.0 with mingw64. I get a minute or two into the build and fail with this error: ./Include/pythonrun.h:178:1: warning: function declaration isn't a prototype [-W strict-prototypes] ./Modules/getpath.c: In function 'isfile': ./Modules/getpath.c:153:5: warning: implicit declaration of function '_Py_wstat' [-Wimplicit-function-declaration] ./Modules/getpath.c: In function 'find_env_config_value': ./Modules/getpath.c:298:17: error: too many arguments to function 'wcstok' In file included from c:\projects\tools\osm\dev\mapnik\custom\environment\instal l\mingw64\bin\../lib/gcc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32 /include/io.h:10:0, from ./PC/pyconfig.h:68, from ./Include/Python.h:8, from ./Modules/getpath.c:3: It seems some people here were using this patch against 3.3.0 at one point. Did you guys ever succeed? Once I've applied the patch, i can get a little further, but the build eventually fails again. Also, conftest continually fails to run during configure. I'm using the following settings to get the build going: export "CFLAGS=-I/mingw/include" export "LDFLAGS=-L/mingw/lib" export "CPPFLAGS=-I/mingw/include" export "CFLAGS=$CFLAGS -I./PC -DMS_WIN64 -D__MINGW32__" #http://bugs.python.org/issue3871 #wget http://bugs.python.org/file27474/py3k-20121004-MINGW.patch wget http://bugs.python.org/file26572/python-py3k-20120729-MINGW.patch #patch -t -p1 < "py3k-20121004-MINGW.patch" patch -t -p1 < python-py3k-20120729-MINGW.patch ./configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw make If I patch before configure, I get the following exception when running ./configure: bad word @INITSYS@ in @INITSYS@ posixmodule.c mv: cannot stat `config.c': No such file or directory After configure, is where it gets further, until it finally fails on: c:\projects\tools\osm\dev\mapnik\custom\environment\install\mingw64\bin\../lib/g cc/x86_64-w64-mingw32/4.7.2/../../../../x86_64-w64-mingw32/include/io.h:311:15: note: previous declaration of 'chmod' was here ./Modules/posixmodule.c:262:32: error: unknown type name 'uid_t' ./Modules/posixmodule.c:262:39: error: unknown type name 'gid_t' You can replicate my environment exactly by running the following deployment scripts from my project here: https://github.com/onepremise/MinGW-AD64S/ Just open dos in admin mode and run setup.bat. Any help is greatly appreciated. Thanks! ---------- nosy: +jhuntley _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:52:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 16:52:00 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355503920.55.0.319472528698.issue16656@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks, Anatoly. I see an actual bug. FindFirstFile and FindNextFile return broken name if file unicode name can't be represented in current codepage. I don't know what is perfect solution for this issue. On 2.7 we can decode listdir() argument to unicode and then encode result names to str with sys.getfilesystemencoding() only if it is possible. Therefore listdir() with str argument will return unicode for non-encodable names. This should not make many new problems in addition to those which 2.7 already have with Unicode. But on 3.x listdir() with bytes argument can returns only bytes objects. I don't know what to do with non-encodable names in such case. Perhaps an exception should be raised. Fortunately listdir() with bytes argument is rarely used on 3.x. ---------- components: +Extension Modules, Unicode, Windows -Library (Lib) nosy: +ezio.melotti, larry, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 17:52:17 2012 From: report at bugs.python.org (Pander) Date: Fri, 14 Dec 2012 16:52:17 +0000 Subject: [issue6331] Add unicode script info to the unicode database In-Reply-To: <1245790259.44.0.08771310344.issue6331@psf.upfronthosting.co.za> Message-ID: <1355503937.33.0.980459949646.issue6331@psf.upfronthosting.co.za> Pander added the comment: Please, also consider reviewing functionality offered by: http://pypi.python.org/pypi/unicodescript/ and http://pypi.python.org/pypi/unicodeblocks/ which could be used to improve and extend the proposed patch. ---------- nosy: +PanderMusubi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:08:07 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 14 Dec 2012 17:08:07 +0000 Subject: [issue16669] Docstrings for namedtuple In-Reply-To: <1355333495.19.0.152758378027.issue16669@psf.upfronthosting.co.za> Message-ID: <1355504887.3.0.775907261712.issue16669@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > I don't think it is worth complicating the API for this. There have > been zero requests for this functionality. Even the doc field of > property() is rarely used. +1 ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:09:53 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 14 Dec 2012 17:09:53 +0000 Subject: [issue879399] socket line buffering Message-ID: <1355504993.6.0.460225596304.issue879399@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Good point, will do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:11:36 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 14 Dec 2012 17:11:36 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355505096.11.0.181795336283.issue16656@psf.upfronthosting.co.za> R. David Murray added the comment: That's what surrogateescape is for, on linux. I thought Victor dealt with this a different way in Windows. Maybe by deprecating the bytes interface :) ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:17:00 2012 From: report at bugs.python.org (Mark Shannon) Date: Fri, 14 Dec 2012 17:17:00 +0000 Subject: [issue16676] Segfault under Python 3.3 after PyType_GenericNew In-Reply-To: <1355452262.45.0.54382908485.issue16676@psf.upfronthosting.co.za> Message-ID: <1355505420.56.0.900097092376.issue16676@psf.upfronthosting.co.za> Changes by Mark Shannon : ---------- nosy: +Mark.Shannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:25:34 2012 From: report at bugs.python.org (Pander) Date: Fri, 14 Dec 2012 17:25:34 +0000 Subject: [issue16681] Documentation 'bidirectional category' should be 'bidirectional class' in unicodedata package Message-ID: <1355505934.2.0.688425095085.issue16681@psf.upfronthosting.co.za> New submission from Pander: Documentation in docs.python.org/3/library/unicodedata.html on 'bidirectional category' should be 'bidirectional class' in unicodedata package. Please see www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt where only bidirectional class is being referred to. ---------- components: Unicode messages: 177473 nosy: PanderMusubi, ezio.melotti priority: normal severity: normal status: open title: Documentation 'bidirectional category' should be 'bidirectional class' in unicodedata package type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:27:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 17:27:44 +0000 Subject: [issue16682] Document that audioop works with bytes, not strings Message-ID: <1355506064.79.0.581209145854.issue16682@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The audioop module documentation says that functions works with Python strings. This was right in 2.x, but in 3.x here should be bytes objects (actually the functions accept strings too, but this is an implementation detail, meaningless in general). ---------- assignee: docs at python components: Documentation messages: 177474 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Document that audioop works with bytes, not strings type: enhancement versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:28:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 17:28:25 +0000 Subject: [issue16682] Document that audioop works with bytes, not strings In-Reply-To: <1355506064.79.0.581209145854.issue16682@psf.upfronthosting.co.za> Message-ID: <1355506105.84.0.588737233311.issue16682@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +patch Added file: http://bugs.python.org/file28312/audioop_docs_bytes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:31:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 17:31:32 +0000 Subject: [issue16683] Resort audioop documentation Message-ID: <1355506291.98.0.0406500704965.issue16683@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Functions in the audioop module documentation enumerated in alphabetic order. Only one function out of order. Here is a patch that fixes this. ---------- assignee: docs at python components: Documentation files: audioop_docs_resort.patch keywords: patch messages: 177475 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Resort audioop documentation type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28313/audioop_docs_resort.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:33:13 2012 From: report at bugs.python.org (Pander) Date: Fri, 14 Dec 2012 17:33:13 +0000 Subject: [issue16684] Unicode property value abbreviated names and long names Message-ID: <1355506392.97.0.314398568458.issue16684@psf.upfronthosting.co.za> New submission from Pander: The package unicodedata http://docs.python.org/3/library/unicodedata.html offers looking up of property values in terms of general category, bidirectional class and east asian width for Unicode characters unicodedata.category(unichr) unicodedata.bidirectional(unichr) unicodedata.east_asian_width(chr) The abbreviated name of the specific category is returned. However, for certain applications it is important to be able to get the from abbreviated name to the long name and vice versa. The data needed to do this can be found at http://www.unicode.org/Public/UNIDATA/PropertyValueAliases.txt under sections # General_Category (gc) # Bidi_Class (bc) # East_Asian_Width (ea) Use only the second (abbreviated name) and third (long name) fields and ignoring other fields and possible comments. For general category, also support translation back and forth of the one-letter abbreviations which are groups representing two-letter general categories abbreviations with the same initial letter. Please extend this package with a way of translating back and forth between abbreviated name and long name for property values defined in Unicode for general category, bidirectional class and East Asian width. This functionality should be independent of retrieving the abbreviated names for Unicode character as is available now and should be accessible via separate methods or dictionaries in which developers can perform lookups themselves. Implementing the functionality requested in this issue allows Python developers to get from an abbreviated property value to a meaningful property value name and vice versa without having to retrieve this information from the Unicode Consortium and/or shipping this information with their code with the risk of using outdated information. ---------- components: Unicode messages: 177476 nosy: PanderMusubi, ezio.melotti priority: normal severity: normal status: open title: Unicode property value abbreviated names and long names type: enhancement versions: Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:37:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 17:37:35 +0000 Subject: [issue16685] Deprecate accepting strings as arguments in audioop functions Message-ID: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Inadvertently strings accepted as arguments of audioop functions. This is a meaningless behavior and remnant of Python 2. We should drop string support. ---------- components: Extension Modules messages: 177477 nosy: serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Deprecate accepting strings as arguments in audioop functions type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:42:27 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2012 17:42:27 +0000 Subject: [issue16685] Deprecate accepting strings as arguments in audioop functions In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1355506947.14.0.160384983429.issue16685@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:44:45 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 14 Dec 2012 17:44:45 +0000 Subject: [issue15651] PEP 3121, 384 refactoring applied to elementtree module In-Reply-To: <1344968721.44.0.689766020196.issue15651@psf.upfronthosting.co.za> Message-ID: <1355507085.64.0.817719254385.issue15651@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:48:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 17:48:36 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355507316.74.0.227694494032.issue16656@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Surrogateescape is for non-decodable names. Here we have a problem with non-encodable names. I know that naive approach with using only Unicode API inside is not work because Windows use complex logic for filename encoding (for example dropping diacritics). Perhaps Martin have more to say. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:54:03 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 14 Dec 2012 17:54:03 +0000 Subject: [issue16684] Unicode property value abbreviated names and long names In-Reply-To: <1355506392.97.0.314398568458.issue16684@psf.upfronthosting.co.za> Message-ID: <1355507643.84.0.480152684079.issue16684@psf.upfronthosting.co.za> Ezio Melotti added the comment: > for certain applications it is important to be able to get the from > abbreviated name to the long name and vice versa. What kind of application? I have a module where I defined my own dict that maps categories with their full names, but I'm not sure this feature is common enough that should be included and maintained in the stdlib. If it's added, a dict is probably enough, but a script to parse the file you mentioned and update this dict should also be included. ---------- stage: -> needs patch versions: +Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 18:55:59 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 14 Dec 2012 17:55:59 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1354792639.08.0.445639143612.issue16626@psf.upfronthosting.co.za> Message-ID: <1355507759.09.0.778272636159.issue16626@psf.upfronthosting.co.za> ?ric Araujo added the comment: Patch contains unrelated changes. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:06:13 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 14 Dec 2012 18:06:13 +0000 Subject: [issue16685] Deprecate accepting strings as arguments in audioop functions In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1355508373.63.0.129491695737.issue16685@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:14:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 14 Dec 2012 18:14:47 +0000 Subject: [issue16681] Documentation 'bidirectional category' should be 'bidirectional class' in unicodedata package In-Reply-To: <1355505934.2.0.688425095085.issue16681@psf.upfronthosting.co.za> Message-ID: <3YNKfZ3fhJzRXy@mail.python.org> Roundup Robot added the comment: New changeset 02de73bae814 by Ezio Melotti in branch '2.7': #16681: use "bidirectional class" instead of "bidirectional category". http://hg.python.org/cpython/rev/02de73bae814 New changeset 97688292bfe5 by Ezio Melotti in branch '3.2': #16681: use "bidirectional class" instead of "bidirectional category". http://hg.python.org/cpython/rev/97688292bfe5 New changeset e9d59cca31fc by Ezio Melotti in branch '2.7': #16681: use "bidirectional class" instead of "bidirectional category" in the docstring too. http://hg.python.org/cpython/rev/e9d59cca31fc New changeset f34d3ba955d1 by Ezio Melotti in branch '3.2': #16681: use "bidirectional class" instead of "bidirectional category" in the docstring too. http://hg.python.org/cpython/rev/f34d3ba955d1 New changeset d8218745c24a by Ezio Melotti in branch '3.3': #16681: merge with 3.2. http://hg.python.org/cpython/rev/d8218745c24a New changeset 39263bb0ef4c by Ezio Melotti in branch 'default': #16681: merge with 3.3. http://hg.python.org/cpython/rev/39263bb0ef4c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:15:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 18:15:07 +0000 Subject: [issue16686] audioop overflow issues Message-ID: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The audioop module has some issues with an overflow. 1. It uses post-checks for an integer overflow. This means using an undefined behavior. 2. When the result truncated in case of overflow, -maxval used as minimal value. But real minimum value is less (-maxval - 1). This means not using full possible range and causes an odd result of some operations (for example add(b'\x80', '\x00', 1) returns b'\x81'). 3. Some operations (for example bias()) does not truncating and just overflow. 4. lin2lin() conversion from 4 to 4 (should do nothing) loses 16 lowest bits. ---------- components: Extension Modules messages: 177482 nosy: mark.dickinson, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: audioop overflow issues type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:15:50 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 14 Dec 2012 18:15:50 +0000 Subject: [issue16681] Documentation 'bidirectional category' should be 'bidirectional class' in unicodedata package In-Reply-To: <1355505934.2.0.688425095085.issue16681@psf.upfronthosting.co.za> Message-ID: <1355508950.89.0.386260339081.issue16681@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: -> ezio.melotti components: +Documentation resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:20:24 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 14 Dec 2012 18:20:24 +0000 Subject: [issue16683] Resort audioop documentation In-Reply-To: <1355506291.98.0.0406500704965.issue16683@psf.upfronthosting.co.za> Message-ID: <3YNKn40yCmzNjb@mail.python.org> Roundup Robot added the comment: New changeset e451901e6243 by Ezio Melotti in branch '2.7': #16683: restore alphabetical order in audioop docs. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/e451901e6243 New changeset 5777ac884919 by Ezio Melotti in branch '3.2': #16683: restore alphabetical order in audioop docs. Patch by Serhiy Storchaka. http://hg.python.org/cpython/rev/5777ac884919 New changeset a1ffb6c68711 by Ezio Melotti in branch '3.3': #16683: merge with 3.2. http://hg.python.org/cpython/rev/a1ffb6c68711 New changeset f32f67d26035 by Ezio Melotti in branch 'default': #16683: merge with 3.3. http://hg.python.org/cpython/rev/f32f67d26035 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:20:58 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 14 Dec 2012 18:20:58 +0000 Subject: [issue16683] Resort audioop documentation In-Reply-To: <1355506291.98.0.0406500704965.issue16683@psf.upfronthosting.co.za> Message-ID: <1355509258.73.0.208210614739.issue16683@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:21:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 18:21:07 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1355507759.09.0.778272636159.issue16626@psf.upfronthosting.co.za> Message-ID: <1355509650.16688.1.camel@raxxla> Serhiy Storchaka added the comment: > Patch contains unrelated changes. Sorry, my fault. Here is a cleaned patch. ---------- Added file: http://bugs.python.org/file28314/glob_magic_in_drive.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r ece75a3b942c Lib/glob.py --- a/Lib/glob.py Wed Dec 05 17:59:29 2012 +0200 +++ b/Lib/glob.py Thu Dec 06 13:07:58 2012 +0200 @@ -28,7 +28,7 @@ if not dirname: yield from glob1(None, basename) return - if has_magic(dirname): + if dirname != pathname and has_magic(dirname): dirs = iglob(dirname) else: dirs = [dirname] From report at bugs.python.org Fri Dec 14 19:22:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 18:22:08 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1354792639.08.0.445639143612.issue16626@psf.upfronthosting.co.za> Message-ID: <1355509328.92.0.444253273775.issue16626@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28221/glob_magic_in_drive.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:22:50 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 14 Dec 2012 18:22:50 +0000 Subject: [issue16685] Deprecate accepting strings as arguments in audioop functions In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1355509370.4.0.890194505978.issue16685@psf.upfronthosting.co.za> Ezio Melotti added the comment: What happens if you pass strings? If it doesn't work we can just fix it to raise an exception and stop returning random results, if it works but bytes should be used instead, we should go through a deprecation process. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:29:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 18:29:03 +0000 Subject: [issue16685] Deprecate accepting strings as arguments in audioop functions In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1355509743.26.0.457920195393.issue16685@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > What happens if you pass strings? They are encoded with UTF-8. See 's#' and 's*' formats in PyArg_ParseTuple() ('y*' recommended for bytes). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:31:05 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 14 Dec 2012 18:31:05 +0000 Subject: [issue16686] audioop overflow issues In-Reply-To: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> Message-ID: <1355509865.9.0.916931007573.issue16686@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:39:03 2012 From: report at bugs.python.org (Robin Schreiber) Date: Fri, 14 Dec 2012 18:39:03 +0000 Subject: [issue15671] PEP 3121, 384 Refactoring applied to struct module In-Reply-To: <1345041779.43.0.428829398339.issue15671@psf.upfronthosting.co.za> Message-ID: <1355510343.49.0.622162954645.issue15671@psf.upfronthosting.co.za> Robin Schreiber added the comment: Updated patch to work with 3.4 Branch version of _struct.c ---------- keywords: +patch Added file: http://bugs.python.org/file28315/_struct_pep3121-384_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:41:37 2012 From: report at bugs.python.org (Robin Schreiber) Date: Fri, 14 Dec 2012 18:41:37 +0000 Subject: [issue15690] PEP 3121, 384 Refactoring applied to parser module In-Reply-To: <1345108967.12.0.878524641332.issue15690@psf.upfronthosting.co.za> Message-ID: <1355510497.22.0.80200270431.issue15690@psf.upfronthosting.co.za> Robin Schreiber added the comment: Updated parsermodule patch to work with 3.4 Branch version. ---------- keywords: +patch Added file: http://bugs.python.org/file28316/parser_pep3121-384_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:44:58 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 14 Dec 2012 18:44:58 +0000 Subject: [issue15671] PEP 3121, 384 Refactoring applied to struct module In-Reply-To: <1345041779.43.0.428829398339.issue15671@psf.upfronthosting.co.za> Message-ID: <1355510698.04.0.895144544423.issue15671@psf.upfronthosting.co.za> Stefan Krah added the comment: Robin, if you use ... [diff] git = on ... in your .hgrc, then the bug tracker will automatically generate a Rietveld review link (At least I think that's what prevents links from being generated). ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:46:52 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 14 Dec 2012 18:46:52 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355510812.4.0.224131662778.issue16656@psf.upfronthosting.co.za> R. David Murray added the comment: Ah, I misunderstood your comment. So, listdir is returning the "correct" the filename, it's just that we can't encode it to the console encoding. So, it is working as expected within the current windows console limitations, if not in a particularly useful fashion. (That is, listdir/os.walk are *not* ignoring the international dirs.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 19:56:15 2012 From: report at bugs.python.org (Robin Schreiber) Date: Fri, 14 Dec 2012 18:56:15 +0000 Subject: [issue15691] PEP 3121, 384 Refactoring applied to posix module In-Reply-To: <1345110485.53.0.856598198463.issue15691@psf.upfronthosting.co.za> Message-ID: <1355511375.0.0.835385992734.issue15691@psf.upfronthosting.co.za> Robin Schreiber added the comment: Updated posixmodule to work with the 3.4 Branch version. ---------- keywords: +patch Added file: http://bugs.python.org/file28317/posix_pep3121-384_v1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 20:00:58 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 19:00:58 +0000 Subject: [issue16656] os.walk ignores international dirs on Windows In-Reply-To: <1355510812.4.0.224131662778.issue16656@psf.upfronthosting.co.za> Message-ID: <1355512043.16688.10.camel@raxxla> Serhiy Storchaka added the comment: > Ah, I misunderstood your comment. Ah, you misunderstood my comment right now. > So, listdir is returning the "correct" the filename, it's just that we can't encode it to the console encoding. listdir() returns already irremediably broken filename (all Cyrillic letters replaced with '?'). My test script outputs only ascii data, you see literally what you get, there is no output encoding issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 20:03:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 19:03:57 +0000 Subject: [issue16656] os.listdir() returns unusable bytes result on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355511837.02.0.54957363378.issue16656@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- title: os.walk ignores international dirs on Windows -> os.listdir() returns unusable bytes result on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 20:13:14 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 14 Dec 2012 19:13:14 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1355469717.37.0.2845225454.issue16612@psf.upfronthosting.co.za> Message-ID: <20121214191316.GA7785@sleipnir.bytereef.org> Stefan Krah added the comment: Larry Hastings wrote: > Finally, since you have not addressed it directly, let me ask you: > are you interested in Clinic having a more boilerplate-friendly macro > processing mode, with templates or recycling old entries or something? > Or do you not care? If it doesn't help you then I may as well not bother. Thanks for the offer. -- Currently I think that for me the easiest option is to add the signature information manually. So unless other people want this feature, I'd say don't bother implementing it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 20:13:41 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 14 Dec 2012 19:13:41 +0000 Subject: [issue16656] os.listdir() returns unusable bytes result on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355512421.7.0.482902994593.issue16656@psf.upfronthosting.co.za> R. David Murray added the comment: Oh, I remember Victor complaining about that behavior of Windows. I'm pretty sure it is the windows API and not python that is doing that mangling. But Victor would know for sure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 20:35:29 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 14 Dec 2012 19:35:29 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1355469717.37.0.2845225454.issue16612@psf.upfronthosting.co.za> Message-ID: <1355513637.5893.0.camel@localhost.localdomain> Antoine Pitrou added the comment: I'll ask again, do you plan to write a PEP to iron out the functional details? I don't think a tracker entry is the right format for this. Le vendredi 14 d?cembre 2012 ? 07:21 +0000, Larry Hastings a ?crit : > Larry Hastings added the comment: > > I don't think we can solve the problem of the output being too long > for your liking. Personally I like the output; I find it eminently > readable, and making it shorter would impair that. I think in the > majority of uses Clinic will be a win for readability. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:04:33 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 14 Dec 2012 20:04:33 +0000 Subject: [issue16678] optparse: parse only known options In-Reply-To: <1355473656.34.0.647093207019.issue16678@psf.upfronthosting.co.za> Message-ID: <1355515473.22.0.328869357516.issue16678@psf.upfronthosting.co.za> ?ric Araujo added the comment: I agree with David and suggest closing this as outdated. Thanks for the suggestion nonetheless. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:08:29 2012 From: report at bugs.python.org (Larry Hastings) Date: Fri, 14 Dec 2012 20:08:29 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1355515709.38.0.234744933426.issue16612@psf.upfronthosting.co.za> Larry Hastings added the comment: I have no current plan to write a PEP. I don't know how to settle the difference of opinion here; the easiest thing would be if you convinced Guido we needed one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:11:03 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 14 Dec 2012 20:11:03 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1355515863.87.0.247640968869.issue16612@psf.upfronthosting.co.za> Gregory P. Smith added the comment: There's a bit of an impasse here on the PEP front. Guido said it wasn't needed. Antoine brings up the point that CPython developers will have to live with the result of this work so maybe something more easy to read and see in one place like a PEP would be valuable... That said, I think a lot of that has been done if you look at the clinic.txt file within the patch. That already contains the meat of what would go into a PEP. What more is required? I personally think we should iterate on this via checked in code in 3.4. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:11:35 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 14 Dec 2012 20:11:35 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1355515709.38.0.234744933426.issue16612@psf.upfronthosting.co.za> Message-ID: <1355515804.5893.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > I have no current plan to write a PEP. I don't know how to settle the > difference of opinion here; the easiest thing would be if you > convinced Guido we needed one. This is silly. Nobody is opposed to you writing a PEP and a couple people would like you to do it. What needs settling exactly? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:13:12 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Fri, 14 Dec 2012 20:13:12 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1355515804.5893.1.camel@localhost.localdomain> Message-ID: Gregory P. Smith added the comment: PEPs are perceived as a hurdle. Regardless, clinic.txt would turn into one pretty easily so just doing it may be easiest. :) On Fri, Dec 14, 2012 at 12:11 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > > I have no current plan to write a PEP. I don't know how to settle the > > difference of opinion here; the easiest thing would be if you > > convinced Guido we needed one. > > This is silly. Nobody is opposed to you writing a PEP and a couple > people would like you to do it. What needs settling exactly? > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:14:54 2012 From: report at bugs.python.org (Larry Hastings) Date: Fri, 14 Dec 2012 20:14:54 +0000 Subject: [issue16656] os.listdir() returns unusable bytes result on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355516094.66.0.620561188221.issue16656@psf.upfronthosting.co.za> Larry Hastings added the comment: I'm a little confused. FindFirstFile is an ANSI API, so we get a narrow string back. We call PyBytes_FromString(), which expects a narrow string and returns a bytes object. Who's trying (and failing) to encode the filename? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:19:14 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 14 Dec 2012 20:19:14 +0000 Subject: [issue16678] optparse: parse only known options In-Reply-To: <1355473656.34.0.647093207019.issue16678@psf.upfronthosting.co.za> Message-ID: <1355516354.1.0.718879031793.issue16678@psf.upfronthosting.co.za> Andrew Svetlov added the comment: +1 for closing as "won't fix" ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:29:49 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 14 Dec 2012 20:29:49 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1355516989.79.0.137263468951.issue16612@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > That said, I think a lot of that has been done if you look at the > clinic.txt file within the patch. That already contains the meat of > what would go into a PEP. Certainly. A PEP doesn't have to be a 100% new text. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:41:36 2012 From: report at bugs.python.org (Pander) Date: Fri, 14 Dec 2012 20:41:36 +0000 Subject: [issue6331] Add unicode script info to the unicode database In-Reply-To: <1245790259.44.0.08771310344.issue6331@psf.upfronthosting.co.za> Message-ID: <1355517696.36.0.82559549058.issue6331@psf.upfronthosting.co.za> Pander added the comment: The latest version of the respective sources can be found here: https://github.com/ConradIrwin/unicodescript and here: https://github.com/simukis/unicodeblocks ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:48:12 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 14 Dec 2012 20:48:12 +0000 Subject: [issue16678] optparse: parse only known options In-Reply-To: <1355473656.34.0.647093207019.issue16678@psf.upfronthosting.co.za> Message-ID: <1355518092.29.0.825953110427.issue16678@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:55:54 2012 From: report at bugs.python.org (Jeff Knupp) Date: Fri, 14 Dec 2012 20:55:54 +0000 Subject: [issue16687] Fix small gramatical error and add reference link in hashlib documentation Message-ID: <1355518554.59.0.0791078366076.issue16687@psf.upfronthosting.co.za> New submission from Jeff Knupp: Original text is: > Feeding string objects is to update is not supported Should be "... objects in to update" instead of "is to" Also, mark "GIL" as a :term: to provide a link to its definition, as it's used without much context in the following note: > .. note:: > > For better multithreading performance, the Python :term:`GIL` is > released for strings of more than 2047 bytes at object creation or > on update. ---------- assignee: docs at python components: Documentation files: patch.txt messages: 177507 nosy: Jeff.Knupp, docs at python priority: normal severity: normal status: open title: Fix small gramatical error and add reference link in hashlib documentation versions: Python 3.5 Added file: http://bugs.python.org/file28318/patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 21:58:38 2012 From: report at bugs.python.org (Jeff Knupp) Date: Fri, 14 Dec 2012 20:58:38 +0000 Subject: [issue15743] test_urllib2/test_urllib use deprecated urllib.Request methods In-Reply-To: <1345492719.87.0.291856407657.issue15743@psf.upfronthosting.co.za> Message-ID: <1355518718.88.0.652955721239.issue15743@psf.upfronthosting.co.za> Changes by Jeff Knupp : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 22:02:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 21:02:07 +0000 Subject: [issue16656] os.listdir() returns unusable bytes result on Windows In-Reply-To: <1355516094.66.0.620561188221.issue16656@psf.upfronthosting.co.za> Message-ID: <1355519306.2581.7.camel@raxxla> Serhiy Storchaka added the comment: > Who's trying (and failing) to encode the filename? Windows. File created using Unicode API and stored UTF-16 encoded in NTFS. Windows fails to represent this filename using ANSI API. Here is a patch against 2.7 which always uses Unicode API in listdir() and tries to encode filenames to str if str argument used. ---------- keywords: +patch Added file: http://bugs.python.org/file28319/listdir_unicode-2.7.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 45cd2d816f4d Modules/posixmodule.c --- a/Modules/posixmodule.c Sun Jul 08 02:22:44 2012 -0700 +++ b/Modules/posixmodule.c Fri Dec 14 22:48:53 2012 +0200 @@ -2099,120 +2099,74 @@ PyObject *d, *v; HANDLE hFindFile; BOOL result; - WIN32_FIND_DATA FileData; char namebuf[MAX_PATH+5]; /* Overallocate for \\*.*\0 */ char *bufptr = namebuf; Py_ssize_t len = sizeof(namebuf)-5; /* only claim to have space for MAX_PATH */ - PyObject *po; - if (PyArg_ParseTuple(args, "U:listdir", &po)) { - WIN32_FIND_DATAW wFileData; - Py_UNICODE *wnamebuf; - /* Overallocate for \\*.*\0 */ - len = PyUnicode_GET_SIZE(po); - wnamebuf = malloc((len + 5) * sizeof(wchar_t)); - if (!wnamebuf) { - PyErr_NoMemory(); + PyObject *decoded = NULL; + WIN32_FIND_DATAW wFileData; + Py_UNICODE *wnamebuf; + + if (!PyArg_ParseTuple(args, "U:listdir", &po)) { + if (!PyArg_ParseTuple(args, "et#:listdir", + Py_FileSystemDefaultEncoding, &bufptr, &len)) return NULL; - } - wcscpy(wnamebuf, PyUnicode_AS_UNICODE(po)); - if (len > 0) { - Py_UNICODE wch = wnamebuf[len-1]; - if (wch != L'/' && wch != L'\\' && wch != L':') - wnamebuf[len++] = L'\\'; - wcscpy(wnamebuf + len, L"*.*"); - } - if ((d = PyList_New(0)) == NULL) { - free(wnamebuf); + po = decoded = PyUnicode_Decode(bufptr, len, + Py_FileSystemDefaultEncoding, NULL); + if (po == NULL) return NULL; - } - Py_BEGIN_ALLOW_THREADS - hFindFile = FindFirstFileW(wnamebuf, &wFileData); - Py_END_ALLOW_THREADS - if (hFindFile == INVALID_HANDLE_VALUE) { - int error = GetLastError(); - if (error == ERROR_FILE_NOT_FOUND) { - free(wnamebuf); - return d; - } - Py_DECREF(d); - win32_error_unicode("FindFirstFileW", wnamebuf); - free(wnamebuf); - return NULL; - } - do { - /* Skip over . and .. */ - if (wcscmp(wFileData.cFileName, L".") != 0 && - wcscmp(wFileData.cFileName, L"..") != 0) { - v = PyUnicode_FromUnicode(wFileData.cFileName, wcslen(wFileData.cFileName)); - if (v == NULL) { - Py_DECREF(d); - d = NULL; - break; - } - if (PyList_Append(d, v) != 0) { - Py_DECREF(v); - Py_DECREF(d); - d = NULL; - break; - } - Py_DECREF(v); - } - Py_BEGIN_ALLOW_THREADS - result = FindNextFileW(hFindFile, &wFileData); - Py_END_ALLOW_THREADS - /* FindNextFile sets error to ERROR_NO_MORE_FILES if - it got to the end of the directory. */ - if (!result && GetLastError() != ERROR_NO_MORE_FILES) { - Py_DECREF(d); - win32_error_unicode("FindNextFileW", wnamebuf); - FindClose(hFindFile); - free(wnamebuf); - return NULL; - } - } while (result == TRUE); - - if (FindClose(hFindFile) == FALSE) { - Py_DECREF(d); - win32_error_unicode("FindClose", wnamebuf); - free(wnamebuf); - return NULL; - } + } + + /* Overallocate for \\*.*\0 */ + len = PyUnicode_GET_SIZE(po); + wnamebuf = malloc((len + 5) * sizeof(wchar_t)); + if (!wnamebuf) { + Py_XDECREF(decoded); + PyErr_NoMemory(); + return NULL; + } + wcscpy(wnamebuf, PyUnicode_AS_UNICODE(po)); + if (len > 0) { + Py_UNICODE wch = wnamebuf[len-1]; + if (wch != L'/' && wch != L'\\' && wch != L':') + wnamebuf[len++] = L'\\'; + wcscpy(wnamebuf + len, L"*.*"); + } + if ((d = PyList_New(0)) == NULL) { free(wnamebuf); - return d; - } - /* Drop the argument parsing error as narrow strings - are also valid. */ - PyErr_Clear(); - - if (!PyArg_ParseTuple(args, "et#:listdir", - Py_FileSystemDefaultEncoding, &bufptr, &len)) - return NULL; - if (len > 0) { - char ch = namebuf[len-1]; - if (ch != SEP && ch != ALTSEP && ch != ':') - namebuf[len++] = '/'; - strcpy(namebuf + len, "*.*"); - } - - if ((d = PyList_New(0)) == NULL) - return NULL; - + Py_XDECREF(decoded); + return NULL; + } Py_BEGIN_ALLOW_THREADS - hFindFile = FindFirstFile(namebuf, &FileData); + hFindFile = FindFirstFileW(wnamebuf, &wFileData); Py_END_ALLOW_THREADS if (hFindFile == INVALID_HANDLE_VALUE) { int error = GetLastError(); - if (error == ERROR_FILE_NOT_FOUND) + if (error == ERROR_FILE_NOT_FOUND) { + free(wnamebuf); + Py_XDECREF(decoded); return d; + } Py_DECREF(d); - return win32_error("FindFirstFile", namebuf); + win32_error_unicode("FindFirstFileW", wnamebuf); + free(wnamebuf); + Py_XDECREF(decoded); + return NULL; } do { /* Skip over . and .. */ - if (strcmp(FileData.cFileName, ".") != 0 && - strcmp(FileData.cFileName, "..") != 0) { - v = PyString_FromString(FileData.cFileName); + if (wcscmp(wFileData.cFileName, L".") != 0 && + wcscmp(wFileData.cFileName, L"..") != 0) { + len = wcslen(wFileData.cFileName); + if (decoded) { + v = PyUnicode_Encode(wFileData.cFileName, len, + Py_FileSystemDefaultEncoding, NULL); + if (v == NULL) + PyErr_Clear(); + v = PyUnicode_FromUnicode(wFileData.cFileName, len); + } + else + v = PyUnicode_FromUnicode(wFileData.cFileName, len); if (v == NULL) { Py_DECREF(d); d = NULL; @@ -2227,23 +2181,29 @@ Py_DECREF(v); } Py_BEGIN_ALLOW_THREADS - result = FindNextFile(hFindFile, &FileData); + result = FindNextFileW(hFindFile, &wFileData); Py_END_ALLOW_THREADS /* FindNextFile sets error to ERROR_NO_MORE_FILES if it got to the end of the directory. */ if (!result && GetLastError() != ERROR_NO_MORE_FILES) { Py_DECREF(d); - win32_error("FindNextFile", namebuf); + win32_error_unicode("FindNextFileW", wnamebuf); FindClose(hFindFile); + free(wnamebuf); + Py_XDECREF(decoded); return NULL; } } while (result == TRUE); if (FindClose(hFindFile) == FALSE) { Py_DECREF(d); - return win32_error("FindClose", namebuf); - } - + win32_error_unicode("FindClose", wnamebuf); + free(wnamebuf); + Py_XDECREF(decoded); + return NULL; + } + free(wnamebuf); + Py_XDECREF(decoded); return d; #elif defined(PYOS_OS2) From report at bugs.python.org Fri Dec 14 22:05:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 21:05:22 +0000 Subject: [issue16656] os.listdir() returns unusable bytes result on Windows In-Reply-To: <1355519306.2581.7.camel@raxxla> Message-ID: <1355519505.2581.10.camel@raxxla> Serhiy Storchaka added the comment: I can't test (and even compile) the patch as I don't have a Windows, please test it for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 22:20:01 2012 From: report at bugs.python.org (Pander) Date: Fri, 14 Dec 2012 21:20:01 +0000 Subject: [issue16684] Unicode property value abbreviated names and long names In-Reply-To: <1355506392.97.0.314398568458.issue16684@psf.upfronthosting.co.za> Message-ID: <1355520001.15.0.0129616207464.issue16684@psf.upfronthosting.co.za> Pander added the comment: I myself have a lot of Python applications that process font files and interact with fonttools and FontForge, which are both written in Python too. As you also have your own dict for this purpose and probably other people too, it would be justified to add these three small dicts in the standard lib. Especially since this package in the standard lib follows the definitions from Unicode Consortium. When this is shipped in one package developers will always have an in sync translation from abbreviated names to long names and vice versa. Over the last years I needed to adjust my dicts regularly for the added definitions by Unicode Consortium which are supported by stdlib. At the moment, translation from Unicode codes U+1234 to human-readable Unicode names and vice versa is offered at the moment. Providing human-readable names for the property values is a service of the same level and will be catering to approximately the same user group. If you agree that these dicts can be added I am willing to provide a script that will parse the aforementioned file. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 22:21:47 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2012 21:21:47 +0000 Subject: [issue16656] os.listdir() returns unusable bytes result on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355520107.98.0.638649160291.issue16656@psf.upfronthosting.co.za> STINNER Victor added the comment: On Windows with Python 2, unencodable characters are replaced with "?". It is the default behaviour of WideCharToMultiByte() and so all ANSI functions have this behaviour. Python doesn't try to behave differently, it just exposes system function as Python functions. So for example, os.listdir(bytes) returns filename with "?" if some characters are not encodable to the ANSI codepage. It's a choice in the design of Windows. > This critical bug is one of the reasons that non-English speaking > communities doesn't adopt Python as broadly as it happens in > English world compared to other technologies (PHP etc.). I don't understand this point. PHP doesn't have a Unicode type, I'm quite sure that PHP have exactly the same issue. And this issue is only solved in Python 3... except if you explicitly uses a bytes filename (for os.listdir/os.walk), but the bytes filename API has been deprecated in Python 3.3. In Python 2, you can use Unicode filenames to workaround this issue. But it doesn't work as well as Python 3: on UNIX, you will get a similar issue with undecodable filenames (which is the opposite of unencodable filenames). Read my book for more information: https://github.com/haypo/unicode_book/wiki -- About listdir_unicode-2.7.patch: Python chose to work as Windows with unencodable characters. If you want to change the behaviour, you must change *all* calls to the Windows ANSI API (which is not trivial). Anyway, as I wrote, the bytes API is deprecated for filenames in Python 3.3. I prefer to not change anything in Python 2, because it may break existing applications. For example, os.listdir(bytes) doesn't fail in Python 2.7 with unencodable names, whereas it fails with your patch. Nothing interesting in this issue, I'm closing it. If your consider the redirection issue important, please open a new issue. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 22:21:55 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2012 21:21:55 +0000 Subject: [issue16656] os.listdir() returns unusable bytes result on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355520115.77.0.464373902596.issue16656@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- resolution: -> wont fix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 22:23:59 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2012 21:23:59 +0000 Subject: [issue16656] os.listdir() returns unusable bytes result on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355520239.95.0.235764368471.issue16656@psf.upfronthosting.co.za> STINNER Victor added the comment: > And this issue is only solved in Python 3... Ooops, I mean: this issue is *already* solved in Python 3 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 22:27:11 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2012 21:27:11 +0000 Subject: [issue16685] Deprecate accepting strings as arguments in audioop functions In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1355520431.15.0.806633219526.issue16685@psf.upfronthosting.co.za> STINNER Victor added the comment: Accepting Unicode strings is surprising and must fail. I don't think that a deprecation process is required here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 22:33:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 21:33:34 +0000 Subject: [issue16656] os.listdir() returns unusable bytes result on Windows In-Reply-To: <1355520107.98.0.638649160291.issue16656@psf.upfronthosting.co.za> Message-ID: <1355521195.2581.15.camel@raxxla> Serhiy Storchaka added the comment: > For example, os.listdir(bytes) doesn't fail in Python 2.7 with unencodable names, whereas it fails with your patch. No. The purpose of this patch is that it doesn't fail and should return a usable result. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 22:37:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 21:37:51 +0000 Subject: [issue16685] Deprecate accepting strings as arguments in audioop functions In-Reply-To: <1355520431.15.0.806633219526.issue16685@psf.upfronthosting.co.za> Message-ID: <1355521455.2581.17.camel@raxxla> Serhiy Storchaka added the comment: > Accepting Unicode strings is surprising and must fail. I don't think that a deprecation process is required here. Should it be fixed in 3.4 only or in all 3.x? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 22:41:47 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 14 Dec 2012 21:41:47 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1355521307.14.0.731327977283.issue16612@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 22:43:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 14 Dec 2012 21:43:21 +0000 Subject: [issue16685] Deprecate accepting strings as arguments in audioop functions In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1355521401.19.0.413712224718.issue16685@psf.upfronthosting.co.za> Ezio Melotti added the comment: The deprecation process can be avoided only if passing strings results in a meaningless result. If there are cases where users are passing strings and everything works fine -- even if they should be passing bytes instead -- we should deprecate strings first to warn the users that the "feature" is going to be removed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 22:51:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 14 Dec 2012 21:51:59 +0000 Subject: [issue16685] Deprecate accepting strings as arguments in audioop functions In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1355521919.73.0.0434147823088.issue16685@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In 2.x it was have a little sense (if you use some 8-bit encoding as default encoding, but the default was 7-bit ascii). But with utf-8 it doesn't have sense and should quickly lead to an unexpected result (or just fail in most cases). ---------- dependencies: +Document that audioop works with bytes, not strings _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 23:19:34 2012 From: report at bugs.python.org (pyos) Date: Fri, 14 Dec 2012 22:19:34 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. Message-ID: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> New submission from pyos: The title says it all: if a regular expression that makes use of backreferences is compiled with `re.I` flag, it will always fail when matched against a string that contains characters outside of U+0000-U+00FF range. I've been unable to further narrow the bug down. A simple example: >>> import re >>> r = re.compile(r'(a)\1', re.I) # should match "aa", "aA", "Aa", or "AA" >>> r.findall('aa') # works as expected ['a'] >>> r.findall('aa bcd') # still works ['a'] >>> r.findall('aa ?') # ord('?') == 0x0100 [] The same code works as expected in Python 3.2: >>> r.findall('aa ?') ['a'] ---------- components: Regular Expressions messages: 177518 nosy: ezio.melotti, mrabarnett, pitrou, pyos priority: normal severity: normal status: open title: Backreferences make case-insensitive regex fail on non-ASCII strings. type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 23:20:52 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2012 22:20:52 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355523652.89.0.370957255217.issue16688@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 23:21:17 2012 From: report at bugs.python.org (STINNER Victor) Date: Fri, 14 Dec 2012 22:21:17 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355523677.68.0.793605233774.issue16688@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 14 23:30:04 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 14 Dec 2012 22:30:04 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355524204.5.0.44853951691.issue16688@psf.upfronthosting.co.za> Ezio Melotti added the comment: It works on 2.7 too, and fails on 3.3/3.x. Maybe it's related to PEP 393? ---------- versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 00:38:10 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 14 Dec 2012 23:38:10 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355528290.02.0.55991309264.issue16651@psf.upfronthosting.co.za> Terry J. Reedy added the comment: itertools should be fairly easy as the docs already contain Python equivalents (or near equivalents). ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 00:47:59 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Fri, 14 Dec 2012 23:47:59 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355528879.75.0.712441579846.issue16688@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 00:51:06 2012 From: report at bugs.python.org (Philip Jenvey) Date: Fri, 14 Dec 2012 23:51:06 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355529066.4.0.123179402859.issue16651@psf.upfronthosting.co.za> Philip Jenvey added the comment: PyPy had a pure python itertools until recently (it's been deleted): https://bitbucket.org/pypy/pypy/src/c1aa74c06e86/lib_pypy/itertools.py?at=py3k ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 01:00:21 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 15 Dec 2012 00:00:21 +0000 Subject: [issue16685] Deprecate accepting strings as arguments in audioop functions In-Reply-To: <1355521919.73.0.0434147823088.issue16685@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > Should it be fixed in 3.4 only or in all 3.x? Such change cannot be done in a minor release (like 3.3.x), so it can only be done in Python 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 01:41:26 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sat, 15 Dec 2012 00:41:26 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355532086.96.0.798449802893.issue16688@psf.upfronthosting.co.za> Matthew Barnett added the comment: In function SRE_MATCH, the code for SRE_OP_GROUPREF (line 1290) contains this: while (p < e) { if (ctx->ptr >= end || SRE_CHARGET(state, ctx->ptr, 0) != SRE_CHARGET(state, p, 0)) RETURN_FAILURE; p += state->charsize; ctx->ptr += state->charsize; } However, the code for SRE_OP_GROUPREF_IGNORE (line 1316) contains this: while (p < e) { if (ctx->ptr >= end || state->lower(SRE_CHARGET(state, ctx->ptr, 0)) != state->lower(*p)) RETURN_FAILURE; p++; ctx->ptr += state->charsize; } (In both cases 'p' is of type 'char*'.) The problem appears to be that the latter is still using '*p' and 'p++' and is thus always working with chars (it gets and advances 1 byte at a time instead of 1, 2 or 4 bytes for Unicode). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 01:41:36 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Dec 2012 00:41:36 +0000 Subject: [issue16655] IDLE list.append calltips test failures In-Reply-To: <1355106680.63.0.980843765647.issue16655@psf.upfronthosting.co.za> Message-ID: <1355532096.83.0.291833494454.issue16655@psf.upfronthosting.co.za> Terry J. Reedy added the comment: In 3.2.3 >>> list.append.__doc__ 'L.append(object) -- append object to end' In 3.3.0 >>> list.append.__doc__ 'L.append(object) -> None -- append object to end' I checked the other 6 pure mutation methods. .sort, .extend, .remove, and the new .clear have the same new addition of ' -> None'. .insert and .reverse do not (but it seems they should). It seems I pushed the June 7 #12510 patch -- msg162510 -- which added the .append tests, without properly testing in 3.2. A fix for 3.2 is easy, but the deeper issue is the fragility of comparing external text to hard-coded expected text. I knew when I wrote the tests that that could and would be a problem in the future, but did not notice that it already was. One solution is not to compare again external strings; but then how do we know that the tooltips work with such? Another is to fetch the external string in the test code, but that amounts to duplicating the code in the tooltip function and testing it against itself; so is it really a test? The third option is to leave the tests vulnerable and patch them in a version specific manner when they break. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 01:56:58 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 15 Dec 2012 00:56:58 +0000 Subject: [issue16689] stdout stderr redirection mess Message-ID: <1355533013.89.0.974705743737.issue16689@psf.upfronthosting.co.za> New submission from anatoly techtonik: Tested on Windows. When Python output is redirected with: > py test_unicode_fname.py > test.log 2>&1 In Python 2.7 the traceback is at the end of file, in Python 3.3 it is at the beginning. In should be in the middle, and it appears on the screen correctly. >From issue16656. ---------- files: test_unicode_fname.py messages: 177525 nosy: techtonik priority: normal severity: normal status: open title: stdout stderr redirection mess versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28320/test_unicode_fname.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 02:14:53 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 15 Dec 2012 01:14:53 +0000 Subject: [issue16656] os.listdir() returns unusable bytes result on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355534093.83.0.275348042757.issue16656@psf.upfronthosting.co.za> anatoly techtonik added the comment: haypo didn't understood the main user story for this ticket and closed it, so I reopen it with simplified user story. """As a developer, I want Python os.listdir('.') function return all directories in current directory on Windows, not matter how international they are, in the same way as other Windows applications return them. I want returned name to be normal string, but reuseable in subsequent functions, so that I can query stats for this dir or CD to it. It doesn't matter how this name is binary represented. It can be quoted, in UTF-8 byte code or whatever - I don't care as long as I can access the same name from the same session.""" ---------- resolution: wont fix -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 02:39:25 2012 From: report at bugs.python.org (Bradley Froehle) Date: Sat, 15 Dec 2012 01:39:25 +0000 Subject: [issue16690] Reference leak with custom tp_dealloc in PyType_FromSpec Message-ID: <1355535565.73.0.312355807055.issue16690@psf.upfronthosting.co.za> New submission from Bradley Froehle: There is a reference leak when using PyType_FromSpec with custom tp_dealloc. This was first noted in issue #15142, where a fix was given which only applies to types which do not override tp_dealloc. For example, the xxlimited.Xxo type suffers from this: Python 3.3.0 (default, Oct 26 2012, 11:06:17) [GCC 4.6.3] on linux Type "help", "copyright", "credits" or "license" for more information. >>> import xxlimited >>> import sys >>> Xxo = type(xxlimited.new()) >>> e = Xxo() >>> sys.getrefcount(Xxo) 7 >>> e = Xxo() >>> sys.getrefcount(Xxo) 8 >>> e = Xxo() >>> sys.getrefcount(Xxo) 9 ---------- components: Interpreter Core messages: 177527 nosy: bfroehle priority: normal severity: normal status: open title: Reference leak with custom tp_dealloc in PyType_FromSpec type: resource usage versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 03:06:20 2012 From: report at bugs.python.org (Bradley Froehle) Date: Sat, 15 Dec 2012 02:06:20 +0000 Subject: [issue16690] Reference leak with custom tp_dealloc in PyType_FromSpec In-Reply-To: <1355535565.73.0.312355807055.issue16690@psf.upfronthosting.co.za> Message-ID: <1355537180.77.0.322722527165.issue16690@psf.upfronthosting.co.za> Bradley Froehle added the comment: I see this issue came up in the course of #15653 as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 03:54:57 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 15 Dec 2012 02:54:57 +0000 Subject: [issue16477] tarfile fails to close file handles in case of exception In-Reply-To: <1352983787.27.0.404679122442.issue16477@psf.upfronthosting.co.za> Message-ID: <1355540097.06.0.203135587519.issue16477@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 03:55:15 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 15 Dec 2012 02:55:15 +0000 Subject: [issue16333] Trailing whitespace in json dump when using indent In-Reply-To: <1351286712.61.0.639993947204.issue16333@psf.upfronthosting.co.za> Message-ID: <1355540115.58.0.691263318183.issue16333@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 03:57:40 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sat, 15 Dec 2012 02:57:40 +0000 Subject: [issue16483] Make int(float('inf')) raise ValueError rather than OverflowError. In-Reply-To: <1353014232.58.0.902552345028.issue16483@psf.upfronthosting.co.za> Message-ID: <1355540260.61.0.514873811654.issue16483@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 06:05:05 2012 From: report at bugs.python.org (David Wolf) Date: Sat, 15 Dec 2012 05:05:05 +0000 Subject: [issue16691] How to use ctypes.windll.user32.MessageBoxW Message-ID: <1355547905.83.0.364744647491.issue16691@psf.upfronthosting.co.za> New submission from David Wolf: import ctypes ctypes.windll.user32.MessageBoxW(0,"Time's up!","Message",0) My quention is that I want to set my message box topmost. It's said I just need to change the first parameter, but I don't know how I should change it. Help me please! I've been working on this for an hour. ---------- components: ctypes messages: 177529 nosy: David.Wolf priority: normal severity: normal status: open title: How to use ctypes.windll.user32.MessageBoxW type: resource usage versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 06:57:21 2012 From: report at bugs.python.org (Ned Deily) Date: Sat, 15 Dec 2012 05:57:21 +0000 Subject: [issue16691] How to use ctypes.windll.user32.MessageBoxW In-Reply-To: <1355547905.83.0.364744647491.issue16691@psf.upfronthosting.co.za> Message-ID: <1355551041.01.0.739011412252.issue16691@psf.upfronthosting.co.za> Ned Deily added the comment: Sorry, this bug tracker is for reporting problems with Python itself. Try asking on support forums, like the general comp.lang.python newsgroup/mailing list (http://www.python.org/community/lists/) or the more specialized python-win32 list (http://mail.python.org/mailman/listinfo/python-win32) or possibly http://stackoverflow.com. ---------- nosy: +ned.deily resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 09:19:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2012 08:19:26 +0000 Subject: [issue16686] audioop overflow issues In-Reply-To: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> Message-ID: <1355559566.36.0.79684103212.issue16686@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: 5. max(b'\x00\x00\x00\x80', 4) returns 0 (on little-endian). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 09:27:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2012 08:27:43 +0000 Subject: [issue16685] Deprecate accepting strings as arguments in audioop functions In-Reply-To: <1355506655.59.0.00344503753899.issue16685@psf.upfronthosting.co.za> Message-ID: <1355560063.8.0.154016021324.issue16685@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +easy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 09:37:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2012 08:37:27 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355560647.0.0.84839887487.issue16688@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good analysis, Matthew. Are you want to submit a patch? ---------- keywords: +easy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 12:44:28 2012 From: report at bugs.python.org (Roumen Petrov) Date: Sat, 15 Dec 2012 11:44:28 +0000 Subject: [issue3871] cross and native build of python for mingw* hosts In-Reply-To: <1355503882.51.0.285722537036.issue3871@psf.upfronthosting.co.za> Message-ID: <50CC6299.8080600@roumenpetrov.info> Roumen Petrov added the comment: Jason Huntley wrote: .... > patch -t -p1 < python-py3k-20120729-MINGW.patch Please run autoheader (optional) and autoconf (required . > ./configure --host=x86_64-w64-mingw32 --build=x86_64-w64-mingw32 --prefix=/mingw ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 13:45:19 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Sat, 15 Dec 2012 12:45:19 +0000 Subject: [issue16656] os.listdir() returns unusable bytes result on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355575519.47.0.332143006256.issue16656@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Anatoly, - in Python2.7, try this: print repr(os.listdir(u'.')) - in Python3, try this: print(ascii(os.listdir('.'))) Do the commands above work correctly? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 15:46:41 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 14:46:41 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1355582801.92.0.863437781784.issue16421@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed it looks like this commit may be the culprit for numerous buildbot failures. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 15:48:16 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 14:48:16 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1355582896.52.0.686618711669.issue16421@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Naming the test modules "foo" and "bar" was perhaps not the best idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 16:23:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Dec 2012 15:23:10 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <3YNsp56xs5zRcp@mail.python.org> Roundup Robot added the comment: New changeset 2e492a9a1845 by Andrew Svetlov in branch 'default': Rename test module names for #16421 to don't clash with other tests. http://hg.python.org/cpython/rev/2e492a9a1845 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 16:43:31 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 15:43:31 +0000 Subject: [issue16672] improve tracing performances when f_trace is NULL In-Reply-To: <1355348258.81.0.121484844419.issue16672@psf.upfronthosting.co.za> Message-ID: <1355586211.72.0.607548725755.issue16672@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +belopolsky, georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 16:45:51 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 15:45:51 +0000 Subject: [issue16690] Reference leak with custom tp_dealloc in PyType_FromSpec In-Reply-To: <1355535565.73.0.312355807055.issue16690@psf.upfronthosting.co.za> Message-ID: <1355586351.73.0.471259458905.issue16690@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +Robin.Schreiber, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 17:28:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Dec 2012 16:28:40 +0000 Subject: [issue16421] importlib.machinery.ExtensionFileLoader cannot load several modules from the same shared object In-Reply-To: <1352212973.28.0.0255386645646.issue16421@psf.upfronthosting.co.za> Message-ID: <1355588920.68.0.841437110267.issue16421@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Antoine, you are right: foo and bar was bad names. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 18:13:50 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 17:13:50 +0000 Subject: [issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever In-Reply-To: <1350905552.38.0.183421910215.issue16298@psf.upfronthosting.co.za> Message-ID: <1355591630.38.0.978543430703.issue16298@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Sorry for the delay. I am not sure I understand your concern here: > If the user reads the exact amount of bytes the server sent, read() on > the socket will never have a chance to return '' and inform the user > about the connection termination. Certainly read(), called once again, would return ''? That's how I understand your unit test anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 18:23:26 2012 From: report at bugs.python.org (Eran Rundstein) Date: Sat, 15 Dec 2012 17:23:26 +0000 Subject: [issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever In-Reply-To: <1350905552.38.0.183421910215.issue16298@psf.upfronthosting.co.za> Message-ID: <1355592206.61.0.0305480198425.issue16298@psf.upfronthosting.co.za> Eran Rundstein added the comment: Hm, it's been a while and I'm no longer sure :( You're right - since there is no length the user will have to call read() until he gets back ''. It's possible I forgot that assumption when speculating about this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 18:31:05 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 17:31:05 +0000 Subject: [issue16692] Support TLS 1.1 and TLS 1.2 Message-ID: <1355592665.89.0.539973629387.issue16692@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Recent OpenSSL versions (e.g. 1.0.1c) have explicit support for TLS 1.1 and (presumably, although undocumented-ly) TLS 1.2 through TLSv1_1_method() and TLSv1_2_method(). It should be easy to add such support to the ssl module (although figuring out how exactly protocol version compatibility is handled - for the docs - might be a challenge). ---------- components: Library (Lib) keywords: easy messages: 177541 nosy: pitrou priority: normal severity: normal stage: needs patch status: open title: Support TLS 1.1 and TLS 1.2 type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 18:35:48 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 15 Dec 2012 17:35:48 +0000 Subject: [issue16692] Support TLS 1.1 and TLS 1.2 In-Reply-To: <1355592665.89.0.539973629387.issue16692@psf.upfronthosting.co.za> Message-ID: <1355592948.36.0.957373726771.issue16692@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 18:40:43 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 15 Dec 2012 17:40:43 +0000 Subject: [issue16693] Assertion error in ceval if Chainmap(object()) used as locals in eval Message-ID: <1355593243.44.0.295822676062.issue16693@psf.upfronthosting.co.za> New submission from R. David Murray: >>> import collections [61531 refs, 20955 blocks] >>> eval('foo', {}, collections.ChainMap(object())) python: Python/ceval.c:2996: PyEval_EvalFrameEx: Assertion `0' failed. zsh: abort ./python ---------- messages: 177542 nosy: r.david.murray, rhettinger priority: normal severity: normal stage: needs patch status: open title: Assertion error in ceval if Chainmap(object()) used as locals in eval type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 18:47:56 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 15 Dec 2012 17:47:56 +0000 Subject: [issue16693] Assertion error in ceval if Chainmap(object()) used as locals in eval In-Reply-To: <1355593243.44.0.295822676062.issue16693@psf.upfronthosting.co.za> Message-ID: <1355593676.61.0.716979895065.issue16693@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> benjamin.peterson nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 18:51:17 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Dec 2012 17:51:17 +0000 Subject: [issue16693] Assertion error in ceval if Chainmap(object()) used as locals in eval In-Reply-To: <1355593243.44.0.295822676062.issue16693@psf.upfronthosting.co.za> Message-ID: <3YNx5071GnzQmB@mail.python.org> Roundup Robot added the comment: New changeset bb6fd6f021e7 by Benjamin Peterson in branch 'default': use error label instead of breaking eval loop (closes #16693) http://hg.python.org/cpython/rev/bb6fd6f021e7 ---------- nosy: +python-dev resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 18:57:40 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 17:57:40 +0000 Subject: [issue8109] Server-side support for TLS Server Name Indication extension In-Reply-To: <1268234047.5.0.702223567094.issue8109@psf.upfronthosting.co.za> Message-ID: <1355594259.99.0.290928015103.issue8109@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've posted a few more comments. As for cyclic garbage collection, it's explained a bit there: http://docs.python.org/dev/extending/newtypes.html#supporting-cyclic-garbage-collection If it isn't very clear to you, I can still handle it myself, though. Those docs aren't the best. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 19:01:09 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Dec 2012 18:01:09 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1355594469.54.0.562635937319.issue16597@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 19:01:55 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 15 Dec 2012 18:01:55 +0000 Subject: [issue16601] Restarting iteration over tarfile continues from where it left off. In-Reply-To: <1354564872.87.0.0661195327337.issue16601@psf.upfronthosting.co.za> Message-ID: <1355594515.83.0.112942208242.issue16601@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 19:28:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Dec 2012 18:28:23 +0000 Subject: [issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever In-Reply-To: <1350905552.38.0.183421910215.issue16298@psf.upfronthosting.co.za> Message-ID: <3YNxvp41vVzRdv@mail.python.org> Roundup Robot added the comment: New changeset 2186f7b99c28 by Antoine Pitrou in branch '2.7': Issue #16298: In HTTPResponse.read(), close the socket when there is no Content-Length and the incoming stream is finished. http://hg.python.org/cpython/rev/2186f7b99c28 New changeset b47d342c449b by Antoine Pitrou in branch '3.2': Issue #16298: In HTTPResponse.read(), close the socket when there is no Content-Length and the incoming stream is finished. http://hg.python.org/cpython/rev/b47d342c449b New changeset 59358f991c00 by Antoine Pitrou in branch '3.3': Issue #16298: In HTTPResponse.read(), close the socket when there is no Content-Length and the incoming stream is finished. http://hg.python.org/cpython/rev/59358f991c00 New changeset 5d6c2c7bc5d4 by Antoine Pitrou in branch 'default': Issue #16298: In HTTPResponse.read(), close the socket when there is no Content-Length and the incoming stream is finished. http://hg.python.org/cpython/rev/5d6c2c7bc5d4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 19:30:17 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 18:30:17 +0000 Subject: [issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever In-Reply-To: <1350905552.38.0.183421910215.issue16298@psf.upfronthosting.co.za> Message-ID: <1355596217.62.0.512313533659.issue16298@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, the patch looked fine to me, so I've committed it to 2.7 and adapted it for 3.x. Thank you! By the way, it's probably easier to produce patches using Mercurial rather than using manual `diff`. You can have a look at the devguide for more information: http://docs.python.org/devguide/ ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 19:33:08 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Dec 2012 18:33:08 +0000 Subject: [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1355596388.46.0.0217599275237.issue16665@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 19:53:40 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 18:53:40 +0000 Subject: [issue16664] [PATCH] Test Glob: files starting with . In-Reply-To: <1355250332.3.0.793167258455.issue16664@psf.upfronthosting.co.za> Message-ID: <1355597620.06.0.251358981132.issue16664@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch looks good to me. The docs may need improving but that's a separate concern. (also, the current behaviour is reasonable, and there is certainly existing code relying on it) ---------- nosy: +hynek, pitrou, tarek stage: -> commit review versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 19:56:56 2012 From: report at bugs.python.org (Eran Rundstein) Date: Sat, 15 Dec 2012 18:56:56 +0000 Subject: [issue16298] httplib.HTTPResponse.read could potentially leave the socket opened forever In-Reply-To: <1350905552.38.0.183421910215.issue16298@psf.upfronthosting.co.za> Message-ID: <1355597816.13.0.0968589720626.issue16298@psf.upfronthosting.co.za> Eran Rundstein added the comment: My pleasure. I had no idea about the Mercurial patch, this is the first time I have submitted a Python bug report :) I'll have a look. Thanks for merging the fix! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 19:57:30 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 18:57:30 +0000 Subject: [issue16555] Add es_cu to locale aliases In-Reply-To: <1353900143.47.0.688085135262.issue16555@psf.upfronthosting.co.za> Message-ID: <1355597850.13.0.0618631919873.issue16555@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 20:05:47 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 19:05:47 +0000 Subject: [issue14266] pyunit script as shorthand for python -m unittest In-Reply-To: <1331586037.12.0.876793471383.issue14266@psf.upfronthosting.co.za> Message-ID: <1355598347.87.0.294912674096.issue14266@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Berker's proposed implementation looks weird to me. Why the "__unittest" variable? Also, it would be better to make unittest's API more flexible, rather than manually tweaking sys.argv to enable discovery. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 20:07:13 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 19:07:13 +0000 Subject: [issue16646] FTP.makeport() loses socket error details In-Reply-To: <1354992688.45.0.00340883588323.issue16646@psf.upfronthosting.co.za> Message-ID: <1355598433.9.0.378601411833.issue16646@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 20:15:18 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 19:15:18 +0000 Subject: [issue10640] SystemError on pickling bytes >= 4GB In-Reply-To: <1291663989.87.0.429691501814.issue10640@psf.upfronthosting.co.za> Message-ID: <1355598918.13.0.582006742267.issue10640@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It should actually have been fixed in issue 11564. Please reopen if you can reproduce with a recent 3.x Python. ---------- resolution: -> duplicate status: pending -> closed superseder: -> pickle not 64-bit ready _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 20:27:12 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 19:27:12 +0000 Subject: [issue4555] Smelly exports (global symbols in python not prefixed with Py or _Py) In-Reply-To: <1228526950.62.0.716618083363.issue4555@psf.upfronthosting.co.za> Message-ID: <1355599632.91.0.621751499417.issue4555@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This very simple patch should certainly be applied. ---------- assignee: -> dmalcolm stage: patch review -> commit review versions: +Python 2.7 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 20:28:58 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 19:28:58 +0000 Subject: [issue16550] pickletools.py treats 32bit lengths as signed, but pickle.py as unsigned In-Reply-To: <1353845836.76.0.0245039537422.issue16550@psf.upfronthosting.co.za> Message-ID: <1355599738.69.0.868283911831.issue16550@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Does it need additional tests? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 20:38:52 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 19:38:52 +0000 Subject: [issue16203] Proposal: add re.fullmatch() method In-Reply-To: <1349991042.0.0.875123830426.issue16203@psf.upfronthosting.co.za> Message-ID: <1355600332.62.0.921455588639.issue16203@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the patch. While an internal flag may be a reasonable implementation strategy, IMHO a dedicated method still makes sense: it's simply more readable than passing a flag. As for the tests, they should probably exercise the interaction with re.MULTILINE - see MRAB's comment in msg172775. ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 20:51:03 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 19:51:03 +0000 Subject: [issue16501] deprecate RISCOS "support" In-Reply-To: <1353258907.33.0.855880480918.issue16501@psf.upfronthosting.co.za> Message-ID: <1355601063.48.0.986046105155.issue16501@psf.upfronthosting.co.za> Antoine Pitrou added the comment: PEP 11 updated in 3abdc6b075fb. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 20:59:28 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Dec 2012 19:59:28 +0000 Subject: [issue16670] Point class may be not be a good example for namedtuple In-Reply-To: <1355333994.73.0.927546875612.issue16670@psf.upfronthosting.co.za> Message-ID: <1355601568.34.0.939352060498.issue16670@psf.upfronthosting.co.za> Terry J. Reedy added the comment: [Raymond, I am assuming that you only left this open for additional comments, possibly more favorable than yours. If I am wrong, reopen.] I have not read the namedtuple doc before. I did so now and think the Point example is fine for the purpose of explaining namedtuples and should be left as is. It is clear to me and should be for anyone. For instance, it naturally leads to this example. "Subclassing is not useful for adding new, stored fields. Instead, simply create a new named tuple type from the _fields attribute: >>> Point3D = namedtuple('Point3D', Point._fields + ('z',))" While I do not consider the issue of 'practice' to be entirely relevant here, I note that complex numbers only work for 2-d points while tuples work for other dimensions, as the above shows. Tuples can be easily multiplied by a transformation matrix of the same dimension through indexing. The namedtuple factory just creates a friendly facade for what is still basically a tuple. "Named tuple instances do not have per-instance dictionaries, so they are lightweight and require no more memory than regular tuples." Anyway, serious numerical work is more likely to use numpy arrays or something similar. ---------- nosy: +terry.reedy resolution: -> works for me stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 21:00:26 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sat, 15 Dec 2012 20:00:26 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355601626.18.0.759600406847.issue16688@psf.upfronthosting.co.za> Matthew Barnett added the comment: OK, here's a patch. ---------- keywords: +patch Added file: http://bugs.python.org/file28321/issue16688.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 21:04:18 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 20:04:18 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1354792639.08.0.445639143612.issue16626@psf.upfronthosting.co.za> Message-ID: <1355601858.78.0.875091296716.issue16626@psf.upfronthosting.co.za> Antoine Pitrou added the comment: How about adding a test? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 21:16:28 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Dec 2012 20:16:28 +0000 Subject: [issue16488] Add context manager support to epoll object In-Reply-To: <1353078849.09.0.752588026545.issue16488@psf.upfronthosting.co.za> Message-ID: <3YP0JW2lhFzQQN@mail.python.org> Roundup Robot added the comment: New changeset d6f61cd364d9 by Antoine Pitrou in branch 'default': Issue #16488: epoll() objects now support the `with` statement. http://hg.python.org/cpython/rev/d6f61cd364d9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 21:17:44 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 20:17:44 +0000 Subject: [issue16488] Add context manager support to epoll object In-Reply-To: <1353078849.09.0.752588026545.issue16488@psf.upfronthosting.co.za> Message-ID: <1355602664.12.0.473525579066.issue16488@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed, thank you! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 21:32:36 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Dec 2012 20:32:36 +0000 Subject: [issue16669] Docstrings for namedtuple In-Reply-To: <1355333495.19.0.152758378027.issue16669@psf.upfronthosting.co.za> Message-ID: <1355603556.09.0.994575691774.issue16669@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I think this should be rejected and closed since the 'enhancement' looks worse to me than what we can do now. 1. Most data attributes cannot have individual docstrings, so I expect the class docstring to list and possibly explain the data attributes. 2. In the process of responding to #16670, I finally read the namedtuple doc. I notice that it already generates default one-line .__doc__ attributes for both the class and properties. For Point, the class docstring is 'Point(x, y)', which will often be good enough. 3. If the person creating the class does not think this sufficient, the replacement is likely to be multiple lines. This is awkward for a constructor argument. There is a reason we put docstrings *after* the header, not *in* the header. 4. The class docstring is easily replaced by assignment. So I would write Eric's example as Point = namedtuple('Point', 'x y') Point.__doc__ = '''\ A 2-dimensional coordinate x - the abscissa y - the ordinate''' This does not create a second new class and is not a 'trick'. 5. The property docstrings have the form 'Alias for field number 0'. I do not consider replacing them an issue. If a true data attribute is replaced by a property, the act of replacement should be transparent. That is the point of properties. So there is no expectation that the attribute should suddenly grow a docstring, I presume that is why property docstrings are not used much. The default for named tuples gives information that is peculiarly relevant to named tuples and that should be generated automatically. As I said before, I think the prose explanation of field names belongs in the class doc. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 21:34:51 2012 From: report at bugs.python.org (Ross Lagerwall) Date: Sat, 15 Dec 2012 20:34:51 +0000 Subject: [issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results In-Reply-To: <1355197575.99.0.863883653591.issue16661@psf.upfronthosting.co.za> Message-ID: <1355603691.78.0.94497177413.issue16661@psf.upfronthosting.co.za> Changes by Ross Lagerwall : ---------- assignee: -> rosslagerwall resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 21:44:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Dec 2012 20:44:02 +0000 Subject: [issue11175] allow argparse FileType to accept encoding and errors arguments In-Reply-To: <1297352833.64.0.0994986830559.issue11175@psf.upfronthosting.co.za> Message-ID: <3YP0wK4YwkzRbW@mail.python.org> Roundup Robot added the comment: New changeset d5a0698a8354 by Petri Lehtinen in branch 'default': #11175: argparse.FileType now accepts encoding and errors arguments. http://hg.python.org/cpython/rev/d5a0698a8354 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 21:46:16 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Sat, 15 Dec 2012 20:46:16 +0000 Subject: [issue11175] allow argparse FileType to accept encoding and errors arguments In-Reply-To: <1297352833.64.0.0994986830559.issue11175@psf.upfronthosting.co.za> Message-ID: <1355604376.71.0.482270888125.issue11175@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Committed, thanks for the patch! I made little tweaks before committing: - changed l1 to UTF-8 in the example (guess you mis-uploaded the latest version) - changed the argument to 'replace' in test_r_1_replace - fixed 3-space indentation to 4-space indentation in test_open_args ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 21:54:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2012 20:54:54 +0000 Subject: [issue16550] pickletools.py treats 32bit lengths as signed, but pickle.py as unsigned In-Reply-To: <1353845836.76.0.0245039537422.issue16550@psf.upfronthosting.co.za> Message-ID: <1355604894.19.0.871498876683.issue16550@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Lib/test/pickletester.py contains some bigmem tests, they can be modified to cover issue12848 and this issue. But I can't run this tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 22:03:53 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 15 Dec 2012 21:03:53 +0000 Subject: [issue14266] pyunit script as shorthand for python -m unittest In-Reply-To: <1331586037.12.0.876793471383.issue14266@psf.upfronthosting.co.za> Message-ID: <1355605433.25.0.219669018614.issue14266@psf.upfronthosting.co.za> ?ric Araujo added the comment: I think the __unittest name is magic to hide modules from the unittest package in error/failure tracebacks. About the script: can?t it be as simple as runpy.run_module? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 22:36:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2012 21:36:38 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1354792639.08.0.445639143612.issue16626@psf.upfronthosting.co.za> Message-ID: <1355607398.6.0.86326342867.issue16626@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have made the test, but I can't run it. Therefore I can't guarantee that the test works. ---------- Added file: http://bugs.python.org/file28322/glob_magic_in_drive_test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 22:40:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2012 21:40:10 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1354792639.08.0.445639143612.issue16626@psf.upfronthosting.co.za> Message-ID: <1355607610.04.0.0807969161081.issue16626@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28323/glob_magic_in_drive_test-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 22:40:30 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 15 Dec 2012 21:40:30 +0000 Subject: [issue15783] decimal.localcontext(None) fails when using the C accelerator module In-Reply-To: <1345904683.65.0.863127291798.issue15783@psf.upfronthosting.co.za> Message-ID: <3YP29T47wHzQgW@mail.python.org> Roundup Robot added the comment: New changeset 29becac5dd9b by Stefan Krah in branch '3.3': Issue #15783: Except for the number methods, the C version of decimal now http://hg.python.org/cpython/rev/29becac5dd9b ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 22:41:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2012 21:41:42 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355607702.22.0.377767892295.issue16688@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 22:50:39 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2012 21:50:39 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> Message-ID: <1355608239.78.0.556905371829.issue16618@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 22:51:09 2012 From: report at bugs.python.org (Stefan Krah) Date: Sat, 15 Dec 2012 21:51:09 +0000 Subject: [issue15783] decimal: Support None default values in the C accelerator module In-Reply-To: <1345904683.65.0.863127291798.issue15783@psf.upfronthosting.co.za> Message-ID: <1355608269.05.0.0732170997586.issue15783@psf.upfronthosting.co.za> Stefan Krah added the comment: Ezio, thanks for the Rietveld comments. There are still unsupported None default values in the Context constructor, so I'm leaving the issue open. ---------- title: decimal.localcontext(None) fails when using the C accelerator module -> decimal: Support None default values in the C accelerator module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 23:01:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2012 22:01:23 +0000 Subject: [issue16648] stdib should use new exception types from PEP 3151 In-Reply-To: <1354995347.5.0.732021100427.issue16648@psf.upfronthosting.co.za> Message-ID: <1355608883.93.0.0850190026075.issue16648@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +FTP.makeport() loses socket error details, LMTP.connect() loses socket error details, Popen._internal_poll() references errno.ECHILD outside of the local scope, Wrong code in ContextManagerTests.test_invalid_args() in test_subprocess.py, Wrong test_extract_hardlink() in test_tarfile.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 23:24:36 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 22:24:36 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1354792639.08.0.445639143612.issue16626@psf.upfronthosting.co.za> Message-ID: <1355610276.76.0.419604006298.issue16626@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Tests work fine under 3.x, but under 2.7 I get: ====================================================================== FAIL: test_glob_magic_in_drive (test.test_glob.GlobTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\t\cpython\lib\test\test_glob.py", line 117, in test_glob_magic_in_dri ve eq(glob.glob('\\\\?\\c:\\'), ['\\\\?\\c:\\']) File "C:\t\cpython\lib\test\test_glob.py", line 48, in assertSequencesEqual_no order self.assertEqual(set(l1), set(l2)) AssertionError: Items in the second set but not the first: '\\\\?\\c:\\' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 23:31:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2012 22:31:24 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1354792639.08.0.445639143612.issue16626@psf.upfronthosting.co.za> Message-ID: <1355610684.86.0.144338676737.issue16626@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ah, I forgot that splitdrive() on 2.7 does not work with UNC paths. Here is an updated patch. ---------- Added file: http://bugs.python.org/file28324/glob_magic_in_drive_test-2.7_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 23:32:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 15 Dec 2012 22:32:03 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1354792639.08.0.445639143612.issue16626@psf.upfronthosting.co.za> Message-ID: <1355610723.09.0.491366762721.issue16626@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28323/glob_magic_in_drive_test-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 23:40:47 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 15 Dec 2012 22:40:47 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1354792639.08.0.445639143612.issue16626@psf.upfronthosting.co.za> Message-ID: <1355611247.07.0.778098603409.issue16626@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thank you, the new test works fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 23:49:43 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Dec 2012 22:49:43 +0000 Subject: [issue16677] Hard to find operator precedence in Lang Ref. In-Reply-To: <1355465395.03.0.430403844231.issue16677@psf.upfronthosting.co.za> Message-ID: <1355611783.93.0.311160348164.issue16677@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree with index entries and that 6.14 Evaluation Order (7 lines) and 6.15 Summary (precedence table and notes) could be combined into 6.14 Evaluation Order and Precedence. I don't think the text necessarily needs revision. Just augment 6.14 and remove 6.15. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 15 23:54:46 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 15 Dec 2012 22:54:46 +0000 Subject: [issue16679] Wrong URL path decoding In-Reply-To: <1355473710.36.0.278942451351.issue16679@psf.upfronthosting.co.za> Message-ID: <1355612086.1.0.701293398988.issue16679@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +aclover, pje _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 00:01:50 2012 From: report at bugs.python.org (STINNER Victor) Date: Sat, 15 Dec 2012 23:01:50 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355607702.25.0.553569398404.issue16688@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: Can someone check if there is no other similar regression (introduced by the PEP 393)? 2012/12/15 Serhiy Storchaka : > > Changes by Serhiy Storchaka : > > > ---------- > stage: needs patch -> patch review > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 01:24:21 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 16 Dec 2012 00:24:21 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355617461.61.0.11376930095.issue16688@psf.upfronthosting.co.za> Matthew Barnett added the comment: I found another bug while looking through the source. On line 495 in function SRE_COUNT: if (maxcount < end - ptr && maxcount != 65535) end = ptr + maxcount*state->charsize; where 'end' and 'ptr' are of type 'char*'. That means that 'end - ptr' is the length in _bytes_, not characters. If the byte after the end of the string is 0 then you get this: >>> # Good: >>> re.search(r"\x00{1,3}", "a\x00\x00").span() (1, 3) >>> # Bad: >>> re.search(r"\x00{1,3}", "\u0100\x00\x00").span() (1, 4) I'll keep looking before submitting a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 01:33:54 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 16 Dec 2012 00:33:54 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355618034.21.0.0729645092194.issue16688@psf.upfronthosting.co.za> Matthew Barnett added the comment: I found another bug while looking through the source. On line 495 in function SRE_COUNT: if (maxcount < end - ptr && maxcount != 65535) end = ptr + maxcount*state->charsize; where 'end' and 'ptr' are of type 'char*'. That means that 'end - ptr' is the length in _bytes_, not characters. If the byte after the end of the string is 0 then you get this: >>> # Good: >>> re.search(r"\x00{1,3}", "a\x00\x00").span() (1, 3) >>> # Bad: >>> re.search(r"\x00{1,3}", "\u0100\x00\x00").span() (1, 4) I'll keep looking before submitting a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 01:38:48 2012 From: report at bugs.python.org (=?utf-8?q?Nacsa_Krist=C3=B3f?=) Date: Sun, 16 Dec 2012 00:38:48 +0000 Subject: [issue15962] Windows STDIN/STDOUT Redirection is actually FIXED In-Reply-To: <1347970794.78.0.910609008076.issue15962@psf.upfronthosting.co.za> Message-ID: <1355618328.03.0.264346374262.issue15962@psf.upfronthosting.co.za> Nacsa Krist?f added the comment: @dhgmgn I think the change is ok. That said, I add two things. It maybe should be noted which Windows version has this corrected. The article contains this string: "This problem was first corrected in Microsoft Windows 2000 Service Pack 4. This problem was first corrected in Windows XP Service Pack 1". The other thing is that I prefer if the relevant information is copied due to various reasons. One reason is that it serves as a "highlight" (nice time-saver and is also against TL;DR situations). Another is that Microsoft may simply cease support, or discontinue this link (they tend to do this). I'm not familiar with how the python docs is constructed, if there is a style guide, etc., but I can tell that I'd be happy if I could see this information there directly. This is also how I've found out about that cmd header line/'trick'. @ Another thing, can anyone else confirm that this works for [s]he? I've tested this on an 32-bit xp pro sp3. When _not_ using the fix, something like `foo | myscript.py | bar` results in: IOError: [Errno 9] Bad file descriptor With _using_ the registry fix from Microsoft, the command from above just works for me on the XP. (The cmd.exe/console needs to be restarted.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 02:04:57 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 16 Dec 2012 01:04:57 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355619897.45.0.0387700175352.issue16688@psf.upfronthosting.co.za> Matthew Barnett added the comment: I haven't found any other issues, so here's the second patch. ---------- Added file: http://bugs.python.org/file28325/issue16688#2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 03:32:00 2012 From: report at bugs.python.org (Eric Snow) Date: Sun, 16 Dec 2012 02:32:00 +0000 Subject: [issue16669] Docstrings for namedtuple In-Reply-To: <1355333495.19.0.152758378027.issue16669@psf.upfronthosting.co.za> Message-ID: <1355625120.57.0.270359867813.issue16669@psf.upfronthosting.co.za> Eric Snow added the comment: +1, Terry ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 03:48:48 2012 From: report at bugs.python.org (Phillip J. Eby) Date: Sun, 16 Dec 2012 02:48:48 +0000 Subject: [issue16679] Wrong URL path decoding In-Reply-To: <1355473710.36.0.278942451351.issue16679@psf.upfronthosting.co.za> Message-ID: <1355626128.37.0.84660209691.issue16679@psf.upfronthosting.co.za> Phillip J. Eby added the comment: > Wouldn't it be possible to amend PEP 3333? Sure... except then it would also be necessary to amend PEP 3333, and also all WSGI applications already written that assume this, any time in the last nine years. This is a known and intended consistent property of how WSGI handles HTTP headers. Under Python 2.x, PATH_INFO was a byte string (and still is), and to maintain also side-compatibility with Jython and IronPython, header strings are always maintained as "bytes in unicode form", with applications having responsibility to decode-recode as needed. This isn't a minor corner of the spec, it's central to how headers are handled, and has been so long before Python 3 even existed. To mess with it now means you break applications and frameworks that are already correctly written to follow the specs. To put it in brief, the reported behavior is not a bug, it is a feature and by design. A server that returns a UTF-8 decoded PATH_INFO is in violation of the spec, so the reference implementation of the spec should absolutely not do so. ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 04:42:51 2012 From: report at bugs.python.org (danblack) Date: Sun, 16 Dec 2012 03:42:51 +0000 Subject: [issue8109] Server-side support for TLS Server Name Indication extension In-Reply-To: <1268234047.5.0.702223567094.issue8109@psf.upfronthosting.co.za> Message-ID: <1355629371.61.0.649141552592.issue8109@psf.upfronthosting.co.za> Changes by danblack : Added file: http://bugs.python.org/file28326/issue-8109-sni-serverside.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 08:24:42 2012 From: report at bugs.python.org (Zachary Ware) Date: Sun, 16 Dec 2012 07:24:42 +0000 Subject: [issue16694] Add pure Python operator module Message-ID: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> New submission from Zachary Ware: (Brett, I've made you nosy due to the relation to Issue16651.) Here is a pure Python implementation of the operator module, or at least a first draft thereof :). I'm attaching the module itself, as well as a patch to integrate it. Any and all review is quite welcome. I'm confident in the fact that the module as it stands passes all current tests, but how it gets there is entirely up for debate (namely, the attrgetter, itemgetter, and methodcaller classes, as well as length_hint(), countOf(), and indexOf()). Note that there's also a change to hmac.py; _compare_digest() in operator.c doesn't seem to have any relation to the rest of the module (see issue15061 discussion) and is private anyway, so operator.py doesn't go near it. hmac.py has to import directly from _operator. Thanks, Zach Ware ---------- components: Extension Modules, Library (Lib) files: operator.py messages: 177579 nosy: brett.cannon, zach.ware priority: normal severity: normal status: open title: Add pure Python operator module type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28327/operator.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 08:25:14 2012 From: report at bugs.python.org (Zachary Ware) Date: Sun, 16 Dec 2012 07:25:14 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1355642714.83.0.972139250745.issue16694@psf.upfronthosting.co.za> Changes by Zachary Ware : ---------- keywords: +patch Added file: http://bugs.python.org/file28328/py_operator.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 09:29:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 08:29:53 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355646593.22.0.415145648901.issue16688@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The patches LGTM. How about adding a test? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 09:34:36 2012 From: report at bugs.python.org (danblack) Date: Sun, 16 Dec 2012 08:34:36 +0000 Subject: [issue8109] Server-side support for TLS Server Name Indication extension In-Reply-To: <1268234047.5.0.702223567094.issue8109@psf.upfronthosting.co.za> Message-ID: <1355646876.44.0.533061022077.issue8109@psf.upfronthosting.co.za> danblack added the comment: > If it isn't very clear to you, I can still handle it myself, though. Those docs aren't the best. Not clear enough. Yes I'd appreciate you handling it. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 10:03:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 09:03:57 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1354792639.08.0.445639143612.issue16626@psf.upfronthosting.co.za> Message-ID: <1355648637.49.0.0645600768001.issue16626@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated with clarified comments. Are the tests fail on non-fixed Python? ---------- Added file: http://bugs.python.org/file28329/glob_magic_in_drive_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 10:05:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 09:05:53 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1355648753.26.0.130088552271.issue16651@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Add pure Python operator module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 10:46:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 09:46:55 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1355651215.53.0.41773013374.issue16694@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 11:03:02 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 10:03:02 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1355648637.49.0.0645600768001.issue16626@psf.upfronthosting.co.za> Message-ID: <1355652086.3411.0.camel@localhost.localdomain> Antoine Pitrou added the comment: > Patch updated with clarified comments. > > Are the tests fail on non-fixed Python? Yes, they do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 11:32:16 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sun, 16 Dec 2012 10:32:16 +0000 Subject: [issue16695] Clarify fnmatch & glob docs about the handling of leading "."s Message-ID: <1355653936.06.0.839482874064.issue16695@psf.upfronthosting.co.za> New submission from Hynek Schlawack: See issue16664. ---------- assignee: docs at python components: Documentation keywords: easy messages: 177584 nosy: Sebastian.Kreft, docs at python, hynek, pitrou priority: normal severity: normal stage: needs patch status: open title: Clarify fnmatch & glob docs about the handling of leading "."s type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 12:05:44 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 11:05:44 +0000 Subject: [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1355655944.33.0.345084644969.issue14901@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 12:29:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 11:29:26 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1355657366.58.0.727671464335.issue16694@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a functional (and more effective) equivalent of attrgetter: def attrgetter(attr, *attrs): """ Return a callable object that fetches the given attribute(s) from its operand. After f=attrgetter('name'), the call f(r) returns r.name. After g=attrgetter('name', 'date'), the call g(r) returns (r.name, r.date). After h=attrgetter('name.first', 'name.last'), the call h(r) returns (r.name.first, r.name.last). """ if not attrs: if not isinstance(attr, str): raise TypeError('attribute name must be a string') names = attr.split('.') def func(obj): for name in names: obj = getattr(obj, name) return obj return func else: getters = tuple(map(attrgetter, (attr,) + attrs)) def func(obj): return tuple(getter(obj) for getter in getters) return func ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 12:35:24 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sun, 16 Dec 2012 11:35:24 +0000 Subject: [issue16664] Test Glob: files starting with . In-Reply-To: <1355250332.3.0.793167258455.issue16664@psf.upfronthosting.co.za> Message-ID: <1355657724.82.0.930411032595.issue16664@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Patch LGTM and will be applied, I have opened issue16695 for the related update of the docs. BTW how did you create the patch? The bugtracker/Rietveld didn't recognize it for review and applying it took some effort too. ---------- title: [PATCH] Test Glob: files starting with . -> Test Glob: files starting with . type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 12:37:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 11:37:00 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1355657820.84.0.717197902762.issue16694@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Perhaps Modules/operator.c should be renamed to Modules/_operator.c. Also note, that error messages in Python an C implementations sometimes differ. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 12:48:52 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sun, 16 Dec 2012 11:48:52 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> Message-ID: <1355658532.18.0.490157806073.issue16618@psf.upfronthosting.co.za> Changes by Hynek Schlawack : ---------- nosy: +hynek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 12:49:03 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Dec 2012 11:49:03 +0000 Subject: [issue16664] Test Glob: files starting with . In-Reply-To: <1355250332.3.0.793167258455.issue16664@psf.upfronthosting.co.za> Message-ID: <3YPP0Z6T0dzNl4@mail.python.org> Roundup Robot added the comment: New changeset 028ecc3900f5 by Hynek Schlawack in branch '2.7': #16664: Add regression tests for glob's behaviour concerning "."-entries http://hg.python.org/cpython/rev/028ecc3900f5 New changeset 29f0c45ce576 by Hynek Schlawack in branch '3.2': #16664: Add regression tests for glob's behaviour concerning "."-entries http://hg.python.org/cpython/rev/29f0c45ce576 New changeset f646842023b3 by Hynek Schlawack in branch '3.3': #16664: Add regression tests for glob's behaviour concerning "."-entries http://hg.python.org/cpython/rev/f646842023b3 New changeset 1fb39efcc3dd by Hynek Schlawack in branch 'default': #16664: Add regression tests for glob's behaviour concerning "."-entries http://hg.python.org/cpython/rev/1fb39efcc3dd ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 12:52:30 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sun, 16 Dec 2012 11:52:30 +0000 Subject: [issue16664] Test Glob: files starting with . In-Reply-To: <1355250332.3.0.793167258455.issue16664@psf.upfronthosting.co.za> Message-ID: <1355658750.75.0.85826027733.issue16664@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Thank you for your patch and welcome to CPython core development! Presuming you want to submit more patches in future, please take the time to sign a Python contributor agreement: http://www.python.org/psf/contrib/ . You'll get a pretty star next to your name in the bug tracker in return. ;) ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 12:58:39 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sun, 16 Dec 2012 11:58:39 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1355659119.89.0.531447982462.issue16076@psf.upfronthosting.co.za> Daniel Shahaf added the comment: Haven't had a chance to look at the test___all__ -related failures yet. Still planning to do so once I have some time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 13:03:32 2012 From: report at bugs.python.org (And Clover) Date: Sun, 16 Dec 2012 12:03:32 +0000 Subject: [issue16679] Wrong URL path decoding In-Reply-To: <1355473710.36.0.278942451351.issue16679@psf.upfronthosting.co.za> Message-ID: <1355659412.62.0.985557563504.issue16679@psf.upfronthosting.co.za> And Clover added the comment: WSGI's usage of ISO-8859-1 for all HTTP-byte-originated strings is very much deliberate; we needed a way to preserve the original input bytes whilst still using unicode strings, and at the time surrogateescape was not available. The result is counter-intuitive but at least it is finally consistent; the expectation is that most web authors will be using some kind of web framework or input-reading library that will hide away the unpleasant details. See http://mail.python.org/pipermail/web-sig/2007-December/thread.html#3002 and http://mail.python.org/pipermail/web-sig/2010-July/thread.html#4473 for the background discussion. In any case we cannot assume a path is UTF-8 - not every URI is known to have come from an IRI so RFC 3987 does not necessarily apply. UTF-8-with-Latin1-fallback is also undesirable in itself as it adds ambiguity - an ISO-8859-1 byte sequence that by coincidence happens to be a valid UTF-8 byte sequence will get mangled. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 13:08:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 12:08:03 +0000 Subject: [issue16669] Docstrings for namedtuple In-Reply-To: <1355603556.09.0.994575691774.issue16669@psf.upfronthosting.co.za> Message-ID: <1355660066.4033.28.camel@raxxla> Serhiy Storchaka added the comment: > 1. Most data attributes cannot have individual docstrings, so I expect the class docstring to list and possibly explain the data attributes. But almost all PyStructSequence field have individual docstrings. > This does not create a second new class and is not a 'trick'. Thanks for the tip. > I presume that is why property docstrings are not used much. Indeed, only 84 of 336 Python implemented properties have docstrings . However this is even larger percent than for methods (about 8K of 43K). And 100 of 115 PyStructSequence field have docstrings. I think Python should have more docstrings, not less. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 13:55:59 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Dec 2012 12:55:59 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1354792639.08.0.445639143612.issue16626@psf.upfronthosting.co.za> Message-ID: <3YPQTp59j6zN8Q@mail.python.org> Roundup Robot added the comment: New changeset 4af260a54e05 by Antoine Pitrou in branch '3.2': Issue #16626: Fix infinite recursion in glob.glob() on Windows when the pattern contains a wildcard in the drive or UNC path. http://hg.python.org/cpython/rev/4af260a54e05 New changeset b90aa7f66e4a by Antoine Pitrou in branch '3.3': Issue #16626: Fix infinite recursion in glob.glob() on Windows when the pattern contains a wildcard in the drive or UNC path. http://hg.python.org/cpython/rev/b90aa7f66e4a New changeset bfb39fb93af7 by Antoine Pitrou in branch 'default': Issue #16626: Fix infinite recursion in glob.glob() on Windows when the pattern contains a wildcard in the drive or UNC path. http://hg.python.org/cpython/rev/bfb39fb93af7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 13:57:33 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Dec 2012 12:57:33 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1354792639.08.0.445639143612.issue16626@psf.upfronthosting.co.za> Message-ID: <3YPQWd0rHkzNDK@mail.python.org> Roundup Robot added the comment: New changeset b0935ef48186 by Antoine Pitrou in branch '2.7': Issue #16626: Fix infinite recursion in glob.glob() on Windows when the pattern contains a wildcard in the drive or UNC path. http://hg.python.org/cpython/rev/b0935ef48186 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 13:58:03 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 12:58:03 +0000 Subject: [issue16626] Infinite recursion in glob.glob('*:') on Windows In-Reply-To: <1354792639.08.0.445639143612.issue16626@psf.upfronthosting.co.za> Message-ID: <1355662683.49.0.667176456252.issue16626@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Patches now committed, thank you ! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 14:20:31 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 13:20:31 +0000 Subject: [issue16696] BytesWarning in glob.glob Message-ID: <1355664031.2.0.313803756669.issue16696@psf.upfronthosting.co.za> New submission from Antoine Pitrou: This failure appeared on one of the Windows buildbots: ====================================================================== ERROR: test_glob_magic_in_drive (test.test_glob.GlobTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "C:\buildbot.python.org\3.2.kloth-win64\build\lib\test\test_glob.py", line 118, in test_glob_magic_in_drive eq(glob.glob(b'*:'), []) File "C:\buildbot.python.org\3.2.kloth-win64\build\lib\glob.py", line 15, in glob return list(iglob(pathname)) File "C:\buildbot.python.org\3.2.kloth-win64\build\lib\glob.py", line 44, in iglob for name in glob_in_dir(dirname, basename): File "C:\buildbot.python.org\3.2.kloth-win64\build\lib\glob.py", line 66, in glob0 if basename == '': BytesWarning: Comparison between bytes and string ---------- components: Library (Lib), Windows messages: 177596 nosy: pitrou, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: BytesWarning in glob.glob type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 14:25:54 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 13:25:54 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> Message-ID: <1355664354.11.0.0894280715945.issue16618@psf.upfronthosting.co.za> Antoine Pitrou added the comment: See also issue16696. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 14:29:56 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 13:29:56 +0000 Subject: [issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results In-Reply-To: <1355197575.99.0.863883653591.issue16661@psf.upfronthosting.co.za> Message-ID: <1355664596.02.0.451344177264.issue16661@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Apparently this also needs fixing on 2.7 and 3.2, see e.g. http://buildbot.python.org/all/builders/AMD64%20Mountain%20Lion%20%5BSB%5D%203.2 ---------- nosy: +pitrou status: closed -> open versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 14:41:20 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 13:41:20 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1355665280.46.0.681462578101.issue16597@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +hynek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 14:53:55 2012 From: report at bugs.python.org (wim glenn) Date: Sun, 16 Dec 2012 13:53:55 +0000 Subject: [issue16697] argparse kwarg 'choices' documentation Message-ID: <1355666035.13.0.877787561314.issue16697@psf.upfronthosting.co.za> New submission from wim glenn: Any object that supports the in operator can be passed as the choices value, so dict objects, set objects, custom containers, etc. are all supported. (from http://docs.python.org/dev/library/argparse.html#choices ) Actual behaviour is contradicted by the docs - it seems the container must additionally be iterable. When using a custom container, argparse b0rks on trying to iterate through choices. Using a metavar prevents this, but it still breaks on cases where the element is not in the container. More details here: http://stackoverflow.com/questions/13833566/python-argparse-choices-from-an-infinite-set ---------- assignee: docs at python components: Documentation messages: 177599 nosy: docs at python, wim.glenn priority: normal severity: normal status: open title: argparse kwarg 'choices' documentation type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 15:03:08 2012 From: report at bugs.python.org (Ross Lagerwall) Date: Sun, 16 Dec 2012 14:03:08 +0000 Subject: [issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results In-Reply-To: <1355197575.99.0.863883653591.issue16661@psf.upfronthosting.co.za> Message-ID: <1355666588.2.0.100983488503.issue16661@psf.upfronthosting.co.za> Ross Lagerwall added the comment: getgrouplist() is new in 3.3. Those failures are from getgroups() failing. I'll open a separate issue for that. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 15:05:09 2012 From: report at bugs.python.org (Ross Lagerwall) Date: Sun, 16 Dec 2012 14:05:09 +0000 Subject: [issue16698] test_posix.test_getgroups fails on some systems Message-ID: <1355666709.31.0.161385459804.issue16698@psf.upfronthosting.co.za> New submission from Ross Lagerwall: test_posix.test_getgroups() fails on some systems: http://buildbot.python.org/all/builders/AMD64%20Mountain%20Lion%20%5BSB%5D%203.2 This could be related to #16661. ---------- components: Tests messages: 177601 nosy: rosslagerwall priority: normal severity: normal stage: needs patch status: open title: test_posix.test_getgroups fails on some systems type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 15:21:37 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 16 Dec 2012 14:21:37 +0000 Subject: [issue16697] argparse kwarg 'choices' documentation In-Reply-To: <1355666035.13.0.877787561314.issue16697@psf.upfronthosting.co.za> Message-ID: <1355667697.65.0.902981490069.issue16697@psf.upfronthosting.co.za> R. David Murray added the comment: This is a duplicate of issue issue 16468, which may get closed with either a bug fix or a doc fix, depending on the outcome of the overall discussion. ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> argparse only supports iterable choices type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 15:21:54 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 16 Dec 2012 14:21:54 +0000 Subject: [issue16468] argparse only supports iterable choices In-Reply-To: <1352867539.71.0.970228461518.issue16468@psf.upfronthosting.co.za> Message-ID: <1355667714.24.0.147763984174.issue16468@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +wim.glenn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 15:29:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 14:29:28 +0000 Subject: [issue16696] BytesWarning in glob.glob In-Reply-To: <1355664031.2.0.313803756669.issue16696@psf.upfronthosting.co.za> Message-ID: <1355668168.13.0.917228686431.issue16696@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It should be "if not basename:". No additional tests are possible except those which added for issue16626. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 16:05:45 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Dec 2012 15:05:45 +0000 Subject: [issue16696] BytesWarning in glob.glob In-Reply-To: <1355664031.2.0.313803756669.issue16696@psf.upfronthosting.co.za> Message-ID: <3YPTMX4mP4zNmw@mail.python.org> Roundup Robot added the comment: New changeset 96f19274de18 by Antoine Pitrou in branch '3.2': Issue #16696: fix comparison between bytes and string. Also, improve glob tests. http://hg.python.org/cpython/rev/96f19274de18 New changeset ed8134df30e4 by Antoine Pitrou in branch '3.3': Issue #16696: fix comparison between bytes and string. Also, improve glob tests. http://hg.python.org/cpython/rev/ed8134df30e4 New changeset 9e898ee68388 by Antoine Pitrou in branch 'default': Issue #16696: fix comparison between bytes and string. Also, improve glob tests. http://hg.python.org/cpython/rev/9e898ee68388 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 16:14:17 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 15:14:17 +0000 Subject: [issue16696] BytesWarning in glob.glob In-Reply-To: <1355664031.2.0.313803756669.issue16696@psf.upfronthosting.co.za> Message-ID: <1355670857.39.0.645021286678.issue16696@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've added some tests for patterns with a trailing slash. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 16:42:53 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Dec 2012 15:42:53 +0000 Subject: [issue13876] Sporadic failure in test_socket: testRecvmsgEOF In-Reply-To: <1327588563.2.0.447366914719.issue13876@psf.upfronthosting.co.za> Message-ID: <3YPVBN4v5NzP6j@mail.python.org> Roundup Robot added the comment: New changeset 391bda06fa65 by Antoine Pitrou in branch '3.3': Silence sporadic failure in RecvmsgSCTPStreamTest.testRecvmsgEOF (issue #13876) - probably not Python-related. http://hg.python.org/cpython/rev/391bda06fa65 New changeset 2d2d4807a3ed by Antoine Pitrou in branch 'default': Silence sporadic failure in RecvmsgSCTPStreamTest.testRecvmsgEOF (issue #13876) - probably not Python-related. http://hg.python.org/cpython/rev/2d2d4807a3ed ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 16:43:33 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 15:43:33 +0000 Subject: [issue13876] Sporadic failure in test_socket: testRecvmsgEOF In-Reply-To: <1327588563.2.0.447366914719.issue13876@psf.upfronthosting.co.za> Message-ID: <1355672613.36.0.837774152364.issue13876@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've now silenced the exception. Leaving this issue open in case someone wants to investigate more. ---------- resolution: -> fixed stage: needs patch -> committed/rejected versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:00:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 16:00:16 +0000 Subject: [issue15845] Fixing some byte-to-string conversion warnings In-Reply-To: <1346552396.88.0.397419581961.issue15845@psf.upfronthosting.co.za> Message-ID: <1355673616.62.0.667713102826.issue15845@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The first bug fixed in issue16696. ---------- nosy: +pitrou, serhiy.storchaka type: enhancement -> behavior versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:15:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 16:15:45 +0000 Subject: [issue16656] os.listdir() returns unusable bytes result on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355674545.36.0.377843334221.issue16656@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Looks as this is a duplicate of issue13247. And Victor submitted a patch with approach similar to me (except that my patch does not raises an exception, but returns an unicode for unencodable names). It looks as longliving design bug and perhaps really be closed as "won't fix". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:25:00 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 16:25:00 +0000 Subject: [issue16656] os.listdir() returns unusable bytes result on Windows In-Reply-To: <1355139704.15.0.993406857034.issue16656@psf.upfronthosting.co.za> Message-ID: <1355675100.73.0.43218198056.issue16656@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Indeed, os.listdir() should always be called with a unicode argument under Windows (which is the natural thing to do in 3.x, anyway). The other issue (with print() unable to display some symbols depending on the codepage) is unrelated. ---------- nosy: +pitrou resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:26:25 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 16:26:25 +0000 Subject: [issue16699] Mountain Lion buildbot lacks disk space Message-ID: <1355675185.68.0.917040495846.issue16699@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: pitrou priority: normal severity: normal status: open title: Mountain Lion buildbot lacks disk space _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:26:50 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 16:26:50 +0000 Subject: [issue16699] Mountain Lion buildbot lacks disk space Message-ID: <1355675210.52.0.0088069164146.issue16699@psf.upfronthosting.co.za> New submission from Antoine Pitrou: ====================================================================== ERROR: test_large_file_ops (test.test_io.CIOTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Volumes/bay2/buildslave/cpython/3.3.snakebite-mountainlion-amd64/build/Lib/test/test_io.py", line 432, in test_large_file_ops self.large_file_ops(f) File "/Volumes/bay2/buildslave/cpython/3.3.snakebite-mountainlion-amd64/build/Lib/test/test_io.py", line 332, in large_file_ops self.assertEqual(f.write(b"xxx"), 3) OSError: [Errno 28] No space left on device ---------- assignee: -> trent keywords: +buildbot nosy: +trent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:30:52 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 16:30:52 +0000 Subject: [issue13247] under Windows, os.path.abspath returns non-ASCII bytes paths as question marks In-Reply-To: <1319327124.52.0.956024299245.issue13247@psf.upfronthosting.co.za> Message-ID: <1355675452.49.0.43443689231.issue13247@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- components: +Windows stage: committed/rejected -> title: os.path.abspath returns unicode paths as question marks -> under Windows, os.path.abspath returns non-ASCII bytes paths as question marks type: enhancement -> behavior versions: +Python 2.7, Python 3.1, Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:36:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 16:36:04 +0000 Subject: [issue13247] under Windows, os.path.abspath returns non-ASCII bytes paths as question marks In-Reply-To: <1319327124.52.0.956024299245.issue13247@psf.upfronthosting.co.za> Message-ID: <1355675764.75.0.239578897742.issue13247@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue16656 where another approach was proposed (unicode names returned from Bytes API if result is not encodable). Actually I think now that there is no right solution of this issue. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 17:58:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 16:58:37 +0000 Subject: [issue16700] Document that bytes OS API can returns unusable results on Windows Message-ID: <1355677117.39.0.191453655217.issue16700@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Some OS functions which returns bytes (os.environb, os.getenvb(), os.getcwdb(), os.listdir(), os.readlink(), os.walk(), os.path.abspath(), os.path.expanduser(), os.path.expandvars(), os.path.realpath() and may be other) can return unusable result on Windows (see for example issue13247 and issue16656). The documentation should contains strong warnings about this. ---------- assignee: docs at python components: Documentation, Windows messages: 177613 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Document that bytes OS API can returns unusable results on Windows type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 18:07:06 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 17:07:06 +0000 Subject: [issue16700] Document that bytes OS API can returns unusable results on Windows In-Reply-To: <1355677117.39.0.191453655217.issue16700@psf.upfronthosting.co.za> Message-ID: <1355677626.35.0.226909018292.issue16700@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 18:33:38 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 16 Dec 2012 17:33:38 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355679218.78.0.514067510141.issue16688@psf.upfronthosting.co.za> Matthew Barnett added the comment: Here are some tests for the issue. ---------- Added file: http://bugs.python.org/file28330/issue16688#3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 18:35:16 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 16 Dec 2012 17:35:16 +0000 Subject: [issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS In-Reply-To: <1327519681.79.0.252690630069.issue13863@psf.upfronthosting.co.za> Message-ID: <1355679316.65.0.523807128603.issue13863@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a possible fix for Python 2.7. Reviews from Windows experts would be very much appreciated; I don't really know what I'm doing here. I'm still trying to work out how to test this effectively. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 18:35:30 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 16 Dec 2012 17:35:30 +0000 Subject: [issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS In-Reply-To: <1327519681.79.0.252690630069.issue13863@psf.upfronthosting.co.za> Message-ID: <1355679330.1.0.145776265729.issue13863@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- keywords: +patch Added file: http://bugs.python.org/file28331/pyc_mtime.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 19:08:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 18:08:15 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355681295.64.0.487217449044.issue16688@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The second test pass on unpatched Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 19:09:16 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 16 Dec 2012 18:09:16 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> Message-ID: <1355681356.37.0.831273497672.issue16618@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch doesn't apply cleanly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 19:48:59 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 16 Dec 2012 18:48:59 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355683739.61.0.377991050886.issue16688@psf.upfronthosting.co.za> Matthew Barnett added the comment: Oops! :-( Now corrected. ---------- Added file: http://bugs.python.org/file28332/issue16688#3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 19:48:07 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 16 Dec 2012 18:48:07 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355683687.3.0.782628791995.issue16688@psf.upfronthosting.co.za> Changes by Matthew Barnett : Removed file: http://bugs.python.org/file28330/issue16688#3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 19:59:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 18:59:08 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1355681356.37.0.831273497672.issue16618@psf.upfronthosting.co.za> Message-ID: <201212162058.15644.storchaka@gmail.com> Serhiy Storchaka added the comment: Patches updated to resolve conflicts with recent commits. Some minor test errors fixed. ---------- Added file: http://bugs.python.org/file28333/glob_dotfiles_2.patch Added file: http://bugs.python.org/file28334/glob_tests-2.7_2.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 2d2d4807a3ed Lib/_pyio.py --- a/Lib/_pyio.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/_pyio.py Sun Dec 16 20:53:44 2012 +0200 @@ -346,8 +346,10 @@ This method has no effect if the file is already closed. """ if not self.__closed: - self.flush() - self.__closed = True + try: + self.flush() + finally: + self.__closed = True def __del__(self): """Destructor. Calls close().""" @@ -1584,8 +1586,10 @@ def close(self): if self.buffer is not None and not self.closed: - self.flush() - self.buffer.close() + try: + self.flush() + finally: + self.buffer.close() @property def closed(self): @@ -2074,3 +2078,56 @@ def detach(self): # This doesn't make sense on StringIO. self._unsupported("detach") + + +class BytesPipeIO(BufferedIOBase): + + def __init__(self, maxsize=0): + self.maxsize = maxsize + self._queue = BytesIO() + self._size = 0 + self._offset = 0 + self.mutex = threading.Lock() + self.not_empty = threading.Condition(self.mutex) + self.not_full = threading.Condition(self.mutex) + self.all_tasks_done = threading.Condition(self.mutex) + self.unfinished_tasks = 0 + + def readable(self): + return True + + def writable(self): + return True + + def read1(self, n=-1): + with self.not_empty: + while not self._queue: + self.not_empty.wait() + self._queue.seek(self._offset) + b = self._queue.read(n) + self._offset += len(b) + self.not_full.notify() + return b + + #def readall(self): + #pass + + #def readinto(self, b): + #pass + + def write(self, b): + with self.not_full: + if self.maxsize > 0: + while self._size - self._offset >= self.maxsize: + self.not_full.wait() + if self._offset * 2 > self._size + 0x1000: + self._pack() + self._queue.seek(self._size) + self._size += self._queue.write(b) + self.unfinished_tasks += 1 + self.not_empty.notify() + + def _pack(self): + self._queue = BytesIO(self._queue.read()) + self._size -= self._offset + self._offset = 0 diff -r 2d2d4807a3ed Lib/codecs.py --- a/Lib/codecs.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/codecs.py Sun Dec 16 20:53:44 2012 +0200 @@ -462,15 +462,8 @@ # read until we get the required number of characters (if available) while True: # can the request be satisfied from the character buffer? - if chars < 0: - if size < 0: - if self.charbuffer: - break - elif len(self.charbuffer) >= size: - break - else: - if len(self.charbuffer) >= chars: - break + if chars >= 0 and len(self.charbuffer) >= chars: + break # we need more data if size < 0: newdata = self.stream.read() diff -r 2d2d4807a3ed Lib/ftplib.py --- a/Lib/ftplib.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/ftplib.py Sun Dec 16 20:53:44 2012 +0200 @@ -288,21 +288,25 @@ def makeport(self): '''Create a new socket and send a PORT command for it.''' - msg = "getaddrinfo returns an empty list" sock = None + saved_err = None for res in socket.getaddrinfo(None, 0, self.af, socket.SOCK_STREAM, 0, socket.AI_PASSIVE): af, socktype, proto, canonname, sa = res try: sock = socket.socket(af, socktype, proto) sock.bind(sa) - except socket.error as msg: + except OSError as err: + saved_err = err if sock: sock.close() sock = None continue break if not sock: - raise socket.error(msg) + if saved_err is not None: + raise saved_err from None + else: + raise OSError("getaddrinfo returns an empty list") sock.listen(1) port = sock.getsockname()[1] # Get proper port host = self.sock.getsockname()[0] # Get proper host diff -r 2d2d4807a3ed Lib/glob.py --- a/Lib/glob.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/glob.py Sun Dec 16 20:53:44 2012 +0200 @@ -57,8 +57,8 @@ names = os.listdir(dirname) except os.error: return [] - if pattern[0] != '.': - names = [x for x in names if x[0] != '.'] + if not _ishidden(pattern): + names = [x for x in names if not _ishidden(x)] return fnmatch.filter(names, pattern) def glob0(dirname, basename): @@ -82,3 +82,6 @@ else: match = magic_check.search(s) return match is not None + +def _ishidden(path): + return path[0] in ('.', b'.'[0]) diff -r 2d2d4807a3ed Lib/idlelib/CallTips.py --- a/Lib/idlelib/CallTips.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/idlelib/CallTips.py Sun Dec 16 20:53:44 2012 +0200 @@ -116,6 +116,9 @@ # exception, especially if user classes are involved. return None +_MAXARGSPECLINES = 10 +_MAXARGSPECCOLS = 70 + # The following are used in both get_argspec and tests _first_param = re.compile('(?<=\()\w*\,?\s*') _default_callable_argspec = "No docstring, see docs." @@ -125,8 +128,9 @@ For Python-coded functions and methods, the first line is introspected. Delete 'self' parameter for classes (.__init__) and bound methods. - The last line is the first line of the doc string. For builtins, this typically - includes the arguments in addition to the return value. + The next lines are the first lines of the doc string up to the first + empty line. For builtins, this typically includes the arguments in + addition to the return value. ''' argspec = "" @@ -148,13 +152,13 @@ else: doc = getattr(ob, "__doc__", "") if doc: - doc = doc.lstrip() - pos = doc.find("\n") - if pos < 0 or pos > 70: - pos = 70 - if argspec: - argspec += "\n" - argspec += doc[:pos] + lines = [argspec] if argspec else [] + for line in doc.splitlines()[:_MAXARGSPECLINES - len(lines)]: + line = line.strip() + if not line: + break + lines.append(line[:_MAXARGSPECCOLS]) + argspec = '\n'.join(lines) if not argspec: argspec = _default_callable_argspec return argspec @@ -209,12 +213,14 @@ print(fmt % (expression, expected, argspec)) def test_builtins(): - # if first line of a possibly multiline compiled docstring changes, + # if a compiled docstring changes, # must change corresponding test string - test('int', "int(x=0) -> integer") + test('int', "int(x=0) -> integer\n" + "int(x, base=10) -> integer") test('Int', Int.__doc__) test('types.MethodType', "method(function, instance)") - test('list', "list() -> new empty list") + test('list', "list() -> new empty list\n" + "list(iterable) -> new list initialized from iterable's items") test('List', List.__doc__) test('list.__new__', 'T.__new__(S, ...) -> a new object with type S, a subtype of T') diff -r 2d2d4807a3ed Lib/pty.py --- a/Lib/pty.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/pty.py Sun Dec 16 20:53:44 2012 +0200 @@ -54,10 +54,7 @@ except ImportError: pass else: - try: - tty_name, master_fd = sgi._getpty(os.O_RDWR, 0o666, 0) - except IOError as msg: - raise os.error(msg) + tty_name, master_fd = sgi._getpty(os.O_RDWR, 0o666, 0) return master_fd, tty_name for x in 'pqrstuvwxyzPQRST': for y in '0123456789abcdef': diff -r 2d2d4807a3ed Lib/random.py --- a/Lib/random.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/random.py Sun Dec 16 20:53:44 2012 +0200 @@ -31,8 +31,7 @@ * The period is 2**19937-1. * It is one of the most extensively tested generators in existence. -* The random() method is implemented in C, executes in a single Python step, - and is, therefore, threadsafe. +* random() and getrandbits() method are threadsafe. """ @@ -43,6 +42,12 @@ from os import urandom as _urandom from collections.abc import Set as _Set, Sequence as _Sequence from hashlib import sha512 as _sha512 +from struct import pack as _pack, unpack as _unpack +from time import time as _time +try: + from threading import RLock as _RLock +except ImportError: + from dummy_threading import RLock as _RLock __all__ = ["Random","seed","random","uniform","randint","choice","sample", "randrange","shuffle","normalvariate","lognormvariate", @@ -59,13 +64,160 @@ RECIP_BPF = 2**-BPF +class _Random: + """Mersenne Twister core generator.""" + # See more comments in Modules/_randommodule.c. + + def __new__(cls, *args, **kwargs): + if cls == _Random and kwargs: + raise TypeError('Random() does not take keyword arguments') + self = super(_Random, cls).__new__(cls) + self.__lock = _RLock() + self.seed(*args) + return self + + def random(self): + """Generates a float in the interval [0, 1).""" + with self.__lock: + genrand_int32 = self.__genrand_int32 + a = genrand_int32() >> 5 # 27 bits + b = genrand_int32() >> 6 # 26 bits + return ((a << 26) + b) * (1 / 0x20000000000000) # 1 / 2**53 + + def seed(self, n=None): + """Initialize internal state from hashable object. + + None or no argument seeds from current time. + + If *n* is not an int, all bits are used, otherwise the hash() of *n* + is used instead. + """ + with self.__lock: + if n is None: + self.__init_genrand(int(_time())) + return None + if isinstance(n, int): + n = abs(n) + else: + n = hash(n) + if n < 0: + n, = _unpack('N', _pack('n', n)) + # Now split n into 32-bit chunks, from the right. + bits = n.bit_length() + keysize = ((bits - 1) >> 5) + 1 if bits else 1 + key = _unpack('<%dI' % keysize, n.to_bytes(keysize * 4, 'little')) + self.__init_by_array(key) + + def getstate(self): + """Return tuple containing the current state.; + can be passed to setstate() later.""" + with self.__lock: + return tuple(self.__state) + (self.__index,) + + def setstate(self, state): + """Restore internal state from tuple returned by getstate().""" + with self.__lock: + if not isinstance(state, tuple): + raise TypeError('state vector must be a tuple') + if len(state) != len(self.__state) + 1: + raise ValueError('state vector is the wrong size') + self.__state = [x & 0xffffffff for x in state[:-1]] + self.__index = int(state[-1]) + + def getrandbits(self, k): + """Generates an int with k random bits.""" + with self.__lock: + if k <= 0: + raise ValueError('number of bits must be greater than zero') + + if k <= 32: + return self.__genrand_int32() >> (32 - k) + + # Fill-out whole words, byte-by-byte to avoid endianness issues + genrand_int32 = self.__genrand_int32 + words = [genrand_int32() for i in range(((k - 1) >> 5) + 1)] + k &= 31 + if k: + words[-1] >>= 32 - k + # little endian order to match bytearray assignment order + return int.from_bytes(_pack('<%dI' % len(words), *words), 'little') + + # Generates a random number on [0,0xffffffff]-interval + def __genrand_int32(self): + try: + y = self.__state[self.__index] + self.__index += 1 + except IndexError: + mt = self.__state + N = len(mt) + # generate N words at one time + for kk in range(N): + y = (mt[kk] & 0x80000000) | (mt[kk + 1 - N] & 0x7fffffff) + x = mt[kk + 397 - N] ^ (y >> 1) + if y & 1: + x ^= 0x9908b0df + mt[kk] = x + y = mt[0] + self.__index = 1 + + y ^= (y >> 11) + y ^= (y << 7) & 0x9d2c5680 + y ^= (y << 15) & 0xefc60000 + y ^= (y >> 18) + return y + + # Initialize by an integer seed + def __init_genrand(self, s): + x = s & 0xffffffff + mt = [x] + append = mt.append + for i in range(1, 624): + x ^= x >> 30 + x = (1812433253 * x + i) & 0xffffffff + append(x) + # See Knuth TAOCP Vol2. 3rd Ed. P.106 for multiplier. + # In the previous versions, MSBs of the seed affect + # only MSBs of the array mt[]. + # 2002/01/09 modified by Makoto Matsumoto + self.__state = mt + self.__index = len(mt) + + # Initialize by an integer array + def __init_by_array(self, init_key): + self.__init_genrand(19650218) + mt = self.__state + N = len(self.__state) + i = 1 + j = 0 + x = mt[0] + for k in range(max(N, len(init_key))): + x ^= x >> 30 + mt[i] = x = ((mt[i] ^ (x * 1664525)) + init_key[j] + j) & 0xffffffff + i += 1 + if i >= N: + i = 1 + j += 1 + if j >= len(init_key): + j = 0 + for k in range(N - 1): + x ^= x >> 30 + mt[i] = x = ((mt[i] ^ (x * 1566083941)) - i) & 0xffffffff + i += 1 + if i >= N: + i = 1 + mt[0] = 0x80000000 # MSB is 1; assuring non-zero initial array + +try: + from _random import Random as _Random +except ImportError: + pass + + # Translated by Guido van Rossum from C source provided by # Adrian Baddeley. Adapted by Raymond Hettinger for use with # the Mersenne Twister and os.urandom() core generators. -import _random - -class Random(_random.Random): +class Random(_Random): """Random number generator base class used by bound module functions. Used to instantiate instances of Random to get generators that don't diff -r 2d2d4807a3ed Lib/shutil.py --- a/Lib/shutil.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/shutil.py Sun Dec 16 20:53:44 2012 +0200 @@ -356,24 +356,24 @@ names = [] try: names = os.listdir(path) - except os.error: + except OSError: onerror(os.listdir, path, sys.exc_info()) for name in names: fullname = os.path.join(path, name) try: mode = os.lstat(fullname).st_mode - except os.error: + except OSError: mode = 0 if stat.S_ISDIR(mode): _rmtree_unsafe(fullname, onerror) else: try: os.unlink(fullname) - except os.error: + except OSError: onerror(os.unlink, fullname, sys.exc_info()) try: os.rmdir(path) - except os.error: + except OSError: onerror(os.rmdir, path, sys.exc_info()) # Version using fd-based APIs to protect against races @@ -464,7 +464,7 @@ _rmtree_safe_fd(fd, path, onerror) try: os.rmdir(path) - except os.error: + except OSError: onerror(os.rmdir, path, sys.exc_info()) else: try: diff -r 2d2d4807a3ed Lib/smtplib.py --- a/Lib/smtplib.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/smtplib.py Sun Dec 16 20:53:44 2012 +0200 @@ -920,13 +920,13 @@ self.sock = socket.socket(socket.AF_UNIX, socket.SOCK_STREAM) self.file = None self.sock.connect(host) - except socket.error as msg: + except socket.error: if self.debuglevel > 0: print('connect fail:', host, file=stderr) if self.sock: self.sock.close() self.sock = None - raise socket.error(msg) + raise (code, msg) = self.getreply() if self.debuglevel > 0: print('connect:', msg, file=stderr) diff -r 2d2d4807a3ed Lib/test/test_codecs.py --- a/Lib/test/test_codecs.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/test/test_codecs.py Sun Dec 16 20:53:44 2012 +0200 @@ -168,6 +168,12 @@ size*"a", ) + # Test readlines() followed by read() + f = getreader("a\n" + "b" * 1000) + self.assertEqual(f.readline(), u"a\n") + self.assertEqual(f.read(), u"b" * 1000) + self.assertEqual(f.read(), u"") + def test_bug1175396(self): s = [ '<%!--===================================================\r\n', diff -r 2d2d4807a3ed Lib/test/test_glob.py --- a/Lib/test/test_glob.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/test/test_glob.py Sun Dec 16 20:53:44 2012 +0200 @@ -31,7 +31,8 @@ self.mktemp('a', 'bcd', 'efg', 'ha') if can_symlink(): os.symlink(self.norm('broken'), self.norm('sym1')) - os.symlink(self.norm('broken'), self.norm('sym2')) + os.symlink('broken', self.norm('sym2')) + os.symlink(os.path.join('a', 'bcd'), self.norm('sym3')) def tearDown(self): shutil.rmtree(self.tempdir) @@ -44,10 +45,16 @@ p = os.path.join(self.tempdir, pattern) res = glob.glob(p) self.assertEqual(list(glob.iglob(p)), res) + bres = [os.fsencode(x) for x in res] + self.assertEqual(glob.glob(os.fsencode(p)), bres) + self.assertEqual(list(glob.iglob(os.fsencode(p))), bres) return res def assertSequencesEqual_noorder(self, l1, l2): + l1 = list(l1) + l2 = list(l2) self.assertEqual(set(l1), set(l2)) + self.assertEqual(sorted(l1), sorted(l2)) def test_glob_literal(self): eq = self.assertSequencesEqual_noorder @@ -58,13 +65,23 @@ # test return types are unicode, but only if os.listdir # returns unicode filenames - uniset = set([str]) - tmp = os.listdir('.') - if set(type(x) for x in tmp) == uniset: + uniset = {str} + tmp = os.listdir(os.curdir) + if {type(x) for x in tmp} == uniset: u1 = glob.glob('*') - u2 = glob.glob('./*') - self.assertEqual(set(type(r) for r in u1), uniset) - self.assertEqual(set(type(r) for r in u2), uniset) + u2 = glob.glob(os.path.join(os.curdir, '*')) + self.assertEqual({type(r) for r in u1}, uniset) + self.assertEqual({type(r) for r in u2}, uniset) + + # test return types are bytes, but only if os.listdir + # returns bytes filenames + bytset = {bytes} + tmp = os.listdir(os.fsencode(os.curdir)) + if {type(x) for x in tmp} == bytset: + u1 = glob.glob(b'*') + u2 = glob.glob(os.path.join(os.fsencode(os.curdir), b'*')) + self.assertEqual({type(r) for r in u1}, bytset) + self.assertEqual({type(r) for r in u2}, bytset) def test_glob_one_directory(self): eq = self.assertSequencesEqual_noorder @@ -111,6 +128,9 @@ {self.norm('aaa'), self.norm('aab')}, {self.norm('aaa') + os.sep, self.norm('aab') + os.sep}, ]) + eq = self.assertSequencesEqual_noorder + eq(self.glob('a*', ''), [os.path.join(self.tempdir, x, '') + for x in ['a', 'aaa', 'aab']]) def test_glob_bytes_directory_with_trailing_slash(self): # Same as test_glob_directory_with_trailing_slash, but with a @@ -128,9 +148,20 @@ ]) @skip_unless_symlink + def test_glob_symlinks(self): + eq = self.assertSequencesEqual_noorder + eq(self.glob('sym3'), [self.norm('sym3')]) + eq(self.glob('sym3', '*'), [self.norm('sym3', 'EF'), + self.norm('sym3', 'efg')]) + eq(self.glob('sym3', ''), [os.path.join(self.norm('sym3'), '')]) + eq(self.glob('*', '*F'), [self.norm('aaa', 'zzzF'), + self.norm('aab', 'F'), self.norm('sym3', 'EF')]) + + @skip_unless_symlink def test_glob_broken_symlinks(self): eq = self.assertSequencesEqual_noorder - eq(self.glob('sym*'), [self.norm('sym1'), self.norm('sym2')]) + eq(self.glob('sym*'), [self.norm('sym1'), self.norm('sym2'), + self.norm('sym3')]) eq(self.glob('sym1'), [self.norm('sym1')]) eq(self.glob('sym2'), [self.norm('sym2')]) diff -r 2d2d4807a3ed Lib/test/test_random.py --- a/Lib/test/test_random.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/test/test_random.py Sun Dec 16 20:53:44 2012 +0200 @@ -1,13 +1,16 @@ #!/usr/bin/env python3 import unittest -import random import time import pickle +import sys import warnings from math import log, exp, pi, fsum, sin from test import support +py_random = support.import_fresh_module('random', blocked=['_random']) +c_random = support.import_fresh_module('random', fresh=['_random']) + class TestBasicOps(unittest.TestCase): # Superclass with tests common to all generators. # Subclasses must arrange for self.gen to retrieve the Random instance @@ -148,11 +151,23 @@ self.assertEqual(y1, y2) def test_pickling(self): - state = pickle.dumps(self.gen) - origseq = [self.gen.random() for i in range(10)] - newgen = pickle.loads(state) - restoredseq = [newgen.random() for i in range(10)] - self.assertEqual(origseq, restoredseq) + with support.CleanImport('random'): + sys.modules['random'] = self.module + state = pickle.dumps(self.gen) + origseq = [self.gen.random() for i in range(10)] + newgen = pickle.loads(state) + restoredseq = [newgen.random() for i in range(10)] + self.assertEqual(origseq, restoredseq) + + if c_random: + # Test interchangeability + if self.module != c_random: + sys.modules['random'] = c_random + else: + sys.modules['random'] = py_random + newgen = pickle.loads(state) + restoredseq = [newgen.random() for i in range(10)] + self.assertEqual(origseq, restoredseq) def test_bug_1727780(self): # verify that version-2-pickles can be loaded @@ -175,9 +190,8 @@ k = sum(randrange(6755399441055744) % 3 == 2 for i in range(n)) self.assertTrue(0.30 < k/n < .37, (k/n)) + class SystemRandom_TestBasicOps(TestBasicOps): - gen = random.SystemRandom() - def test_autoseed(self): # Doesn't need to do anything except not fail self.gen.seed() @@ -271,10 +285,17 @@ self.assertEqual(k, numbits) # note the stronger assertion self.assertTrue(2**k > n > 2**(k-1)) # note the stronger assertion +class SystemRandom_TestBasicOpsPython(SystemRandom_TestBasicOps): + module = py_random + gen = module.SystemRandom() + + at unittest.skipUnless(c_random, 'requires _random') +class SystemRandom_TestBasicOpsC(SystemRandom_TestBasicOps): + module = c_random + gen = module.SystemRandom() + class MersenneTwister_TestBasicOps(TestBasicOps): - gen = random.Random() - def test_guaranteed_stable(self): # These sequences are guaranteed to stay the same across versions of python self.gen.seed(3456147, version=1) @@ -446,6 +467,16 @@ self.assertTrue(stop < x <= start) self.assertEqual((x+stop)%step, 0) +class MersenneTwister_TestBasicOpsPython(MersenneTwister_TestBasicOps): + module = py_random + gen = module.Random() + + at unittest.skipUnless(c_random, 'requires _random') +class MersenneTwister_TestBasicOpsC(MersenneTwister_TestBasicOps): + module = c_random + gen = module.Random() + + def gamma(z, sqrt2pi=(2.0*pi)**0.5): # Reflection to right half of complex plane if z < 0.5: @@ -467,7 +498,7 @@ class TestDistributions(unittest.TestCase): def test_zeroinputs(self): # Verify that distributions can handle a series of zero inputs' - g = random.Random() + g = self.module.Random() x = [g.random() for i in range(50)] + [0.0]*5 g.random = x[:].pop; g.uniform(1,10) g.random = x[:].pop; g.paretovariate(1.0) @@ -486,7 +517,7 @@ def test_avg_std(self): # Use integration to test distribution average and standard deviation. # Only works for distributions which do not consume variates in pairs - g = random.Random() + g = self.module.Random() N = 5000 x = [i/float(N) for i in range(1,N)] for variate, args, mu, sigmasqrd in [ @@ -512,36 +543,53 @@ self.assertAlmostEqual(s1/N, mu, places=2) self.assertAlmostEqual(s2/(N-1), sigmasqrd, places=2) +class TestDistributionsPython(TestDistributions): + module = py_random + + at unittest.skipUnless(c_random, 'requires _random') +class TestDistributionsC(TestDistributions): + module = c_random + + class TestModule(unittest.TestCase): def testMagicConstants(self): - self.assertAlmostEqual(random.NV_MAGICCONST, 1.71552776992141) - self.assertAlmostEqual(random.TWOPI, 6.28318530718) - self.assertAlmostEqual(random.LOG4, 1.38629436111989) - self.assertAlmostEqual(random.SG_MAGICCONST, 2.50407739677627) + self.assertAlmostEqual(self.module.NV_MAGICCONST, 1.71552776992141) + self.assertAlmostEqual(self.module.TWOPI, 6.28318530718) + self.assertAlmostEqual(self.module.LOG4, 1.38629436111989) + self.assertAlmostEqual(self.module.SG_MAGICCONST, 2.50407739677627) def test__all__(self): # tests validity but not completeness of the __all__ list - self.assertTrue(set(random.__all__) <= set(dir(random))) + self.assertTrue(set(self.module.__all__) <= set(dir(self.module))) def test_random_subclass_with_kwargs(self): # SF bug #1486663 -- this used to erroneously raise a TypeError - class Subclass(random.Random): + module = self.module + class Subclass(module.Random): def __init__(self, newarg=None): - random.Random.__init__(self) + module.Random.__init__(self) Subclass(newarg=1) +class TestModulePython(TestModule): + module = py_random + + at unittest.skipUnless(c_random, 'requires _random') +class TestModuleC(TestModule): + module = c_random + def test_main(verbose=None): - testclasses = [MersenneTwister_TestBasicOps, - TestDistributions, - TestModule] + testclasses = [ + MersenneTwister_TestBasicOpsPython, MersenneTwister_TestBasicOpsC, + TestDistributionsPython, TestDistributionsC, + TestModulePython, TestModuleC] try: - random.SystemRandom().random() + py_random.SystemRandom().random() except NotImplementedError: pass else: - testclasses.append(SystemRandom_TestBasicOps) + testclasses.extend([SystemRandom_TestBasicOpsPython, SystemRandom_TestBasicOpsC]) support.run_unittest(*testclasses) diff -r 2d2d4807a3ed Lib/test/test_subprocess.py --- a/Lib/test/test_subprocess.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/test/test_subprocess.py Sun Dec 16 20:53:44 2012 +0200 @@ -2161,8 +2161,7 @@ stderr=subprocess.PIPE) as proc: pass - if c.exception.errno != errno.ENOENT: # ignore "no such file" - raise c.exception + self.assertEqual(c.exception.errno, errno.ENOENT) def test_main(): diff -r 2d2d4807a3ed Lib/test/test_tarfile.py --- a/Lib/test/test_tarfile.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/test/test_tarfile.py Sun Dec 16 20:53:44 2012 +0200 @@ -340,22 +340,16 @@ try: tar.extract("ustar/regtype", TEMPDIR) - try: - tar.extract("ustar/lnktype", TEMPDIR) - except EnvironmentError as e: - if e.errno == errno.ENOENT: - self.fail("hardlink not extracted properly") + self.addCleanup(os.remove, os.path.join(TEMPDIR, "ustar/regtype")) + tar.extract("ustar/lnktype", TEMPDIR) + self.addCleanup(os.remove, os.path.join(TEMPDIR, "ustar/lnktype")) with open(os.path.join(TEMPDIR, "ustar/lnktype"), "rb") as f: data = f.read() self.assertEqual(md5sum(data), md5_regtype) - try: - tar.extract("ustar/symtype", TEMPDIR) - except EnvironmentError as e: - if e.errno == errno.ENOENT: - self.fail("symlink not extracted properly") - + tar.extract("ustar/symtype", TEMPDIR) + self.addCleanup(os.remove, os.path.join(TEMPDIR, "ustar/symtype")) with open(os.path.join(TEMPDIR, "ustar/symtype"), "rb") as f: data = f.read() self.assertEqual(md5sum(data), md5_regtype) diff -r 2d2d4807a3ed Modules/_randommodule.c --- a/Modules/_randommodule.c Sun Dec 16 16:40:22 2012 +0100 +++ b/Modules/_randommodule.c Sun Dec 16 20:53:44 2012 +0200 @@ -389,6 +389,9 @@ return NULL; } + if (k <= 32) /* Fast path */ + return PyLong_FromUnsignedLong(genrand_int32(self) >> (32 - k)); + bytes = ((k - 1) / 32 + 1) * 4; bytearray = (unsigned char *)PyMem_Malloc(bytes); if (bytearray == NULL) { -------------- next part -------------- diff -r b0935ef48186 Lib/lib-tk/Tkinter.py --- a/Lib/lib-tk/Tkinter.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/lib-tk/Tkinter.py Sun Dec 16 20:53:46 2012 +0200 @@ -41,6 +41,7 @@ TclError = _tkinter.TclError from types import * from Tkconstants import * +import re wantobjects = 1 @@ -58,6 +59,37 @@ except AttributeError: _tkinter.deletefilehandler = None +_magic_re = re.compile(r'([\\{}])') +_space_re = re.compile(r'([\s])') + +def _join(value): + """Internal function.""" + return ' '.join(map(_stringify, value)) + +def _stringify(value): + """Internal function.""" + if isinstance(value, (list, tuple)): + if len(value) == 1: + value = _stringify(value[0]) + if value[0] == '{': + value = '{%s}' % value + else: + value = '{%s}' % _join(value) + else: + if isinstance(value, basestring): + value = unicode(value) + else: + value = str(value) + if not value: + value = '{}' + elif _magic_re.search(value): + # add '\' before special characters and spaces + value = _magic_re.sub(r'\\\1', value) + value = _space_re.sub(r'\\\1', value) + elif value[0] == '"' or _space_re.search(value): + value = '{%s}' % value + return value + def _flatten(tuple): """Internal function.""" res = () @@ -1086,7 +1118,7 @@ nv.append('%d' % item) else: # format it to proper Tcl code if it contains space - nv.append(('{%s}' if ' ' in item else '%s') % item) + nv.append(_stringify(item)) else: v = ' '.join(nv) res = res + ('-'+k, v) diff -r b0935ef48186 Lib/lib-tk/test/test_ttk/test_functions.py --- a/Lib/lib-tk/test/test_ttk/test_functions.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/lib-tk/test/test_ttk/test_functions.py Sun Dec 16 20:53:46 2012 +0200 @@ -50,13 +50,17 @@ ttk._format_optdict({'test': {'left': 'as is'}}), {'-test': {'left': 'as is'}}) - # check script formatting and untouched value(s) + # check script formatting check_against( ttk._format_optdict( - {'test': [1, -1, '', '2m', 0], 'nochange1': 3, - 'nochange2': 'abc def'}, script=True), - {'-test': '{1 -1 {} 2m 0}', '-nochange1': 3, - '-nochange2': 'abc def' }) + {'test': [1, -1, '', '2m', 0], 'test2': 3, + 'test3': '', 'test4': 'abc def', + 'test5': '"abc"', 'test6': '{}', + 'test7': '} -spam {'}, script=True), + {'-test': '{1 -1 {} 2m 0}', '-test2': '3', + '-test3': '{}', '-test4': '{abc def}', + '-test5': '{"abc"}', '-test6': r'\{\}', + '-test7': r'\}\ -spam\ \{'}) opts = {u'??????': True, u'??': False} orig_opts = opts.copy() @@ -70,6 +74,32 @@ ttk._format_optdict( {'option': ('one two', 'three')}), {'-option': '{one two} three'}) + check_against( + ttk._format_optdict( + {'option': ('one\ttwo', 'three')}), + {'-option': '{one\ttwo} three'}) + + # passing empty strings inside a tuple/list + check_against( + ttk._format_optdict( + {'option': ('', 'one')}), + {'-option': '{} one'}) + + # passing values with braces inside a tuple/list + check_against( + ttk._format_optdict( + {'option': ('one} {two', 'three')}), + {'-option': r'one\}\ \{two three'}) + + # passing quoted strings inside a tuple/list + check_against( + ttk._format_optdict( + {'option': ('"one"', 'two')}), + {'-option': '{"one"} two'}) + check_against( + ttk._format_optdict( + {'option': ('{one}', 'two')}), + {'-option': r'\{one\} two'}) # ignore an option amount_opts = len(ttk._format_optdict(opts, ignore=(u'??'))) // 2 diff -r b0935ef48186 Lib/lib-tk/test/test_ttk/test_widgets.py --- a/Lib/lib-tk/test/test_ttk/test_widgets.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/lib-tk/test/test_ttk/test_widgets.py Sun Dec 16 20:53:46 2012 +0200 @@ -188,6 +188,14 @@ self.combo.configure(values=[1, '', 2]) self.assertEqual(self.combo['values'], ('1', '', '2')) + # testing values with spaces + self.combo['values'] = ['a b', 'a\tb', 'a\nb'] + self.assertEqual(self.combo['values'], ('a b', 'a\tb', 'a\nb')) + + # testing values with special characters + self.combo['values'] = [r'a\tb', '"a"', '} {'] + self.assertEqual(self.combo['values'], (r'a\tb', '"a"', '} {')) + # out of range self.assertRaises(Tkinter.TclError, self.combo.current, len(self.combo['values'])) diff -r b0935ef48186 Lib/lib-tk/ttk.py --- a/Lib/lib-tk/ttk.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/lib-tk/ttk.py Sun Dec 16 20:53:46 2012 +0200 @@ -26,8 +26,7 @@ "tclobjs_to_py", "setup_master"] import Tkinter - -_flatten = Tkinter._flatten +from Tkinter import _flatten, _join, _stringify # Verify if Tk is new enough to not need the Tile package _REQUIRE_TILE = True if Tkinter.TkVersion < 8.5 else False @@ -47,39 +46,56 @@ master.tk.eval('package require tile') # TclError may be raised here master._tile_loaded = True +def _format_optvalue(value, script=False): + """Internal function.""" + if script: + # if caller passes a Tcl script to tk.call, all the values need to + # be grouped into words (arguments to a command in Tcl dialect) + value = _stringify(value) + elif isinstance(value, (list, tuple)): + value = _join(value) + return value + def _format_optdict(optdict, script=False, ignore=None): """Formats optdict to a tuple to pass it to tk.call. E.g. (script=False): {'foreground': 'blue', 'padding': [1, 2, 3, 4]} returns: ('-foreground', 'blue', '-padding', '1 2 3 4')""" - format = "%s" if not script else "{%s}" opts = [] for opt, value in optdict.iteritems(): - if ignore and opt in ignore: - continue + if not ignore or opt not in ignore: + opts.append("-%s" % opt) + if value is not None: + opts.append(_format_optvalue(value, script)) - if isinstance(value, (list, tuple)): - v = [] - for val in value: - if isinstance(val, basestring): - v.append(unicode(val) if val else '{}') - else: - v.append(str(val)) + return _flatten(opts) - # format v according to the script option, but also check for - # space in any value in v in order to group them correctly - value = format % ' '.join( - ('{%s}' if ' ' in val else '%s') % val for val in v) - - if script and value == '': - value = '{}' # empty string in Python is equivalent to {} in Tcl - - opts.append(("-%s" % opt, value)) - - # Remember: _flatten skips over None - return _flatten(opts) +def _mapdict_values(items): + # each value in mapdict is expected to be a sequence, where each item + # is another sequence containing a state (or several) and a value + # E.g. (script=False): + # [('active', 'selected', 'grey'), ('focus', [1, 2, 3, 4])] + # returns: + # ['active selected', 'grey', 'focus', [1, 2, 3, 4]] + opt_val = [] + for item in items: + state = item[:-1] + val = item[-1] + # hacks for bakward compatibility + state[0] # raise IndexError if empty + if len(state) == 1: + # if it is empty (something that evaluates to False), then + # format it to Tcl code to denote the "normal" state + state = state[0] or '' + else: + # group multiple states + state = ' '.join(state) # raise TypeError if not str + opt_val.append(state) + if val is not None: + opt_val.append(val) + return opt_val def _format_mapdict(mapdict, script=False): """Formats mapdict to pass it to tk.call. @@ -90,32 +106,11 @@ returns: ('-expand', '{active selected} grey focus {1, 2, 3, 4}')""" - # if caller passes a Tcl script to tk.call, all the values need to - # be grouped into words (arguments to a command in Tcl dialect) - format = "%s" if not script else "{%s}" opts = [] for opt, value in mapdict.iteritems(): - - opt_val = [] - # each value in mapdict is expected to be a sequence, where each item - # is another sequence containing a state (or several) and a value - for statespec in value: - state, val = statespec[:-1], statespec[-1] - - if len(state) > 1: # group multiple states - state = "{%s}" % ' '.join(state) - else: # single state - # if it is empty (something that evaluates to False), then - # format it to Tcl code to denote the "normal" state - state = state[0] or '{}' - - if isinstance(val, (list, tuple)): # val needs to be grouped - val = "{%s}" % ' '.join(map(str, val)) - - opt_val.append("%s %s" % (state, val)) - - opts.append(("-%s" % opt, format % ' '.join(opt_val))) + opts.extend(("-%s" % opt, + _format_optvalue(_mapdict_values(value), script))) return _flatten(opts) @@ -129,7 +124,7 @@ iname = args[0] # next args, if any, are statespec/value pairs which is almost # a mapdict, but we just need the value - imagespec = _format_mapdict({None: args[1:]})[1] + imagespec = _join(_mapdict_values(args[1:])) spec = "%s %s" % (iname, imagespec) else: @@ -138,7 +133,7 @@ # themed styles on Windows XP and Vista. # Availability: Tk 8.6, Windows XP and Vista. class_name, part_id = args[:2] - statemap = _format_mapdict({None: args[2:]})[1] + statemap = _join(_mapdict_values(args[2:])) spec = "%s %s %s" % (class_name, part_id, statemap) opts = _format_optdict(kw, script) @@ -148,11 +143,11 @@ # otherwise it will clone {} (empty element) spec = args[0] # theme name if len(args) > 1: # elementfrom specified - opts = (args[1], ) + opts = (_format_optvalue(args[1], script),) if script: spec = '{%s}' % spec - opts = ' '.join(map(str, opts)) + opts = ' '.join(opts) return spec, opts @@ -189,7 +184,7 @@ for layout_elem in layout: elem, opts = layout_elem opts = opts or {} - fopts = ' '.join(map(str, _format_optdict(opts, True, "children"))) + fopts = ' '.join(_format_optdict(opts, True, ("children",))) head = "%s%s%s" % (' ' * indent, elem, (" %s" % fopts) if fopts else '') if "children" in opts: @@ -215,11 +210,11 @@ for name, opts in settings.iteritems(): # will format specific keys according to Tcl code if opts.get('configure'): # format 'configure' - s = ' '.join(map(unicode, _format_optdict(opts['configure'], True))) + s = ' '.join(_format_optdict(opts['configure'], True)) script.append("ttk::style configure %s %s;" % (name, s)) if opts.get('map'): # format 'map' - s = ' '.join(map(unicode, _format_mapdict(opts['map'], True))) + s = ' '.join(_format_mapdict(opts['map'], True)) script.append("ttk::style map %s %s;" % (name, s)) if 'layout' in opts: # format 'layout' which may be empty @@ -706,30 +701,9 @@ exportselection, justify, height, postcommand, state, textvariable, values, width """ - # The "values" option may need special formatting, so leave to - # _format_optdict the responsibility to format it - if "values" in kw: - kw["values"] = _format_optdict({'v': kw["values"]})[1] - Entry.__init__(self, master, "ttk::combobox", **kw) - def __setitem__(self, item, value): - if item == "values": - value = _format_optdict({item: value})[1] - - Entry.__setitem__(self, item, value) - - - def configure(self, cnf=None, **kw): - """Custom Combobox configure, created to properly format the values - option.""" - if "values" in kw: - kw["values"] = _format_optdict({'v': kw["values"]})[1] - - return Entry.configure(self, cnf, **kw) - - def current(self, newindex=None): """If newindex is supplied, sets the combobox value to the element at position newindex in the list of values. Otherwise, diff -r b0935ef48186 Lib/test/test_glob.py --- a/Lib/test/test_glob.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_glob.py Sun Dec 16 20:53:46 2012 +0200 @@ -5,6 +5,8 @@ import shutil import sys +def fsdecode(s): + return unicode(s, sys.getfilesystemencoding()) class GlobTests(unittest.TestCase): @@ -31,7 +33,8 @@ self.mktemp('a', 'bcd', 'efg', 'ha') if hasattr(os, 'symlink'): os.symlink(self.norm('broken'), self.norm('sym1')) - os.symlink(self.norm('broken'), self.norm('sym2')) + os.symlink('broken', self.norm('sym2')) + os.symlink(os.path.join('a', 'bcd'), self.norm('sym3')) def tearDown(self): shutil.rmtree(self.tempdir) @@ -44,10 +47,16 @@ p = os.path.join(self.tempdir, pattern) res = glob.glob(p) self.assertEqual(list(glob.iglob(p)), res) + ures = [fsdecode(x) for x in res] + self.assertEqual(glob.glob(fsdecode(p)), ures) + self.assertEqual(list(glob.iglob(fsdecode(p))), ures) return res def assertSequencesEqual_noorder(self, l1, l2): + l1 = list(l1) + l2 = list(l2) self.assertEqual(set(l1), set(l2)) + self.assertEqual(sorted(l1), sorted(l2)) def test_glob_literal(self): eq = self.assertSequencesEqual_noorder @@ -58,13 +67,23 @@ # test return types are unicode, but only if os.listdir # returns unicode filenames - uniset = set([unicode]) - tmp = os.listdir(u'.') - if set(type(x) for x in tmp) == uniset: + uniset = {unicode} + tmp = os.listdir(fsdecode(os.curdir)) + if {type(x) for x in tmp} == uniset: u1 = glob.glob(u'*') - u2 = glob.glob(u'./*') - self.assertEqual(set(type(r) for r in u1), uniset) - self.assertEqual(set(type(r) for r in u2), uniset) + u2 = glob.glob(os.path.join(fsdecode(os.curdir), u'*')) + self.assertEqual({type(r) for r in u1}, uniset) + self.assertEqual({type(r) for r in u2}, uniset) + + # test return types are string, but only if os.listdir + # returns string filenames + strset = {str} + tmp = os.listdir(os.curdir) + if {type(x) for x in tmp} == strset: + u1 = glob.glob('*') + u2 = glob.glob(os.path.join(os.curdir, '*')) + self.assertEqual({type(r) for r in u1}, strset) + self.assertEqual({type(r) for r in u2}, strset) def test_glob_one_directory(self): eq = self.assertSequencesEqual_noorder @@ -103,11 +122,24 @@ self.assertEqual(len(res), 1) # either of these results are reasonable self.assertIn(res[0], [self.tempdir, self.tempdir + os.sep]) + eq = self.assertSequencesEqual_noorder + eq(self.glob('a*', ''), [os.path.join(self.tempdir, x, '') + for x in ['a', 'aaa', 'aab']]) + + def test_glob_symlinks(self): + if hasattr(os, 'symlink'): + eq = self.assertSequencesEqual_noorder + eq(self.glob('sym3'), [self.norm('sym3')]) + eq(self.glob('sym3', '*'), [self.norm('sym3', 'EF'), + self.norm('sym3', 'efg')]) + eq(self.glob('*', '*F'), [self.norm('aaa', 'zzzF'), + self.norm('aab', 'F'), self.norm('sym3', 'EF')]) def test_glob_broken_symlinks(self): if hasattr(os, 'symlink'): eq = self.assertSequencesEqual_noorder - eq(self.glob('sym*'), [self.norm('sym1'), self.norm('sym2')]) + eq(self.glob('sym*'), [self.norm('sym1'), self.norm('sym2'), + self.norm('sym3')]) eq(self.glob('sym1'), [self.norm('sym1')]) eq(self.glob('sym2'), [self.norm('sym2')]) From report at bugs.python.org Sun Dec 16 20:02:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 19:02:31 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1355684551.62.0.0759696950027.issue16688@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. Matthew, can you please submit a contributor form? http://python.org/psf/contrib/contrib-form/ http://python.org/psf/contrib/ ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 20:13:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 19:13:53 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1355681356.37.0.831273497672.issue16618@psf.upfronthosting.co.za> Message-ID: <201212162113.32513.storchaka@gmail.com> Serhiy Storchaka added the comment: Patches updated. Unrelated changes removed. ---------- Added file: http://bugs.python.org/file28335/glob_dotfiles_2.patch Added file: http://bugs.python.org/file28336/glob_tests-2.7_2.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 2d2d4807a3ed Lib/glob.py --- a/Lib/glob.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/glob.py Sun Dec 16 21:10:24 2012 +0200 @@ -57,8 +57,8 @@ names = os.listdir(dirname) except os.error: return [] - if pattern[0] != '.': - names = [x for x in names if x[0] != '.'] + if not _ishidden(pattern): + names = [x for x in names if not _ishidden(x)] return fnmatch.filter(names, pattern) def glob0(dirname, basename): @@ -82,3 +82,6 @@ else: match = magic_check.search(s) return match is not None + +def _ishidden(path): + return path[0] in ('.', b'.'[0]) From report at bugs.python.org Sun Dec 16 20:14:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 19:14:34 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> Message-ID: <1355685274.07.0.725527775294.issue16618@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28333/glob_dotfiles_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 20:14:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 19:14:53 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> Message-ID: <1355685293.1.0.196739677095.issue16618@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28334/glob_tests-2.7_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 20:21:42 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 16 Dec 2012 19:21:42 +0000 Subject: [issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS In-Reply-To: <1327519681.79.0.252690630069.issue13863@psf.upfronthosting.co.za> Message-ID: <1355685702.09.0.249096595268.issue13863@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch, with a test. ---------- Added file: http://bugs.python.org/file28337/pyc_mtime2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 20:47:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 19:47:16 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <201212162113.32513.storchaka@gmail.com> Message-ID: <201212162146.51152.storchaka@gmail.com> Serhiy Storchaka added the comment: Yet one attempt. ---------- Added file: http://bugs.python.org/file28338/glob_dotfiles_2.patch Added file: http://bugs.python.org/file28339/glob_tests-2.7_2.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 2d2d4807a3ed Lib/glob.py --- a/Lib/glob.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/glob.py Sun Dec 16 21:12:42 2012 +0200 @@ -57,8 +57,8 @@ names = os.listdir(dirname) except os.error: return [] - if pattern[0] != '.': - names = [x for x in names if x[0] != '.'] + if not _ishidden(pattern): + names = [x for x in names if not _ishidden(x)] return fnmatch.filter(names, pattern) def glob0(dirname, basename): @@ -82,3 +82,6 @@ else: match = magic_check.search(s) return match is not None + +def _ishidden(path): + return path[0] in ('.', b'.'[0]) diff -r 2d2d4807a3ed Lib/test/test_glob.py --- a/Lib/test/test_glob.py Sun Dec 16 16:40:22 2012 +0100 +++ b/Lib/test/test_glob.py Sun Dec 16 21:12:42 2012 +0200 @@ -31,7 +31,8 @@ self.mktemp('a', 'bcd', 'efg', 'ha') if can_symlink(): os.symlink(self.norm('broken'), self.norm('sym1')) - os.symlink(self.norm('broken'), self.norm('sym2')) + os.symlink('broken', self.norm('sym2')) + os.symlink(os.path.join('a', 'bcd'), self.norm('sym3')) def tearDown(self): shutil.rmtree(self.tempdir) @@ -44,10 +45,16 @@ p = os.path.join(self.tempdir, pattern) res = glob.glob(p) self.assertEqual(list(glob.iglob(p)), res) + bres = [os.fsencode(x) for x in res] + self.assertEqual(glob.glob(os.fsencode(p)), bres) + self.assertEqual(list(glob.iglob(os.fsencode(p))), bres) return res def assertSequencesEqual_noorder(self, l1, l2): + l1 = list(l1) + l2 = list(l2) self.assertEqual(set(l1), set(l2)) + self.assertEqual(sorted(l1), sorted(l2)) def test_glob_literal(self): eq = self.assertSequencesEqual_noorder @@ -58,13 +65,23 @@ # test return types are unicode, but only if os.listdir # returns unicode filenames - uniset = set([str]) - tmp = os.listdir('.') - if set(type(x) for x in tmp) == uniset: + uniset = {str} + tmp = os.listdir(os.curdir) + if {type(x) for x in tmp} == uniset: u1 = glob.glob('*') - u2 = glob.glob('./*') - self.assertEqual(set(type(r) for r in u1), uniset) - self.assertEqual(set(type(r) for r in u2), uniset) + u2 = glob.glob(os.path.join(os.curdir, '*')) + self.assertEqual({type(r) for r in u1}, uniset) + self.assertEqual({type(r) for r in u2}, uniset) + + # test return types are bytes, but only if os.listdir + # returns bytes filenames + bytset = {bytes} + tmp = os.listdir(os.fsencode(os.curdir)) + if {type(x) for x in tmp} == bytset: + u1 = glob.glob(b'*') + u2 = glob.glob(os.path.join(os.fsencode(os.curdir), b'*')) + self.assertEqual({type(r) for r in u1}, bytset) + self.assertEqual({type(r) for r in u2}, bytset) def test_glob_one_directory(self): eq = self.assertSequencesEqual_noorder @@ -111,6 +128,9 @@ {self.norm('aaa'), self.norm('aab')}, {self.norm('aaa') + os.sep, self.norm('aab') + os.sep}, ]) + eq = self.assertSequencesEqual_noorder + eq(self.glob('a*', ''), [os.path.join(self.tempdir, x, '') + for x in ['a', 'aaa', 'aab']]) def test_glob_bytes_directory_with_trailing_slash(self): # Same as test_glob_directory_with_trailing_slash, but with a @@ -128,9 +148,20 @@ ]) @skip_unless_symlink + def test_glob_symlinks(self): + eq = self.assertSequencesEqual_noorder + eq(self.glob('sym3'), [self.norm('sym3')]) + eq(self.glob('sym3', '*'), [self.norm('sym3', 'EF'), + self.norm('sym3', 'efg')]) + eq(self.glob('sym3', ''), [os.path.join(self.norm('sym3'), '')]) + eq(self.glob('*', '*F'), [self.norm('aaa', 'zzzF'), + self.norm('aab', 'F'), self.norm('sym3', 'EF')]) + + @skip_unless_symlink def test_glob_broken_symlinks(self): eq = self.assertSequencesEqual_noorder - eq(self.glob('sym*'), [self.norm('sym1'), self.norm('sym2')]) + eq(self.glob('sym*'), [self.norm('sym1'), self.norm('sym2'), + self.norm('sym3')]) eq(self.glob('sym1'), [self.norm('sym1')]) eq(self.glob('sym2'), [self.norm('sym2')]) -------------- next part -------------- diff -r b0935ef48186 Lib/test/test_glob.py --- a/Lib/test/test_glob.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_glob.py Sun Dec 16 21:12:51 2012 +0200 @@ -5,6 +5,8 @@ import shutil import sys +def fsdecode(s): + return unicode(s, sys.getfilesystemencoding()) class GlobTests(unittest.TestCase): @@ -31,7 +33,8 @@ self.mktemp('a', 'bcd', 'efg', 'ha') if hasattr(os, 'symlink'): os.symlink(self.norm('broken'), self.norm('sym1')) - os.symlink(self.norm('broken'), self.norm('sym2')) + os.symlink('broken', self.norm('sym2')) + os.symlink(os.path.join('a', 'bcd'), self.norm('sym3')) def tearDown(self): shutil.rmtree(self.tempdir) @@ -44,10 +47,16 @@ p = os.path.join(self.tempdir, pattern) res = glob.glob(p) self.assertEqual(list(glob.iglob(p)), res) + ures = [fsdecode(x) for x in res] + self.assertEqual(glob.glob(fsdecode(p)), ures) + self.assertEqual(list(glob.iglob(fsdecode(p))), ures) return res def assertSequencesEqual_noorder(self, l1, l2): + l1 = list(l1) + l2 = list(l2) self.assertEqual(set(l1), set(l2)) + self.assertEqual(sorted(l1), sorted(l2)) def test_glob_literal(self): eq = self.assertSequencesEqual_noorder @@ -58,13 +67,23 @@ # test return types are unicode, but only if os.listdir # returns unicode filenames - uniset = set([unicode]) - tmp = os.listdir(u'.') - if set(type(x) for x in tmp) == uniset: + uniset = {unicode} + tmp = os.listdir(fsdecode(os.curdir)) + if {type(x) for x in tmp} == uniset: u1 = glob.glob(u'*') - u2 = glob.glob(u'./*') - self.assertEqual(set(type(r) for r in u1), uniset) - self.assertEqual(set(type(r) for r in u2), uniset) + u2 = glob.glob(os.path.join(fsdecode(os.curdir), u'*')) + self.assertEqual({type(r) for r in u1}, uniset) + self.assertEqual({type(r) for r in u2}, uniset) + + # test return types are string, but only if os.listdir + # returns string filenames + strset = {str} + tmp = os.listdir(os.curdir) + if {type(x) for x in tmp} == strset: + u1 = glob.glob('*') + u2 = glob.glob(os.path.join(os.curdir, '*')) + self.assertEqual({type(r) for r in u1}, strset) + self.assertEqual({type(r) for r in u2}, strset) def test_glob_one_directory(self): eq = self.assertSequencesEqual_noorder @@ -103,11 +122,24 @@ self.assertEqual(len(res), 1) # either of these results are reasonable self.assertIn(res[0], [self.tempdir, self.tempdir + os.sep]) + eq = self.assertSequencesEqual_noorder + eq(self.glob('a*', ''), [os.path.join(self.tempdir, x, '') + for x in ['a', 'aaa', 'aab']]) + + def test_glob_symlinks(self): + if hasattr(os, 'symlink'): + eq = self.assertSequencesEqual_noorder + eq(self.glob('sym3'), [self.norm('sym3')]) + eq(self.glob('sym3', '*'), [self.norm('sym3', 'EF'), + self.norm('sym3', 'efg')]) + eq(self.glob('*', '*F'), [self.norm('aaa', 'zzzF'), + self.norm('aab', 'F'), self.norm('sym3', 'EF')]) def test_glob_broken_symlinks(self): if hasattr(os, 'symlink'): eq = self.assertSequencesEqual_noorder - eq(self.glob('sym*'), [self.norm('sym1'), self.norm('sym2')]) + eq(self.glob('sym*'), [self.norm('sym1'), self.norm('sym2'), + self.norm('sym3')]) eq(self.glob('sym1'), [self.norm('sym1')]) eq(self.glob('sym2'), [self.norm('sym2')]) From report at bugs.python.org Sun Dec 16 20:49:43 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 16 Dec 2012 19:49:43 +0000 Subject: [issue16700] Document that bytes OS API can returns unusable results on Windows In-Reply-To: <1355677626.4.0.0112948407942.issue16700@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: I don't remember il the deprecation of bytes filename is documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 20:52:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 19:52:23 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> Message-ID: <1355687543.24.0.322299811002.issue16618@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28335/glob_dotfiles_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 20:52:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 16 Dec 2012 19:52:37 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> Message-ID: <1355687557.93.0.782076830833.issue16618@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28336/glob_tests-2.7_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 21:00:45 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 16 Dec 2012 20:00:45 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1355688045.02.0.978495739613.issue16694@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 21:12:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 16 Dec 2012 20:12:42 +0000 Subject: [issue15783] decimal: Support None default values in the C accelerator module In-Reply-To: <1345904683.65.0.863127291798.issue15783@psf.upfronthosting.co.za> Message-ID: <3YPc9k0wX0zNl2@mail.python.org> Roundup Robot added the comment: New changeset 907d71668d3c by Stefan Krah in branch '3.3': Issue #15783: Support None default values in the Context() constructor. http://hg.python.org/cpython/rev/907d71668d3c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 21:26:43 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 16 Dec 2012 20:26:43 +0000 Subject: [issue15783] decimal: Support None default values in the C accelerator module In-Reply-To: <1345904683.65.0.863127291798.issue15783@psf.upfronthosting.co.za> Message-ID: <1355689603.67.0.798338295829.issue15783@psf.upfronthosting.co.za> Stefan Krah added the comment: I think I've found all of them now. Closing. ---------- assignee: -> skrah components: +Library (Lib) resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 21:41:14 2012 From: report at bugs.python.org (Ashwini Chaudhary) Date: Sun, 16 Dec 2012 20:41:14 +0000 Subject: [issue16701] Docs missing the behavior of += (in-place add) for lists. Message-ID: <1355690474.0.0.76209480062.issue16701@psf.upfronthosting.co.za> New submission from Ashwini Chaudhary: I think the python docs are missing the behavior of += for lists. It actually calls list.extend() but can't find that anywhere in docs expect in source code, http://hg.python.org/cpython/file/2d2d4807a3ed/Objects/listobject.c#l892. ---------- assignee: docs at python components: Documentation messages: 177627 nosy: docs at python, montysinngh priority: normal severity: normal status: open title: Docs missing the behavior of += (in-place add) for lists. type: enhancement versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 22:15:28 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 16 Dec 2012 21:15:28 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: <1321140269.61.0.335726830367.issue13390@psf.upfronthosting.co.za> Message-ID: <1355692528.97.0.0533340736034.issue13390@psf.upfronthosting.co.za> Stefan Krah added the comment: ``./configure --without-pymalloc'' fails here: gcc -pthread -Xlinker -export-dynamic -o python Modules/python.o libpython3.4.a -lpthread -ldl -lutil -lm libpython3.4.a(sysmodule.o): In function `sys_getallocatedblocks': /home/stefan/hg/cpython/./Python/sysmodule.c:900: undefined reference to `_Py_GetAllocatedBlocks' collect2: error: ld returned 1 exit status make: *** [python] Error 1 ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 22:31:02 2012 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Dec 2012 21:31:02 +0000 Subject: [issue16661] test_posix.test_getgrouplist fails on some systems - incorrectly comparing getgroups and getgrouplist results In-Reply-To: <1355197575.99.0.863883653591.issue16661@psf.upfronthosting.co.za> Message-ID: <1355693462.0.0.421463910466.issue16661@psf.upfronthosting.co.za> Ned Deily added the comment: The getgroups test failure on OS X is likely the known limitation documented in issue10433. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 22:34:54 2012 From: report at bugs.python.org (Ned Deily) Date: Sun, 16 Dec 2012 21:34:54 +0000 Subject: [issue16698] test_posix.test_getgroups fails on some systems In-Reply-To: <1355666709.31.0.161385459804.issue16698@psf.upfronthosting.co.za> Message-ID: <1355693694.88.0.673946487.issue16698@psf.upfronthosting.co.za> Ned Deily added the comment: The test failure on OS X is likely an instance of the platform limitation documented in issue10433. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 22:44:54 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 16 Dec 2012 21:44:54 +0000 Subject: [issue16701] Docs missing the behavior of += (in-place add) for lists. In-Reply-To: <1355690474.0.0.76209480062.issue16701@psf.upfronthosting.co.za> Message-ID: <1355694294.95.0.344682176724.issue16701@psf.upfronthosting.co.za> R. David Murray added the comment: Well, it is effectively documented by the text here: http://docs.python.org/3/reference/simple_stmts.html#augmented-assignment-statements since "a + b" is logically equivalent to a.extend(b) when a is being updated "in-place". The fact that it is in fact implemented using extend is an implementation detail. That said, it would be logical to add an entry for the augmented assignment to the table here: http://docs.python.org/3/library/stdtypes.html#mutable-sequence-types There also may be other places in that chapter where augmented assignment deserves mention. ---------- nosy: +r.david.murray versions: -Python 3.1, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 22:51:06 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 16 Dec 2012 21:51:06 +0000 Subject: [issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS In-Reply-To: <1327519681.79.0.252690630069.issue13863@psf.upfronthosting.co.za> Message-ID: <1355694666.75.0.998509413593.issue13863@psf.upfronthosting.co.za> Mark Dickinson added the comment: Updated patch to address comments from Serhiy on Rietveld: - use '& 0xffffffff' in the Python code that gets the mtime; only the bottom 32 bits of the mtime are used. - simplify line that reads mtime from .pyc file. Also improved an error check in the C code: compare with INVALID_HANDLE_VALUE instead of comparing with -1 directly. ---------- Added file: http://bugs.python.org/file28340/pyc_mtime3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 23:13:57 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 16 Dec 2012 22:13:57 +0000 Subject: [issue16655] IDLE list.append calltips test failures In-Reply-To: <1355106680.63.0.980843765647.issue16655@psf.upfronthosting.co.za> Message-ID: <1355696037.12.0.318997798886.issue16655@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Could you mock or monkey-patch what you are getting a tool tip for (i.e. set the "external" string you are checking for)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 16 23:41:35 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Sun, 16 Dec 2012 22:41:35 +0000 Subject: [issue16507] Patch selectmodule.c to support WSAPoll on Windows In-Reply-To: <1353277974.19.0.012295377293.issue16507@psf.upfronthosting.co.za> Message-ID: <1355697695.36.0.354515018213.issue16507@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Here is a new version with tests and docs. Note that the docs do not mention the bug mentioned in http://daniel.haxx.se/blog/2012/10/10/wsapoll-is-broken/ Maybe they should? Note that that bug makes it a bit difficult to use poll with tulip on Windows. (But one could restrict timeouts to one second and always check outstanding connect attempts using select() when poll() returns.) ---------- type: -> enhancement versions: +Python 3.4 Added file: http://bugs.python.org/file28341/runtime_wsapoll.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 00:16:22 2012 From: report at bugs.python.org (Brian Curtin) Date: Sun, 16 Dec 2012 23:16:22 +0000 Subject: [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1355699782.53.0.357969066723.issue14901@psf.upfronthosting.co.za> Brian Curtin added the comment: Looks alright so far. I'm working on reviewing and applying it. ---------- assignee: docs at python -> brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 07:18:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Dec 2012 06:18:57 +0000 Subject: [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <3YPsdD0ynRzNjb@mail.python.org> Roundup Robot added the comment: New changeset 5edbd93509b8 by Brian Curtin in branch '3.2': Fix #14901. Update the Windows FAQ. http://hg.python.org/cpython/rev/5edbd93509b8 New changeset fe20d5bf0c93 by Brian Curtin in branch 'default': Add Ashish Nitin Patil for work on Issue #14901 http://hg.python.org/cpython/rev/fe20d5bf0c93 New changeset 81d1df1f512a by Brian Curtin in branch '2.7': Fix #14901. Update some sections of Windows FAQ. http://hg.python.org/cpython/rev/81d1df1f512a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 07:21:20 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 17 Dec 2012 06:21:20 +0000 Subject: [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1355725280.78.0.519124464595.issue14901@psf.upfronthosting.co.za> Brian Curtin added the comment: Thanks for the patch. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 08:41:25 2012 From: report at bugs.python.org (Lucas Maystre) Date: Mon, 17 Dec 2012 07:41:25 +0000 Subject: [issue11175] allow argparse FileType to accept encoding and errors arguments In-Reply-To: <1297352833.64.0.0994986830559.issue11175@psf.upfronthosting.co.za> Message-ID: <1355730085.04.0.248119628986.issue11175@psf.upfronthosting.co.za> Lucas Maystre added the comment: Sorry for the little glitches you had to fix, I wonder why I didn't catch them. Anyways, thanks Petri! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 09:12:17 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 17 Dec 2012 08:12:17 +0000 Subject: [issue16692] Support TLS 1.1 and TLS 1.2 In-Reply-To: <1355592665.89.0.539973629387.issue16692@psf.upfronthosting.co.za> Message-ID: <1355731937.1.0.664509833102.issue16692@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 09:17:07 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Dec 2012 08:17:07 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: <1355692528.97.0.0533340736034.issue13390@psf.upfronthosting.co.za> Message-ID: <1355732128.3319.1.camel@localhost.localdomain> Antoine Pitrou added the comment: > ``./configure --without-pymalloc'' fails here: > > gcc -pthread -Xlinker -export-dynamic -o python Modules/python.o libpython3.4.a -lpthread -ldl -lutil -lm > libpython3.4.a(sysmodule.o): In function `sys_getallocatedblocks': > /home/stefan/hg/cpython/./Python/sysmodule.c:900: undefined reference to `_Py_GetAllocatedBlocks' > collect2: error: ld returned 1 exit status > make: *** [python] Error 1 Hmm, interesting. When built --without-pymalloc, we could make sys.getallocatedblocks() always return 0, or we could not define it all (which would make like a bit harder for regrtest). What do you think? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 09:20:36 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 17 Dec 2012 08:20:36 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1355732436.73.0.528216175706.issue16694@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 10:16:21 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 17 Dec 2012 09:16:21 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: <1355732128.3319.1.camel@localhost.localdomain> Message-ID: STINNER Victor added the comment: sys.gettotalrefcount() is only defined when Python is compiled in debug mode. sys.getallocatedblocks() should only be available when the right debug option is present. This function is specific to CPython anyway, Python module should not rely on this (too much) ;-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 11:49:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 17 Dec 2012 10:49:18 +0000 Subject: [issue11176] give more meaningful argument names in argparse documentation In-Reply-To: <1297352937.46.0.470038569364.issue11176@psf.upfronthosting.co.za> Message-ID: <1355741358.27.0.0235217231344.issue11176@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Also see this e-mail to docs@: http://mail.python.org/pipermail/docs/2012-December/012028.html > Subject: [docs] FOO and BAR > > Do you think it would be possible to write your documentation avoiding the silly usage of FOO and BAR everywhere? This is a very very old and boring joke, and does nothing to clarify what you are trying to clarify. If you could include real-world examples in your documentation, rather than "clever" programmer "jokes", learners such as myself would have far more respect for the good work you are obviously doing here. > > For example, the section on argparser is full of this sort of rubbish: > argparse.ArgumentParser(description='A foo that bars') > > Under what circumstances would you ever put that in a program? Are you mad? > > Please take this into consideration. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 12:22:17 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 17 Dec 2012 11:22:17 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: <1321140269.61.0.335726830367.issue13390@psf.upfronthosting.co.za> Message-ID: <1355743337.03.0.328766208732.issue13390@psf.upfronthosting.co.za> anatoly techtonik added the comment: Memory control over the stuff that Python creates is a practical feature that compensates OS disability for tracking memory usage. If all Python scripts could measure their memory usage, we could see more memory effective and adaptive programs around. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 13:13:27 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 17 Dec 2012 12:13:27 +0000 Subject: [issue16646] FTP.makeport() loses socket error details In-Reply-To: <1354992688.45.0.00340883588323.issue16646@psf.upfronthosting.co.za> Message-ID: <1355746407.35.0.238436167177.issue16646@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Why did you replace socket.error with OSError? I think we should use socket.create_connection() as a guide line: http://hg.python.org/cpython/file/45dfb657b430/Lib/socket.py#l401 A patch is in attachment. ---------- Added file: http://bugs.python.org/file28342/ftplib.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 13:23:47 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 17 Dec 2012 12:23:47 +0000 Subject: [issue16646] FTP.makeport() loses socket error details In-Reply-To: <1354992688.45.0.00340883588323.issue16646@psf.upfronthosting.co.za> Message-ID: <1355747027.2.0.384034647163.issue16646@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- assignee: -> giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 13:30:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2012 12:30:37 +0000 Subject: [issue16646] FTP.makeport() loses socket error details In-Reply-To: <1354992688.45.0.00340883588323.issue16646@psf.upfronthosting.co.za> Message-ID: <1355747437.39.0.374662982928.issue16646@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: socket.error is alias to OSError since 3.3 (PEP 3151). For versions < 3.3 socket.error should be preserved. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 13:38:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2012 12:38:20 +0000 Subject: [issue16646] FTP.makeport() loses socket error details In-Reply-To: <1354992688.45.0.00340883588323.issue16646@psf.upfronthosting.co.za> Message-ID: <1355747900.96.0.221027925574.issue16646@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I agree that copying a code from socket.create_connection() is a good idea. Modernizing socket.error to OSError can be done in a separated issue. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 13:52:20 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Dec 2012 12:52:20 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: Message-ID: <2042273242.325145957.1355748734169.JavaMail.root@zimbra10-e2.priv.proxad.net> Antoine Pitrou added the comment: > sys.gettotalrefcount() is only defined when Python is compiled in > debug mode. sys.getallocatedblocks() should only be available when > the > right debug option is present. This function is specific to CPython > anyway, Python module should not rely on this (too much) ;-) On the contrary, the aim is precisely to provide a memory statistics function which is available for everyone, not only CPython developers. It is simply not practical right now for a C extension developer to check for memory leaks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 14:08:19 2012 From: report at bugs.python.org (Stefan Krah) Date: Mon, 17 Dec 2012 13:08:19 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: <1355732128.3319.1.camel@localhost.localdomain> Message-ID: <20121217130821.GA31529@sleipnir.bytereef.org> Stefan Krah added the comment: Antoine Pitrou wrote: > Hmm, interesting. When built --without-pymalloc, we could make > sys.getallocatedblocks() always return 0, or we could not define it all > (which would make like a bit harder for regrtest). What do you think? Given the name getallocatedblocks(), it would seem reasonable to return 0 in this case and document the fact. I don't think many people use --without-pymalloc anyhow. I'm using the option only for Valgrind testing, that's how I found the build error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 14:24:56 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Dec 2012 13:24:56 +0000 Subject: [issue16646] FTP.makeport() loses socket error details In-Reply-To: <1354992688.45.0.00340883588323.issue16646@psf.upfronthosting.co.za> Message-ID: <3YQ34l33wGzN1m@mail.python.org> Roundup Robot added the comment: New changeset b7419f88c628 by Giampaolo Rodola' in branch '3.2': Fix issue #16646: ftplib.FTP.makeport() might lose socket error details. (patch by Serhiy Storchaka) http://hg.python.org/cpython/rev/b7419f88c628 New changeset b8289a08d720 by Giampaolo Rodola' in branch '3.3': Fix issue #16646: ftplib.FTP.makeport() might lose socket error details. (patch by Serhiy Storchaka) http://hg.python.org/cpython/rev/b8289a08d720 New changeset a0b1942600a2 by Giampaolo Rodola' in branch 'default': Fix issue #16646: ftplib.FTP.makeport() might lose socket error details. (patch by Serhiy Storchaka) http://hg.python.org/cpython/rev/a0b1942600a2 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 14:30:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Dec 2012 13:30:57 +0000 Subject: [issue16646] FTP.makeport() loses socket error details In-Reply-To: <1354992688.45.0.00340883588323.issue16646@psf.upfronthosting.co.za> Message-ID: <3YQ3Ch4jHrzMZh@mail.python.org> Roundup Robot added the comment: New changeset 6e07be3dfb6b by Giampaolo Rodola' in branch '2.7': Fix issue #16646: ftplib.FTP.makeport() might lose socket error details. (patch by Serhiy Storchaka) http://hg.python.org/cpython/rev/6e07be3dfb6b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 14:35:49 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 17 Dec 2012 13:35:49 +0000 Subject: [issue16646] FTP.makeport() loses socket error details In-Reply-To: <1354992688.45.0.00340883588323.issue16646@psf.upfronthosting.co.za> Message-ID: <1355751349.37.0.870595779623.issue16646@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 15:10:52 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 17 Dec 2012 14:10:52 +0000 Subject: [issue16692] Support TLS 1.1 and TLS 1.2 In-Reply-To: <1355592665.89.0.539973629387.issue16692@psf.upfronthosting.co.za> Message-ID: <1355753452.12.0.109068434312.issue16692@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 17:44:29 2012 From: report at bugs.python.org (Claude Paroz) Date: Mon, 17 Dec 2012 16:44:29 +0000 Subject: [issue16679] Wrong URL path decoding In-Reply-To: <1355473710.36.0.278942451351.issue16679@psf.upfronthosting.co.za> Message-ID: <1355762669.31.0.647751212254.issue16679@psf.upfronthosting.co.za> Claude Paroz added the comment: Thanks for the explanations (and history). I realize that changing the behaviour is probably not an option. As an example in a framework, we are currently discussing how we will cope with this in Django: https://code.djangoproject.com/ticket/19468 On the Python side, it might be worth adding an admonition about PATH_INFO and non-ascii URLs on the wsgiref docs. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 18:08:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Dec 2012 17:08:10 +0000 Subject: [issue16647] LMTP.connect() loses socket error details In-Reply-To: <1354993783.87.0.258604768595.issue16647@psf.upfronthosting.co.za> Message-ID: <3YQ82K56fGzPYM@mail.python.org> Roundup Robot added the comment: New changeset 1a2ead9faa3f by Andrew Svetlov in branch '3.2': Issue #16647: save socket error details in LMTP.connect() http://hg.python.org/cpython/rev/1a2ead9faa3f New changeset 6d805653843a by Andrew Svetlov in branch '3.3': Issue #16647: save socket error details in LMTP.connect() http://hg.python.org/cpython/rev/6d805653843a New changeset ddf0fbff94d8 by Andrew Svetlov in branch 'default': Issue #16647: save socket error details in LMTP.connect() http://hg.python.org/cpython/rev/ddf0fbff94d8 New changeset 98b73c0103d9 by Andrew Svetlov in branch '2.7': Issue #16647: save socket error details in LMTP.connect() http://hg.python.org/cpython/rev/98b73c0103d9 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 18:09:06 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Dec 2012 17:09:06 +0000 Subject: [issue16647] LMTP.connect() loses socket error details In-Reply-To: <1354993783.87.0.258604768595.issue16647@psf.upfronthosting.co.za> Message-ID: <1355764146.88.0.248600701061.issue16647@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks, Serhiy. ---------- nosy: +asvetlov resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 18:17:13 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 17 Dec 2012 17:17:13 +0000 Subject: [issue15974] Optional compact and colored output for regrest In-Reply-To: <1348077938.27.0.260547344914.issue15974@psf.upfronthosting.co.za> Message-ID: <1355764633.59.0.589464231453.issue15974@psf.upfronthosting.co.za> Brett Cannon added the comment: Clang's test runner output is really nice; green-coloured progress bar on one line, next line listing what is executing. Eventual output listing details of the run (e.g. counts of what was run, expected failures, etc.). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 18:40:12 2012 From: report at bugs.python.org (Jeff Knupp) Date: Mon, 17 Dec 2012 17:40:12 +0000 Subject: [issue16702] Force urllib2_localnet test not to use http proxies Message-ID: <1355766012.42.0.0371520737596.issue16702@psf.upfronthosting.co.za> New submission from Jeff Knupp: test_urllib2_localnet is concerned with testing connections only using 'localhost' or '127.0.0.1' hosts. If a user has the "http_proxy" environment variable set, these test will likely fail as the proxy won't have any idea where to send a request for 'localhost'. Patch makes urllib.request.urlopen ignore proxies set in the environment. Note that this only works for http proxies. https proxies are trickier and require more work. ---------- components: Tests files: test_proxy.patch keywords: patch messages: 177654 nosy: Jeff.Knupp priority: normal severity: normal status: open title: Force urllib2_localnet test not to use http proxies type: behavior versions: Python 3.4 Added file: http://bugs.python.org/file28343/test_proxy.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 19:52:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2012 18:52:37 +0000 Subject: [issue16644] Wrong code in ContextManagerTests.test_invalid_args() in test_subprocess.py In-Reply-To: <1354986235.92.0.873586035968.issue16644@psf.upfronthosting.co.za> Message-ID: <1355770357.4.0.358619229702.issue16644@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: For 3.3+ the patch can be modernized. ---------- Added file: http://bugs.python.org/file28344/test_subprocess_test_invalid_args_3.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 20:34:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2012 19:34:27 +0000 Subject: [issue16646] FTP.makeport() loses socket error details In-Reply-To: <1354992688.45.0.00340883588323.issue16646@psf.upfronthosting.co.za> Message-ID: <1355772867.88.0.29222941877.issue16646@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I doubt about the committed variant of patch. Note that both my original patch and socket.create_connection() use intermediate variable for catching an exception. This is done deliberately. Example: >>> err = None >>> try: raise ValueError ... except ValueError as err: pass ... >>> err Traceback (most recent call last): File "", line 1, in NameError: name 'err' is not defined ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 20:38:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2012 19:38:45 +0000 Subject: [issue16703] except statement turns defined variable into undefined Message-ID: <1355773125.79.0.0457031741632.issue16703@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Example: >>> err = None >>> try: raise ValueError ... except ValueError as err: pass ... >>> err Traceback (most recent call last): File "", line 1, in NameError: name 'err' is not defined It is expected that either the variable will have the catched value, or save the old value, or the compiler will raise an error. But it didn't even warns. ---------- components: Interpreter Core messages: 177657 nosy: serhiy.storchaka priority: normal severity: normal status: open title: except statement turns defined variable into undefined type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 20:43:45 2012 From: report at bugs.python.org (Jeff Knupp) Date: Mon, 17 Dec 2012 19:43:45 +0000 Subject: [issue16658] Missing "return" in HTTPConnection.send() In-Reply-To: <1355170472.23.0.747956680603.issue16658@psf.upfronthosting.co.za> Message-ID: <1355773425.27.0.32390987194.issue16658@psf.upfronthosting.co.za> Jeff Knupp added the comment: I'm assuming this is the patch you were looking for. However, there are a couple of unrelated issues with http.client.send that jumped out at me: 1. Encoding a file handed directly to send() seems wrong. If a client wants to send a file encoded using something other than iso-8859-1, we've effectively short-circuited that. Since the normal request() calls take care of encoding, it seems send() should be for those that 'know what they're doing'. Also, nowhere in the send() documentation does it state that send() will perform this encoding (and only on a file, but not on a string?). Removing the burden of encoding if a file-like object is passed seems more reasonable and would make the code considerably clearer. If anyone agrees, I'll open a new ticket with patch for this issue. ---------- keywords: +patch nosy: +Jeff.Knupp Added file: http://bugs.python.org/file28345/http_client.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 20:47:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Dec 2012 19:47:37 +0000 Subject: [issue16646] FTP.makeport() loses socket error details In-Reply-To: <1354992688.45.0.00340883588323.issue16646@psf.upfronthosting.co.za> Message-ID: <3YQCZF2NCSzNjb@mail.python.org> Roundup Robot added the comment: New changeset dcefa2c8386b by Giampaolo Rodola' in branch '3.2': Issue 16646 (ftplib): deliberately use intermediate variable after catching exception http://hg.python.org/cpython/rev/dcefa2c8386b New changeset da161499d0c0 by Giampaolo Rodola' in branch '3.3': Issue 16646 (ftplib): deliberately use intermediate variable after catching exception http://hg.python.org/cpython/rev/da161499d0c0 New changeset 0845a3dbee38 by Giampaolo Rodola' in branch 'default': Issue 16646 (ftplib): deliberately use intermediate variable after catching exception http://hg.python.org/cpython/rev/0845a3dbee38 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 20:47:53 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 17 Dec 2012 19:47:53 +0000 Subject: [issue16703] except statement turns defined variable into undefined In-Reply-To: <1355773125.79.0.0457031741632.issue16703@psf.upfronthosting.co.za> Message-ID: <1355773673.08.0.100113277181.issue16703@psf.upfronthosting.co.za> Mark Dickinson added the comment: This is a deliberate feature of Python 3. See PEP 3110. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 20:47:57 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 17 Dec 2012 19:47:57 +0000 Subject: [issue16646] FTP.makeport() loses socket error details In-Reply-To: <1354992688.45.0.00340883588323.issue16646@psf.upfronthosting.co.za> Message-ID: <1355773677.7.0.788251907262.issue16646@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Ouch! My bad. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:03:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2012 20:03:27 +0000 Subject: [issue16703] except statement turns defined variable into undefined In-Reply-To: <1355773125.79.0.0457031741632.issue16703@psf.upfronthosting.co.za> Message-ID: <1355774607.36.0.0236752863265.issue16703@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I understand that such behavior change needed was a good reason. But the current behavior is quite confusing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:09:32 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Dec 2012 20:09:32 +0000 Subject: [issue16704] Get rid of select.error in stdlib. Use OSError instead Message-ID: <1355774972.19.0.330000367797.issue16704@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- assignee: asvetlov components: Library (Lib) nosy: asvetlov priority: normal severity: normal status: open title: Get rid of select.error in stdlib. Use OSError instead type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:10:25 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Dec 2012 20:10:25 +0000 Subject: [issue16648] stdib should use new exception types from PEP 3151 In-Reply-To: <1354995347.5.0.732021100427.issue16648@psf.upfronthosting.co.za> Message-ID: <1355775025.04.0.200172314852.issue16648@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- dependencies: +Get rid of select.error in stdlib. Use OSError instead _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:18:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2012 20:18:35 +0000 Subject: [issue16704] Get rid of select.error in stdlib. Use OSError instead Message-ID: <1355775515.49.0.557492244243.issue16704@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Note that tests use a mock with overloaded `error` attribute. ---------- nosy: +serhiy.storchaka stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:19:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 17 Dec 2012 20:19:00 +0000 Subject: [issue16704] Get rid of select.error in stdlib. Use OSError instead In-Reply-To: <1355775515.49.0.557492244243.issue16704@psf.upfronthosting.co.za> Message-ID: <1355775540.01.0.28727669101.issue16704@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: test needed -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:23:56 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Dec 2012 20:23:56 +0000 Subject: [issue16704] Get rid of select.error in stdlib. Use OSError instead In-Reply-To: <1355775515.49.0.557492244243.issue16704@psf.upfronthosting.co.za> Message-ID: <3YQDNC5JcdzNmG@mail.python.org> Roundup Robot added the comment: New changeset eb8032781eba by Andrew Svetlov in branch 'default': Issue #16704: Get rid of select.error in stdlib. Use OSError instead. http://hg.python.org/cpython/rev/eb8032781eba ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:25:28 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Dec 2012 20:25:28 +0000 Subject: [issue16704] Get rid of select.error in stdlib. Use OSError instead In-Reply-To: <1355775515.49.0.557492244243.issue16704@psf.upfronthosting.co.za> Message-ID: <1355775928.28.0.357003384269.issue16704@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:27:42 2012 From: report at bugs.python.org (And Clover) Date: Mon, 17 Dec 2012 20:27:42 +0000 Subject: [issue9022] TypeError in wsgiref.handlers when using CGIHandler In-Reply-To: <1276820747.2.0.467969862682.issue9022@psf.upfronthosting.co.za> Message-ID: <1355776062.82.0.568361953927.issue9022@psf.upfronthosting.co.za> And Clover added the comment: (This issue should be closed; it is superseded by the fix for 10155 in Python 3.2.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:29:20 2012 From: report at bugs.python.org (And Clover) Date: Mon, 17 Dec 2012 20:29:20 +0000 Subject: [issue10155] Add fixups for encoding problems to wsgiref In-Reply-To: <1287591822.31.0.50492787235.issue10155@psf.upfronthosting.co.za> Message-ID: <1355776160.47.0.918352583953.issue10155@psf.upfronthosting.co.za> And Clover added the comment: (belated close-fixed) ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:31:39 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Dec 2012 20:31:39 +0000 Subject: [issue16705] Use concrete classes inherited from OSError instead of errno check Message-ID: <1355776299.81.0.3555135726.issue16705@psf.upfronthosting.co.za> New submission from Andrew Svetlov: Probably it is long enough work and should be done in several iteration after converting all exceptions like IOError, EnvironmentError, WindowsError, mmap.error, socket.error and select.error to OSError. ---------- assignee: asvetlov components: Library (Lib) messages: 177668 nosy: asvetlov priority: normal severity: normal status: open title: Use concrete classes inherited from OSError instead of errno check type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:31:54 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Dec 2012 20:31:54 +0000 Subject: [issue16648] stdib should use new exception types from PEP 3151 In-Reply-To: <1354995347.5.0.732021100427.issue16648@psf.upfronthosting.co.za> Message-ID: <1355776314.23.0.649602228787.issue16648@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- dependencies: +Use concrete classes inherited from OSError instead of errno check _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:51:37 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 17 Dec 2012 20:51:37 +0000 Subject: [issue16706] Get rid of os.error. Use OSError instead Message-ID: <1355777497.03.0.498840147649.issue16706@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- assignee: asvetlov components: Library (Lib) nosy: asvetlov priority: normal severity: normal status: open title: Get rid of os.error. Use OSError instead type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 21:55:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Dec 2012 20:55:42 +0000 Subject: [issue16705] Use concrete classes inherited from OSError instead of errno check In-Reply-To: <1355776299.81.0.3555135726.issue16705@psf.upfronthosting.co.za> Message-ID: <3YQF4s2wp9zLtK@mail.python.org> Roundup Robot added the comment: New changeset 7aa2ccc5aef1 by Andrew Svetlov in branch 'default': Replace mmap.error with OSError, #16705 http://hg.python.org/cpython/rev/7aa2ccc5aef1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 22:35:32 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Dec 2012 21:35:32 +0000 Subject: [issue16705] Use concrete classes inherited from OSError instead of errno check In-Reply-To: <1355776299.81.0.3555135726.issue16705@psf.upfronthosting.co.za> Message-ID: <3YQFyq6GGPzNhB@mail.python.org> Roundup Robot added the comment: New changeset 061e9a439f54 by Andrew Svetlov in branch 'default': Get rig of EnvironmentError (#16705) http://hg.python.org/cpython/rev/061e9a439f54 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 22:51:03 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Dec 2012 21:51:03 +0000 Subject: [issue16707] --with-pydebug and --without-pymalloc are incompatible Message-ID: <1355781063.36.0.527295218216.issue16707@psf.upfronthosting.co.za> New submission from Antoine Pitrou: Here is what happens when combining --with-pydebug and --without-pymalloc: gcc -pthread -g -O0 -Wall -Wstrict-prototypes Parser/acceler.o Parser/grammar1.o Parser/listnode.o Parser/node.o Parser/parser.o Parser/bitset.o Parser/metagrammar.o Parser/firstsets.o Parser/grammar.o Parser/pgen.o Objects/obmalloc.o Python/dynamic_annotations.o Python/mysnprintf.o Python/pyctype.o Parser/tokenizer_pgen.o Parser/printgrammar.o Parser/parsetok_pgen.o Parser/pgenmain.o -lpthread -ldl -lutil -o Parser/pgen Parser/tokenizer_pgen.o: In function `tok_new': /home/antoine/cpython/default/Parser/tokenizer.c:115: undefined reference to `_PyMem_DebugMalloc' Parser/tokenizer_pgen.o: In function `new_string': /home/antoine/cpython/default/Parser/tokenizer.c:152: undefined reference to `_PyMem_DebugMalloc' Parser/tokenizer_pgen.o: In function `PyTokenizer_FromUTF8': /home/antoine/cpython/default/Parser/tokenizer.c:799: undefined reference to `_PyMem_DebugMalloc' Parser/tokenizer_pgen.o: In function `PyTokenizer_FromFile': /home/antoine/cpython/default/Parser/tokenizer.c:819: undefined reference to `_PyMem_DebugMalloc' /home/antoine/cpython/default/Parser/tokenizer.c:831: undefined reference to `_PyMem_DebugMalloc' Parser/tokenizer_pgen.o: In function `PyTokenizer_Free': /home/antoine/cpython/default/Parser/tokenizer.c:849: undefined reference to `_PyMem_DebugFree' /home/antoine/cpython/default/Parser/tokenizer.c:856: undefined reference to `_PyMem_DebugFree' /home/antoine/cpython/default/Parser/tokenizer.c:858: undefined reference to `_PyMem_DebugFree' /home/antoine/cpython/default/Parser/tokenizer.c:859: undefined reference to `_PyMem_DebugFree' Parser/tokenizer_pgen.o: In function `tok_nextc': /home/antoine/cpython/default/Parser/tokenizer.c:928: undefined reference to `_PyMem_DebugFree' /home/antoine/cpython/default/Parser/tokenizer.c:936: undefined reference to `_PyMem_DebugRealloc' /home/antoine/cpython/default/Parser/tokenizer.c:939: undefined reference to `_PyMem_DebugFree' /home/antoine/cpython/default/Parser/tokenizer.c:941: undefined reference to `_PyMem_DebugFree' /home/antoine/cpython/default/Parser/tokenizer.c:949: undefined reference to `_PyMem_DebugFree' /home/antoine/cpython/default/Parser/tokenizer.c:957: undefined reference to `_PyMem_DebugFree' /home/antoine/cpython/default/Parser/tokenizer.c:973: undefined reference to `_PyMem_DebugMalloc' /home/antoine/cpython/default/Parser/tokenizer.c:1008: undefined reference to `_PyMem_DebugRealloc' Parser/tokenizer_pgen.o: In function `PyTokenizer_FindEncodingFilename': /home/antoine/cpython/default/Parser/tokenizer.c:1753: undefined reference to `_PyMem_DebugMalloc' Parser/parsetok_pgen.o: In function `parsetok': /home/antoine/cpython/default/Parser/parsetok.c:179: undefined reference to `_PyObject_DebugMalloc' /home/antoine/cpython/default/Parser/parsetok.c:193: undefined reference to `_PyObject_DebugFree' /home/antoine/cpython/default/Parser/parsetok.c:199: undefined reference to `_PyObject_DebugFree' /home/antoine/cpython/default/Parser/parsetok.c:217: undefined reference to `_PyObject_DebugFree' /home/antoine/cpython/default/Parser/parsetok.c:275: undefined reference to `_PyObject_DebugMalloc' /home/antoine/cpython/default/Parser/parsetok.c:288: undefined reference to `_PyObject_DebugMalloc' /home/antoine/cpython/default/Parser/parsetok.c:292: undefined reference to `_PyObject_DebugFree' /home/antoine/cpython/default/Parser/parsetok.c:297: undefined reference to `_PyMem_DebugFree' Parser/pgenmain.o: In function `getgrammar': /home/antoine/cpython/default/Parser/pgenmain.c:111: undefined reference to `_PyObject_DebugFree' Parser/pgenmain.o: In function `PyOS_Readline': /home/antoine/cpython/default/Parser/pgenmain.c:143: undefined reference to `_PyMem_DebugMalloc' /home/antoine/cpython/default/Parser/pgenmain.c:156: undefined reference to `_PyMem_DebugRealloc' collect2: ld a retourn? 1 code d'?tat d'ex?cution make[1]: *** [Parser/pgen] Erreur 1 make[1] : on quitte le r?pertoire ? /home/antoine/cpython/default ? make: *** [Include/graminit.h] Erreur 2 ---------- components: Interpreter Core messages: 177671 nosy: pitrou, skrah priority: low severity: normal status: open title: --with-pydebug and --without-pymalloc are incompatible type: compile error versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 23:07:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 17 Dec 2012 22:07:47 +0000 Subject: [issue13390] Hunt memory allocations in addition to reference leaks In-Reply-To: <1321140269.61.0.335726830367.issue13390@psf.upfronthosting.co.za> Message-ID: <3YQGh16rGwzNJc@mail.python.org> Roundup Robot added the comment: New changeset a85673b55177 by Antoine Pitrou in branch 'default': Following issue #13390, fix compilation --without-pymalloc, and make sys.getallocatedblocks() return 0 in that situation. http://hg.python.org/cpython/rev/a85673b55177 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 17 23:09:54 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 17 Dec 2012 22:09:54 +0000 Subject: [issue16707] --with-pydebug and --without-pymalloc are incompatible In-Reply-To: <1355781063.36.0.527295218216.issue16707@psf.upfronthosting.co.za> Message-ID: <1355782194.88.0.97493673.issue16707@psf.upfronthosting.co.za> Antoine Pitrou added the comment: "make clean" fixed the build. Sorry for the noise. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 02:54:02 2012 From: report at bugs.python.org (luke wood) Date: Tue, 18 Dec 2012 01:54:02 +0000 Subject: [issue16708] Module: shutil will not import when writen in the text editor but will in the python shell Message-ID: <1355795642.02.0.671749780764.issue16708@psf.upfronthosting.co.za> Changes by luke wood : ---------- components: Library (Lib) files: dropbox dropper.py nosy: dj_law priority: normal severity: normal status: open title: Module: shutil will not import when writen in the text editor but will in the python shell type: behavior versions: Python 3.3 Added file: http://bugs.python.org/file28346/dropbox dropper.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 03:06:41 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Dec 2012 02:06:41 +0000 Subject: [issue16708] Module: shutil will not import when writen in the text editor but will in the python shell Message-ID: <1355796401.21.0.270180570333.issue16708@psf.upfronthosting.co.za> New submission from R. David Murray: It works fine for me. Are you on windows by any chance? I suspect you should take this to python-list for help, but you could paste the traceback you are getting if you still think it is a bug in Python. ---------- nosy: +r.david.murray resolution: -> works for me stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 03:14:29 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 18 Dec 2012 02:14:29 +0000 Subject: [issue15911] can't step through _frozen_importlib/importlib._bootstrap using gdb In-Reply-To: <1347305436.8.0.778141669429.issue15911@psf.upfronthosting.co.za> Message-ID: <1355796869.4.0.422836982817.issue15911@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 03:28:57 2012 From: report at bugs.python.org (Robert Collins) Date: Tue, 18 Dec 2012 02:28:57 +0000 Subject: [issue16709] unittest discover order is filesystem specific - hard to reproduce Message-ID: <1355797737.36.0.999533489695.issue16709@psf.upfronthosting.co.za> New submission from Robert Collins: Openstack recently switched from nose to using discover. discover walks the filesystem using os.listdir(), and that is just a thin layer over readdir. On ext3/ext4 filesystems, readdir is in an arbitrary order dependent on file insertion into the directory if dir_index is enabled (which is the default). This means that files are loaded in an order that isn't reproducable by other developers, so bad tests that have isolation issues can be very tricky to track down. Just wrapping the os.listdir() in sorted() would be sufficient to make this robust and repeatable, and avoid the headache. ---------- components: Library (Lib) messages: 177675 nosy: ezio.melotti, michael.foord, pitrou, rbcollins priority: normal severity: normal status: open title: unittest discover order is filesystem specific - hard to reproduce versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 07:52:13 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Dec 2012 06:52:13 +0000 Subject: [issue16709] unittest discover order is filesystem specific - hard to reproduce In-Reply-To: <1355797737.36.0.999533489695.issue16709@psf.upfronthosting.co.za> Message-ID: <1355813533.02.0.56286247611.issue16709@psf.upfronthosting.co.za> Antoine Pitrou added the comment: +1. It also makes test output nicer. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 08:02:23 2012 From: report at bugs.python.org (Mikhail Korobov) Date: Tue, 18 Dec 2012 07:02:23 +0000 Subject: [issue6784] byte/unicode pickle incompatibilities between python2 and python3 In-Reply-To: <1251287773.44.0.222300610244.issue6784@psf.upfronthosting.co.za> Message-ID: <1355814143.37.0.321590047994.issue6784@psf.upfronthosting.co.za> Changes by Mikhail Korobov : ---------- nosy: +kmike _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 08:24:35 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Tue, 18 Dec 2012 07:24:35 +0000 Subject: [issue16706] Get rid of os.error. Use OSError instead Message-ID: <1355815475.46.0.678774575239.issue16706@psf.upfronthosting.co.za> New submission from Hynek Schlawack: Ah yeah I support this endeavor, I fixed a few instances in rmtree while working on it. It?s just confusing. JFTR, is there any rationale/reason to do it? Last time I checked it wasn?t deprecated. ---------- nosy: +hynek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 08:34:28 2012 From: report at bugs.python.org (luke wood) Date: Tue, 18 Dec 2012 07:34:28 +0000 Subject: [issue16708] Module: shutil will not import when writen in the text editor but will in the python shell In-Reply-To: <1355796401.21.0.270180570333.issue16708@psf.upfronthosting.co.za> Message-ID: <1355816068.72.0.949523236167.issue16708@psf.upfronthosting.co.za> luke wood added the comment: ok i dont really know what python list is. i googled it but it just came up with the documentation. Traceback (most recent call last): File "C:\Users\luke\Documents\Python Code\dropbox dropper.py", line 1, in import shutil File "C:\Python33\lib\shutil.py", line 14, in import tarfile File "C:\Python33\lib\tarfile.py", line 48, in import copy File "C:\Users\luke\Documents\Python Code\copy.py", line 4, in shutil.copy2(source, destination) AttributeError: 'module' object has no attribute 'copy2' ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 10:39:04 2012 From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCT0LDQstGA0LjQu9C40L0=?=) Date: Tue, 18 Dec 2012 09:39:04 +0000 Subject: [issue16710] json encode/decode error Message-ID: <1355823543.95.0.422130341622.issue16710@psf.upfronthosting.co.za> New submission from ?????? ????????: I sent this. {24: (0, ''), 27: (0, ''), 19: (0, ''), 28: (0, '')} {"tasks": {"24": [0, ""], "27": [0, ""], "19": [0, ""], "28": [0, ""]}, "uuid": "8798b4dfbe3646e5ab05106f6f9af6fe", "delay": 3, "task_limit": 10, "arch": ["ARM", "i386", "x86_64"], "build_env": "fedora"} And I've got this. {"tasks": {"24": [0, ""], "27": [0, ""], "19": [0, ""], "28": [0, ""]}, "uuid": "8798b4dfbe3646e5ab05106f6f9af6fe", "delay": 3, "task_limit": 10, "arch": ["ARM", "i386", "x86_64"], "build_env": "fedora"} {u'tasks': {u'24': [0, u''], u'19': [0, u''], u'27': [0, u''], u'28': [0, u'']}, u'uuid': u'8798b4dfbe3646e5ab05106f6f9af6fe', u'delay': 3, u'task_limit': 10, u'arch': [u'ARM', u'i386', u'x86_64'], u'build_env': u'rosa'} {u'24': [0, u''], u'19': [0, u''], u'27': [0, u''], u'28': [0, u'']} It must contain digits. {24: (0, ''), 27: (0, ''), 19: (0, ''), 28: (0, '')} {u'24': [0, u''], u'19': [0, u''], u'27': [0, u''], u'28': [0, u'']} ---------- messages: 177679 nosy: ??????.???????? priority: normal severity: normal status: open title: json encode/decode error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 10:54:03 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 18 Dec 2012 09:54:03 +0000 Subject: [issue16710] json encode/decode error In-Reply-To: <1355823543.95.0.422130341622.issue16710@psf.upfronthosting.co.za> Message-ID: <1355824443.03.0.188143516143.issue16710@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Unlike Python dictionaries, keys of Json objects are always strings. There is a note in the documentation: http://docs.python.org/2/library/json.html#json.dumps ---------- nosy: +amaury.forgeotdarc resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 11:17:11 2012 From: report at bugs.python.org (INADA Naoki) Date: Tue, 18 Dec 2012 10:17:11 +0000 Subject: [issue16711] s/next()/__next__/ in collections.abc.Iterator document. Message-ID: <1355825815.83.0.808882740221.issue16711@psf.upfronthosting.co.za> New submission from INADA Naoki: http://docs.python.org/3/library/collections.abc.html#collections.abc.Iterator > ABC for classes that provide the __iter__() and next() methods. "next()" should be "__next__()" for Python 3. ---------- assignee: docs at python components: Documentation messages: 177681 nosy: docs at python, naoki priority: normal severity: normal status: open title: s/next()/__next__/ in collections.abc.Iterator document. versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 11:24:42 2012 From: report at bugs.python.org (=?utf-8?b?0JDQvdC00YDQtdC5INCT0LDQstGA0LjQu9C40L0=?=) Date: Tue, 18 Dec 2012 10:24:42 +0000 Subject: [issue16710] json encode/decode error In-Reply-To: <1355823543.95.0.422130341622.issue16710@psf.upfronthosting.co.za> Message-ID: <1355826282.38.0.451409106815.issue16710@psf.upfronthosting.co.za> ?????? ???????? added the comment: I saw it now. I'm in a hurry today. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 11:26:04 2012 From: report at bugs.python.org (Michael Foord) Date: Tue, 18 Dec 2012 10:26:04 +0000 Subject: [issue16709] unittest discover order is filesystem specific - hard to reproduce In-Reply-To: <1355797737.36.0.999533489695.issue16709@psf.upfronthosting.co.za> Message-ID: <1355826364.77.0.894046886423.issue16709@psf.upfronthosting.co.za> Michael Foord added the comment: Seems reasonable. ---------- assignee: -> michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 12:10:32 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 11:10:32 +0000 Subject: [issue16706] Get rid of os.error. Use OSError instead In-Reply-To: <1355815475.46.0.678774575239.issue16706@psf.upfronthosting.co.za> Message-ID: <1355829032.34.0.906422381203.issue16706@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I think deprecation makes not big value. We should continue aliases support and there are no place to raise warning. What we can do ? mention deprecation in the doc. The reason to get rid of other OSError aliases to make cleaner code (especially considering situations like `except (os.error, IOError):` and use best practices in stdlib. I think the later is very important because stdlib is first class example of coding style for many users. After stdlib we can cleanup C code to that unification and use concrete exception classes instead of errno checking (#16705). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 13:14:07 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Tue, 18 Dec 2012 12:14:07 +0000 Subject: [issue16706] Get rid of os.error. Use OSError instead In-Reply-To: <1355829032.34.0.906422381203.issue16706@psf.upfronthosting.co.za> Message-ID: <46F8AC14-E23F-4C90-ACCD-92CC84A8BFA0@ox.cx> Hynek Schlawack added the comment: > I think deprecation makes not big value. > We should continue aliases support and there are no place to raise warning. > What we can do ? mention deprecation in the doc. That?s what I meant. I saw it in shutil code, were confused, looked it up, wondered why it exists. I would like to get rid of it. Do you have any concrete plans or should I just wade through shutil and make it pretty for 3.4? > The reason to get rid of other OSError aliases to make cleaner code (especially considering situations like `except (os.error, IOError):` and use best practices in stdlib. Sure. > I think the later is very important because stdlib is first class example of coding style for many users. I hope not. :-/ > After stdlib we can cleanup C code to that unification and use concrete exception classes instead of errno checking (#16705). Awesome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 13:15:50 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 12:15:50 +0000 Subject: [issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope In-Reply-To: <1355036600.83.0.376355184043.issue16650@psf.upfronthosting.co.za> Message-ID: <1355832950.96.0.887622449449.issue16650@psf.upfronthosting.co.za> Andrew Svetlov added the comment: As I can see in Py_Finalize finalized for standard exception classes is called after any python code has been finished, so we don't need to protect those exceptions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 13:30:21 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Dec 2012 12:30:21 +0000 Subject: [issue16708] Module: shutil will not import when writen in the text editor but will in the python shell In-Reply-To: <1355796401.21.0.270180570333.issue16708@psf.upfronthosting.co.za> Message-ID: <1355833821.34.0.408407986003.issue16708@psf.upfronthosting.co.za> R. David Murray added the comment: You have a 'copy.py' module in your python path, as is evidenced by the filename in your traceback, which tarfile is importing instead of the real copy module, and your copy.py is therefore trying to use shutil before it is completely imported, thus the error. So this is indeed a local problem on your machine. python-list is a mailing list where there are a lot of python users, many of whom will be willing to help you sort this out if you need more help. Go to mail.python.org for a list of lists and signup instructions. ---------- resolution: works for me -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 13:56:01 2012 From: report at bugs.python.org (INADA Naoki) Date: Tue, 18 Dec 2012 12:56:01 +0000 Subject: [issue16712] collections.abc.Sequence should not provide __reversed__ Message-ID: <1355835361.63.0.373231585566.issue16712@psf.upfronthosting.co.za> New submission from INADA Naoki: http://docs.python.org/3.3/reference/datamodel.html#object.__reversed__ > Objects that support the sequence protocol should only provide __reversed__() if they can provide an implementation that is more efficient than the one provided by reversed(). collections.abc.Sequence can't provide more efficient method. It only make `reversed()` slower. ---------- components: Library (Lib) messages: 177688 nosy: naoki priority: normal severity: normal status: open title: collections.abc.Sequence should not provide __reversed__ versions: Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 14:40:15 2012 From: report at bugs.python.org (Brett Cannon) Date: Tue, 18 Dec 2012 13:40:15 +0000 Subject: [issue16703] except statement turns defined variable into undefined In-Reply-To: <1355773125.79.0.0457031741632.issue16703@psf.upfronthosting.co.za> Message-ID: <1355838015.53.0.114200948537.issue16703@psf.upfronthosting.co.za> Brett Cannon added the comment: As Mark pointed out, this is on purpose and is not going to change since Python lacks block-level scoping of variables and thus causes the last case related to the variable to take precedence. It might be a little unexpected, but it's not that unreasonable when you think about scoping rules and understand how 'except' blocks work. ---------- nosy: +brett.cannon resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 14:53:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Dec 2012 13:53:52 +0000 Subject: [issue16711] s/next()/__next__/ in collections.abc.Iterator document. In-Reply-To: <1355825815.83.0.808882740221.issue16711@psf.upfronthosting.co.za> Message-ID: <3YQggd4bWvzQPB@mail.python.org> Roundup Robot added the comment: New changeset 259516fddb6c by Andrew Svetlov in branch '3.2': Issue #16711: Fix required method names for collections.Iterator http://hg.python.org/cpython/rev/259516fddb6c New changeset 864bb05be215 by Andrew Svetlov in branch '3.3': Issue #16711: Fix required method names for collections.Iterator http://hg.python.org/cpython/rev/864bb05be215 New changeset 85127ec7d724 by Andrew Svetlov in branch 'default': Issue #16711: Fix required method names for collections.Iterator http://hg.python.org/cpython/rev/85127ec7d724 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 14:54:26 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 13:54:26 +0000 Subject: [issue16711] s/next()/__next__/ in collections.abc.Iterator document. In-Reply-To: <1355825815.83.0.808882740221.issue16711@psf.upfronthosting.co.za> Message-ID: <1355838866.4.0.533424589631.issue16711@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks. ---------- nosy: +asvetlov resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 15:30:24 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Dec 2012 14:30:24 +0000 Subject: [issue16713] "tel" URIs should support params Message-ID: <1355841024.52.0.600019146787.issue16713@psf.upfronthosting.co.za> New submission from Antoine Pitrou: RFC 3966 (http://tools.ietf.org/html/rfc3966) defines the tel URI and its parameters. However, urlparse / urllib.parse doesn't recognize "tel" URIs as taking parameters: >>> urlparse.urlparse('tel:7042;phone-context=example.com') ParseResult(scheme='tel', netloc='', path='7042;phone-context=example.com', params='', query='', fragment='') ---------- components: Library (Lib) messages: 177692 nosy: orsenthil, pitrou priority: normal severity: normal stage: needs patch status: open title: "tel" URIs should support params type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 15:52:52 2012 From: report at bugs.python.org (vila) Date: Tue, 18 Dec 2012 14:52:52 +0000 Subject: [issue16709] unittest discover order is filesystem specific - hard to reproduce In-Reply-To: <1355797737.36.0.999533489695.issue16709@psf.upfronthosting.co.za> Message-ID: <1355842372.46.0.24006600287.issue16709@psf.upfronthosting.co.za> Changes by vila : ---------- nosy: +vila _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 16:36:03 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Tue, 18 Dec 2012 15:36:03 +0000 Subject: [issue16713] "tel" URIs should support params In-Reply-To: <1355841024.52.0.600019146787.issue16713@psf.upfronthosting.co.za> Message-ID: <1355844963.75.0.80698160262.issue16713@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I don't know whether 'tel' is a common scheme, but it's easy to add it to urlparse from the outside: >>> urlparse.uses_param.append('tel') >>> urlparse.urlparse('tel:7042;phone-context=example.com') ParseResult(scheme='tel', netloc='', path='7042', params='phone-context=example.com', query='', fragment='') ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:16:19 2012 From: report at bugs.python.org (Jan Lachnitt) Date: Tue, 18 Dec 2012 16:16:19 +0000 Subject: [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1355847379.74.0.595505492306.issue15533@psf.upfronthosting.co.za> Jan Lachnitt added the comment: Hi, I am using Python 3.2.3 on Windows XP. I encountered a problem with subprocess.call when using the cwd parameter. I used Google to look for a solution and I found this issue in Python tracker. But this issue seems absolutely reversed! The subprocess documentation says this: "In particular, the function looks for executable (or for the first item in args) relative to cwd if the executable path is a relative path." But this is NOT true. If I use the path relative to cwd, I get Windows Error 2 (system cannot find the file). If I change the executable's path to be relative to the current directory, where the script is running (i.e. NOT the cwd parameter passed to subprocess.call), it works fine. ---------- nosy: +pepalogik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:38:51 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 18 Dec 2012 16:38:51 +0000 Subject: [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1355848731.83.0.855811873805.issue15533@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Hi Jan, yes, the documentation now describes the non-Windows behavior, which is different from the Windows behavior. See the comment just before yours on what still needs to be done to resolve this issue. I was in the middle of creating a bunch of test cases for the various combinations, as well as documenting the results. But I got busy with other things. I will see if I can revisit my work on this sometime soon and upload a diff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:42:01 2012 From: report at bugs.python.org (Jan Lachnitt) Date: Tue, 18 Dec 2012 16:42:01 +0000 Subject: [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1355848921.71.0.414354262008.issue15533@psf.upfronthosting.co.za> Jan Lachnitt added the comment: EDIT: No, it doesn't work fine: the executable reports stack overflow. I thought this had nothing to do with Python, hence I didn't mention it. But If I run the executable without Python, THEN it works fine. But this may be another issue. I'll update to 3.3.0 and then tell you if this has changed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 17:53:16 2012 From: report at bugs.python.org (Jan Lachnitt) Date: Tue, 18 Dec 2012 16:53:16 +0000 Subject: [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1355849596.08.0.0133662038336.issue15533@psf.upfronthosting.co.za> Jan Lachnitt added the comment: Hi Chris, thank for your reply, I didn't see it while writing the edit. Does it mean that on Linux, it will use the cwd? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 19:11:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 18:11:29 +0000 Subject: [issue16714] Raise exceptions, don't throw Message-ID: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch fixes wording of documentation, comments, etc which use the term 'throw' instead of 'raise' in context of exception raising. ---------- assignee: docs at python components: Documentation files: raise-3.3.patch keywords: patch messages: 177698 nosy: asvetlov, docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Raise exceptions, don't throw type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28347/raise-3.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 19:12:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 18:12:13 +0000 Subject: [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <1355854333.54.0.513125571435.issue16714@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28348/raise-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 19:13:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 18:13:11 +0000 Subject: [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <1355854391.88.0.54741434461.issue16714@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28349/raise-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 19:13:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 18:13:42 +0000 Subject: [issue16648] stdib should use new exception types from PEP 3151 In-Reply-To: <1354995347.5.0.732021100427.issue16648@psf.upfronthosting.co.za> Message-ID: <1355854422.31.0.926599876048.issue16648@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Raise exceptions, don't throw _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 19:17:21 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 18 Dec 2012 18:17:21 +0000 Subject: [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <1355854641.55.0.433265019586.issue16714@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 19:41:26 2012 From: report at bugs.python.org (Georg Brandl) Date: Tue, 18 Dec 2012 18:41:26 +0000 Subject: [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <1355856086.03.0.903512642.issue16714@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM, except for: diff -r 907d71668d3c Python/pythonrun.c --- a/Python/pythonrun.c Sun Dec 16 21:10:35 2012 +0100 +++ b/Python/pythonrun.c Tue Dec 18 19:35:27 2012 +0200 @@ -2518,7 +2518,7 @@ PyOS_CheckStack(void) { __try { - /* alloca throws a stack overflow exception if there's + /* alloca raises a stack overflow exception if there's not enough space left on the stack */ alloca(PYOS_STACK_MARGIN * sizeof(void*)); return 0; This is talking about a C++ exception and therefore "throw" is correct. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 20:27:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Dec 2012 19:27:57 +0000 Subject: [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <3YQq582ZRDzNjw@mail.python.org> Roundup Robot added the comment: New changeset fdf907708f49 by Andrew Svetlov in branch '3.2': Issue #16714: use 'raise' exceptions, don't 'throw'. http://hg.python.org/cpython/rev/fdf907708f49 New changeset 15a391919deb by Andrew Svetlov in branch '3.3': Issue #16714: use 'raise' exceptions, don't 'throw'. http://hg.python.org/cpython/rev/15a391919deb New changeset 7260cf668dd7 by Andrew Svetlov in branch 'default': Issue #16714: use 'raise' exceptions, don't 'throw'. http://hg.python.org/cpython/rev/7260cf668dd7 New changeset 8c2635afbfe1 by Andrew Svetlov in branch '2.7': Issue #16714: use 'raise' exceptions, don't 'throw'. http://hg.python.org/cpython/rev/8c2635afbfe1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 20:28:42 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 19:28:42 +0000 Subject: [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <1355858922.8.0.742529551033.issue16714@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks, Serhiy. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 20:36:56 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 19:36:56 +0000 Subject: [issue16715] Get rid of IOrror. Use OSError instead Message-ID: <1355859416.59.0.0780309826509.issue16715@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- assignee: asvetlov components: Library (Lib) nosy: asvetlov priority: normal severity: normal status: open title: Get rid of IOrror. Use OSError instead versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 20:37:23 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 19:37:23 +0000 Subject: [issue16705] Use concrete classes inherited from OSError instead of errno check In-Reply-To: <1355776299.81.0.3555135726.issue16705@psf.upfronthosting.co.za> Message-ID: <1355859443.59.0.215681605223.issue16705@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- dependencies: +Get rid of IOrror. Use OSError instead, Get rid of os.error. Use OSError instead _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:02:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Dec 2012 20:02:52 +0000 Subject: [issue16706] Get rid of os.error. Use OSError instead In-Reply-To: <1355815475.46.0.678774575239.issue16706@psf.upfronthosting.co.za> Message-ID: <3YQqsS2SMSzPHy@mail.python.org> Roundup Robot added the comment: New changeset 47f98a550d42 by Andrew Svetlov in branch 'default': Issue #16706: get rid of os.error http://hg.python.org/cpython/rev/47f98a550d42 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:07:22 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 20:07:22 +0000 Subject: [issue16716] Deprecate OSError aliases in the doc Message-ID: <1355861242.44.0.0203808398116.issue16716@psf.upfronthosting.co.za> New submission from Andrew Svetlov: The list of aliases is: IOError, EnvironmentError, WindowsError, mmap.error, socket.error, os.error and select.error Documentation should have deprecation message guessing to use OSError instead. ---------- messages: 177704 nosy: asvetlov priority: normal severity: normal stage: needs patch status: open title: Deprecate OSError aliases in the doc versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:08:57 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 20:08:57 +0000 Subject: [issue16706] Get rid of os.error. Use OSError instead In-Reply-To: <1355815475.46.0.678774575239.issue16706@psf.upfronthosting.co.za> Message-ID: <1355861337.02.0.962701019566.issue16706@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. About deprecation: I've created #16716 for that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:09:14 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 20:09:14 +0000 Subject: [issue16705] Use concrete classes inherited from OSError instead of errno check In-Reply-To: <1355776299.81.0.3555135726.issue16705@psf.upfronthosting.co.za> Message-ID: <1355861354.93.0.096897630996.issue16705@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- dependencies: +Deprecate OSError aliases in the doc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:09:33 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 20:09:33 +0000 Subject: [issue16706] Get rid of os.error. Use OSError instead In-Reply-To: <1355815475.46.0.678774575239.issue16706@psf.upfronthosting.co.za> Message-ID: <1355861373.92.0.48305184798.issue16706@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:13:46 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 20:13:46 +0000 Subject: [issue16717] Get rid of socket.error. Use OSError instead Message-ID: <1355861626.7.0.653509506755.issue16717@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- assignee: asvetlov components: Documentation nosy: asvetlov priority: normal severity: normal status: open title: Get rid of socket.error. Use OSError instead versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:14:04 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 20:14:04 +0000 Subject: [issue16705] Use concrete classes inherited from OSError instead of errno check In-Reply-To: <1355776299.81.0.3555135726.issue16705@psf.upfronthosting.co.za> Message-ID: <1355861644.57.0.727771413571.issue16705@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- dependencies: +Get rid of socket.error. Use OSError instead _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:14:10 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Dec 2012 20:14:10 +0000 Subject: [issue16716] Deprecate OSError aliases in the doc In-Reply-To: <1355861242.44.0.0203808398116.issue16716@psf.upfronthosting.co.za> Message-ID: <1355861650.62.0.403898384359.issue16716@psf.upfronthosting.co.za> Antoine Pitrou added the comment: "The following exceptions are kept for compatibility with previous versions; starting from Python 3.3, they are aliases of OSError." Do you want to add an explicit compatibility statement there? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:35:40 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 18 Dec 2012 20:35:40 +0000 Subject: [issue16718] Mysterious atexit fail Message-ID: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> New submission from anatoly techtonik: Weird bug. Attached are two files: wow.py and wy.py When wow.py is executed - it fails with single ImportError. But when wy.py is executed (which is a simple "import wow" statement) it fails with one ImportError and TypeError exceptions. ---------- components: Interpreter Core, Library (Lib) messages: 177707 nosy: techtonik priority: normal severity: normal status: open title: Mysterious atexit fail versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:36:01 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 18 Dec 2012 20:36:01 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355862961.21.0.307652440341.issue16718@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file28353/wow.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:36:09 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 18 Dec 2012 20:36:09 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355862969.6.0.968947432009.issue16718@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file28354/wy.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:36:55 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 18 Dec 2012 20:36:55 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355863015.65.0.536759839745.issue16718@psf.upfronthosting.co.za> anatoly techtonik added the comment: ...one ImportError and *two* TypeError exceptions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:39:47 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 18 Dec 2012 20:39:47 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355863187.93.0.693037451696.issue16718@psf.upfronthosting.co.za> anatoly techtonik added the comment: >py wy.py Traceback (most recent call last): File "wy.py", line 1, in import wow File "E:\scons\wow.py", line 12, in import fail ImportError: No module named fail Error in atexit._run_exitfuncs: Traceback (most recent call last): File "C:\Python27\lib\atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "E:\scons\wow.py", line 8, in _clean cleanlist = [ c for c in _Cleanup if c ] TypeError: 'NoneType' object is not iterable Error in sys.exitfunc: Traceback (most recent call last): File "C:\Python27\lib\atexit.py", line 24, in _run_exitfuncs func(*targs, **kargs) File "E:\scons\wow.py", line 8, in _clean cleanlist = [ c for c in _Cleanup if c ] TypeError: 'NoneType' object is not iterable ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:48:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 20:48:26 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355863706.4.0.71472617513.issue16718@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It's because _Cleanup is None (as all global variables) when atexit registered functions executed. Don't use globals in such code. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:51:27 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 20:51:27 +0000 Subject: [issue16716] Deprecate OSError aliases in the doc In-Reply-To: <1355861242.44.0.0203808398116.issue16716@psf.upfronthosting.co.za> Message-ID: <1355863887.77.0.982205584423.issue16716@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Don't know about library/exceptions.rst For other modules (socket, select etc.) I like to use ".. deprecated:: 3.3" markup. Antoine, do you have objections? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 21:55:28 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Dec 2012 20:55:28 +0000 Subject: [issue16716] Deprecate OSError aliases in the doc In-Reply-To: <1355861242.44.0.0203808398116.issue16716@psf.upfronthosting.co.za> Message-ID: <1355864128.94.0.621169888772.issue16716@psf.upfronthosting.co.za> Antoine Pitrou added the comment: No objections from me. It would be good to have other people's opinions, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 22:00:11 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 18 Dec 2012 21:00:11 +0000 Subject: [issue16716] Deprecate OSError aliases in the doc In-Reply-To: <1355861242.44.0.0203808398116.issue16716@psf.upfronthosting.co.za> Message-ID: <1355864411.1.0.0999619166921.issue16716@psf.upfronthosting.co.za> R. David Murray added the comment: It seems sensible to me. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 20:02:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 19:02:43 +0000 Subject: [issue16714] Raise exceptions, don't throw In-Reply-To: <1355856086.03.0.903512642.issue16714@psf.upfronthosting.co.za> Message-ID: <201212182101.54155.storchaka@gmail.com> Serhiy Storchaka added the comment: Indeed. Here are updated patches. ---------- Added file: http://bugs.python.org/file28350/raise-2.7_2.patch Added file: http://bugs.python.org/file28351/raise-3.3_2.patch Added file: http://bugs.python.org/file28352/raise-3.2_2.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r b0935ef48186 Doc/howto/cporting.rst --- a/Doc/howto/cporting.rst Sun Dec 16 13:55:47 2012 +0100 +++ b/Doc/howto/cporting.rst Tue Dec 18 20:06:01 2012 +0200 @@ -253,7 +253,7 @@ * :c:func:`PyCapsule_GetName` always returns NULL. - * :c:func:`PyCapsule_SetName` always throws an exception and + * :c:func:`PyCapsule_SetName` always raises an exception and returns failure. (Since there's no way to store a name in a CObject, noisy failure of :c:func:`PyCapsule_SetName` was deemed preferable to silent failure here. If this is diff -r b0935ef48186 Lib/asyncore.py --- a/Lib/asyncore.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/asyncore.py Tue Dec 18 20:06:01 2012 +0200 @@ -393,7 +393,7 @@ else: return data except socket.error, why: - # winsock sometimes throws ENOTCONN + # winsock sometimes raises ENOTCONN if why.args[0] in _DISCONNECTED: self.handle_close() return '' diff -r b0935ef48186 Lib/distutils/tests/test_msvc9compiler.py --- a/Lib/distutils/tests/test_msvc9compiler.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/distutils/tests/test_msvc9compiler.py Tue Dec 18 20:06:01 2012 +0200 @@ -104,7 +104,7 @@ unittest.TestCase): def test_no_compiler(self): - # makes sure query_vcvarsall throws + # makes sure query_vcvarsall raises # a DistutilsPlatformError if the compiler # is not found from distutils.msvc9compiler import query_vcvarsall diff -r b0935ef48186 Lib/email/feedparser.py --- a/Lib/email/feedparser.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/email/feedparser.py Tue Dec 18 20:06:01 2012 +0200 @@ -13,7 +13,7 @@ data. When you have no more data to push into the parser, call .close(). This completes the parsing and returns the root message object. -The other advantage of this parser is that it will never throw a parsing +The other advantage of this parser is that it will never raise a parsing exception. Instead, when it finds something unexpected, it adds a 'defect' to the current message. Defects are just instances that live on the message object's .defects attribute. @@ -214,7 +214,7 @@ # supposed to see in the body of the message. self._parse_headers(headers) # Headers-only parsing is a backwards compatibility hack, which was - # necessary in the older parser, which could throw errors. All + # necessary in the older parser, which could raise errors. All # remaining lines in the input are thrown into the message body. if self._headersonly: lines = [] diff -r b0935ef48186 Lib/email/header.py --- a/Lib/email/header.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/email/header.py Tue Dec 18 20:06:01 2012 +0200 @@ -103,7 +103,7 @@ dec = email.base64mime.decode(encoded) except binascii.Error: # Turn this into a higher level exception. BAW: Right - # now we throw the lower level exception away but + # now we raise the lower level exception away but # when/if we get exception chaining, we'll preserve it. raise HeaderParseError if dec is None: diff -r b0935ef48186 Lib/httplib.py --- a/Lib/httplib.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/httplib.py Tue Dec 18 20:06:01 2012 +0200 @@ -1068,7 +1068,7 @@ if port == 0: port = None - # Note that we may pass an empty string as the host; this will throw + # Note that we may pass an empty string as the host; this will raise # an error when we attempt to connect. Presumably, the client code # will call connect before then, with a proper host. self._setup(self._connection_class(host, port, strict)) diff -r b0935ef48186 Lib/io.py --- a/Lib/io.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/io.py Tue Dec 18 20:06:01 2012 +0200 @@ -4,7 +4,7 @@ At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams; implementations are -allowed to throw an IOError if they do not support a given operation. +allowed to raise an IOError if they do not support a given operation. Extending IOBase is RawIOBase which deals simply with the reading and writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide diff -r b0935ef48186 Lib/lib-tk/Tkinter.py --- a/Lib/lib-tk/Tkinter.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/lib-tk/Tkinter.py Tue Dec 18 20:06:01 2012 +0200 @@ -155,7 +155,7 @@ pass def _exit(code=0): - """Internal function. Calling it will throw the exception SystemExit.""" + """Internal function. Calling it will raise the exception SystemExit.""" try: code = int(code) except ValueError: diff -r b0935ef48186 Lib/logging/__init__.py --- a/Lib/logging/__init__.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/logging/__init__.py Tue Dec 18 20:06:01 2012 +0200 @@ -1251,7 +1251,7 @@ all the handlers of this logger to handle the record. """ if _srcfile: - #IronPython doesn't track Python frames, so findCaller throws an + #IronPython doesn't track Python frames, so findCaller raises an #exception on some versions of IronPython. We trap it here so that #IronPython can use logging. try: diff -r b0935ef48186 Lib/runpy.py --- a/Lib/runpy.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/runpy.py Tue Dec 18 20:06:01 2012 +0200 @@ -200,7 +200,7 @@ pass else: # The following check looks a bit odd. The trick is that - # NullImporter throws ImportError if the supplied path is a + # NullImporter raises ImportError if the supplied path is a # *valid* directory entry (and hence able to be handled # by the standard import machinery) try: diff -r b0935ef48186 Lib/test/test_codeop.py --- a/Lib/test/test_codeop.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_codeop.py Tue Dec 18 20:06:01 2012 +0200 @@ -50,7 +50,7 @@ '''succeed iff str is the start of an invalid piece of code''' try: compile_command(str,symbol=symbol) - self.fail("No exception thrown for invalid code") + self.fail("No exception raised for invalid code") except SyntaxError: self.assertTrue(is_syntax) except OverflowError: diff -r b0935ef48186 Lib/test/test_docxmlrpc.py --- a/Lib/test/test_docxmlrpc.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_docxmlrpc.py Tue Dec 18 20:06:01 2012 +0200 @@ -100,7 +100,7 @@ self.assertEqual(response.status, 200) self.assertEqual(response.getheader("Content-type"), "text/html") - # Server throws an exception if we don't start to read the data + # Server raises an exception if we don't start to read the data response.read() def test_invalid_get_response(self): diff -r b0935ef48186 Lib/test/test_imaplib.py --- a/Lib/test/test_imaplib.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_imaplib.py Tue Dec 18 20:06:01 2012 +0200 @@ -79,7 +79,7 @@ return line += part except IOError: - # ..but SSLSockets throw exceptions. + # ..but SSLSockets raise exceptions. return if line.endswith('\r\n'): break diff -r b0935ef48186 Lib/test/test_minidom.py --- a/Lib/test/test_minidom.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_minidom.py Tue Dec 18 20:06:01 2012 +0200 @@ -1060,7 +1060,7 @@ '\xa4', "testEncodings - encoding EURO SIGN") - # Verify that character decoding errors throw exceptions instead + # Verify that character decoding errors raise exceptions instead # of crashing self.assertRaises(UnicodeDecodeError, parseString, 'Comment \xe7a va ? Tr\xe8s bien ?') diff -r b0935ef48186 Lib/test/test_os.py --- a/Lib/test/test_os.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_os.py Tue Dec 18 20:06:01 2012 +0200 @@ -214,33 +214,33 @@ try: result[200] - self.fail("No exception thrown") + self.fail("No exception raised") except IndexError: pass # Make sure that assignment fails try: result.st_mode = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except (AttributeError, TypeError): pass try: result.st_rdev = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except (AttributeError, TypeError): pass try: result.parrot = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass # Use the stat_result constructor with a too-short tuple. try: result2 = os.stat_result((10,)) - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass @@ -274,20 +274,20 @@ # Make sure that assignment really fails try: result.f_bfree = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass try: result.parrot = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass # Use the constructor with a too-short tuple. try: result2 = os.statvfs_result((10,)) - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass diff -r b0935ef48186 Lib/test/test_pty.py --- a/Lib/test/test_pty.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_pty.py Tue Dec 18 20:06:01 2012 +0200 @@ -152,7 +152,7 @@ # platform-dependent amount of data is written to its fd. On # Linux 2.6, it's 4000 bytes and the child won't block, but on OS # X even the small writes in the child above will block it. Also - # on Linux, the read() will throw an OSError (input/output error) + # on Linux, the read() will raise an OSError (input/output error) # when it tries to read past the end of the buffer but the child's # already exited, so catch and discard those exceptions. It's not # worth checking for EIO. diff -r b0935ef48186 Lib/test/test_sax.py --- a/Lib/test/test_sax.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_sax.py Tue Dec 18 20:06:01 2012 +0200 @@ -294,7 +294,7 @@ def test_5027_1(self): # The xml prefix (as in xml:lang below) is reserved and bound by # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had - # a bug whereby a KeyError is thrown because this namespace is missing + # a bug whereby a KeyError is raised because this namespace is missing # from a dictionary. # # This test demonstrates the bug by parsing a document. @@ -320,7 +320,7 @@ def test_5027_2(self): # The xml prefix (as in xml:lang below) is reserved and bound by # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had - # a bug whereby a KeyError is thrown because this namespace is missing + # a bug whereby a KeyError is raised because this namespace is missing # from a dictionary. # # This test demonstrates the bug by direct manipulation of the diff -r b0935ef48186 Lib/test/test_signal.py --- a/Lib/test/test_signal.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_signal.py Tue Dec 18 20:06:01 2012 +0200 @@ -109,7 +109,7 @@ # This wait should be interrupted by the signal's exception. self.wait(child) time.sleep(1) # Give the signal time to be delivered. - self.fail('HandlerBCalled exception not thrown') + self.fail('HandlerBCalled exception not raised') except HandlerBCalled: self.assertTrue(self.b_called) self.assertFalse(self.a_called) @@ -148,7 +148,7 @@ # test-running process from all the signals. It then # communicates with that child process over a pipe and # re-raises information about any exceptions the child - # throws. The real work happens in self.run_test(). + # raises. The real work happens in self.run_test(). os_done_r, os_done_w = os.pipe() with closing(os.fdopen(os_done_r)) as done_r, \ closing(os.fdopen(os_done_w, 'w')) as done_w: diff -r b0935ef48186 Lib/test/test_socketserver.py --- a/Lib/test/test_socketserver.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_socketserver.py Tue Dec 18 20:06:01 2012 +0200 @@ -58,7 +58,7 @@ def simple_subprocess(testcase): pid = os.fork() if pid == 0: - # Don't throw an exception; it would be caught by the test harness. + # Don't raise an exception; it would be caught by the test harness. os._exit(72) yield None pid2, status = os.waitpid(pid, 0) diff -r b0935ef48186 Lib/test/test_sys_settrace.py --- a/Lib/test/test_sys_settrace.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_sys_settrace.py Tue Dec 18 20:06:01 2012 +0200 @@ -417,7 +417,7 @@ except ValueError: pass else: - self.fail("exception not thrown!") + self.fail("exception not raised!") except RuntimeError: self.fail("recursion counter not reset") diff -r b0935ef48186 Lib/test/test_time.py --- a/Lib/test/test_time.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_time.py Tue Dec 18 20:06:01 2012 +0200 @@ -106,7 +106,7 @@ def test_strptime(self): # Should be able to go round-trip from strftime to strptime without - # throwing an exception. + # raising an exception. tt = time.gmtime(self.t) for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', diff -r b0935ef48186 Lib/test/test_uu.py --- a/Lib/test/test_uu.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_uu.py Tue Dec 18 20:06:01 2012 +0200 @@ -48,7 +48,7 @@ out = cStringIO.StringIO() try: uu.decode(inp, out) - self.fail("No exception thrown") + self.fail("No exception raised") except uu.Error, e: self.assertEqual(str(e), "Truncated input file") @@ -57,7 +57,7 @@ out = cStringIO.StringIO() try: uu.decode(inp, out) - self.fail("No exception thrown") + self.fail("No exception raised") except uu.Error, e: self.assertEqual(str(e), "No valid begin line found in input file") diff -r b0935ef48186 Lib/test/test_winreg.py --- a/Lib/test/test_winreg.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_winreg.py Tue Dec 18 20:06:01 2012 +0200 @@ -234,7 +234,7 @@ def test_changing_value(self): # Issue2810: A race condition in 2.6 and 3.1 may cause - # EnumValue or QueryValue to throw "WindowsError: More data is + # EnumValue or QueryValue to raise "WindowsError: More data is # available" done = False @@ -282,7 +282,7 @@ def test_dynamic_key(self): # Issue2810, when the value is dynamically generated, these - # throw "WindowsError: More data is available" in 2.6 and 3.1 + # raise "WindowsError: More data is available" in 2.6 and 3.1 try: EnumValue(HKEY_PERFORMANCE_DATA, 0) except OSError as e: diff -r b0935ef48186 Lib/test/test_zipfile.py --- a/Lib/test/test_zipfile.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/test/test_zipfile.py Tue Dec 18 20:06:01 2012 +0200 @@ -811,7 +811,7 @@ with zipfile.ZipFile(data, mode="w") as zipf: zipf.writestr("foo.txt", "O, for a Muse of Fire!") - # This is correct; calling .read on a closed ZipFile should throw + # This is correct; calling .read on a closed ZipFile should raise # a RuntimeError, and so should calling .testzip. An earlier # version of .testzip would swallow this exception (and any other) # and report that the first file in the archive was corrupt. diff -r b0935ef48186 Lib/traceback.py --- a/Lib/traceback.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/traceback.py Tue Dec 18 20:06:01 2012 +0200 @@ -166,7 +166,7 @@ # >>> raise string1, string2 # deprecated # # Clear these out first because issubtype(string1, SyntaxError) - # would throw another exception and mask the original problem. + # would raise another exception and mask the original problem. if (isinstance(etype, BaseException) or isinstance(etype, types.InstanceType) or etype is None or type(etype) is str): diff -r b0935ef48186 Lib/unittest/case.py --- a/Lib/unittest/case.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/unittest/case.py Tue Dec 18 20:06:01 2012 +0200 @@ -447,10 +447,10 @@ def assertRaises(self, excClass, callableObj=None, *args, **kwargs): - """Fail unless an exception of class excClass is thrown + """Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is - thrown, it will not be caught, and the test case will be + raised, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception. diff -r b0935ef48186 Lib/wsgiref/validate.py --- a/Lib/wsgiref/validate.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/wsgiref/validate.py Tue Dec 18 20:06:01 2012 +0200 @@ -134,9 +134,9 @@ When applied between a WSGI server and a WSGI application, this middleware will check for WSGI compliancy on a number of levels. This middleware does not modify the request or response in any - way, but will throw an AssertionError if anything seems off + way, but will raise an AssertionError if anything seems off (except for a failure to close the application iterator, which - will be printed to stderr -- there's no way to throw an exception + will be printed to stderr -- there's no way to raise an exception at that point). """ diff -r b0935ef48186 Lib/xml/sax/_exceptions.py --- a/Lib/xml/sax/_exceptions.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/xml/sax/_exceptions.py Tue Dec 18 20:06:01 2012 +0200 @@ -12,7 +12,7 @@ the application: you can subclass it to provide additional functionality, or to add localization. Note that although you will receive a SAXException as the argument to the handlers in the - ErrorHandler interface, you are not actually required to throw + ErrorHandler interface, you are not actually required to raise the exception; instead, you can simply read the information in it.""" @@ -50,7 +50,7 @@ the original XML document. Note that although the application will receive a SAXParseException as the argument to the handlers in the ErrorHandler interface, the application is not actually required - to throw the exception; instead, it can simply read the + to raise the exception; instead, it can simply read the information in it and take a different action. Since this exception is a subclass of SAXException, it inherits @@ -62,7 +62,7 @@ self._locator = locator # We need to cache this stuff at construction time. - # If this exception is thrown, the objects through which we must + # If this exception is raised, the objects through which we must # traverse to get this information may be deleted by the time # it gets caught. self._systemId = self._locator.getSystemId() diff -r b0935ef48186 Lib/xml/sax/xmlreader.py --- a/Lib/xml/sax/xmlreader.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/xml/sax/xmlreader.py Tue Dec 18 20:06:01 2012 +0200 @@ -68,7 +68,7 @@ SAX parsers are not required to provide localization for errors and warnings; if they cannot support the requested locale, - however, they must throw a SAX exception. Applications may + however, they must raise a SAX exception. Applications may request a locale change in the middle of a parse.""" raise SAXNotSupportedException("Locale support not implemented") diff -r b0935ef48186 Lib/xmlrpclib.py --- a/Lib/xmlrpclib.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Lib/xmlrpclib.py Tue Dec 18 20:06:01 2012 +0200 @@ -945,7 +945,7 @@ class MultiCallIterator: """Iterates over the results of a multicall. Exceptions are - thrown in response to xmlrpc faults.""" + raised in response to xmlrpc faults.""" def __init__(self, results): self.results = results diff -r b0935ef48186 Modules/_io/_iomodule.c --- a/Modules/_io/_iomodule.c Sun Dec 16 13:55:47 2012 +0100 +++ b/Modules/_io/_iomodule.c Tue Dec 18 20:06:01 2012 +0200 @@ -59,7 +59,7 @@ "At the top of the I/O hierarchy is the abstract base class IOBase. It\n" "defines the basic interface to a stream. Note, however, that there is no\n" "separation between reading and writing to streams; implementations are\n" -"allowed to throw an IOError if they do not support a given operation.\n" +"allowed to raise an IOError if they do not support a given operation.\n" "\n" "Extending IOBase is RawIOBase which deals simply with the reading and\n" "writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide\n" diff -r b0935ef48186 Modules/parsermodule.c --- a/Modules/parsermodule.c Sun Dec 16 13:55:47 2012 +0100 +++ b/Modules/parsermodule.c Tue Dec 18 20:06:01 2012 +0200 @@ -698,7 +698,7 @@ err_string("parse tree does not use a valid start symbol"); } } - /* Make sure we throw an exception on all errors. We should never + /* Make sure we raise an exception on all errors. We should never * get this, but we'd do well to be sure something is done. */ if (st == NULL && !PyErr_Occurred()) @@ -813,7 +813,7 @@ else if (!ISNONTERMINAL(type)) { /* * It has to be one or the other; this is an error. - * Throw an exception. + * Raise an exception. */ PyObject *err = Py_BuildValue("os", elem, "unknown node type."); PyErr_SetObject(parser_error, err); @@ -863,7 +863,7 @@ if (ISTERMINAL(num)) { /* * The tuple is simple, but it doesn't start with a start symbol. - * Throw an exception now and be done with it. + * Raise an exception now and be done with it. */ tuple = Py_BuildValue("os", tuple, "Illegal syntax-tree; cannot start with terminal symbol."); diff -r b0935ef48186 Modules/posixmodule.c --- a/Modules/posixmodule.c Sun Dec 16 13:55:47 2012 +0100 +++ b/Modules/posixmodule.c Tue Dec 18 20:06:01 2012 +0200 @@ -349,7 +349,7 @@ #if defined _MSC_VER && _MSC_VER >= 1400 /* Microsoft CRT in VS2005 and higher will verify that a filehandle is - * valid and throw an assertion if it isn't. + * valid and raise an assertion if it isn't. * Normally, an invalid fd is likely to be a C program error and therefore * an assertion can be useful, but it does contradict the POSIX standard * which for write(2) states: diff -r b0935ef48186 Tools/scripts/serve.py --- a/Tools/scripts/serve.py Sun Dec 16 13:55:47 2012 +0100 +++ b/Tools/scripts/serve.py Tue Dec 18 20:06:01 2012 +0200 @@ -2,7 +2,7 @@ ''' Small wsgiref based web server. Takes a path to serve from and an optional port number (defaults to 8000), then tries to serve files. -Mime types are guessed from the file names, 404 errors are thrown +Mime types are guessed from the file names, 404 errors are raised if the file is not found. Used for the make serve target in Doc. ''' import sys -------------- next part -------------- diff -r 907d71668d3c Doc/howto/cporting.rst --- a/Doc/howto/cporting.rst Sun Dec 16 21:10:35 2012 +0100 +++ b/Doc/howto/cporting.rst Tue Dec 18 19:35:27 2012 +0200 @@ -253,7 +253,7 @@ * :c:func:`PyCapsule_GetName` always returns NULL. - * :c:func:`PyCapsule_SetName` always throws an exception and + * :c:func:`PyCapsule_SetName` always raises an exception and returns failure. (Since there's no way to store a name in a CObject, noisy failure of :c:func:`PyCapsule_SetName` was deemed preferable to silent failure here. If this is diff -r 907d71668d3c Doc/library/contextlib.rst --- a/Doc/library/contextlib.rst Sun Dec 16 21:10:35 2012 +0100 +++ b/Doc/library/contextlib.rst Tue Dec 18 19:35:27 2012 +0200 @@ -184,7 +184,7 @@ files = [stack.enter_context(open(fname)) for fname in filenames] # All opened files will automatically be closed at the end of # the with statement, even if attempts to open files later - # in the list throw an exception + # in the list raise an exception Each instance maintains a stack of registered callbacks that are called in reverse order when the instance is closed (either explicitly or implicitly diff -r 907d71668d3c Doc/library/imaplib.rst --- a/Doc/library/imaplib.rst Sun Dec 16 21:10:35 2012 +0100 +++ b/Doc/library/imaplib.rst Tue Dec 18 19:35:27 2012 +0200 @@ -75,7 +75,7 @@ :class:`ssl.SSLContext` object which allows bundling SSL configuration options, certificates and private keys into a single (potentially long-lived) structure. Note that the *keyfile*/*certfile* parameters are mutually exclusive with *ssl_context*, - a :class:`ValueError` is thrown if *keyfile*/*certfile* is provided along with *ssl_context*. + a :class:`ValueError` is raised if *keyfile*/*certfile* is provided along with *ssl_context*. .. versionchanged:: 3.3 *ssl_context* parameter added. diff -r 907d71668d3c Doc/library/os.rst --- a/Doc/library/os.rst Sun Dec 16 21:10:35 2012 +0100 +++ b/Doc/library/os.rst Tue Dec 18 19:35:27 2012 +0200 @@ -1171,7 +1171,7 @@ output) specifies which file descriptor should be queried. If the file descriptor is not connected to a terminal, an :exc:`OSError` - is thrown. + is raised. :func:`shutil.get_terminal_size` is the high-level function which should normally be used, ``os.get_terminal_size`` is the low-level @@ -1945,7 +1945,7 @@ :mod:`os` module permit use of their *dir_fd* parameter. Different platforms provide different functionality, and an option that might work on one might be unsupported on another. For consistency's sakes, functions that support - *dir_fd* always allow specifying the parameter, but will throw an exception + *dir_fd* always allow specifying the parameter, but will raise an exception if the functionality is not actually available. To check whether a particular function permits use of its *dir_fd* @@ -1986,7 +1986,7 @@ descriptor. Different platforms provide different functionality, and an option that might work on one might be unsupported on another. For consistency's sakes, functions that support *fd* always allow specifying - the parameter, but will throw an exception if the functionality is not + the parameter, but will raise an exception if the functionality is not actually available. To check whether a particular function permits specifying an open file @@ -2007,7 +2007,7 @@ platforms provide different functionality, and an option that might work on one might be unsupported on another. For consistency's sakes, functions that support *follow_symlinks* always allow specifying the parameter, but will - throw an exception if the functionality is not actually available. + raise an exception if the functionality is not actually available. To check whether a particular function permits use of its *follow_symlinks* parameter, use the ``in`` operator on ``supports_follow_symlinks``. As an diff -r 907d71668d3c Lib/asyncore.py --- a/Lib/asyncore.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/asyncore.py Tue Dec 18 19:35:27 2012 +0200 @@ -385,7 +385,7 @@ else: return data except socket.error as why: - # winsock sometimes throws ENOTCONN + # winsock sometimes raises ENOTCONN if why.args[0] in _DISCONNECTED: self.handle_close() return b'' diff -r 907d71668d3c Lib/contextlib.py --- a/Lib/contextlib.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/contextlib.py Tue Dec 18 19:35:27 2012 +0200 @@ -151,7 +151,7 @@ files = [stack.enter_context(open(fname)) for fname in filenames] # All opened files will automatically be closed at the end of # the with statement, even if attempts to open files later - # in the list throw an exception + # in the list raise an exception """ def __init__(self): diff -r 907d71668d3c Lib/distutils/tests/test_msvc9compiler.py --- a/Lib/distutils/tests/test_msvc9compiler.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/distutils/tests/test_msvc9compiler.py Tue Dec 18 19:35:27 2012 +0200 @@ -104,7 +104,7 @@ unittest.TestCase): def test_no_compiler(self): - # makes sure query_vcvarsall throws + # makes sure query_vcvarsall raises # a DistutilsPlatformError if the compiler # is not found from distutils.msvc9compiler import query_vcvarsall diff -r 907d71668d3c Lib/email/feedparser.py --- a/Lib/email/feedparser.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/email/feedparser.py Tue Dec 18 19:35:27 2012 +0200 @@ -13,7 +13,7 @@ data. When you have no more data to push into the parser, call .close(). This completes the parsing and returns the root message object. -The other advantage of this parser is that it will never throw a parsing +The other advantage of this parser is that it will never raise a parsing exception. Instead, when it finds something unexpected, it adds a 'defect' to the current message. Defects are just instances that live on the message object's .defects attribute. @@ -228,7 +228,7 @@ # supposed to see in the body of the message. self._parse_headers(headers) # Headers-only parsing is a backwards compatibility hack, which was - # necessary in the older parser, which could throw errors. All + # necessary in the older parser, which could raise errors. All # remaining lines in the input are thrown into the message body. if self._headersonly: lines = [] diff -r 907d71668d3c Lib/email/header.py --- a/Lib/email/header.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/email/header.py Tue Dec 18 19:35:27 2012 +0200 @@ -298,7 +298,7 @@ else: s = s.decode(input_charset, errors) # Ensure that the bytes we're storing can be decoded to the output - # character set, otherwise an early error is thrown. + # character set, otherwise an early error is raised. output_charset = charset.output_codec or 'us-ascii' if output_charset != _charset.UNKNOWN8BIT: try: diff -r 907d71668d3c Lib/email/utils.py --- a/Lib/email/utils.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/email/utils.py Tue Dec 18 19:35:27 2012 +0200 @@ -83,7 +83,7 @@ 'utf-8'. """ name, address = pair - # The address MUST (per RFC) be ascii, so throw a UnicodeError if it isn't. + # The address MUST (per RFC) be ascii, so raise an UnicodeError if it isn't. address.encode('ascii') if name: try: diff -r 907d71668d3c Lib/imaplib.py --- a/Lib/imaplib.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/imaplib.py Tue Dec 18 19:35:27 2012 +0200 @@ -1178,7 +1178,7 @@ ssl_context - a SSLContext object that contains your certificate chain and private key (default: None) Note: if ssl_context is provided, then parameters keyfile or - certfile should not be set otherwise ValueError is thrown. + certfile should not be set otherwise ValueError is raised. for more documentation see the docstring of the parent class IMAP4. """ diff -r 907d71668d3c Lib/io.py --- a/Lib/io.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/io.py Tue Dec 18 19:35:27 2012 +0200 @@ -4,7 +4,7 @@ At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams; implementations are -allowed to throw an IOError if they do not support a given operation. +allowed to raise an IOError if they do not support a given operation. Extending IOBase is RawIOBase which deals simply with the reading and writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide diff -r 907d71668d3c Lib/logging/__init__.py --- a/Lib/logging/__init__.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/logging/__init__.py Tue Dec 18 19:35:27 2012 +0200 @@ -1349,7 +1349,7 @@ """ sinfo = None if _srcfile: - #IronPython doesn't track Python frames, so findCaller throws an + #IronPython doesn't track Python frames, so findCaller raises an #exception on some versions of IronPython. We trap it here so that #IronPython can use logging. try: @@ -1671,7 +1671,7 @@ Added the ``style`` parameter. .. versionchanged:: 3.3 - Added the ``handlers`` parameter. A ``ValueError`` is now thrown for + Added the ``handlers`` parameter. A ``ValueError`` is now raised for incompatible arguments (e.g. ``handlers`` specified together with ``filename``/``filemode``, or ``filename``/``filemode`` specified together with ``stream``, or ``handlers`` specified together with diff -r 907d71668d3c Lib/multiprocessing/util.py --- a/Lib/multiprocessing/util.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/multiprocessing/util.py Tue Dec 18 19:35:27 2012 +0200 @@ -290,7 +290,7 @@ if current_process() is not None: # We check if the current process is None here because if - # it's None, any call to ``active_children()`` will throw + # it's None, any call to ``active_children()`` will raise # an AttributeError (active_children winds up trying to # get attributes from util._current_process). One # situation where this can happen is if someone has diff -r 907d71668d3c Lib/pkgutil.py --- a/Lib/pkgutil.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/pkgutil.py Tue Dec 18 19:35:27 2012 +0200 @@ -504,7 +504,7 @@ return importlib.find_loader(fullname, path) except (ImportError, AttributeError, TypeError, ValueError) as ex: # This hack fixes an impedance mismatch between pkgutil and - # importlib, where the latter throws other errors for cases where + # importlib, where the latter raises other errors for cases where # pkgutil previously threw ImportError msg = "Error while finding loader for {!r} ({}: {})" raise ImportError(msg.format(fullname, type(ex), ex)) from ex diff -r 907d71668d3c Lib/tempfile.py --- a/Lib/tempfile.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/tempfile.py Tue Dec 18 19:35:27 2012 +0200 @@ -621,7 +621,7 @@ def __init__(self, suffix="", prefix=template, dir=None): self._closed = False - self.name = None # Handle mkdtemp throwing an exception + self.name = None # Handle mkdtemp raising an exception self.name = mkdtemp(suffix, prefix, dir) def __repr__(self): diff -r 907d71668d3c Lib/test/test_codeop.py --- a/Lib/test/test_codeop.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_codeop.py Tue Dec 18 19:35:27 2012 +0200 @@ -50,7 +50,7 @@ '''succeed iff str is the start of an invalid piece of code''' try: compile_command(str,symbol=symbol) - self.fail("No exception thrown for invalid code") + self.fail("No exception raised for invalid code") except SyntaxError: self.assertTrue(is_syntax) except OverflowError: diff -r 907d71668d3c Lib/test/test_docxmlrpc.py --- a/Lib/test/test_docxmlrpc.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_docxmlrpc.py Tue Dec 18 19:35:27 2012 +0200 @@ -100,7 +100,7 @@ self.assertEqual(response.status, 200) self.assertEqual(response.getheader("Content-type"), "text/html") - # Server throws an exception if we don't start to read the data + # Server raises an exception if we don't start to read the data response.read() def test_invalid_get_response(self): diff -r 907d71668d3c Lib/test/test_imaplib.py --- a/Lib/test/test_imaplib.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_imaplib.py Tue Dec 18 19:35:27 2012 +0200 @@ -115,7 +115,7 @@ return line += part except IOError: - # ..but SSLSockets throw exceptions. + # ..but SSLSockets raise exceptions. return if line.endswith(b'\r\n'): break diff -r 907d71668d3c Lib/test/test_minidom.py --- a/Lib/test/test_minidom.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_minidom.py Tue Dec 18 19:35:27 2012 +0200 @@ -1073,7 +1073,7 @@ '' '\u20ac'.encode('utf-16')) - # Verify that character decoding errors throw exceptions instead + # Verify that character decoding errors raise exceptions instead # of crashing self.assertRaises(UnicodeDecodeError, parseString, b'Comment \xe7a va ? Tr\xe8s bien ?') diff -r 907d71668d3c Lib/test/test_os.py --- a/Lib/test/test_os.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_os.py Tue Dec 18 19:35:27 2012 +0200 @@ -202,33 +202,33 @@ try: result[200] - self.fail("No exception thrown") + self.fail("No exception raised") except IndexError: pass # Make sure that assignment fails try: result.st_mode = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass try: result.st_rdev = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except (AttributeError, TypeError): pass try: result.parrot = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass # Use the stat_result constructor with a too-short tuple. try: result2 = os.stat_result((10,)) - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass @@ -273,20 +273,20 @@ # Make sure that assignment really fails try: result.f_bfree = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass try: result.parrot = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass # Use the constructor with a too-short tuple. try: result2 = os.statvfs_result((10,)) - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass @@ -2018,7 +2018,7 @@ size = os.get_terminal_size() except OSError as e: if sys.platform == "win32" or e.errno in (errno.EINVAL, errno.ENOTTY): - # Under win32 a generic OSError can be thrown if the + # Under win32 a generic OSError can be raised if the # handle cannot be retrieved self.skipTest("failed to query terminal size") raise @@ -2043,7 +2043,7 @@ actual = os.get_terminal_size(sys.__stdin__.fileno()) except OSError as e: if sys.platform == "win32" or e.errno in (errno.EINVAL, errno.ENOTTY): - # Under win32 a generic OSError can be thrown if the + # Under win32 a generic OSError can be raised if the # handle cannot be retrieved self.skipTest("failed to query terminal size") raise diff -r 907d71668d3c Lib/test/test_posix.py --- a/Lib/test/test_posix.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_posix.py Tue Dec 18 19:35:27 2012 +0200 @@ -824,7 +824,7 @@ posix.rename(support.TESTFN + 'ren', support.TESTFN) raise else: - posix.stat(support.TESTFN) # should not throw exception + posix.stat(support.TESTFN) # should not raise exception finally: posix.close(f) @@ -842,7 +842,7 @@ def test_unlink_dir_fd(self): f = posix.open(posix.getcwd(), posix.O_RDONLY) support.create_empty_file(support.TESTFN + 'del') - posix.stat(support.TESTFN + 'del') # should not throw exception + posix.stat(support.TESTFN + 'del') # should not raise exception try: posix.unlink(support.TESTFN + 'del', dir_fd=f) except: diff -r 907d71668d3c Lib/test/test_pty.py --- a/Lib/test/test_pty.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_pty.py Tue Dec 18 19:35:27 2012 +0200 @@ -152,7 +152,7 @@ # platform-dependent amount of data is written to its fd. On # Linux 2.6, it's 4000 bytes and the child won't block, but on OS # X even the small writes in the child above will block it. Also - # on Linux, the read() will throw an OSError (input/output error) + # on Linux, the read() will raise an OSError (input/output error) # when it tries to read past the end of the buffer but the child's # already exited, so catch and discard those exceptions. It's not # worth checking for EIO. diff -r 907d71668d3c Lib/test/test_sax.py --- a/Lib/test/test_sax.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_sax.py Tue Dec 18 19:35:27 2012 +0200 @@ -389,7 +389,7 @@ def test_5027_1(self): # The xml prefix (as in xml:lang below) is reserved and bound by # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had - # a bug whereby a KeyError is thrown because this namespace is missing + # a bug whereby a KeyError is raised because this namespace is missing # from a dictionary. # # This test demonstrates the bug by parsing a document. @@ -415,7 +415,7 @@ def test_5027_2(self): # The xml prefix (as in xml:lang below) is reserved and bound by # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had - # a bug whereby a KeyError is thrown because this namespace is missing + # a bug whereby a KeyError is raised because this namespace is missing # from a dictionary. # # This test demonstrates the bug by direct manipulation of the diff -r 907d71668d3c Lib/test/test_signal.py --- a/Lib/test/test_signal.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_signal.py Tue Dec 18 19:35:27 2012 +0200 @@ -107,7 +107,7 @@ # This wait should be interrupted by the signal's exception. self.wait(child) time.sleep(1) # Give the signal time to be delivered. - self.fail('HandlerBCalled exception not thrown') + self.fail('HandlerBCalled exception not raised') except HandlerBCalled: self.assertTrue(self.b_called) self.assertFalse(self.a_called) @@ -143,7 +143,7 @@ # test-running process from all the signals. It then # communicates with that child process over a pipe and # re-raises information about any exceptions the child - # throws. The real work happens in self.run_test(). + # raises. The real work happens in self.run_test(). os_done_r, os_done_w = os.pipe() with closing(os.fdopen(os_done_r, 'rb')) as done_r, \ closing(os.fdopen(os_done_w, 'wb')) as done_w: diff -r 907d71668d3c Lib/test/test_socketserver.py --- a/Lib/test/test_socketserver.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_socketserver.py Tue Dec 18 19:35:27 2012 +0200 @@ -58,7 +58,7 @@ def simple_subprocess(testcase): pid = os.fork() if pid == 0: - # Don't throw an exception; it would be caught by the test harness. + # Don't raise an exception; it would be caught by the test harness. os._exit(72) yield None pid2, status = os.waitpid(pid, 0) diff -r 907d71668d3c Lib/test/test_sys_settrace.py --- a/Lib/test/test_sys_settrace.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_sys_settrace.py Tue Dec 18 19:35:27 2012 +0200 @@ -422,7 +422,7 @@ except ValueError: pass else: - self.fail("exception not thrown!") + self.fail("exception not raised!") except RuntimeError: self.fail("recursion counter not reset") diff -r 907d71668d3c Lib/test/test_time.py --- a/Lib/test/test_time.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_time.py Tue Dec 18 19:35:27 2012 +0200 @@ -175,7 +175,7 @@ def test_strptime(self): # Should be able to go round-trip from strftime to strptime without - # throwing an exception. + # raising an exception. tt = time.gmtime(self.t) for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', diff -r 907d71668d3c Lib/test/test_uu.py --- a/Lib/test/test_uu.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_uu.py Tue Dec 18 19:35:27 2012 +0200 @@ -80,7 +80,7 @@ out = io.BytesIO() try: uu.decode(inp, out) - self.fail("No exception thrown") + self.fail("No exception raised") except uu.Error as e: self.assertEqual(str(e), "Truncated input file") @@ -89,7 +89,7 @@ out = io.BytesIO() try: uu.decode(inp, out) - self.fail("No exception thrown") + self.fail("No exception raised") except uu.Error as e: self.assertEqual(str(e), "No valid begin line found in input file") diff -r 907d71668d3c Lib/test/test_winreg.py --- a/Lib/test/test_winreg.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_winreg.py Tue Dec 18 19:35:27 2012 +0200 @@ -245,7 +245,7 @@ def test_changing_value(self): # Issue2810: A race condition in 2.6 and 3.1 may cause - # EnumValue or QueryValue to throw "WindowsError: More data is + # EnumValue or QueryValue to raise "WindowsError: More data is # available" done = False @@ -291,7 +291,7 @@ def test_dynamic_key(self): # Issue2810, when the value is dynamically generated, these - # throw "WindowsError: More data is available" in 2.6 and 3.1 + # raise "WindowsError: More data is available" in 2.6 and 3.1 try: EnumValue(HKEY_PERFORMANCE_DATA, 0) except OSError as e: diff -r 907d71668d3c Lib/test/test_zipfile.py --- a/Lib/test/test_zipfile.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/test/test_zipfile.py Tue Dec 18 19:35:27 2012 +0200 @@ -1024,7 +1024,7 @@ with zipfile.ZipFile(data, mode="w") as zipf: zipf.writestr("foo.txt", "O, for a Muse of Fire!") - # This is correct; calling .read on a closed ZipFile should throw + # This is correct; calling .read on a closed ZipFile should raise # a RuntimeError, and so should calling .testzip. An earlier # version of .testzip would swallow this exception (and any other) # and report that the first file in the archive was corrupt. diff -r 907d71668d3c Lib/tkinter/__init__.py --- a/Lib/tkinter/__init__.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/tkinter/__init__.py Tue Dec 18 19:35:27 2012 +0200 @@ -149,7 +149,7 @@ pass def _exit(code=0): - """Internal function. Calling it will throw the exception SystemExit.""" + """Internal function. Calling it will raise the exception SystemExit.""" try: code = int(code) except ValueError: diff -r 907d71668d3c Lib/unittest/case.py --- a/Lib/unittest/case.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/unittest/case.py Tue Dec 18 19:35:27 2012 +0200 @@ -542,10 +542,10 @@ return '%s : %s' % (safe_repr(standardMsg), safe_repr(msg)) def assertRaises(self, excClass, callableObj=None, *args, **kwargs): - """Fail unless an exception of class excClass is thrown + """Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is - thrown, it will not be caught, and the test case will be + raised, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception. diff -r 907d71668d3c Lib/wsgiref/validate.py --- a/Lib/wsgiref/validate.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/wsgiref/validate.py Tue Dec 18 19:35:27 2012 +0200 @@ -139,9 +139,9 @@ When applied between a WSGI server and a WSGI application, this middleware will check for WSGI compliancy on a number of levels. This middleware does not modify the request or response in any - way, but will throw an AssertionError if anything seems off + way, but will raise an AssertionError if anything seems off (except for a failure to close the application iterator, which - will be printed to stderr -- there's no way to throw an exception + will be printed to stderr -- there's no way to raise an exception at that point). """ diff -r 907d71668d3c Lib/xml/sax/_exceptions.py --- a/Lib/xml/sax/_exceptions.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/xml/sax/_exceptions.py Tue Dec 18 19:35:27 2012 +0200 @@ -12,7 +12,7 @@ the application: you can subclass it to provide additional functionality, or to add localization. Note that although you will receive a SAXException as the argument to the handlers in the - ErrorHandler interface, you are not actually required to throw + ErrorHandler interface, you are not actually required to raise the exception; instead, you can simply read the information in it.""" @@ -50,7 +50,7 @@ the original XML document. Note that although the application will receive a SAXParseException as the argument to the handlers in the ErrorHandler interface, the application is not actually required - to throw the exception; instead, it can simply read the + to raise the exception; instead, it can simply read the information in it and take a different action. Since this exception is a subclass of SAXException, it inherits @@ -62,7 +62,7 @@ self._locator = locator # We need to cache this stuff at construction time. - # If this exception is thrown, the objects through which we must + # If this exception is raised, the objects through which we must # traverse to get this information may be deleted by the time # it gets caught. self._systemId = self._locator.getSystemId() diff -r 907d71668d3c Lib/xml/sax/xmlreader.py --- a/Lib/xml/sax/xmlreader.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/xml/sax/xmlreader.py Tue Dec 18 19:35:27 2012 +0200 @@ -68,7 +68,7 @@ SAX parsers are not required to provide localization for errors and warnings; if they cannot support the requested locale, - however, they must throw a SAX exception. Applications may + however, they must raise a SAX exception. Applications may request a locale change in the middle of a parse.""" raise SAXNotSupportedException("Locale support not implemented") diff -r 907d71668d3c Lib/xmlrpc/client.py --- a/Lib/xmlrpc/client.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Lib/xmlrpc/client.py Tue Dec 18 19:35:27 2012 +0200 @@ -811,7 +811,7 @@ class MultiCallIterator: """Iterates over the results of a multicall. Exceptions are - thrown in response to xmlrpc faults.""" + raised in response to xmlrpc faults.""" def __init__(self, results): self.results = results diff -r 907d71668d3c Modules/_io/_iomodule.c --- a/Modules/_io/_iomodule.c Sun Dec 16 21:10:35 2012 +0100 +++ b/Modules/_io/_iomodule.c Tue Dec 18 19:35:27 2012 +0200 @@ -60,7 +60,7 @@ "At the top of the I/O hierarchy is the abstract base class IOBase. It\n" "defines the basic interface to a stream. Note, however, that there is no\n" "separation between reading and writing to streams; implementations are\n" -"allowed to throw an IOError if they do not support a given operation.\n" +"allowed to raise an IOError if they do not support a given operation.\n" "\n" "Extending IOBase is RawIOBase which deals simply with the reading and\n" "writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide\n" diff -r 907d71668d3c Modules/parsermodule.c --- a/Modules/parsermodule.c Sun Dec 16 21:10:35 2012 +0100 +++ b/Modules/parsermodule.c Tue Dec 18 19:35:27 2012 +0200 @@ -696,7 +696,7 @@ err_string("parse tree does not use a valid start symbol"); } } - /* Make sure we throw an exception on all errors. We should never + /* Make sure we raise an exception on all errors. We should never * get this, but we'd do well to be sure something is done. */ if (st == NULL && !PyErr_Occurred()) @@ -802,7 +802,7 @@ else if (!ISNONTERMINAL(type)) { /* * It has to be one or the other; this is an error. - * Throw an exception. + * Raise an exception. */ PyObject *err = Py_BuildValue("os", elem, "unknown node type."); PyErr_SetObject(parser_error, err); @@ -854,7 +854,7 @@ if (ISTERMINAL(num)) { /* * The tuple is simple, but it doesn't start with a start symbol. - * Throw an exception now and be done with it. + * Raise an exception now and be done with it. */ tuple = Py_BuildValue("os", tuple, "Illegal syntax-tree; cannot start with terminal symbol."); diff -r 907d71668d3c Modules/posixmodule.c --- a/Modules/posixmodule.c Sun Dec 16 21:10:35 2012 +0100 +++ b/Modules/posixmodule.c Tue Dec 18 19:35:27 2012 +0200 @@ -798,7 +798,7 @@ #if defined _MSC_VER && _MSC_VER >= 1400 /* Microsoft CRT in VS2005 and higher will verify that a filehandle is - * valid and throw an assertion if it isn't. + * valid and raise an assertion if it isn't. * Normally, an invalid fd is likely to be a C program error and therefore * an assertion can be useful, but it does contradict the POSIX standard * which for write(2) states: @@ -2716,7 +2716,7 @@ result = fchmodat(dir_fd, path.narrow, mode, follow_symlinks ? 0 : AT_SYMLINK_NOFOLLOW); /* - * But wait! We can't throw the exception without allowing threads, + * But wait! We can't raise the exception without allowing threads, * and we can't do that in this nested scope. (Macro trickery, sigh.) */ fchmodat_nofollow_unsupported = @@ -10617,7 +10617,7 @@ "which file descriptor should be queried.\n" \ "\n" \ "If the file descriptor is not connected to a terminal, an OSError\n" \ - "is thrown.\n" \ + "is raised.\n" \ "\n" \ "This function will only be defined if an implementation is\n" \ "available for this system.\n" \ diff -r 907d71668d3c Tools/scripts/find_recursionlimit.py --- a/Tools/scripts/find_recursionlimit.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Tools/scripts/find_recursionlimit.py Tue Dec 18 19:35:27 2012 +0200 @@ -92,7 +92,7 @@ def test_compiler_recursion(): # The compiler uses a scaling factor to support additional levels # of recursion. This is a sanity check of that scaling to ensure - # it still throws RuntimeError even at higher recursion limits + # it still raises RuntimeError even at higher recursion limits compile("()" * (10 * sys.getrecursionlimit()), "", "single") def check_limit(n, test_func_name): diff -r 907d71668d3c Tools/scripts/serve.py --- a/Tools/scripts/serve.py Sun Dec 16 21:10:35 2012 +0100 +++ b/Tools/scripts/serve.py Tue Dec 18 19:35:27 2012 +0200 @@ -2,7 +2,7 @@ ''' Small wsgiref based web server. Takes a path to serve from and an optional port number (defaults to 8000), then tries to serve files. -Mime types are guessed from the file names, 404 errors are thrown +Mime types are guessed from the file names, 404 errors are raised if the file is not found. Used for the make serve target in Doc. ''' import sys -------------- next part -------------- diff -r 2ecea81adab0 Doc/howto/cporting.rst --- a/Doc/howto/cporting.rst Sun Dec 16 16:09:11 2012 +0100 +++ b/Doc/howto/cporting.rst Tue Dec 18 20:05:46 2012 +0200 @@ -253,7 +253,7 @@ * :c:func:`PyCapsule_GetName` always returns NULL. - * :c:func:`PyCapsule_SetName` always throws an exception and + * :c:func:`PyCapsule_SetName` always raises an exception and returns failure. (Since there's no way to store a name in a CObject, noisy failure of :c:func:`PyCapsule_SetName` was deemed preferable to silent failure here. If this is diff -r 2ecea81adab0 Lib/asyncore.py --- a/Lib/asyncore.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/asyncore.py Tue Dec 18 20:05:46 2012 +0200 @@ -393,7 +393,7 @@ else: return data except socket.error as why: - # winsock sometimes throws ENOTCONN + # winsock sometimes raises ENOTCONN if why.args[0] in _DISCONNECTED: self.handle_close() return b'' diff -r 2ecea81adab0 Lib/distutils/tests/test_msvc9compiler.py --- a/Lib/distutils/tests/test_msvc9compiler.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/distutils/tests/test_msvc9compiler.py Tue Dec 18 20:05:46 2012 +0200 @@ -104,7 +104,7 @@ unittest.TestCase): def test_no_compiler(self): - # makes sure query_vcvarsall throws + # makes sure query_vcvarsall raises # a DistutilsPlatformError if the compiler # is not found from distutils.msvc9compiler import query_vcvarsall diff -r 2ecea81adab0 Lib/email/feedparser.py --- a/Lib/email/feedparser.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/email/feedparser.py Tue Dec 18 20:05:46 2012 +0200 @@ -13,7 +13,7 @@ data. When you have no more data to push into the parser, call .close(). This completes the parsing and returns the root message object. -The other advantage of this parser is that it will never throw a parsing +The other advantage of this parser is that it will never raise a parsing exception. Instead, when it finds something unexpected, it adds a 'defect' to the current message. Defects are just instances that live on the message object's .defects attribute. @@ -214,7 +214,7 @@ # supposed to see in the body of the message. self._parse_headers(headers) # Headers-only parsing is a backwards compatibility hack, which was - # necessary in the older parser, which could throw errors. All + # necessary in the older parser, which could raise errors. All # remaining lines in the input are thrown into the message body. if self._headersonly: lines = [] diff -r 2ecea81adab0 Lib/email/header.py --- a/Lib/email/header.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/email/header.py Tue Dec 18 20:05:46 2012 +0200 @@ -280,7 +280,7 @@ else: s = s.decode(input_charset, errors) # Ensure that the bytes we're storing can be decoded to the output - # character set, otherwise an early error is thrown. + # character set, otherwise an early error is raised. output_charset = charset.output_codec or 'us-ascii' if output_charset != _charset.UNKNOWN8BIT: try: diff -r 2ecea81adab0 Lib/importlib/_bootstrap.py --- a/Lib/importlib/_bootstrap.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/importlib/_bootstrap.py Tue Dec 18 20:05:46 2012 +0200 @@ -415,7 +415,7 @@ source_mtime is not None): # If e.g. Jython ever implements imp.cache_from_source to have # their own cached file format, this block of code will most likely - # throw an exception. + # raise an exception. data = bytearray(imp.get_magic()) data.extend(marshal._w_long(source_mtime)) data.extend(marshal.dumps(code_object)) diff -r 2ecea81adab0 Lib/importlib/test/import_/test_fromlist.py --- a/Lib/importlib/test/import_/test_fromlist.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/importlib/test/import_/test_fromlist.py Tue Dec 18 20:05:46 2012 +0200 @@ -39,7 +39,7 @@ If a package is being imported, then what is listed in fromlist may be treated as a module to be imported [module]. But once again, even if - something in fromlist does not exist as a module, no error is thrown + something in fromlist does not exist as a module, no error is raised [no module]. And this extends to what is contained in __all__ when '*' is imported [using *]. And '*' does not need to be the only name in the fromlist [using * with others]. diff -r 2ecea81adab0 Lib/io.py --- a/Lib/io.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/io.py Tue Dec 18 20:05:46 2012 +0200 @@ -4,7 +4,7 @@ At the top of the I/O hierarchy is the abstract base class IOBase. It defines the basic interface to a stream. Note, however, that there is no separation between reading and writing to streams; implementations are -allowed to throw an IOError if they do not support a given operation. +allowed to raise an IOError if they do not support a given operation. Extending IOBase is RawIOBase which deals simply with the reading and writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide diff -r 2ecea81adab0 Lib/logging/__init__.py --- a/Lib/logging/__init__.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/logging/__init__.py Tue Dec 18 20:05:46 2012 +0200 @@ -1355,7 +1355,7 @@ """ sinfo = None if _srcfile: - #IronPython doesn't track Python frames, so findCaller throws an + #IronPython doesn't track Python frames, so findCaller raises an #exception on some versions of IronPython. We trap it here so that #IronPython can use logging. try: diff -r 2ecea81adab0 Lib/multiprocessing/util.py --- a/Lib/multiprocessing/util.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/multiprocessing/util.py Tue Dec 18 20:05:46 2012 +0200 @@ -301,7 +301,7 @@ _run_finalizers(0) if current_process() is not None: # We check if the current process is None here because if - # it's None, any call to ``active_children()`` will throw an + # it's None, any call to ``active_children()`` will raise an # AttributeError (active_children winds up trying to get # attributes from util._current_process). This happens in a # variety of shutdown circumstances that are not well-understood diff -r 2ecea81adab0 Lib/runpy.py --- a/Lib/runpy.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/runpy.py Tue Dec 18 20:05:46 2012 +0200 @@ -211,7 +211,7 @@ pass else: # The following check looks a bit odd. The trick is that - # NullImporter throws ImportError if the supplied path is a + # NullImporter raises ImportError if the supplied path is a # *valid* directory entry (and hence able to be handled # by the standard import machinery) try: diff -r 2ecea81adab0 Lib/tempfile.py --- a/Lib/tempfile.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/tempfile.py Tue Dec 18 20:05:46 2012 +0200 @@ -625,7 +625,7 @@ def __init__(self, suffix="", prefix=template, dir=None): self._closed = False - self.name = None # Handle mkdtemp throwing an exception + self.name = None # Handle mkdtemp raising an exception self.name = mkdtemp(suffix, prefix, dir) def __repr__(self): diff -r 2ecea81adab0 Lib/test/test_codeop.py --- a/Lib/test/test_codeop.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_codeop.py Tue Dec 18 20:05:46 2012 +0200 @@ -50,7 +50,7 @@ '''succeed iff str is the start of an invalid piece of code''' try: compile_command(str,symbol=symbol) - self.fail("No exception thrown for invalid code") + self.fail("No exception raised for invalid code") except SyntaxError: self.assertTrue(is_syntax) except OverflowError: diff -r 2ecea81adab0 Lib/test/test_docxmlrpc.py --- a/Lib/test/test_docxmlrpc.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_docxmlrpc.py Tue Dec 18 20:05:46 2012 +0200 @@ -100,7 +100,7 @@ self.assertEqual(response.status, 200) self.assertEqual(response.getheader("Content-type"), "text/html") - # Server throws an exception if we don't start to read the data + # Server raises an exception if we don't start to read the data response.read() def test_invalid_get_response(self): diff -r 2ecea81adab0 Lib/test/test_imaplib.py --- a/Lib/test/test_imaplib.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_imaplib.py Tue Dec 18 20:05:46 2012 +0200 @@ -99,7 +99,7 @@ return line += part except IOError: - # ..but SSLSockets throw exceptions. + # ..but SSLSockets raise exceptions. return if line.endswith(b'\r\n'): break diff -r 2ecea81adab0 Lib/test/test_minidom.py --- a/Lib/test/test_minidom.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_minidom.py Tue Dec 18 20:05:46 2012 +0200 @@ -1085,7 +1085,7 @@ self.assertEqual(doc.toxml('iso-8859-15'), b'\xa4') - # Verify that character decoding errors throw exceptions instead + # Verify that character decoding errors raise exceptions instead # of crashing self.assertRaises(UnicodeDecodeError, parseString, b'Comment \xe7a va ? Tr\xe8s bien ?') diff -r 2ecea81adab0 Lib/test/test_os.py --- a/Lib/test/test_os.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_os.py Tue Dec 18 20:05:46 2012 +0200 @@ -164,33 +164,33 @@ try: result[200] - self.fail("No exception thrown") + self.fail("No exception raised") except IndexError: pass # Make sure that assignment fails try: result.st_mode = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass try: result.st_rdev = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except (AttributeError, TypeError): pass try: result.parrot = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass # Use the stat_result constructor with a too-short tuple. try: result2 = os.stat_result((10,)) - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass @@ -233,20 +233,20 @@ # Make sure that assignment really fails try: result.f_bfree = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass try: result.parrot = 1 - self.fail("No exception thrown") + self.fail("No exception raised") except AttributeError: pass # Use the constructor with a too-short tuple. try: result2 = os.statvfs_result((10,)) - self.fail("No exception thrown") + self.fail("No exception raised") except TypeError: pass diff -r 2ecea81adab0 Lib/test/test_pty.py --- a/Lib/test/test_pty.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_pty.py Tue Dec 18 20:05:46 2012 +0200 @@ -152,7 +152,7 @@ # platform-dependent amount of data is written to its fd. On # Linux 2.6, it's 4000 bytes and the child won't block, but on OS # X even the small writes in the child above will block it. Also - # on Linux, the read() will throw an OSError (input/output error) + # on Linux, the read() will raise an OSError (input/output error) # when it tries to read past the end of the buffer but the child's # already exited, so catch and discard those exceptions. It's not # worth checking for EIO. diff -r 2ecea81adab0 Lib/test/test_sax.py --- a/Lib/test/test_sax.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_sax.py Tue Dec 18 20:05:46 2012 +0200 @@ -389,7 +389,7 @@ def test_5027_1(self): # The xml prefix (as in xml:lang below) is reserved and bound by # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had - # a bug whereby a KeyError is thrown because this namespace is missing + # a bug whereby a KeyError is raised because this namespace is missing # from a dictionary. # # This test demonstrates the bug by parsing a document. @@ -415,7 +415,7 @@ def test_5027_2(self): # The xml prefix (as in xml:lang below) is reserved and bound by # definition to http://www.w3.org/XML/1998/namespace. XMLGenerator had - # a bug whereby a KeyError is thrown because this namespace is missing + # a bug whereby a KeyError is raised because this namespace is missing # from a dictionary. # # This test demonstrates the bug by direct manipulation of the diff -r 2ecea81adab0 Lib/test/test_signal.py --- a/Lib/test/test_signal.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_signal.py Tue Dec 18 20:05:46 2012 +0200 @@ -113,7 +113,7 @@ # This wait should be interrupted by the signal's exception. self.wait(child) time.sleep(1) # Give the signal time to be delivered. - self.fail('HandlerBCalled exception not thrown') + self.fail('HandlerBCalled exception not raised') except HandlerBCalled: self.assertTrue(self.b_called) self.assertFalse(self.a_called) @@ -152,7 +152,7 @@ # test-running process from all the signals. It then # communicates with that child process over a pipe and # re-raises information about any exceptions the child - # throws. The real work happens in self.run_test(). + # raises. The real work happens in self.run_test(). os_done_r, os_done_w = os.pipe() with closing(os.fdopen(os_done_r, 'rb')) as done_r, \ closing(os.fdopen(os_done_w, 'wb')) as done_w: diff -r 2ecea81adab0 Lib/test/test_socketserver.py --- a/Lib/test/test_socketserver.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_socketserver.py Tue Dec 18 20:05:46 2012 +0200 @@ -58,7 +58,7 @@ def simple_subprocess(testcase): pid = os.fork() if pid == 0: - # Don't throw an exception; it would be caught by the test harness. + # Don't raise an exception; it would be caught by the test harness. os._exit(72) yield None pid2, status = os.waitpid(pid, 0) diff -r 2ecea81adab0 Lib/test/test_sys_settrace.py --- a/Lib/test/test_sys_settrace.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_sys_settrace.py Tue Dec 18 20:05:46 2012 +0200 @@ -418,7 +418,7 @@ except ValueError: pass else: - self.fail("exception not thrown!") + self.fail("exception not raised!") except RuntimeError: self.fail("recursion counter not reset") diff -r 2ecea81adab0 Lib/test/test_time.py --- a/Lib/test/test_time.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_time.py Tue Dec 18 20:05:46 2012 +0200 @@ -106,7 +106,7 @@ def test_strptime(self): # Should be able to go round-trip from strftime to strptime without - # throwing an exception. + # raising an exception. tt = time.gmtime(self.t) for directive in ('a', 'A', 'b', 'B', 'c', 'd', 'H', 'I', 'j', 'm', 'M', 'p', 'S', diff -r 2ecea81adab0 Lib/test/test_uu.py --- a/Lib/test/test_uu.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_uu.py Tue Dec 18 20:05:46 2012 +0200 @@ -80,7 +80,7 @@ out = io.BytesIO() try: uu.decode(inp, out) - self.fail("No exception thrown") + self.fail("No exception raised") except uu.Error as e: self.assertEqual(str(e), "Truncated input file") @@ -89,7 +89,7 @@ out = io.BytesIO() try: uu.decode(inp, out) - self.fail("No exception thrown") + self.fail("No exception raised") except uu.Error as e: self.assertEqual(str(e), "No valid begin line found in input file") diff -r 2ecea81adab0 Lib/test/test_winreg.py --- a/Lib/test/test_winreg.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_winreg.py Tue Dec 18 20:05:46 2012 +0200 @@ -245,7 +245,7 @@ def test_changing_value(self): # Issue2810: A race condition in 2.6 and 3.1 may cause - # EnumValue or QueryValue to throw "WindowsError: More data is + # EnumValue or QueryValue to raise "WindowsError: More data is # available" done = False @@ -291,7 +291,7 @@ def test_dynamic_key(self): # Issue2810, when the value is dynamically generated, these - # throw "WindowsError: More data is available" in 2.6 and 3.1 + # raise "WindowsError: More data is available" in 2.6 and 3.1 try: EnumValue(HKEY_PERFORMANCE_DATA, 0) except OSError as e: diff -r 2ecea81adab0 Lib/test/test_zipfile.py --- a/Lib/test/test_zipfile.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/test/test_zipfile.py Tue Dec 18 20:05:46 2012 +0200 @@ -873,7 +873,7 @@ with zipfile.ZipFile(data, mode="w") as zipf: zipf.writestr("foo.txt", "O, for a Muse of Fire!") - # This is correct; calling .read on a closed ZipFile should throw + # This is correct; calling .read on a closed ZipFile should raise # a RuntimeError, and so should calling .testzip. An earlier # version of .testzip would swallow this exception (and any other) # and report that the first file in the archive was corrupt. diff -r 2ecea81adab0 Lib/tkinter/__init__.py --- a/Lib/tkinter/__init__.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/tkinter/__init__.py Tue Dec 18 20:05:46 2012 +0200 @@ -147,7 +147,7 @@ pass def _exit(code=0): - """Internal function. Calling it will throw the exception SystemExit.""" + """Internal function. Calling it will raise the exception SystemExit.""" try: code = int(code) except ValueError: diff -r 2ecea81adab0 Lib/unittest/case.py --- a/Lib/unittest/case.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/unittest/case.py Tue Dec 18 20:05:46 2012 +0200 @@ -528,10 +528,10 @@ def assertRaises(self, excClass, callableObj=None, *args, **kwargs): - """Fail unless an exception of class excClass is thrown + """Fail unless an exception of class excClass is raised by callableObj when invoked with arguments args and keyword arguments kwargs. If a different type of exception is - thrown, it will not be caught, and the test case will be + raised, it will not be caught, and the test case will be deemed to have suffered an error, exactly as for an unexpected exception. diff -r 2ecea81adab0 Lib/wsgiref/validate.py --- a/Lib/wsgiref/validate.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/wsgiref/validate.py Tue Dec 18 20:05:46 2012 +0200 @@ -139,9 +139,9 @@ When applied between a WSGI server and a WSGI application, this middleware will check for WSGI compliancy on a number of levels. This middleware does not modify the request or response in any - way, but will throw an AssertionError if anything seems off + way, but will raise an AssertionError if anything seems off (except for a failure to close the application iterator, which - will be printed to stderr -- there's no way to throw an exception + will be printed to stderr -- there's no way to raise an exception at that point). """ diff -r 2ecea81adab0 Lib/xml/sax/_exceptions.py --- a/Lib/xml/sax/_exceptions.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/xml/sax/_exceptions.py Tue Dec 18 20:05:46 2012 +0200 @@ -12,7 +12,7 @@ the application: you can subclass it to provide additional functionality, or to add localization. Note that although you will receive a SAXException as the argument to the handlers in the - ErrorHandler interface, you are not actually required to throw + ErrorHandler interface, you are not actually required to raise the exception; instead, you can simply read the information in it.""" @@ -50,7 +50,7 @@ the original XML document. Note that although the application will receive a SAXParseException as the argument to the handlers in the ErrorHandler interface, the application is not actually required - to throw the exception; instead, it can simply read the + to raise the exception; instead, it can simply read the information in it and take a different action. Since this exception is a subclass of SAXException, it inherits @@ -62,7 +62,7 @@ self._locator = locator # We need to cache this stuff at construction time. - # If this exception is thrown, the objects through which we must + # If this exception is raised, the objects through which we must # traverse to get this information may be deleted by the time # it gets caught. self._systemId = self._locator.getSystemId() diff -r 2ecea81adab0 Lib/xml/sax/xmlreader.py --- a/Lib/xml/sax/xmlreader.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/xml/sax/xmlreader.py Tue Dec 18 20:05:46 2012 +0200 @@ -68,7 +68,7 @@ SAX parsers are not required to provide localization for errors and warnings; if they cannot support the requested locale, - however, they must throw a SAX exception. Applications may + however, they must raise a SAX exception. Applications may request a locale change in the middle of a parse.""" raise SAXNotSupportedException("Locale support not implemented") diff -r 2ecea81adab0 Lib/xmlrpc/client.py --- a/Lib/xmlrpc/client.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Lib/xmlrpc/client.py Tue Dec 18 20:05:46 2012 +0200 @@ -800,7 +800,7 @@ class MultiCallIterator: """Iterates over the results of a multicall. Exceptions are - thrown in response to xmlrpc faults.""" + raised in response to xmlrpc faults.""" def __init__(self, results): self.results = results diff -r 2ecea81adab0 Modules/_io/_iomodule.c --- a/Modules/_io/_iomodule.c Sun Dec 16 16:09:11 2012 +0100 +++ b/Modules/_io/_iomodule.c Tue Dec 18 20:05:46 2012 +0200 @@ -59,7 +59,7 @@ "At the top of the I/O hierarchy is the abstract base class IOBase. It\n" "defines the basic interface to a stream. Note, however, that there is no\n" "separation between reading and writing to streams; implementations are\n" -"allowed to throw an IOError if they do not support a given operation.\n" +"allowed to raise an IOError if they do not support a given operation.\n" "\n" "Extending IOBase is RawIOBase which deals simply with the reading and\n" "writing of raw bytes to a stream. FileIO subclasses RawIOBase to provide\n" diff -r 2ecea81adab0 Modules/parsermodule.c --- a/Modules/parsermodule.c Sun Dec 16 16:09:11 2012 +0100 +++ b/Modules/parsermodule.c Tue Dec 18 20:05:46 2012 +0200 @@ -718,7 +718,7 @@ err_string("parse tree does not use a valid start symbol"); } } - /* Make sure we throw an exception on all errors. We should never + /* Make sure we raise an exception on all errors. We should never * get this, but we'd do well to be sure something is done. */ if (st == NULL && !PyErr_Occurred()) @@ -824,7 +824,7 @@ else if (!ISNONTERMINAL(type)) { /* * It has to be one or the other; this is an error. - * Throw an exception. + * Raise an exception. */ PyObject *err = Py_BuildValue("os", elem, "unknown node type."); PyErr_SetObject(parser_error, err); @@ -876,7 +876,7 @@ if (ISTERMINAL(num)) { /* * The tuple is simple, but it doesn't start with a start symbol. - * Throw an exception now and be done with it. + * Raise an exception now and be done with it. */ tuple = Py_BuildValue("os", tuple, "Illegal syntax-tree; cannot start with terminal symbol."); diff -r 2ecea81adab0 Modules/posixmodule.c --- a/Modules/posixmodule.c Sun Dec 16 16:09:11 2012 +0100 +++ b/Modules/posixmodule.c Tue Dec 18 20:05:46 2012 +0200 @@ -349,7 +349,7 @@ #if defined _MSC_VER && _MSC_VER >= 1400 /* Microsoft CRT in VS2005 and higher will verify that a filehandle is - * valid and throw an assertion if it isn't. + * valid and raise an assertion if it isn't. * Normally, an invalid fd is likely to be a C program error and therefore * an assertion can be useful, but it does contradict the POSIX standard * which for write(2) states: diff -r 2ecea81adab0 Tools/scripts/serve.py --- a/Tools/scripts/serve.py Sun Dec 16 16:09:11 2012 +0100 +++ b/Tools/scripts/serve.py Tue Dec 18 20:05:46 2012 +0200 @@ -2,7 +2,7 @@ ''' Small wsgiref based web server. Takes a path to serve from and an optional port number (defaults to 8000), then tries to serve files. -Mime types are guessed from the file names, 404 errors are thrown +Mime types are guessed from the file names, 404 errors are raised if the file is not found. Used for the make serve target in Doc. ''' import sys From report at bugs.python.org Tue Dec 18 22:11:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Dec 2012 21:11:02 +0000 Subject: [issue16717] Get rid of socket.error. Use OSError instead Message-ID: <3YQsN52sHrzQMy@mail.python.org> New submission from Roundup Robot: New changeset 50d19c2fac82 by Andrew Svetlov in branch 'default': Issue #16717: get rid of socket.error, replace with OSError http://hg.python.org/cpython/rev/50d19c2fac82 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 22:11:32 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 18 Dec 2012 21:11:32 +0000 Subject: [issue16717] Get rid of socket.error. Use OSError instead In-Reply-To: <3YQsN52sHrzQMy@mail.python.org> Message-ID: <1355865092.62.0.123427023358.issue16717@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 22:19:25 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 18 Dec 2012 21:19:25 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355865565.3.0.362796966647.issue16718@psf.upfronthosting.co.za> anatoly techtonik added the comment: But why _Cleanup is not None when wow.py is executed standalone? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 22:22:45 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Dec 2012 21:22:45 +0000 Subject: [issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0 In-Reply-To: <1344473974.14.0.584788696764.issue15599@psf.upfronthosting.co.za> Message-ID: <1355865765.4.0.370786378741.issue15599@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The occasional test_parallel_meta_path failure is really weird. The sys.meta_path module finding in _bootstrap.py is protected by the global import lock, so there shouldn't be any failure here. I'm starting to suspect some issue in the lock code itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 22:23:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Dec 2012 21:23:41 +0000 Subject: [issue15599] test_circular_imports() of test_threaded_import fails on FreeBSD 9.0 In-Reply-To: <1344473974.14.0.584788696764.issue15599@psf.upfronthosting.co.za> Message-ID: <3YQsfh1T04zQct@mail.python.org> Roundup Robot added the comment: New changeset 1ee9cf5a5351 by Antoine Pitrou in branch '3.3': Add sanity assertions in some import lock code (issue #15599). http://hg.python.org/cpython/rev/1ee9cf5a5351 New changeset 7cfca9ede861 by Antoine Pitrou in branch 'default': Add sanity assertions in some import lock code (issue #15599). http://hg.python.org/cpython/rev/7cfca9ede861 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 22:26:59 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Dec 2012 21:26:59 +0000 Subject: [issue15599] test_threaded_import fails sporadically on Windows and FreeBSD In-Reply-To: <1344473974.14.0.584788696764.issue15599@psf.upfronthosting.co.za> Message-ID: <1355866019.68.0.0700355944111.issue15599@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- title: test_circular_imports() of test_threaded_import fails on FreeBSD 9.0 -> test_threaded_import fails sporadically on Windows and FreeBSD _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 22:32:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 21:32:36 +0000 Subject: [issue16719] Get rid of WindowsError. Use OSError instead Message-ID: <1355866355.61.0.0791773762565.issue16719@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch. ---------- components: Extension Modules, Interpreter Core, Library (Lib) files: windowserror2oserror.patch keywords: patch messages: 177719 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Get rid of WindowsError. Use OSError instead type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28355/windowserror2oserror.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 22:33:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 21:33:18 +0000 Subject: [issue16719] Get rid of WindowsError. Use OSError instead In-Reply-To: <1355866355.61.0.0791773762565.issue16719@psf.upfronthosting.co.za> Message-ID: <1355866398.03.0.490126868073.issue16719@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 22:33:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 21:33:41 +0000 Subject: [issue16648] stdib should use new exception types from PEP 3151 In-Reply-To: <1354995347.5.0.732021100427.issue16648@psf.upfronthosting.co.za> Message-ID: <1355866421.83.0.644578010921.issue16648@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Get rid of WindowsError. Use OSError instead _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 22:40:48 2012 From: report at bugs.python.org (Brian Curtin) Date: Tue, 18 Dec 2012 21:40:48 +0000 Subject: [issue16719] Get rid of WindowsError. Use OSError instead In-Reply-To: <1355866355.61.0.0791773762565.issue16719@psf.upfronthosting.co.za> Message-ID: <1355866848.97.0.416651926509.issue16719@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- assignee: -> brian.curtin components: +Windows nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 23:06:01 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Dec 2012 22:06:01 +0000 Subject: [issue15599] test_threaded_import fails sporadically on Windows and FreeBSD In-Reply-To: <1344473974.14.0.584788696764.issue15599@psf.upfronthosting.co.za> Message-ID: <3YQtbX50bbzMkc@mail.python.org> Roundup Robot added the comment: New changeset 67d6bb557d67 by Antoine Pitrou in branch '3.3': Try to make test_threaded_import faster and safer (issue #15599). http://hg.python.org/cpython/rev/67d6bb557d67 New changeset 30c7cc62303a by Antoine Pitrou in branch 'default': Try to make test_threaded_import faster and safer (issue #15599). http://hg.python.org/cpython/rev/30c7cc62303a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 23:07:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 22:07:36 +0000 Subject: [issue16720] Get rid of os.error. Use OSError instead Message-ID: <1355868456.72.0.79747952931.issue16720@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patch. ---------- components: Library (Lib) files: os.error2oserror.diff keywords: patch messages: 177721 nosy: asvetlov, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Get rid of os.error. Use OSError instead type: enhancement versions: Python 3.4 Added file: http://bugs.python.org/file28356/os.error2oserror.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 23:08:17 2012 From: report at bugs.python.org (Vladimir Timofeev) Date: Tue, 18 Dec 2012 22:08:17 +0000 Subject: [issue16721] configure incorrectly adds -OPT:Olimit=0 for clang Message-ID: <1355868497.91.0.141324882263.issue16721@psf.upfronthosting.co.za> New submission from Vladimir Timofeev: Similar to http://bugs.python.org/issue1162001 But some differences, issue exposed only when first -OPT:Olimit=0 followed by correct -On option. clang simple do not check correctness of first occurences of -O: $ clang -OPT:Olimit=0 test.c; echo $? error: invalid integral value 'PT:Olimit=0' in '-OPT:Olimit=0' error: invalid integral value 'PT:Olimit=0' in '-OPT:Olimit=0' 1 $ clang -OPT:Olimit=0 -O2 test.c; echo $? 0 This leads to normal compilation of python itself, but some dependant software built by gcc fails (see http://www.freebsd.org/cgi/query-pr.cgi?pr=174525 ) ---------- components: Build messages: 177722 nosy: Vladimir.Timofeev priority: normal severity: normal status: open title: configure incorrectly adds -OPT:Olimit=0 for clang versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 23:08:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Tue, 18 Dec 2012 22:08:27 +0000 Subject: [issue16648] stdib should use new exception types from PEP 3151 In-Reply-To: <1354995347.5.0.732021100427.issue16648@psf.upfronthosting.co.za> Message-ID: <1355868507.36.0.0712371811997.issue16648@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Get rid of os.error. Use OSError instead _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 23:09:50 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Dec 2012 22:09:50 +0000 Subject: [issue16721] configure incorrectly adds -OPT:Olimit=0 for clang In-Reply-To: <1355868497.91.0.141324882263.issue16721@psf.upfronthosting.co.za> Message-ID: <1355868590.55.0.224552680183.issue16721@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 23:33:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 18 Dec 2012 22:33:42 +0000 Subject: [issue16715] Get rid of IOError. Use OSError instead Message-ID: <1355870022.82.0.706692106609.issue16715@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- title: Get rid of IOrror. Use OSError instead -> Get rid of IOError. Use OSError instead _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 18 23:47:43 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 18 Dec 2012 22:47:43 +0000 Subject: [issue13876] Sporadic failure in test_socket: testRecvmsgEOF In-Reply-To: <1327588563.2.0.447366914719.issue13876@psf.upfronthosting.co.za> Message-ID: <3YQvWf1T5tzMfr@mail.python.org> Roundup Robot added the comment: New changeset 13d8c33de8ff by Antoine Pitrou in branch '3.3': Silence sporadic failure in RecvmsgIntoSCTPStreamTest.testRecvmsgEOF (issue #13876) - probably not Python-related. http://hg.python.org/cpython/rev/13d8c33de8ff New changeset 900ee4a04f5e by Antoine Pitrou in branch 'default': Silence sporadic failure in RecvmsgIntoSCTPStreamTest.testRecvmsgEOF (issue #13876) - probably not Python-related. http://hg.python.org/cpython/rev/900ee4a04f5e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 01:10:39 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 19 Dec 2012 00:10:39 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355875839.96.0.839724966397.issue16718@psf.upfronthosting.co.za> Richard Oudkerk added the comment: When you run wy.py the wow module gets partially imported, and then garbage collected because it fails to import successfully. The destructor for the module replaces values in the module's __dict__ with None. So when the cleanup function runs you get the unexpected error. When you run wow.py directly, wow (i.e. the main module) will not be garbage collected, so _Cleanup is never replaced by None. ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 06:42:54 2012 From: report at bugs.python.org (=?utf-8?b?0KDRg9GB0LvQsNC9INCY0LbQsdGD0LvQsNGC0L7Qsg==?=) Date: Wed, 19 Dec 2012 05:42:54 +0000 Subject: [issue16722] __index__() overrides __bytes__() when bytes() is called Message-ID: <1355895772.21.0.287047855702.issue16722@psf.upfronthosting.co.za> New submission from ?????? ?????????: If a class implements both __index__() and __bytes__(), the built-in bytes() constructor uses __index__() in place of __bytes__(), including the assumption that __index__() returns a bytes object. Attaching a simple example (leads to overflow when big integer is casted to bytes). ---------- components: None files: testb.py messages: 177725 nosy: LRN priority: normal severity: normal status: open title: __index__() overrides __bytes__() when bytes() is called versions: Python 3.3 Added file: http://bugs.python.org/file28357/testb.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 07:42:14 2012 From: report at bugs.python.org (Michiel de Hoon) Date: Wed, 19 Dec 2012 06:42:14 +0000 Subject: [issue16723] io.TextIOWrapper on urllib.request.urlopen terminates prematurely Message-ID: <1355899334.66.0.683261774989.issue16723@psf.upfronthosting.co.za> New submission from Michiel de Hoon: I am trying to use io.TextIOWrapper to wrap a handle returned by urllib.request.urlopen. Reading line-by-line from the wrapped handle terminates prematurely. As an example, consider this script: import urllib.request import io url = "http://www.python.org" handle = urllib.request.urlopen(url) wrapped_handle = io.TextIOWrapper(handle, encoding='utf-8') for line in wrapped_handle: pass This gives: Traceback (most recent call last): File "", line 1, in ValueError: I/O operation on closed file. This happens after 335 out of the 430 lines have been read (the last line read is "

The Python Software Foundation holds the intellectual property\n", which is line 335 on the www.python.org website. ---------- messages: 177726 nosy: mdehoon priority: normal severity: normal status: open title: io.TextIOWrapper on urllib.request.urlopen terminates prematurely type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 10:29:56 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Wed, 19 Dec 2012 09:29:56 +0000 Subject: [issue8853] getaddrinfo should accept port of type long In-Reply-To: <1275155293.8.0.373298822378.issue8853@psf.upfronthosting.co.za> Message-ID: <1355909396.89.0.0447190539681.issue8853@psf.upfronthosting.co.za> Changes by Petri Lehtinen : ---------- nosy: +petri.lehtinen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 10:36:38 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 19 Dec 2012 09:36:38 +0000 Subject: [issue16724] Rename `data` argument names to `bytes` Message-ID: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> New submission from anatoly techtonik: http://docs.python.org/3/library/binascii - binascii.hexlify(data) + binascii.hexlify(bytes) tag:easy ---------- assignee: docs at python components: Documentation messages: 177727 nosy: docs at python, techtonik priority: normal severity: normal status: open title: Rename `data` argument names to `bytes` versions: Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 10:41:21 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 09:41:21 +0000 Subject: [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355910081.04.0.508115059351.issue16724@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Why? The binascii module consistently uses "data" to refer to binary data. For example: "Return the hexadecimal representation of the binary data. Every byte of data is converted ..." ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 10:55:14 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 09:55:14 +0000 Subject: [issue16723] io.TextIOWrapper on urllib.request.urlopen terminates prematurely In-Reply-To: <1355899334.66.0.683261774989.issue16723@psf.upfronthosting.co.za> Message-ID: <1355910914.8.0.276410621595.issue16723@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Hum, io objects are not supposed to close themselves when they run out of data. Even if HTTPResponse chooses to close the underlying socket (to clean unused resources?), it should not report itself as a closed io.IOBase. Subsequent calls read() should return b"", this is the io.RawIOBase way to indicate EOF. To fix this particular example, it seems enough to delete the "@property def closed(self)" from HTTPResponse. Note the XXX just above: """ # XXX This class should probably be revised to act more like # the "raw stream" that BufferedReader expects. """ But close() should be modified as well, and internal calls to close() should be changed to only close the underlying socket. ---------- nosy: +amaury.forgeotdarc, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 10:59:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2012 09:59:27 +0000 Subject: [issue16723] io.TextIOWrapper on urllib.request.urlopen terminates prematurely In-Reply-To: <1355899334.66.0.683261774989.issue16723@psf.upfronthosting.co.za> Message-ID: <1355911167.52.0.955424005784.issue16723@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This looks as a known bug in io.TextIOWrapper which call read() even previous read() returned an empty data. There was a related issue, I can't found it now. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 11:17:10 2012 From: report at bugs.python.org (Tim Cuthbertson) Date: Wed, 19 Dec 2012 10:17:10 +0000 Subject: [issue15112] argparse: nargs='*' positional argument doesn't accept any items if preceded by an option and another positional In-Reply-To: <1340165747.87.0.563099760163.issue15112@psf.upfronthosting.co.za> Message-ID: <1355912230.9.0.782885860581.issue15112@psf.upfronthosting.co.za> Changes by Tim Cuthbertson : ---------- nosy: +gfxmonk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 11:17:22 2012 From: report at bugs.python.org (Tim Cuthbertson) Date: Wed, 19 Dec 2012 10:17:22 +0000 Subject: [issue9334] argparse does not accept options taking arguments beginning with dash (regression from optparse) In-Reply-To: <1279836939.11.0.811316280273.issue9334@psf.upfronthosting.co.za> Message-ID: <1355912242.85.0.521971830784.issue9334@psf.upfronthosting.co.za> Changes by Tim Cuthbertson : ---------- nosy: +gfxmonk _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 11:21:49 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 10:21:49 +0000 Subject: [issue16723] io.TextIOWrapper on urllib.request.urlopen terminates prematurely In-Reply-To: <1355899334.66.0.683261774989.issue16723@psf.upfronthosting.co.za> Message-ID: <1355912509.05.0.869543057952.issue16723@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: buffer.read() never returns empty data in this case. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 11:36:58 2012 From: report at bugs.python.org (Jakob Eriksson) Date: Wed, 19 Dec 2012 10:36:58 +0000 Subject: [issue16725] Add 'ident' property to SysLogHandler like in Python 3.x Message-ID: <1355913418.22.0.692856202576.issue16725@psf.upfronthosting.co.za> New submission from Jakob Eriksson: Can we have the same ident property for the SysLogHandler in the Python 2.7 library, like it was introduced in the 3.x library? ( Like http://hg.python.org/cpython/rev/6baa90fa2b6d ) ---------- components: Library (Lib) hgrepos: 165 messages: 177732 nosy: b-jakob-v priority: normal severity: normal status: open title: Add 'ident' property to SysLogHandler like in Python 3.x versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 11:37:47 2012 From: report at bugs.python.org (Jakob Eriksson) Date: Wed, 19 Dec 2012 10:37:47 +0000 Subject: [issue16725] Add 'ident' property to SysLogHandler like in Python 3.x In-Reply-To: <1355913418.22.0.692856202576.issue16725@psf.upfronthosting.co.za> Message-ID: <1355913467.98.0.888109881643.issue16725@psf.upfronthosting.co.za> Changes by Jakob Eriksson : ---------- type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 11:56:49 2012 From: report at bugs.python.org (Michiel de Hoon) Date: Wed, 19 Dec 2012 10:56:49 +0000 Subject: [issue16726] expat ParseFile expects bytes, not string Message-ID: <1355914609.66.0.723053050254.issue16726@psf.upfronthosting.co.za> New submission from Michiel de Hoon: The expat parser in xml.parsers.expat has a Parse method and a ParseFile method. The Parse method parses a string, however the ParseFile method wants bytes. This is a minimal example of the Parse method: >>> import xml.parsers.expat >>> p = xml.parsers.expat.ParserCreate() >>> p.Parse('') which runs fine. Note that argument to p.Parse is a string, not bytes. This is the corresponding example of ParseFile: >>> import xml.parsers.expat >>> handle = open("test.xml") >>> p = xml.parsers.expat.ParserCreate() >>> p.ParseFile(handle) where the file test.xml only contains This gives an error: Traceback (most recent call last): File "", line 1, in TypeError: read() did not return a bytes object (type=str) Opening the file test.xml in binary raises an Error: >>> import xml.parsers.expat >>> handle = open("test.xml", "rb") >>> p = xml.parsers.expat.ParserCreate() >>> p.ParseFile(handle) Traceback (most recent call last): File "", line 1, in xml.parsers.expat.ExpatError: no element found: line 2, column 0 suggesting that in reality, the expat Parser needs a string, not bytes. (the same error appears with a more meaningful XML file). I would expect that both Parse and ParseFile accept strings, but not bytes. ---------- messages: 177733 nosy: mdehoon priority: normal severity: normal status: open title: expat ParseFile expects bytes, not string type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 12:07:10 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 19 Dec 2012 11:07:10 +0000 Subject: [issue16725] Add 'ident' property to SysLogHandler like in Python 3.x In-Reply-To: <1355913418.22.0.692856202576.issue16725@psf.upfronthosting.co.za> Message-ID: <1355915230.32.0.701504051258.issue16725@psf.upfronthosting.co.za> R. David Murray added the comment: No, that would be a feature addition, and we don't do those in bug fix releases. ---------- nosy: +r.david.murray resolution: -> rejected stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 12:21:59 2012 From: report at bugs.python.org (Hamish Downer) Date: Wed, 19 Dec 2012 11:21:59 +0000 Subject: [issue15565] pdb displays runt Exception strings In-Reply-To: <1344246838.35.0.931540837367.issue15565@psf.upfronthosting.co.za> Message-ID: <1355916119.69.0.166844353727.issue15565@psf.upfronthosting.co.za> Hamish Downer added the comment: The bug affects me on python 2.7, as described by the original reporter. I am using Ubuntu 12.04 which comes with python 2.7.3 - was this fixed for 2.7 quite recently? However the python 3.2 that is packaged for Ubuntu 12.04 does not suffer from this bug. ---------- nosy: +Hamish.Downer _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 12:30:49 2012 From: report at bugs.python.org (Keith Sabine) Date: Wed, 19 Dec 2012 11:30:49 +0000 Subject: [issue16727] Windows installers for 2.7.3 don't install python27.dll correctly Message-ID: <1355916649.59.0.0223605375699.issue16727@psf.upfronthosting.co.za> New submission from Keith Sabine: The windows installers for Python 2.7.3 do not install the required python27.dll correctly. The Windows x86 MSI Installer (2.7.3) does not install a 32 bit python27.dll in windows\system32 at all. The Windows x86-64 MSI Installer (2.7.3) installs a 64 bit python27.dll in windows\system32, NOT in windows\SysWOW64 as it should. The python27.dll should be kept in the python DLLs directory for both 32 and 64 bit versions, so users can clean up the mess if they need to... ---------- components: Windows messages: 177736 nosy: keith969 priority: normal severity: normal status: open title: Windows installers for 2.7.3 don't install python27.dll correctly versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 13:14:49 2012 From: report at bugs.python.org (INADA Naoki) Date: Wed, 19 Dec 2012 12:14:49 +0000 Subject: [issue16728] collections.abc.Sequence shoud provide __subclasshook__ Message-ID: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> New submission from INADA Naoki: http://docs.python.org/3.3/glossary.html#term-sequence __getitem__ and __len__ are required for sequence type. (__iter__ is not required because types having __getitem__ are already iterator.) .__contains__(), .index() and .count() is not required for sequence. For example, following class should be sequence. class Foo: def __getitem__(self, index): if not isinstance(index, int): raise TypeError if index >= 3: raise IndexError return index def __len__(self): return 3 ---------- components: Library (Lib) messages: 177737 nosy: naoki priority: normal severity: normal status: open title: collections.abc.Sequence shoud provide __subclasshook__ versions: Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 13:31:05 2012 From: report at bugs.python.org (INADA Naoki) Date: Wed, 19 Dec 2012 12:31:05 +0000 Subject: [issue16728] collections.abc.Sequence shoud provide __subclasshook__ In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1355920265.34.0.0728765974956.issue16728@psf.upfronthosting.co.za> INADA Naoki added the comment: In Python 3.3: In [33]: issubclass(Foo, collections.abc.Sequence) Out[33]: False ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 13:33:48 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Dec 2012 12:33:48 +0000 Subject: [issue16719] Get rid of WindowsError. Use OSError instead In-Reply-To: <1355866355.61.0.0791773762565.issue16719@psf.upfronthosting.co.za> Message-ID: <3YRFrm4qqrzQmS@mail.python.org> Roundup Robot added the comment: New changeset bb94f6222fef by Andrew Svetlov in branch 'default': Issue #16719: Get rid of WindowsError. Use OSError instead http://hg.python.org/cpython/rev/bb94f6222fef ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 14:12:57 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 19 Dec 2012 13:12:57 +0000 Subject: [issue16719] Get rid of WindowsError. Use OSError instead In-Reply-To: <1355866355.61.0.0791773762565.issue16719@psf.upfronthosting.co.za> Message-ID: <1355922777.53.0.430116545967.issue16719@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Sorry, Brian. I missed that you assign issue to yourself. Committed patch contributed by Serhiy. Close the issue. Feel free to reopen if needed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 14:15:32 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 19 Dec 2012 13:15:32 +0000 Subject: [issue13615] setup.py register fails with -r argument In-Reply-To: <1324070497.95.0.248126770194.issue13615@psf.upfronthosting.co.za> Message-ID: <1355922932.55.0.222773282587.issue13615@psf.upfronthosting.co.za> anatoly techtonik added the comment: Soo.. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 14:37:34 2012 From: report at bugs.python.org (Wibowo Arindrarto) Date: Wed, 19 Dec 2012 13:37:34 +0000 Subject: [issue16726] expat ParseFile expects bytes, not string In-Reply-To: <1355914609.66.0.723053050254.issue16726@psf.upfronthosting.co.za> Message-ID: <1355924254.4.0.85680745478.issue16726@psf.upfronthosting.co.za> Changes by Wibowo Arindrarto : ---------- nosy: +bow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 14:37:41 2012 From: report at bugs.python.org (Wibowo Arindrarto) Date: Wed, 19 Dec 2012 13:37:41 +0000 Subject: [issue16723] io.TextIOWrapper on urllib.request.urlopen terminates prematurely In-Reply-To: <1355899334.66.0.683261774989.issue16723@psf.upfronthosting.co.za> Message-ID: <1355924261.94.0.0718374548101.issue16723@psf.upfronthosting.co.za> Changes by Wibowo Arindrarto : ---------- nosy: +bow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 14:44:01 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 19 Dec 2012 13:44:01 +0000 Subject: [issue16729] Document how to provide defaults for setup.py commands options Message-ID: <1355924641.52.0.160418711028.issue16729@psf.upfronthosting.co.za> New submission from anatoly techtonik: The way to override defaults for setup.py commands is not documented. For example, to change to name of build and dist dirs from setup.py, the following entry should be added to setup parameters: options={ 'build': {'build_base': '__build__'}, 'sdist': {'dist_dir': '__build__/dist'}, } An example would be extremely helpful at http://docs.python.org/2/install/index.html#how-building-works tag:easy http://thread.gmane.org/gmane.comp.python.distutils.devel/16434 issue16299 ---------- assignee: eric.araujo components: Distutils, Distutils2, Documentation messages: 177742 nosy: alexis, eric.araujo, tarek, techtonik priority: normal severity: normal status: open title: Document how to provide defaults for setup.py commands options versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 15:31:22 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Wed, 19 Dec 2012 14:31:22 +0000 Subject: [issue8853] getaddrinfo should accept port of type long In-Reply-To: <1275155293.8.0.373298822378.issue8853@psf.upfronthosting.co.za> Message-ID: <1355927482.23.0.215643665101.issue8853@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Attached a new patch with a test case and fixed error handling. ---------- Added file: http://bugs.python.org/file28358/issue8853_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 15:31:31 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Wed, 19 Dec 2012 14:31:31 +0000 Subject: [issue8853] getaddrinfo should accept port of type long In-Reply-To: <1275155293.8.0.373298822378.issue8853@psf.upfronthosting.co.za> Message-ID: <1355927491.82.0.0726132699286.issue8853@psf.upfronthosting.co.za> Changes by Petri Lehtinen : ---------- stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 15:32:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2012 14:32:02 +0000 Subject: [issue16723] io.TextIOWrapper on urllib.request.urlopen terminates prematurely In-Reply-To: <1355899334.66.0.683261774989.issue16723@psf.upfronthosting.co.za> Message-ID: <1355927522.63.0.385072066573.issue16723@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 15:55:01 2012 From: report at bugs.python.org (David Pritchard) Date: Wed, 19 Dec 2012 14:55:01 +0000 Subject: [issue16730] _fill_cache in _bootstrap.py crashes without directory execute permissions Message-ID: <1355928901.47.0.243119596238.issue16730@psf.upfronthosting.co.za> New submission from David Pritchard: In importlib/_bootstrap.py, there is a function _fill_cache which crashes when you try to run Python in any environment that is so restricted that write permissions are not allowed. You get a trace like: Traceback (most recent call last): In line: [the import statement] File "", line 1558, in _find_and_load File "", line 1516, in _find_and_load_unlocked File "", line 1470, in _find_module File "", line 1305, in find_module File "", line 1284, in _get_loader File "", line 1356, in find_loader File "", line 1392, in _fill_cache PermissionError: [Errno 13] Permission denied: '[the directory name]' This was not an issue when I was using Python 3.2 and I suspect it has to do with the OS error refactoring. I believe it can be fixed with a two-line patch, attached. (Sorry if it is the wrong format, it's the first one I've submitted.) The patch simply treats the case of PermissionError the same was as it does when there is a FileNotFoundError. I've tested the patch and it fixes the problem. ---------- components: Interpreter Core files: _bootstrap.py.patch keywords: patch messages: 177745 nosy: David.Pritchard priority: normal severity: normal status: open title: _fill_cache in _bootstrap.py crashes without directory execute permissions versions: Python 3.3 Added file: http://bugs.python.org/file28359/_bootstrap.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 15:57:32 2012 From: report at bugs.python.org (David Pritchard) Date: Wed, 19 Dec 2012 14:57:32 +0000 Subject: [issue16730] _fill_cache in _bootstrap.py crashes without directory execute permissions In-Reply-To: <1355928901.47.0.243119596238.issue16730@psf.upfronthosting.co.za> Message-ID: <1355929052.24.0.659055833868.issue16730@psf.upfronthosting.co.za> David Pritchard added the comment: Sorry, in the main text of my message, "write permissions" should say directory execute permissions (permission to list contents of a directory) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 16:17:03 2012 From: report at bugs.python.org (Stefan Krah) Date: Wed, 19 Dec 2012 15:17:03 +0000 Subject: [issue16730] _fill_cache in _bootstrap.py crashes without directory execute permissions In-Reply-To: <1355928901.47.0.243119596238.issue16730@psf.upfronthosting.co.za> Message-ID: <1355930223.31.0.564345832152.issue16730@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 16:28:47 2012 From: report at bugs.python.org (Jan Lachnitt) Date: Wed, 19 Dec 2012 15:28:47 +0000 Subject: [issue15533] subprocess.Popen(cwd) documentation In-Reply-To: <1343886272.5.0.825552125397.issue15533@psf.upfronthosting.co.za> Message-ID: <1355930927.89.0.939273235877.issue15533@psf.upfronthosting.co.za> Jan Lachnitt added the comment: Hi all, I have solved the problem by using absolute path of the executable. The reason why the executable didn't work properly may be that the executable's relative path was inconsistent with current directory. See the following example (I have made an executable which shows its argv and cwd). If it is called normally, then: argv[0] = phsh0.exe cwd = D:\Jenda\AutoLEED\TESTING\default But if it is called by Python's subprocess.call from "D:\Jenda\AutoLEED\TESTING" as I want, then: argv[0] = default\phsh0.exe cwd = D:\Jenda\AutoLEED\TESTING\default The executable may be confused by this inconsistency. So it is not the documentation, but Python itself what should be changed. The executable should be searched in cwd on any platform to avoid the inconsistency. I have not yet updated my Python installation, so my results apply to 3.2.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 16:48:40 2012 From: report at bugs.python.org (Berker Peksag) Date: Wed, 19 Dec 2012 15:48:40 +0000 Subject: [issue14266] pyunit script as shorthand for python -m unittest In-Reply-To: <1331586037.12.0.876793471383.issue14266@psf.upfronthosting.co.za> Message-ID: <1355932109.91.0.732415919675.issue14266@psf.upfronthosting.co.za> Berker Peksag added the comment: Antoine and ?ric: Thank you for the reviews and suggestions. > Why the "__unittest" variable? I added the "__unittest" variable after read issue 7815 and the related changeset: http://hg.python.org/cpython/rev/2858cae540e4/ See also: - http://stackoverflow.com/questions/12583015/how-can-i-hide-my-stack-frames-in-a-testcase-subclass - https://github.com/nose-devs/nose2/pull/28/files However, without the variable tracebacks are still clear: $ pyunit -v test_acc (test_bar.TestAcc) ... ok test_acc_negative (test_bar.TestAccNegative) ... ok test_mul (test_foo.TestMul) ... ok test_mul_negative (test_foo.TestMulNegative) ... ok test_mul (test_baz.TestMul) ... FAIL ====================================================================== FAIL: test_mul (test_baz.TestMul) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/berker/hacking/cpython/test_baz.py", line 12, in test_mul self.assertEqual(3, mul(2, 2)) AssertionError: 3 != 4 ---------------------------------------------------------------------- Ran 5 tests in 0.002s FAILED (failures=1) > Also, it would be better to make unittest's API more flexible, rather > than manually tweaking sys.argv to enable discovery. You're right. Something like that? unittest.main(discover=True) > About the script: can?t it be as simple as runpy.run_module? I will try that, thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 16:51:41 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 19 Dec 2012 15:51:41 +0000 Subject: [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355932301.18.0.48188686616.issue16724@psf.upfronthosting.co.za> anatoly techtonik added the comment: In Python 2 there was no 'binary data' type - everything was a string. Now we have string, str, bytearray, array, list of ints. If hexlify is not accepting anything except bytes, it is better be explicit. When porting code from Python 2 the argument was passed as a string with escapes inside, so it took some time to figure out why it didn't work in Py3k (actually it took a lot of time, because the research path turned wrong way at this point). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:00:02 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 16:00:02 +0000 Subject: [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355932802.53.0.585488661029.issue16724@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > If hexlify is not accepting anything except bytes, it is better be explicit. But it is very explicit in the link you provided: both a note at the top, and the words "binary data" in the description of every function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:02:30 2012 From: report at bugs.python.org (Chris Angelico) Date: Wed, 19 Dec 2012 16:02:30 +0000 Subject: [issue13153] IDLE crashes when pasting non-BMP unicode char on UCS-16 build In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1355932947.1.0.127199145005.issue13153@psf.upfronthosting.co.za> Chris Angelico added the comment: I'm experiencing a similar issue. Fresh install of 3.3 today from the .msi installer on the web site, identifies itself as: Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32 To reproduce: Copy and paste this character into IDLE. ? C:\Python33>.\python -m idlelib.idle Traceback (most recent call last): File "C:\Python33\lib\runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "C:\Python33\lib\runpy.py", line 73, in _run_code exec(code, run_globals) File "C:\Python33\lib\idlelib\idle.py", line 11, in idlelib.PyShell.main() File "C:\Python33\lib\idlelib\PyShell.py", line 1477, in main root.mainloop() File "C:\Python33\lib\tkinter\__init__.py", line 1038, in mainloop self.tk.mainloop(n) UnicodeDecodeError: 'utf-8' codec can't decode bytes in position 0-2: invalid continuation byte (Incidentally, there appears to be a slight difference depending on whether I copy the character in Chrome or Firefox. IDLE terminates the same way, but a Latin-1 app sees the character from Firefox as a letter, but the same thing from Chrome is two question marks (presumably the surrogates).) ---------- nosy: +Rosuav _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:03:26 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 16:03:26 +0000 Subject: [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355933006.68.0.348076921618.issue16724@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > If hexlify is not accepting anything except bytes, it is better be explicit. But it is very explicit in the link you provided: both a note at the top, and the words "binary data" in the description of every function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:10:54 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 16:10:54 +0000 Subject: [issue16728] collections.abc.Sequence shoud provide __subclasshook__ In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1355933454.01.0.230809775255.issue16728@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Careful, though: dict also provides these methods, but I would not consider it a Sequence. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:13:34 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 16:13:34 +0000 Subject: [issue16727] Windows installers for 2.7.3 don't install python27.dll correctly In-Reply-To: <1355916649.59.0.0223605375699.issue16727@psf.upfronthosting.co.za> Message-ID: <1355933614.86.0.631892630316.issue16727@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Did you select an option like "install for all users"/"install just for me" at some point? ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:17:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2012 16:17:59 +0000 Subject: [issue16714] Raise exceptions, don't throw In-Reply-To: <1355858922.8.0.742529551033.issue16714@psf.upfronthosting.co.za> Message-ID: <1355934256.5826.5.camel@raxxla> Serhiy Storchaka added the comment: I found one error. In Lib/email/header.py for 2.7 'raise' should be reverted to 'throw'. Also I miss a past form. Second patch replaces 'threw' with 'raised'. ---------- Added file: http://bugs.python.org/file28360/throw_away.patch Added file: http://bugs.python.org/file28361/throw2raised.patch Added file: http://bugs.python.org/file28362/throw2raised-3.2.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 8c2635afbfe1 Lib/email/header.py --- a/Lib/email/header.py Tue Dec 18 21:27:37 2012 +0200 +++ b/Lib/email/header.py Wed Dec 19 18:00:22 2012 +0200 @@ -103,7 +103,7 @@ dec = email.base64mime.decode(encoded) except binascii.Error: # Turn this into a higher level exception. BAW: Right - # now we raise the lower level exception away but + # now we throw the lower level exception away but # when/if we get exception chaining, we'll preserve it. raise HeaderParseError if dec is None: -------------- next part -------------- diff -r bb94f6222fef Lib/pkgutil.py --- a/Lib/pkgutil.py Wed Dec 19 14:33:35 2012 +0200 +++ b/Lib/pkgutil.py Wed Dec 19 18:11:03 2012 +0200 @@ -503,7 +503,7 @@ except (ImportError, AttributeError, TypeError, ValueError) as ex: # This hack fixes an impedance mismatch between pkgutil and # importlib, where the latter raises other errors for cases where - # pkgutil previously threw ImportError + # pkgutil previously raised ImportError msg = "Error while finding loader for {!r} ({}: {})" raise ImportError(msg.format(fullname, type(ex), ex)) from ex diff -r bb94f6222fef Lib/test/test_urllib2.py --- a/Lib/test/test_urllib2.py Wed Dec 19 14:33:35 2012 +0200 +++ b/Lib/test/test_urllib2.py Wed Dec 19 18:11:03 2012 +0200 @@ -1302,7 +1302,7 @@ ) def test_basic_and_digest_auth_handlers(self): - # HTTPDigestAuthHandler threw an exception if it couldn't handle a 40* + # HTTPDigestAuthHandler raised an exception if it couldn't handle a 40* # response (http://python.org/sf/1479302), where it should instead # return None to allow another handler (especially # HTTPBasicAuthHandler) to handle the response. diff -r bb94f6222fef Lib/test/test_winreg.py --- a/Lib/test/test_winreg.py Wed Dec 19 14:33:35 2012 +0200 +++ b/Lib/test/test_winreg.py Wed Dec 19 18:11:03 2012 +0200 @@ -277,7 +277,7 @@ def test_long_key(self): # Issue2810, in 2.6 and 3.1 when the key name was exactly 256 - # characters, EnumKey threw "WindowsError: More data is + # characters, EnumKey raised "WindowsError: More data is # available" name = 'x'*256 try: -------------- next part -------------- diff -r cf62fbf2171a Lib/test/test_urllib2.py --- a/Lib/test/test_urllib2.py Fri Nov 02 07:34:37 2012 +0100 +++ b/Lib/test/test_urllib2.py Wed Dec 19 18:15:49 2012 +0200 @@ -1252,7 +1252,7 @@ ) def test_basic_and_digest_auth_handlers(self): - # HTTPDigestAuthHandler threw an exception if it couldn't handle a 40* + # HTTPDigestAuthHandler raised an exception if it couldn't handle a 40* # response (http://python.org/sf/1479302), where it should instead # return None to allow another handler (especially # HTTPBasicAuthHandler) to handle the response. diff -r cf62fbf2171a Lib/test/test_winreg.py --- a/Lib/test/test_winreg.py Fri Nov 02 07:34:37 2012 +0100 +++ b/Lib/test/test_winreg.py Wed Dec 19 18:15:49 2012 +0200 @@ -277,7 +277,7 @@ def test_long_key(self): # Issue2810, in 2.6 and 3.1 when the key name was exactly 256 - # characters, EnumKey threw "WindowsError: More data is + # characters, EnumKey raised "WindowsError: More data is # available" name = 'x'*256 try: From report at bugs.python.org Wed Dec 19 17:21:24 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 19 Dec 2012 16:21:24 +0000 Subject: [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355934084.84.0.00821761402121.issue16724@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I agree: the docs is good and don't needed to be modified. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:29:32 2012 From: report at bugs.python.org (Keith Sabine) Date: Wed, 19 Dec 2012 16:29:32 +0000 Subject: [issue16727] Windows installers for 2.7.3 don't install python27.dll correctly In-Reply-To: <1355916649.59.0.0223605375699.issue16727@psf.upfronthosting.co.za> Message-ID: <1355934572.83.0.162871509732.issue16727@psf.upfronthosting.co.za> Keith Sabine added the comment: I selected "install for all users", even though there is only one... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:32:51 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 19 Dec 2012 16:32:51 +0000 Subject: [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355934771.53.0.916230762434.issue16724@psf.upfronthosting.co.za> anatoly techtonik added the comment: Fact no.1: When people use docs as a reference, they don't read top notes. Face no.2: This is not explicit: binascii.hexlify(data) This is: binascii.hexlify(bytes) I understand that you like the wording in description, but can't understand why don't want to fix this stuff above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:32:56 2012 From: report at bugs.python.org (=?utf-8?q?Michele_Orr=C3=B9?=) Date: Wed, 19 Dec 2012 16:32:56 +0000 Subject: [issue16728] collections.abc.Sequence shoud provide __subclasshook__ In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1355934776.43.0.870369814158.issue16728@psf.upfronthosting.co.za> Changes by Michele Orr? : ---------- nosy: +maker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:38:49 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 16:38:49 +0000 Subject: [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355935129.52.0.842583692866.issue16724@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: > When people use docs as a reference, they don't read top notes. Maybe, but they can read some words beyond the function name, can't they? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:41:53 2012 From: report at bugs.python.org (INADA Naoki) Date: Wed, 19 Dec 2012 16:41:53 +0000 Subject: [issue16728] collections.abc.Sequence shoud provide __subclasshook__ In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1355935313.45.0.458952775287.issue16728@psf.upfronthosting.co.za> INADA Naoki added the comment: I think PySequence_Check() has same problem. OTOH, mapping definition says: > A container object that supports arbitrary key lookups and implements the methods specified in the Mapping or MutableMapping abstract base classes. - http://docs.python.org/3.3/glossary.html#term-mapping So the mapping should implement all methods defined in collections.abc.Mapping. If the sequence should implement all methods defined in collections.abc.Sequence, it's a documentation bug. Is there a common view about what is the sequence? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:45:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2012 16:45:33 +0000 Subject: [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355935532.54.0.544417716081.issue16724@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > If hexlify is not accepting anything except bytes, it is better be explicit. However hexlify is accepting something except bytes. It is accepting any object which supports buffer protocol. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:48:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2012 16:48:49 +0000 Subject: [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355935729.08.0.961488094388.issue16724@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > If hexlify is not accepting anything except bytes, it is better be explicit. However hexlify is accepting something except bytes. It is accepting any object which supports buffer protocol. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:52:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2012 16:52:05 +0000 Subject: [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355935925.26.0.622495427888.issue16724@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > If hexlify is not accepting anything except bytes, it is better be explicit. However hexlify is accepting something except bytes. It is accepting any object which supports buffer protocol. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 17:52:44 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 19 Dec 2012 16:52:44 +0000 Subject: [issue16724] Rename `data` argument names to `bytes` In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355935964.83.0.763869854735.issue16724@psf.upfronthosting.co.za> R. David Murray added the comment: We do not use data type names as formal parameter names. You will realize this is sensible if you consider that in most cases in Python the formal parameter name is something gets used in more than just the documentation, and that using a type name would shadow the type name, which is something we prefer to avoid. ---------- nosy: +r.david.murray resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 18:10:22 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 19 Dec 2012 17:10:22 +0000 Subject: [issue16724] Define `binary data` representation in Python In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355937021.74.0.00983163862873.issue16724@psf.upfronthosting.co.za> anatoly techtonik added the comment: The fact that array.array, bytearray and memoryview are also accepted is a surprise for me. It will help if Python docs contained a definition of what can be considered 'binary data' and link this term from hexlify description to this definition. ---------- resolution: invalid -> status: closed -> open title: Rename `data` argument names to `bytes` -> Define `binary data` representation in Python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 18:19:39 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Wed, 19 Dec 2012 17:19:39 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1355937579.36.0.372560699097.issue16076@psf.upfronthosting.co.za> Daniel Shahaf added the comment: Re the problem from msg 177134 ('./python -mtest test___all__ test_xml_etree' failing), it is a a preexisting problem, in the sense that applying just the Lib/test/ part of this patch suffices to trigger it. Adding 'xml.etree' to the blacklist in test___all__.py:50 suffices to address the problem. At a guess that is because when test___all__ imports the 'xml.etree' module, it doesn't filter out the '_elementtree' symbol like test_xml_etree.py:test_main() does. New patch attached; differences to previous version: - Removed debug prints. - Skip test_pickling when testing the Python xml.etree. (The skips could be removed in the future, if/when the test___all__ interaction problem is resolved.) ---------- Added file: http://bugs.python.org/file28363/i16076-v5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 18:27:19 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 17:27:19 +0000 Subject: [issue16724] Define `binary data` representation in Python In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355938039.77.0.626337335863.issue16724@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Isn't such a definition already present in the top-level paragraphs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 18:56:44 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 19 Dec 2012 17:56:44 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355939804.58.0.703345123112.issue16718@psf.upfronthosting.co.za> anatoly techtonik added the comment: This is not repeatable in Python 3. Is it possible to fix it for Python 2 as well? Is it possible to postpone registration until the import is finished successfully? Or at least give atexit handler a chance to run before global variable stack is purged? Or destroy atexit handler if its namespace is purged? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 18:58:42 2012 From: report at bugs.python.org (Eric Snow) Date: Wed, 19 Dec 2012 17:58:42 +0000 Subject: [issue16730] _fill_cache in _bootstrap.py crashes without directory execute permissions In-Reply-To: <1355928901.47.0.243119596238.issue16730@psf.upfronthosting.co.za> Message-ID: <1355939921.43.0.0955286581344.issue16730@psf.upfronthosting.co.za> Eric Snow added the comment: Patch looks good to me. Are there any other exceptions that might be included here? ---------- nosy: +brett.cannon, eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 19:36:08 2012 From: report at bugs.python.org (Stefan Krah) Date: Wed, 19 Dec 2012 18:36:08 +0000 Subject: [issue16721] configure incorrectly adds -OPT:Olimit=0 for clang In-Reply-To: <1355868497.91.0.141324882263.issue16721@psf.upfronthosting.co.za> Message-ID: <1355942167.99.0.854756004818.issue16721@psf.upfronthosting.co.za> Stefan Krah added the comment: If Irix support is the reason for the Olimit test, perhaps we can limit the check to Irix? http://www.gossamer-threads.com/lists/python/dev/689524?do=post_view_threaded#689524 ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 19:45:07 2012 From: report at bugs.python.org (Bradley Froehle) Date: Wed, 19 Dec 2012 18:45:07 +0000 Subject: [issue16690] Reference leak with custom tp_dealloc in PyType_FromSpec In-Reply-To: <1355535565.73.0.312355807055.issue16690@psf.upfronthosting.co.za> Message-ID: <1355942707.66.0.137642293916.issue16690@psf.upfronthosting.co.za> Changes by Bradley Froehle : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 19:51:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2012 18:51:56 +0000 Subject: [issue16686] audioop overflow issues In-Reply-To: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> Message-ID: <1355943115.88.0.802046390084.issue16686@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: 6. reverse() and ratecv() lose 16 lowest bits for 4-bytes data. 7. rms() can returns negative value (-0x80000000 instead 0x80000000). 8. maxpp() and avgpp() overflow and return absolutely wrong result for large peaks. 9. ratecv() crashes Python on empty input. ---------- type: behavior -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 20:38:23 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 19:38:23 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355945903.57.0.576732221758.issue16718@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Infortunately, the behaviour is the same in 2.7 and 3.2, and only changes with 3.3, which means that this is probably related to the new implementation of the import system. This won't be backported. [It would be interesting to understand why there is a difference, btw... is a reference to the module held somewhere?] A possible workaround for such module-level calls atexit.register() is to ensure that used globals are captured in the function namespace, a bit like some __del__ methods: def _clean(_Cleanup=_Cleanup): .... ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 20:50:46 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Wed, 19 Dec 2012 19:50:46 +0000 Subject: [issue16731] xxlimited/xxmodule docstrings ambiguous Message-ID: <1355946646.69.0.259699636535.issue16731@psf.upfronthosting.co.za> New submission from Daniel Shahaf: Tweak the docstrings of xxmodule and xxlimited to clarify the difference between them (as derived from setup.py). While at it also add a defensive coding guard to xxlimited to ensure it remains Py_LIMITED_API-safe. ---------- assignee: docs at python components: Documentation, Extension Modules files: xxdocstrings.diff keywords: patch messages: 177774 nosy: danielsh, docs at python priority: normal severity: normal status: open title: xxlimited/xxmodule docstrings ambiguous versions: Python 3.4 Added file: http://bugs.python.org/file28367/xxdocstrings.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 21:01:23 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Wed, 19 Dec 2012 20:01:23 +0000 Subject: [issue16732] setup.py support for xxmodule without tkinker Message-ID: <1355947283.43.0.495525141996.issue16732@psf.upfronthosting.co.za> New submission from Daniel Shahaf: In setup.py, the logic or enabling xxmodule/xxlimited is currently in detect_tkinker(), so it's not run when one of the 'return' statements in the latter is executed. On a box without tk installed, xxmodule.o gets built with the attached patch but not without. ---------- components: Build files: setupxxmodule.diff keywords: patch messages: 177775 nosy: danielsh priority: normal severity: normal status: open title: setup.py support for xxmodule without tkinker versions: Python 3.4 Added file: http://bugs.python.org/file28368/setupxxmodule.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 21:22:46 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 19 Dec 2012 20:22:46 +0000 Subject: [issue16730] _fill_cache in _bootstrap.py crashes without directory execute permissions In-Reply-To: <1355928901.47.0.243119596238.issue16730@psf.upfronthosting.co.za> Message-ID: <1355948566.39.0.743121003246.issue16730@psf.upfronthosting.co.za> Brett Cannon added the comment: If Antoine can't think of any then I think there aren't any more. This does need a test, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 21:23:01 2012 From: report at bugs.python.org (Brett Cannon) Date: Wed, 19 Dec 2012 20:23:01 +0000 Subject: [issue16730] _fill_cache in _bootstrap.py crashes without directory execute permissions In-Reply-To: <1355928901.47.0.243119596238.issue16730@psf.upfronthosting.co.za> Message-ID: <1355948581.13.0.769326917498.issue16730@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 21:23:22 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 20:23:22 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355948602.04.0.73881084109.issue16718@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: OK, found the difference between 3.2 and 3.3: The ImportError exception is still alive when atexit handlers are called, with its __traceback__, and all local variables in Python frames. And since 3.3 the import system is built with Python functions... More exactly, I could find the incomplete 'wow' module in sys.last_value.__traceback__.tb_next.tb_frame.f_back.f_back.f_back.f_locals['module'] But all this is not really related to the current issue. Things should be better in the future, when modules are cleared with true garbage collection. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 21:43:49 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 19 Dec 2012 20:43:49 +0000 Subject: [issue13153] IDLE crashes when pasting non-BMP unicode char on Py3 In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1355949829.42.0.892961664488.issue13153@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Same on 64-bit 3.3. Changed title since 3.3 is no longer '16-bit build'. ---------- title: IDLE crashes when pasting non-BMP unicode char on UCS-16 build -> IDLE crashes when pasting non-BMP unicode char on Py3 versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 21:47:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Dec 2012 20:47:15 +0000 Subject: [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <3YRSpB338rzRky@mail.python.org> Roundup Robot added the comment: New changeset 0a5c5399f638 by Andrew Svetlov in branch '2.7': revert comment wording (#16714) http://hg.python.org/cpython/rev/0a5c5399f638 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 21:55:54 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Dec 2012 20:55:54 +0000 Subject: [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <3YRT095TDvzRjv@mail.python.org> Roundup Robot added the comment: New changeset b227f8f7242d by Andrew Svetlov in branch '2.7': replace threw with raised (#16714) http://hg.python.org/cpython/rev/b227f8f7242d New changeset 74da2dbb5e50 by Andrew Svetlov in branch '3.2': replace threw with raised (#16714) http://hg.python.org/cpython/rev/74da2dbb5e50 New changeset 55d86476d048 by Andrew Svetlov in branch '3.3': replace threw with raised (#16714) http://hg.python.org/cpython/rev/55d86476d048 New changeset 3594175c6860 by Andrew Svetlov in branch 'default': replace threw with raised (#16714) http://hg.python.org/cpython/rev/3594175c6860 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 21:56:38 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 19 Dec 2012 20:56:38 +0000 Subject: [issue16714] Raise exceptions, don't throw In-Reply-To: <1355854289.26.0.789629634493.issue16714@psf.upfronthosting.co.za> Message-ID: <1355950598.47.0.70912178299.issue16714@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed. Thanks again, Serhiy! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 22:12:51 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 19 Dec 2012 21:12:51 +0000 Subject: [issue16722] __index__() overrides __bytes__() when bytes() is called In-Reply-To: <1355895772.21.0.287047855702.issue16722@psf.upfronthosting.co.za> Message-ID: <1355951571.02.0.398334345341.issue16722@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I'm afraid we can only fix this in 3.4 lest someone is relying on it. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 22:16:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2012 21:16:59 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355951819.91.0.342700896054.issue16718@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: -serhiy.storchaka versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 22:19:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2012 21:19:56 +0000 Subject: [issue16724] Define `binary data` representation in Python In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355951996.44.0.218714295139.issue16724@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: -serhiy.storchaka versions: -Python 3.1, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 22:29:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 19 Dec 2012 21:29:10 +0000 Subject: [issue16722] __index__() overrides __bytes__() when bytes() is called In-Reply-To: <1355895772.21.0.287047855702.issue16722@psf.upfronthosting.co.za> Message-ID: <3YRTkY2pLTzMkl@mail.python.org> Roundup Robot added the comment: New changeset c744b6f8a09a by Benjamin Peterson in branch '3.3': try to call __bytes__ before __index__ (closes #16722) http://hg.python.org/cpython/rev/c744b6f8a09a New changeset 7c717d423160 by Benjamin Peterson in branch 'default': merge 3.3 (#16722) http://hg.python.org/cpython/rev/7c717d423160 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 22:29:31 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 19 Dec 2012 21:29:31 +0000 Subject: [issue16722] __index__() overrides __bytes__() when bytes() is called In-Reply-To: <1355895772.21.0.287047855702.issue16722@psf.upfronthosting.co.za> Message-ID: <1355952571.24.0.413630646012.issue16722@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: fixed -> stage: committed/rejected -> status: closed -> open versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 22:54:18 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Wed, 19 Dec 2012 21:54:18 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1355954058.58.0.335873359978.issue14373@psf.upfronthosting.co.za> Alexey Kachayev added the comment: Updated patch with next points: * fix typedefs * python implementation works normally without C acceleration * test cases cover both python/c implementations * several style fixes in C module ---------- nosy: +kachayev Added file: http://bugs.python.org/file28369/14373.fixed.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 22:56:30 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 19 Dec 2012 21:56:30 +0000 Subject: [issue16722] __index__() overrides __bytes__() when bytes() is called In-Reply-To: <1355895772.21.0.287047855702.issue16722@psf.upfronthosting.co.za> Message-ID: <1355954190.32.0.27630788081.issue16722@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 23:10:44 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 19 Dec 2012 22:10:44 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1355955044.94.0.241573789839.issue14373@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +amaury.forgeotdarc, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 23:13:37 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 19 Dec 2012 22:13:37 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355955217.21.0.228498229694.issue16718@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > Things should be better in the future, when modules are cleared with true > garbage collection. When is this future of which you speak? I am not sure whether it would affect performance, but a weakrefable subclass of dict could be used for module dicts. Then the module destructor could just save the module's dict in a WeakValueDictionary keyed by the id (assuming we are not yet shutting down). At shutdown the saved module dicts could be purged by replacing all values with None. Or maybe something similar is possible without using a dict subclass. ---------- versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 23:26:12 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 19 Dec 2012 22:26:12 +0000 Subject: [issue16722] __index__() overrides __bytes__() when bytes() is called In-Reply-To: <1355895772.21.0.287047855702.issue16722@psf.upfronthosting.co.za> Message-ID: <1355955972.41.0.288382438318.issue16722@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Is it coupled with #15559? If true we can relax ipaddress with adding __index__ again for 3.4 ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 23:27:52 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 19 Dec 2012 22:27:52 +0000 Subject: [issue15559] Bad interaction between ipaddress addresses and the bytes constructor In-Reply-To: <1344153793.69.0.927408739195.issue15559@psf.upfronthosting.co.za> Message-ID: <1355956072.87.0.475848573448.issue15559@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I changed the precedence now, so __bytes__ is tried before __index__. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 23:36:38 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 19 Dec 2012 22:36:38 +0000 Subject: [issue16722] __index__() overrides __bytes__() when bytes() is called In-Reply-To: <1355895772.21.0.287047855702.issue16722@psf.upfronthosting.co.za> Message-ID: <1355956597.99.0.551703870851.issue16722@psf.upfronthosting.co.za> Andrew Svetlov added the comment: BTW, ??????, can you change your name to use latin alphabet? I'm ?????? ???????, but use Andrew Svetlov for tracker. Latin transcription is much easier to remember for all python users who don't speak Russian. For that guys your name looks like Chinese one for me. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 23:53:19 2012 From: report at bugs.python.org (Matthew Barnett) Date: Wed, 19 Dec 2012 22:53:19 +0000 Subject: [issue1075356] exceeding obscure weakproxy bug Message-ID: <1355957599.06.0.146420257685.issue1075356@psf.upfronthosting.co.za> Matthew Barnett added the comment: The patch "issue1075356.patch" is my attempt to fix this bug. 'PyArg_ParseTuple', etc, eventually call 'convertsimple'. What this patch does is to insert some code at the start of 'convertsimple' that checks whether the argument is a weakref proxy and, if it is, fetch the object to which the proxy refers. From then on it's working with the true argument, so it'll work just like would have done if it been given the proxied object itself originally. ---------- keywords: +patch nosy: +mrabarnett versions: +Python 3.3 Added file: http://bugs.python.org/file28370/issue1075356.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 23:59:08 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Wed, 19 Dec 2012 22:59:08 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355957948.07.0.621475951735.issue16718@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: See issue812369 for the shutdown procedure and modules cleanup. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 00:06:03 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 19 Dec 2012 23:06:03 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355958363.55.0.26897535014.issue16718@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > See issue812369 for the shutdown procedure and modules cleanup. I am aware of that issue, but the original patch is 9 years old. Which is why I ask if/when it will actually happen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 00:24:49 2012 From: report at bugs.python.org (yippi) Date: Wed, 19 Dec 2012 23:24:49 +0000 Subject: [issue16733] Solaris ctypes_test failures Message-ID: <1355959487.2.0.457059136813.issue16733@psf.upfronthosting.co.za> New submission from yippi: Note I am building Python 3.3 with the Sun Studio compiler on Solaris 11. When I run the tests, I get these 2 ctypes errors: ====================================================================== FAIL: test_ints (ctypes.test.test_bitfields.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builds/bacamero/ul/components/python/python33/Python-3.3.0/Lib/ctypes/test/test_bitfields.py", line 40, in test_ints self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii'))) AssertionError: -1 != 1 ====================================================================== FAIL: test_shorts (ctypes.test.test_bitfields.C_Test) ---------------------------------------------------------------------- Traceback (most recent call last): File "/builds/bacamero/ul/components/python/python33/Python-3.3.0/Lib/ctypes/test/test_bitfields.py", line 47, in test_shorts self.assertEqual(getattr(b, name), func(byref(b), name.encode('ascii'))) AssertionError: -32 != 32 ---------------------------------------------------------------------- I see almost identical errors in Python 2.6 and 2.7. The same two tests fail, though the format of the error message is a bit different. For example it looks like this in 2.7: AssertionError: Tuples differ: ('A', 1, -1) != ('A', 1, 1) AssertionError: Tuples differ: ('R', 32, -32) != ('R', 32, 32) I made a simple standalone test program that prints out all the values instead of stopping on first failure. The script and output is attached for reference. I think this might be related to issue #16275. On Solaris 11 we are building Python with the configure --with -system-ffi argument. On Solaris 11, libffi 3.0.9 is used. I tried updating libffi to the latest 3.0.11 version and rebuilding, but that did not help. Any pointers about how to debug this would be helpful. It is not clear to me if this is a libffi issue, a compiler issue, a problem in Python or something else. Is there any additional information I could provide to help track this down? ---------- components: Tests files: ctypes.out messages: 177792 nosy: yippi priority: normal severity: normal status: open title: Solaris ctypes_test failures type: behavior versions: Python 2.6, Python 2.7, Python 3.3 Added file: http://bugs.python.org/file28371/ctypes.out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 00:42:41 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 19 Dec 2012 23:42:41 +0000 Subject: [issue16275] test_ctypes fails on Solaris 10 SPARC 2.7 (nitrogen/s10) (Sun C compiler) In-Reply-To: <1350552289.03.0.785225307416.issue16275@psf.upfronthosting.co.za> Message-ID: <1355960561.15.0.972277739454.issue16275@psf.upfronthosting.co.za> STINNER Victor added the comment: I guess that #16733 is a duplicate of this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 00:43:45 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 19 Dec 2012 23:43:45 +0000 Subject: [issue16733] Solaris ctypes_test failures In-Reply-To: <1355959487.2.0.457059136813.issue16733@psf.upfronthosting.co.za> Message-ID: <1355960625.02.0.274467304419.issue16733@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:18:49 2012 From: report at bugs.python.org (Bradley Froehle) Date: Thu, 20 Dec 2012 01:18:49 +0000 Subject: [issue16690] Reference leak with custom tp_dealloc in PyType_FromSpec In-Reply-To: <1355535565.73.0.312355807055.issue16690@psf.upfronthosting.co.za> Message-ID: <1355966329.48.0.374269956944.issue16690@psf.upfronthosting.co.za> Bradley Froehle added the comment: The attached file `heaptype_refcnt_testcases.py` runs through several test cases (ssl.SSLError, a subclass of ssl.SSLError, and xxlimited.Xxo) seeing if references are leaked in each instance. Unfortunately `xxlimited.Xxo` isn't set to be a base type and I don't know of any other types in the default install which use PyType_FromSpec with a custom tp_dealloc. ---------- Added file: http://bugs.python.org/file28372/heaptype_refcnt_testcases.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 02:25:22 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 20 Dec 2012 01:25:22 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1355966722.86.0.897111999604.issue16694@psf.upfronthosting.co.za> Zachary Ware added the comment: Sorry to have disappeared on this, other things took priority... Thank you for the comments, Serhiy. v2 of the patch renames Modules/operator.c to Modules/_operator.c, and changes that name every place I could find it. I also tried to tidy up some of the error message mismatches. I didn't bother with the ones regarding missing arguments, as that would mean checking args and throwing an exception in each and every function. I do like the functional attrgetter better than the object version I wrote. The main reason I went with an object version in the first place was because that's what the C implementation used. Is there any reason not to break with the C implementation and use a function instead? The updated patch takes a rather ugly hack to try to use the functional version in an object. length_hint() was horrible and has been rewritten. It should be less horrible now :). It should also follow the C implementation quite a bit better. ---------- Added file: http://bugs.python.org/file28373/py_operator.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 04:52:44 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 20 Dec 2012 03:52:44 +0000 Subject: [issue16724] Define `binary data` representation in Python In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355975564.71.0.00354183459845.issue16724@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > It will help if Python docs contained a definition of what can be considered 'binary data' and link this term from hexlify description to this definition. I believe this is part of the goal of issue 16518, where "bytes-like object" is being proposed as one of the terms for addition to the glossary. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 05:19:37 2012 From: report at bugs.python.org (=?utf-8?b?0KDRg9GB0LvQsNC9INCY0LbQsdGD0LvQsNGC0L7Qsg==?=) Date: Thu, 20 Dec 2012 04:19:37 +0000 Subject: [issue16722] __index__() overrides __bytes__() when bytes() is called In-Reply-To: <1355895772.21.0.287047855702.issue16722@psf.upfronthosting.co.za> Message-ID: <1355977177.34.0.81190904509.issue16722@psf.upfronthosting.co.za> ?????? ????????? added the comment: Yes, i saw #15559 ( well, actually, i saw the related discussion http://mail.python.org/pipermail/python-dev/2012-August/121241.html ) while looking for an answer. It's more narrow - i.e. manifestation of this issue in ipaddress case where some people actually _needed_ to have different values returned by __index__() and __bytes__(), and had to work around it. As for my name, my username is used almost everywhere and, unlike my real name, it's easy to read and remember. The only place where usernames aren't mentioned are mails from the Python issue tracker. File a bug for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 06:12:22 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 20 Dec 2012 05:12:22 +0000 Subject: [issue16724] Define `binary data` representation in Python In-Reply-To: <1355909798.33.0.519653926366.issue16724@psf.upfronthosting.co.za> Message-ID: <1355980342.87.0.71456981668.issue16724@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I concur with Amaury and Andrew. The docs are fine as-is. ---------- nosy: +rhettinger resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 06:13:29 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 20 Dec 2012 05:13:29 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1355980409.46.0.682222200106.issue16694@psf.upfronthosting.co.za> Zachary Ware added the comment: Considering what a huge headache it was to get my own patch to apply at home on Linux rather than at work on Windows, here's a new version of the patch that straightens out the line ending nightmare present in v2. No other changes made. ---------- Added file: http://bugs.python.org/file28374/py_operator.v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 06:27:42 2012 From: report at bugs.python.org (Zachary Ware) Date: Thu, 20 Dec 2012 05:27:42 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1355981262.89.0.239852522585.issue16694@psf.upfronthosting.co.za> Changes by Zachary Ware : Removed file: http://bugs.python.org/file28373/py_operator.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 06:55:26 2012 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 20 Dec 2012 05:55:26 +0000 Subject: [issue16734] Delay interpreter startup phase until script is read Message-ID: <1355982926.73.0.55538190201.issue16734@psf.upfronthosting.co.za> New submission from anatoly techtonik: Currently, when interpreter is launched it returns immediately to parent process without waiting to read the entrypoint script. This causes problem when you need to remove this script after executing. Is it possible to delay return to child process until the entrypoint script is read? See test case in attach. ---------- components: Interpreter Core files: sub_race_removal.py messages: 177800 nosy: techtonik priority: normal severity: normal status: open title: Delay interpreter startup phase until script is read versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file28375/sub_race_removal.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 08:39:34 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 20 Dec 2012 07:39:34 +0000 Subject: [issue16518] add "buffer protocol" to glossary In-Reply-To: <1353477807.87.0.204584648831.issue16518@psf.upfronthosting.co.za> Message-ID: <1355989174.21.0.702469696025.issue16518@psf.upfronthosting.co.za> Chris Jerdonek added the comment: After this issue is resolved, the binascii docs can be updated as suggested in issue 16724. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 19 20:24:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 19 Dec 2012 19:24:51 +0000 Subject: [issue16686] audioop overflow issues In-Reply-To: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> Message-ID: <1355945432.2731.21.camel@raxxla> Serhiy Storchaka added the comment: Because audioop module is such buggy, I propose a large patch which fixes mentioned above bugs (and some other). Tests have greatly extended. There is also a reference Python implementation (later I will open a separated issue for this). There are also other, algorithmic bugs. I will submit patches for them later, after fixing C implementation bugs. ---------- keywords: +patch Added file: http://bugs.python.org/file28364/audioop.patch Added file: http://bugs.python.org/file28365/audioop_tests.patch Added file: http://bugs.python.org/file28366/audioop.py _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r bb94f6222fef Modules/audioop.c --- a/Modules/audioop.c Wed Dec 19 14:33:35 2012 +0200 +++ b/Modules/audioop.c Wed Dec 19 20:57:20 2012 +0200 @@ -26,6 +26,20 @@ #endif #endif +const int maxvals[] = {0, 0x7f, 0x7fff, 0x7fffff, 0x7fffffff}; +const int minvals[] = {0, -0x80, -0x8000, -0x800000, -0x80000000}; + +static int +fbound(double val, double minval, double maxval) +{ + if (val > maxval) + val = maxval; + else if (val < minval + 1) + val = minval; + return val; +} + + /* Code shamelessly stolen from sox, 12.17.7, g711.c ** (c) Craig Reese, Joe Campbell and Jeff Poskanzer 1989 */ @@ -347,7 +361,7 @@ signed char *cp; Py_ssize_t len, i; int size, val = 0; - int max = 0; + unsigned int absval, max = 0; if ( !PyArg_ParseTuple(args, "s#i:max", &cp, &len, &size) ) return 0; @@ -357,10 +371,11 @@ if ( size == 1 ) val = (int)*CHARP(cp, i); else if ( size == 2 ) val = (int)*SHORTP(cp, i); else if ( size == 4 ) val = (int)*LONGP(cp, i); - if ( val < 0 ) val = (-val); - if ( val > max ) max = val; + if (val < 0) absval = (-val); + else absval = val; + if (absval > max) max = absval; } - return PyLong_FromLong(max); + return PyLong_FromUnsignedLong(max); } static PyObject * @@ -369,7 +384,7 @@ signed char *cp; Py_ssize_t len, i; int size, val = 0; - int min = 0x7fffffff, max = -0x7fffffff; + int min = 0x7fffffff, max = -0x80000000; if (!PyArg_ParseTuple(args, "s#i:minmax", &cp, &len, &size)) return NULL; @@ -406,7 +421,7 @@ if ( len == 0 ) val = 0; else - val = (int)(avg / (double)(len/size)); + val = (int)floor(avg / (double)(len/size)); return PyLong_FromLong(val); } @@ -416,6 +431,7 @@ signed char *cp; Py_ssize_t len, i; int size, val = 0; + unsigned int res; double sum_squares = 0.0; if ( !PyArg_ParseTuple(args, "s#i:rms", &cp, &len, &size) ) @@ -429,10 +445,10 @@ sum_squares += (double)val*(double)val; } if ( len == 0 ) - val = 0; + res = 0; else - val = (int)sqrt(sum_squares / (double)(len/size)); - return PyLong_FromLong(val); + res = (unsigned int)sqrt(sum_squares / (double)(len/size)); + return PyLong_FromUnsignedLong(res); } static double _sum2(short *a, short *b, Py_ssize_t len) @@ -490,7 +506,8 @@ /* Passing a short** for an 's' argument is correct only if the string contents is aligned for interpretation as short[]. Due to the definition of PyBytesObject, - this is currently (Python 2.6) the case. */ + this is currently (Python 2.6) the case. + XXX: It's not true for memoryview. */ if ( !PyArg_ParseTuple(args, "s#s#:findfit", (char**)&cp1, &len1, (char**)&cp2, &len2) ) return 0; @@ -623,51 +640,49 @@ int size, val = 0, prevval = 0, prevextremevalid = 0, prevextreme = 0; double avg = 0.0; - int diff, prevdiff, extremediff, nextreme = 0; + int diff, prevdiff, nextreme = 0; if ( !PyArg_ParseTuple(args, "s#i:avgpp", &cp, &len, &size) ) return 0; if (!audioop_check_parameters(len, size)) return NULL; - /* Compute first delta value ahead. Also automatically makes us - ** skip the first extreme value - */ + if (len <= size) + return PyLong_FromLong(0); if ( size == 1 ) prevval = (int)*CHARP(cp, 0); else if ( size == 2 ) prevval = (int)*SHORTP(cp, 0); else if ( size == 4 ) prevval = (int)*LONGP(cp, 0); - if ( size == 1 ) val = (int)*CHARP(cp, size); - else if ( size == 2 ) val = (int)*SHORTP(cp, size); - else if ( size == 4 ) val = (int)*LONGP(cp, size); - prevdiff = val - prevval; - + prevdiff = 17; /* Anything != 0, 1 */ for ( i=size; i max ) - max = extremediff; + if (val != prevval) { + diff = val < prevval; + if (prevdiff == !diff) { + /* Derivative changed sign. Compute difference to + ** last extreme value and remember. + */ + if (prevextremevalid) { + if (prevval < prevextreme) + extremediff = (unsigned int)prevextreme - + (unsigned int)prevval; + else + extremediff = (unsigned int)prevval - + (unsigned int)prevextreme; + if ( extremediff > max ) + max = extremediff; + } + prevextremevalid = 1; + prevextreme = prevval; } - prevextremevalid = 1; - prevextreme = prevval; + prevval = val; + prevdiff = diff; } - prevval = val; - if ( diff != 0 ) - prevdiff = diff; } - return PyLong_FromLong(max); + return PyLong_FromUnsignedLong(max); } static PyObject * @@ -753,7 +767,7 @@ signed char *cp, *ncp; Py_ssize_t len, i; int size, val = 0; - double factor, fval, maxval; + double factor, fval, maxval, minval; PyObject *rv; if ( !PyArg_ParseTuple(args, "s#id:mul", &cp, &len, &size, &factor ) ) @@ -761,13 +775,8 @@ if (!audioop_check_parameters(len, size)) return NULL; - if ( size == 1 ) maxval = (double) 0x7f; - else if ( size == 2 ) maxval = (double) 0x7fff; - else if ( size == 4 ) maxval = (double) 0x7fffffff; - else { - PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); - return 0; - } + maxval = (double) maxvals[size]; + minval = (double) minvals[size]; rv = PyBytes_FromStringAndSize(NULL, len); if ( rv == 0 ) @@ -780,9 +789,7 @@ else if ( size == 2 ) val = (int)*SHORTP(cp, i); else if ( size == 4 ) val = (int)*LONGP(cp, i); fval = (double)val*factor; - if ( fval > maxval ) fval = maxval; - else if ( fval < -maxval ) fval = -maxval; - val = (int)fval; + val = (int)floor(fbound(fval, minval, maxval)); if ( size == 1 ) *CHARP(ncp, i) = (signed char)val; else if ( size == 2 ) *SHORTP(ncp, i) = (short)val; else if ( size == 4 ) *LONGP(ncp, i) = (Py_Int32)val; @@ -797,7 +804,7 @@ signed char *cp, *ncp; Py_ssize_t len, i; int size, val1 = 0, val2 = 0; - double fac1, fac2, fval, maxval; + double fac1, fac2, fval, maxval, minval; PyObject *rv; if ( !PyArg_ParseTuple(args, "s*idd:tomono", @@ -815,14 +822,8 @@ return NULL; } - if ( size == 1 ) maxval = (double) 0x7f; - else if ( size == 2 ) maxval = (double) 0x7fff; - else if ( size == 4 ) maxval = (double) 0x7fffffff; - else { - PyBuffer_Release(&pcp); - PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); - return 0; - } + maxval = (double) maxvals[size]; + minval = (double) minvals[size]; rv = PyBytes_FromStringAndSize(NULL, len/2); if ( rv == 0 ) { @@ -840,9 +841,7 @@ else if ( size == 2 ) val2 = (int)*SHORTP(cp, i+2); else if ( size == 4 ) val2 = (int)*LONGP(cp, i+4); fval = (double)val1*fac1 + (double)val2*fac2; - if ( fval > maxval ) fval = maxval; - else if ( fval < -maxval ) fval = -maxval; - val1 = (int)fval; + val1 = (int)floor(fbound(fval, minval, maxval)); if ( size == 1 ) *CHARP(ncp, i/2) = (signed char)val1; else if ( size == 2 ) *SHORTP(ncp, i/2) = (short)val1; else if ( size == 4 ) *LONGP(ncp, i/2)= (Py_Int32)val1; @@ -857,7 +856,7 @@ signed char *cp, *ncp; Py_ssize_t len, i; int size, val1, val2, val = 0; - double fac1, fac2, fval, maxval; + double fac1, fac2, fval, maxval, minval; PyObject *rv; if ( !PyArg_ParseTuple(args, "s#idd:tostereo", @@ -866,13 +865,8 @@ if (!audioop_check_parameters(len, size)) return NULL; - if ( size == 1 ) maxval = (double) 0x7f; - else if ( size == 2 ) maxval = (double) 0x7fff; - else if ( size == 4 ) maxval = (double) 0x7fffffff; - else { - PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); - return 0; - } + maxval = (double) maxvals[size]; + minval = (double) minvals[size]; if (len > PY_SSIZE_T_MAX/2) { PyErr_SetString(PyExc_MemoryError, @@ -892,14 +886,10 @@ else if ( size == 4 ) val = (int)*LONGP(cp, i); fval = (double)val*fac1; - if ( fval > maxval ) fval = maxval; - else if ( fval < -maxval ) fval = -maxval; - val1 = (int)fval; + val1 = (int)floor(fbound(fval, minval, maxval)); fval = (double)val*fac2; - if ( fval > maxval ) fval = maxval; - else if ( fval < -maxval ) fval = -maxval; - val2 = (int)fval; + val2 = (int)floor(fbound(fval, minval, maxval)); if ( size == 1 ) *CHARP(ncp, i*2) = (signed char)val1; else if ( size == 2 ) *SHORTP(ncp, i*2) = (short)val1; @@ -917,7 +907,7 @@ { signed char *cp1, *cp2, *ncp; Py_ssize_t len1, len2, i; - int size, val1 = 0, val2 = 0, maxval, newval; + int size, val1 = 0, val2 = 0, minval, maxval, newval; PyObject *rv; if ( !PyArg_ParseTuple(args, "s#s#i:add", @@ -930,13 +920,8 @@ return 0; } - if ( size == 1 ) maxval = 0x7f; - else if ( size == 2 ) maxval = 0x7fff; - else if ( size == 4 ) maxval = 0x7fffffff; - else { - PyErr_SetString(AudioopError, "Size should be 1, 2 or 4"); - return 0; - } + maxval = maxvals[size]; + minval = minvals[size]; rv = PyBytes_FromStringAndSize(NULL, len1); if ( rv == 0 ) @@ -952,12 +937,17 @@ else if ( size == 2 ) val2 = (int)*SHORTP(cp2, i); else if ( size == 4 ) val2 = (int)*LONGP(cp2, i); - newval = val1 + val2; /* truncate in case of overflow */ - if (newval > maxval) newval = maxval; - else if (newval < -maxval) newval = -maxval; - else if (size == 4 && (newval^val1) < 0 && (newval^val2) < 0) - newval = val1 > 0 ? maxval : - maxval; + if (val2 >= 0) + if (val1 > maxval - val2) + newval = maxval; + else + newval = val1 + val2; + else + if (val1 < minval - val2) + newval = minval; + else + newval = val1 + val2; if ( size == 1 ) *CHARP(ncp, i) = (signed char)newval; else if ( size == 2 ) *SHORTP(ncp, i) = (short)newval; @@ -971,7 +961,7 @@ { signed char *cp, *ncp; Py_ssize_t len, i; - int size, val = 0; + int size, val = 0, minval, maxval; PyObject *rv; int bias; @@ -987,15 +977,29 @@ return 0; ncp = (signed char *)PyBytes_AsString(rv); + maxval = maxvals[size]; + minval = minvals[size]; for ( i=0; i < len; i += size ) { if ( size == 1 ) val = (int)*CHARP(cp, i); else if ( size == 2 ) val = (int)*SHORTP(cp, i); else if ( size == 4 ) val = (int)*LONGP(cp, i); - if ( size == 1 ) *CHARP(ncp, i) = (signed char)(val+bias); - else if ( size == 2 ) *SHORTP(ncp, i) = (short)(val+bias); - else if ( size == 4 ) *LONGP(ncp, i) = (Py_Int32)(val+bias); + /* truncate in case of overflow */ + if (bias >= 0) + if (val > maxval - bias) + val = maxval; + else + val += bias; + else + if (val < minval - bias) + val = minval; + else + val += bias; + + if ( size == 1 ) *CHARP(ncp, i) = (signed char)val; + else if ( size == 2 ) *SHORTP(ncp, i) = (short)val; + else if ( size == 4 ) *LONGP(ncp, i) = (Py_Int32)val; } return rv; } @@ -1022,15 +1026,15 @@ ncp = (unsigned char *)PyBytes_AsString(rv); for ( i=0; i < len; i += size ) { - if ( size == 1 ) val = ((int)*CHARP(cp, i)) << 8; - else if ( size == 2 ) val = (int)*SHORTP(cp, i); - else if ( size == 4 ) val = ((int)*LONGP(cp, i)) >> 16; + if ( size == 1 ) val = ((int)*CHARP(cp, i)) << 24; + else if ( size == 2 ) val = ((int)*SHORTP(cp, i)) << 16; + else if ( size == 4 ) val = (int)*LONGP(cp, i); j = len - i - size; - if ( size == 1 ) *CHARP(ncp, j) = (signed char)(val >> 8); - else if ( size == 2 ) *SHORTP(ncp, j) = (short)(val); - else if ( size == 4 ) *LONGP(ncp, j) = (Py_Int32)(val<<16); + if ( size == 1 ) *CHARP(ncp, j) = (signed char)(val >> 24); + else if ( size == 2 ) *SHORTP(ncp, j) = (short)(val >> 16); + else if ( size == 4 ) *LONGP(ncp, j) = (Py_Int32)val; } return rv; } @@ -1064,13 +1068,13 @@ ncp = (unsigned char *)PyBytes_AsString(rv); for ( i=0, j=0; i < len; i += size, j += size2 ) { - if ( size == 1 ) val = ((int)*CHARP(cp, i)) << 8; - else if ( size == 2 ) val = (int)*SHORTP(cp, i); - else if ( size == 4 ) val = ((int)*LONGP(cp, i)) >> 16; + if ( size == 1 ) val = ((int)*CHARP(cp, i)) << 24; + else if ( size == 2 ) val = ((int)*SHORTP(cp, i)) << 16; + else if ( size == 4 ) val = (int)*LONGP(cp, i); - if ( size2 == 1 ) *CHARP(ncp, j) = (signed char)(val >> 8); - else if ( size2 == 2 ) *SHORTP(ncp, j) = (short)(val); - else if ( size2 == 4 ) *LONGP(ncp, j) = (Py_Int32)(val<<16); + if ( size2 == 1 ) *CHARP(ncp, j) = (signed char)(val >> 24); + else if ( size2 == 2 ) *SHORTP(ncp, j) = (short)(val >> 16); + else if ( size2 == 4 ) *LONGP(ncp, j) = (Py_Int32)val; } return rv; } @@ -1134,6 +1138,10 @@ d = gcd(inrate, outrate); inrate /= d; outrate /= d; + /* divide weightA and weightB by their greatest common divisor */ + d = gcd(weightA, weightB); + weightA /= d; + weightA /= d; if ((size_t)nchannels > PY_SIZE_MAX/sizeof(int)) { PyErr_SetString(PyExc_MemoryError, @@ -1173,7 +1181,9 @@ } /* str <- Space for the output buffer. */ - { + if (len == 0) + str = PyBytes_FromStringAndSize(NULL, 0); + else { /* There are len input frames, so we need (mathematically) ceiling(len*outrate/inrate) output frames, and each frame requires bytes_per_frame bytes. Computing this @@ -1188,12 +1198,11 @@ else str = PyBytes_FromStringAndSize(NULL, q * outrate * bytes_per_frame); - - if (str == NULL) { - PyErr_SetString(PyExc_MemoryError, - "not enough memory for output buffer"); - goto exit; - } + } + if (str == NULL) { + PyErr_SetString(PyExc_MemoryError, + "not enough memory for output buffer"); + goto exit; } ncp = PyBytes_AsString(str); @@ -1227,32 +1236,32 @@ for (chan = 0; chan < nchannels; chan++) { prev_i[chan] = cur_i[chan]; if (size == 1) - cur_i[chan] = ((int)*CHARP(cp, 0)) << 8; + cur_i[chan] = ((int)*CHARP(cp, 0)) << 24; else if (size == 2) - cur_i[chan] = (int)*SHORTP(cp, 0); + cur_i[chan] = ((int)*SHORTP(cp, 0)) << 16; else if (size == 4) - cur_i[chan] = ((int)*LONGP(cp, 0)) >> 16; + cur_i[chan] = (int)*LONGP(cp, 0); cp += size; /* implements a simple digital filter */ - cur_i[chan] = - (weightA * cur_i[chan] + - weightB * prev_i[chan]) / - (weightA + weightB); + cur_i[chan] = (int)( + ((double)weightA * (double)cur_i[chan] + + (double)weightB * (double)prev_i[chan]) / + ((double)weightA + (double)weightB)); } len--; d += outrate; } while (d >= 0) { for (chan = 0; chan < nchannels; chan++) { - cur_o = (prev_i[chan] * d + - cur_i[chan] * (outrate - d)) / - outrate; + cur_o = (int)(((double)prev_i[chan] * (double)d + + (double)cur_i[chan] * (double)(outrate - d)) / + (double)outrate); if (size == 1) - *CHARP(ncp, 0) = (signed char)(cur_o >> 8); + *CHARP(ncp, 0) = (signed char)(cur_o >> 24); else if (size == 2) - *SHORTP(ncp, 0) = (short)(cur_o); + *SHORTP(ncp, 0) = (short)(cur_o >> 16); else if (size == 4) - *LONGP(ncp, 0) = (Py_Int32)(cur_o<<16); + *LONGP(ncp, 0) = (Py_Int32)(cur_o); ncp += size; } d -= inrate; -------------- next part -------------- diff -r bb94f6222fef Lib/test/test_audioop.py --- a/Lib/test/test_audioop.py Wed Dec 19 14:33:35 2012 +0200 +++ b/Lib/test/test_audioop.py Wed Dec 19 20:57:10 2012 +0200 @@ -1,25 +1,21 @@ import audioop +import sys import unittest from test.support import run_unittest -endian = 'big' if audioop.getsample(b'\0\1', 2, 0) == 1 else 'little' +def pack(width, data): + return b''.join(v.to_bytes(width, sys.byteorder, signed=True) for v in data) -def gendata1(): - return b'\0\1\2' +packs = {w: (lambda *data, width=w: pack(width, data)) for w in (1, 2, 4)} +maxvalues = {w: (1 << (8 * w - 1)) - 1 for w in (1, 2, 4)} +minvalues = {w: -1 << (8 * w - 1) for w in (1, 2, 4)} -def gendata2(): - if endian == 'big': - return b'\0\0\0\1\0\2' - else: - return b'\0\0\1\0\2\0' - -def gendata4(): - if endian == 'big': - return b'\0\0\0\0\0\0\0\1\0\0\0\2' - else: - return b'\0\0\0\0\1\0\0\0\2\0\0\0' - -data = [gendata1(), gendata2(), gendata4()] +datas = { + 1: b'\x00\x12\x45\xbb\x7f\x80\xff', + 2: packs[2](0, 0x1234, 0x4567, -0x4567, 0x7fff, -0x8000, -1), + 4: packs[4](0, 0x12345678, 0x456789ab, -0x456789ab, + 0x7fffffff, -0x80000000, -1), +} INVALID_DATA = [ (b'abc', 0), @@ -31,171 +27,320 @@ class TestAudioop(unittest.TestCase): def test_max(self): - self.assertEqual(audioop.max(data[0], 1), 2) - self.assertEqual(audioop.max(data[1], 2), 2) - self.assertEqual(audioop.max(data[2], 4), 2) + for w in 1, 2, 4: + self.assertEqual(audioop.max(b'', w), 0) + p = packs[w] + self.assertEqual(audioop.max(p(5), w), 5) + self.assertEqual(audioop.max(p(5, -8, -1), w), 8) + self.assertEqual(audioop.max(p(maxvalues[w]), w), maxvalues[w]) + self.assertEqual(audioop.max(p(minvalues[w]), w), -minvalues[w]) + self.assertEqual(audioop.max(datas[w], w), -minvalues[w]) def test_minmax(self): - self.assertEqual(audioop.minmax(data[0], 1), (0, 2)) - self.assertEqual(audioop.minmax(data[1], 2), (0, 2)) - self.assertEqual(audioop.minmax(data[2], 4), (0, 2)) + for w in 1, 2, 4: + self.assertEqual(audioop.minmax(b'', w), + (0x7fffffff, -0x80000000)) + p = packs[w] + self.assertEqual(audioop.minmax(p(5), w), (5, 5)) + self.assertEqual(audioop.minmax(p(5, -8, -1), w), (-8, 5)) + self.assertEqual(audioop.minmax(p(maxvalues[w]), w), + (maxvalues[w], maxvalues[w])) + self.assertEqual(audioop.minmax(p(minvalues[w]), w), + (minvalues[w], minvalues[w])) + self.assertEqual(audioop.minmax(datas[w], w), + (minvalues[w], maxvalues[w])) def test_maxpp(self): - self.assertEqual(audioop.maxpp(data[0], 1), 0) - self.assertEqual(audioop.maxpp(data[1], 2), 0) - self.assertEqual(audioop.maxpp(data[2], 4), 0) + for w in 1, 2, 4: + self.assertEqual(audioop.maxpp(b'', w), 0) + self.assertEqual(audioop.maxpp(packs[w](*range(100)), w), 0) + self.assertEqual(audioop.maxpp(packs[w](9, 10, 5, 5, 0, 1), w), 10) + self.assertEqual(audioop.maxpp(datas[w], w), + maxvalues[w] - minvalues[w]) def test_avg(self): - self.assertEqual(audioop.avg(data[0], 1), 1) - self.assertEqual(audioop.avg(data[1], 2), 1) - self.assertEqual(audioop.avg(data[2], 4), 1) + for w in 1, 2, 4: + self.assertEqual(audioop.avg(b'', w), 0) + p = packs[w] + self.assertEqual(audioop.avg(p(5), w), 5) + self .assertEqual(audioop.avg(p(5, 8), w), 6) + self.assertEqual(audioop.avg(p(5, -8), w), -2) + self.assertEqual(audioop.avg(p(maxvalues[w], maxvalues[w]), w), + maxvalues[w]) + self.assertEqual(audioop.avg(p(minvalues[w], minvalues[w]), w), + minvalues[w]) + self.assertEqual(audioop.avg(packs[4](0x50000000, 0x70000000), 4), + 0x60000000) + self.assertEqual(audioop.avg(packs[4](-0x50000000, -0x70000000), 4), + -0x60000000) def test_avgpp(self): - self.assertEqual(audioop.avgpp(data[0], 1), 0) - self.assertEqual(audioop.avgpp(data[1], 2), 0) - self.assertEqual(audioop.avgpp(data[2], 4), 0) + for w in 1, 2, 4: + self.assertEqual(audioop.avgpp(b'', w), 0) + self.assertEqual(audioop.avgpp(packs[w](*range(100)), w), 0) + self.assertEqual(audioop.avgpp(packs[w](9, 10, 5, 5, 0, 1), w), 10) + self.assertEqual(audioop.avgpp(datas[1], 1), 196) + self.assertEqual(audioop.avgpp(datas[2], 2), 50534) + self.assertEqual(audioop.avgpp(datas[4], 4), 3311897002) def test_rms(self): - self.assertEqual(audioop.rms(data[0], 1), 1) - self.assertEqual(audioop.rms(data[1], 2), 1) - self.assertEqual(audioop.rms(data[2], 4), 1) + for w in 1, 2, 4: + self.assertEqual(audioop.rms(b'', w), 0) + p = packs[w] + self.assertEqual(audioop.rms(p(*range(100)), w), 57) + self.assertAlmostEqual(audioop.rms(p(maxvalues[w]) * 5, w), + maxvalues[w], delta=1) + self.assertAlmostEqual(audioop.rms(p(minvalues[w]) * 5, w), + -minvalues[w], delta=1) + self.assertEqual(audioop.rms(datas[1], 1), 77) + self.assertEqual(audioop.rms(datas[2], 2), 20001) + self.assertEqual(audioop.rms(datas[4], 4), 1310854152) def test_cross(self): - self.assertEqual(audioop.cross(data[0], 1), 0) - self.assertEqual(audioop.cross(data[1], 2), 0) - self.assertEqual(audioop.cross(data[2], 4), 0) + for w in 1, 2, 4: + self.assertEqual(audioop.cross(b'', w), -1) + p = packs[w] + self.assertEqual(audioop.cross(p(0, 1, 2), w), 0) + self.assertEqual(audioop.cross(p(1, 2, -3, -4), w), 1) + self.assertEqual(audioop.cross(p(-1, -2, 3, 4), w), 1) + self.assertEqual(audioop.cross(p(0, minvalues[w]), w), 1) + self.assertEqual(audioop.cross(p(minvalues[w], maxvalues[w]), w), 1) def test_add(self): - data2 = [] - for d in data: - str = bytearray(len(d)) - for i,b in enumerate(d): - str[i] = 2*b - data2.append(str) - self.assertEqual(audioop.add(data[0], data[0], 1), data2[0]) - self.assertEqual(audioop.add(data[1], data[1], 2), data2[1]) - self.assertEqual(audioop.add(data[2], data[2], 4), data2[2]) + for w in 1, 2, 4: + self.assertEqual(audioop.add(b'', b'', w), b'') + self.assertEqual(audioop.add(datas[w], b'\0' * len(datas[w]), w), + datas[w]) + self.assertEqual(audioop.add(datas[1], datas[1], 1), + b'\x00\x24\x7f\x80\x7f\x80\xfe') + self.assertEqual(audioop.add(datas[2], datas[2], 2), + packs[2](0, 0x2468, 0x7fff, -0x8000, 0x7fff, -0x8000, -2)) + self.assertEqual(audioop.add(datas[4], datas[4], 4), + packs[4](0, 0x2468acf0, 0x7fffffff, -0x80000000, + 0x7fffffff, -0x80000000, -2)) def test_bias(self): - # Note: this test assumes that avg() works - d1 = audioop.bias(data[0], 1, 100) - d2 = audioop.bias(data[1], 2, 100) - d4 = audioop.bias(data[2], 4, 100) - self.assertEqual(audioop.avg(d1, 1), 101) - self.assertEqual(audioop.avg(d2, 2), 101) - self.assertEqual(audioop.avg(d4, 4), 101) + for w in 1, 2, 4: + for bias in 0, 1, -1, 127, -128, 0x7fffffff, -0x80000000: + self.assertEqual(audioop.bias(b'', w, bias), b'') + self.assertEqual(audioop.bias(datas[1], 1, 1), + b'\x01\x13\x46\xbc\x7f\x81\x00') + self.assertEqual(audioop.bias(datas[1], 1, -1), + b'\xff\x11\x44\xba\x7e\x80\xfe') + self.assertEqual(audioop.bias(datas[1], 1, 0x7fffffff), + b'\x7f\x7f\x7f\x7f\x7f\x7f\x7f') + self.assertEqual(audioop.bias(datas[1], 1, -0x80000000), + b'\x80\x80\x80\x80\x80\x80\x80') + self.assertEqual(audioop.bias(datas[2], 2, 1), + packs[2](1, 0x1235, 0x4568, -0x4566, 0x7fff, -0x7fff, 0)) + self.assertEqual(audioop.bias(datas[2], 2, -1), + packs[2](-1, 0x1233, 0x4566, -0x4568, 0x7ffe, -0x8000, -2)) + self.assertEqual(audioop.bias(datas[2], 2, 0x7fffffff), + packs[2](*[0x7fff] * 7)) + self.assertEqual(audioop.bias(datas[2], 2, -0x80000000), + packs[2](*[-0x8000] * 7)) + self.assertEqual(audioop.bias(datas[4], 4, 1), + packs[4](1, 0x12345679, 0x456789ac, -0x456789aa, + 0x7fffffff, -0x7fffffff, 0)) + self.assertEqual(audioop.bias(datas[4], 4, -1), + packs[4](-1, 0x12345677, 0x456789aa, -0x456789ac, + 0x7ffffffe, -0x80000000, -2)) + self.assertEqual(audioop.bias(datas[4], 4, 0x7fffffff), + packs[4](0x7fffffff, 0x7fffffff, 0x7fffffff, 0x3a987654, + 0x7fffffff, -1, 0x7ffffffe)) + self.assertEqual(audioop.bias(datas[4], 4, -0x80000000), + packs[4](-0x80000000, -0x6dcba988, -0x3a987655, -0x80000000, + -1, -0x80000000, -0x80000000)) def test_lin2lin(self): - # too simple: we test only the size - for d1 in data: - for d2 in data: - got = len(d1)//3 - wtd = len(d2)//3 - self.assertEqual(len(audioop.lin2lin(d1, got, wtd)), len(d2)) + for w in 1, 2, 4: + self.assertEqual(audioop.lin2lin(datas[w], w, w), datas[w]) + + self.assertEqual(audioop.lin2lin(datas[1], 1, 2), + packs[2](0, 0x1200, 0x4500, -0x4500, 0x7f00, -0x8000, -0x100)) + self.assertEqual(audioop.lin2lin(datas[1], 1, 4), + packs[4](0, 0x12000000, 0x45000000, -0x45000000, + 0x7f000000, -0x80000000, -0x1000000)) + self.assertEqual(audioop.lin2lin(datas[2], 2, 1), + b'\x00\x12\x45\xba\x7f\x80\xff') + self.assertEqual(audioop.lin2lin(datas[2], 2, 4), + packs[4](0, 0x12340000, 0x45670000, -0x45670000, + 0x7fff0000, -0x80000000, -0x10000)) + self.assertEqual(audioop.lin2lin(datas[4], 4, 1), + b'\x00\x12\x45\xba\x7f\x80\xff') + self.assertEqual(audioop.lin2lin(datas[4], 4, 2), + packs[2](0, 0x1234, 0x4567, -0x4568, 0x7fff, -0x8000, -1)) def test_adpcm2lin(self): + self.assertEqual(audioop.adpcm2lin(b'\x07\x7f\x7f', 1, None), + (b'\x00\x00\x00\xff\x00\xff', (-179, 40))) + self.assertEqual(audioop.adpcm2lin(b'\x07\x7f\x7f', 2, None), + (packs[2](0, 0xb, 0x29, -0x16, 0x72, -0xb3), (-179, 40))) + self.assertEqual(audioop.adpcm2lin(b'\x07\x7f\x7f', 4, None), + (packs[4](0, 0xb0000, 0x290000, -0x160000, 0x720000, + -0xb30000), (-179, 40))) + # Very cursory test - self.assertEqual(audioop.adpcm2lin(b'\0\0', 1, None), (b'\0' * 4, (0,0))) - self.assertEqual(audioop.adpcm2lin(b'\0\0', 2, None), (b'\0' * 8, (0,0))) - self.assertEqual(audioop.adpcm2lin(b'\0\0', 4, None), (b'\0' * 16, (0,0))) + for w in 1, 2, 4: + self.assertEqual(audioop.adpcm2lin(b'\0' * 5, w, None), + (b'\0' * w * 10, (0, 0))) def test_lin2adpcm(self): + self.assertEqual(audioop.lin2adpcm(datas[1], 1, None), + (b'\x07\x7f\x7f', (-221, 39))) + self.assertEqual(audioop.lin2adpcm(datas[2], 2, None), + (b'\x07\x7f\x7f', (31, 39))) + self.assertEqual(audioop.lin2adpcm(datas[4], 4, None), + (b'\x07\x7f\x7f', (31, 39))) + # Very cursory test - self.assertEqual(audioop.lin2adpcm(b'\0\0\0\0', 1, None), (b'\0\0', (0,0))) + for w in 1, 2, 4: + self.assertEqual(audioop.lin2adpcm(b'\0' * w * 10, w, None), + (b'\0' * 5, (0, 0))) def test_lin2alaw(self): - self.assertEqual(audioop.lin2alaw(data[0], 1), b'\xd5\xc5\xf5') - self.assertEqual(audioop.lin2alaw(data[1], 2), b'\xd5\xd5\xd5') - self.assertEqual(audioop.lin2alaw(data[2], 4), b'\xd5\xd5\xd5') + self.assertEqual(audioop.lin2alaw(datas[1], 1), + b'\xd5\x87\xa4\x24\xaa\x2a\x5a') + self.assertEqual(audioop.lin2alaw(datas[2], 2), + b'\xd5\x87\xa4\x24\xaa\x2a\x55') + self.assertEqual(audioop.lin2alaw(datas[4], 4), + b'\xd5\x87\xa4\x24\xaa\x2a\x55') def test_alaw2lin(self): - # Cursory - d = audioop.lin2alaw(data[0], 1) - self.assertEqual(audioop.alaw2lin(d, 1), data[0]) - if endian == 'big': - self.assertEqual(audioop.alaw2lin(d, 2), - b'\x00\x08\x01\x08\x02\x10') - self.assertEqual(audioop.alaw2lin(d, 4), - b'\x00\x08\x00\x00\x01\x08\x00\x00\x02\x10\x00\x00') - else: - self.assertEqual(audioop.alaw2lin(d, 2), - b'\x08\x00\x08\x01\x10\x02') - self.assertEqual(audioop.alaw2lin(d, 4), - b'\x00\x00\x08\x00\x00\x00\x08\x01\x00\x00\x10\x02') + encoded = b'\x00\x03\x24\x2a\x51\x54\x55\x58\x6b\x71\x7f'\ + b'\x80\x83\xa4\xaa\xd1\xd4\xd5\xd8\xeb\xf1\xff' + src = [-688, -720, -2240, -4032, -9, -3, -1, -27, -244, -82, -106, + 688, 720, 2240, 4032, 9, 3, 1, 27, 244, 82, 106] + for w in 1, 2, 4: + self.assertEqual(audioop.alaw2lin(encoded, w), + packs[w](*(x << (w * 8) >> 13 for x in src))) + + encoded = bytes(range(256)) + for w in 2, 4: + decoded = audioop.alaw2lin(encoded, w) + self.assertEqual(audioop.lin2alaw(decoded, w), encoded) def test_lin2ulaw(self): - self.assertEqual(audioop.lin2ulaw(data[0], 1), b'\xff\xe7\xdb') - self.assertEqual(audioop.lin2ulaw(data[1], 2), b'\xff\xff\xff') - self.assertEqual(audioop.lin2ulaw(data[2], 4), b'\xff\xff\xff') + self.assertEqual(audioop.lin2ulaw(datas[1], 1), + b'\xff\xad\x8e\x0e\x80\x00\x67') + self.assertEqual(audioop.lin2ulaw(datas[2], 2), + b'\xff\xad\x8e\x0e\x80\x00\x7e') + self.assertEqual(audioop.lin2ulaw(datas[4], 4), + b'\xff\xad\x8e\x0e\x80\x00\x7e') def test_ulaw2lin(self): - # Cursory - d = audioop.lin2ulaw(data[0], 1) - self.assertEqual(audioop.ulaw2lin(d, 1), data[0]) - if endian == 'big': - self.assertEqual(audioop.ulaw2lin(d, 2), - b'\x00\x00\x01\x04\x02\x0c') - self.assertEqual(audioop.ulaw2lin(d, 4), - b'\x00\x00\x00\x00\x01\x04\x00\x00\x02\x0c\x00\x00') - else: - self.assertEqual(audioop.ulaw2lin(d, 2), - b'\x00\x00\x04\x01\x0c\x02') - self.assertEqual(audioop.ulaw2lin(d, 4), - b'\x00\x00\x00\x00\x00\x00\x04\x01\x00\x00\x0c\x02') + encoded = b'\x00\x0e\x28\x3f\x57\x6a\x76\x7c\x7e\x7f'\ + b'\x80\x8e\xa8\xbf\xd7\xea\xf6\xfc\xfe\xff' + src = [-8031, -4447, -1471, -495, -163, -53, -18, -6, -2, 0, + 8031, 4447, 1471, 495, 163, 53, 18, 6, 2, 0] + for w in 1, 2, 4: + self.assertEqual(audioop.ulaw2lin(encoded, w), + packs[w](*(x << (w * 8) >> 14 for x in src))) + + # Current u-law implementation has two codes fo 0: 0x7f and 0xff. + encoded = bytes(range(127)) + bytes(range(128, 256)) + for w in 2, 4: + decoded = audioop.ulaw2lin(encoded, w) + self.assertEqual(audioop.lin2ulaw(decoded, w), encoded) def test_mul(self): - data2 = [] - for d in data: - str = bytearray(len(d)) - for i,b in enumerate(d): - str[i] = 2*b - data2.append(str) - self.assertEqual(audioop.mul(data[0], 1, 2), data2[0]) - self.assertEqual(audioop.mul(data[1],2, 2), data2[1]) - self.assertEqual(audioop.mul(data[2], 4, 2), data2[2]) + for w in 1, 2, 4: + self.assertEqual(audioop.mul(b'', w, 2), b'') + self.assertEqual(audioop.mul(datas[w], w, 0), + b'\0' * len(datas[w])) + self.assertEqual(audioop.mul(datas[w], w, 1), + datas[w]) + self.assertEqual(audioop.mul(datas[1], 1, 2), + b'\x00\x24\x7f\x80\x7f\x80\xfe') + self.assertEqual(audioop.mul(datas[2], 2, 2), + packs[2](0, 0x2468, 0x7fff, -0x8000, 0x7fff, -0x8000, -2)) + self.assertEqual(audioop.mul(datas[4], 4, 2), + packs[4](0, 0x2468acf0, 0x7fffffff, -0x80000000, + 0x7fffffff, -0x80000000, -2)) def test_ratecv(self): + for w in 1, 2, 4: + self.assertEqual(audioop.ratecv(b'', w, 1, 8000, 8000, None), + (b'', (-1, ((0, 0),)))) + self.assertEqual(audioop.ratecv(b'', w, 5, 8000, 8000, None), + (b'', (-1, ((0, 0),) * 5))) + self.assertEqual(audioop.ratecv(b'', w, 1, 8000, 16000, None), + (b'', (-2, ((0, 0),)))) + self.assertEqual(audioop.ratecv(datas[w], w, 1, 8000, 8000, None)[0], + datas[w]) state = None - d1, state = audioop.ratecv(data[0], 1, 1, 8000, 16000, state) - d2, state = audioop.ratecv(data[0], 1, 1, 8000, 16000, state) + d1, state = audioop.ratecv(b'\x00\x01\x02', 1, 1, 8000, 16000, state) + d2, state = audioop.ratecv(b'\x00\x01\x02', 1, 1, 8000, 16000, state) self.assertEqual(d1 + d2, b'\000\000\001\001\002\001\000\000\001\001\002') + for w in 1, 2, 4: + d0, state0 = audioop.ratecv(datas[w], w, 1, 8000, 16000, None) + d, state = b'', None + for i in range(0, len(datas[w]), w): + d1, state = audioop.ratecv(datas[w][i:i + w], w, 1, + 8000, 16000, state) + d += d1 + self.assertEqual(d, d0) + self.assertEqual(state, state0) + def test_reverse(self): - self.assertEqual(audioop.reverse(data[0], 1), b'\2\1\0') + for w in 1, 2, 4: + self.assertEqual(audioop.reverse(b'', w), b'') + self.assertEqual(audioop.reverse(packs[w](0, 1, 2), w), + packs[w](2, 1, 0)) def test_tomono(self): - data2 = bytearray() - for d in data[0]: - data2.append(d) - data2.append(d) - self.assertEqual(audioop.tomono(data2, 1, 0.5, 0.5), data[0]) + for w in 1, 2, 4: + data1 = datas[w] + data2 = bytearray(2 * len(data1)) + for k in range(w): + data2[k::2*w] = data1[k::w] + self.assertEqual(audioop.tomono(data2, w, 1, 0), data1) + self.assertEqual(audioop.tomono(data2, w, 0, 1), b'\0' * len(data1)) + for k in range(w): + data2[k+w::2*w] = data1[k::w] + self.assertEqual(audioop.tomono(data2, w, 0.5, 0.5), data1) def test_tostereo(self): - data2 = bytearray() - for d in data[0]: - data2.append(d) - data2.append(d) - self.assertEqual(audioop.tostereo(data[0], 1, 1, 1), data2) + for w in 1, 2, 4: + data1 = datas[w] + data2 = bytearray(2 * len(data1)) + for k in range(w): + data2[k::2*w] = data1[k::w] + self.assertEqual(audioop.tostereo(data1, w, 1, 0), data2) + self.assertEqual(audioop.tostereo(data1, w, 0, 0), b'\0' * len(data2)) + for k in range(w): + data2[k+w::2*w] = data1[k::w] + self.assertEqual(audioop.tostereo(data1, w, 1, 1), data2) def test_findfactor(self): - self.assertEqual(audioop.findfactor(data[1], data[1]), 1.0) + self.assertEqual(audioop.findfactor(datas[2], datas[2]), 1.0) + self.assertEqual(audioop.findfactor(b'\0' * len(datas[2]), datas[2]), + 0.0) def test_findfit(self): - self.assertEqual(audioop.findfit(data[1], data[1]), (0, 1.0)) + self.assertEqual(audioop.findfit(datas[2], datas[2]), (0, 1.0)) + self.assertEqual(audioop.findfit(datas[2], packs[2](1, 2, 0)), + (1, 8038.8)) + self.assertEqual(audioop.findfit(datas[2][:-2] * 5 + datas[2], datas[2]), + (30, 1.0)) def test_findmax(self): - self.assertEqual(audioop.findmax(data[1], 1), 2) + self.assertEqual(audioop.findmax(datas[2], 1), 5) def test_getsample(self): - for i in range(3): - self.assertEqual(audioop.getsample(data[0], 1, i), i) - self.assertEqual(audioop.getsample(data[1], 2, i), i) - self.assertEqual(audioop.getsample(data[2], 4, i), i) + for w in 1, 2, 4: + data = packs[w](0, 1, -1, maxvalues[w], minvalues[w]) + self.assertEqual(audioop.getsample(data, w, 0), 0) + self.assertEqual(audioop.getsample(data, w, 1), 1) + self.assertEqual(audioop.getsample(data, w, 2), -1) + self.assertEqual(audioop.getsample(data, w, 3), maxvalues[w]) + self.assertEqual(audioop.getsample(data, w, 4), minvalues[w]) def test_negativelen(self): # from issue 3306, previously it segfaulted self.assertRaises(audioop.error, - audioop.findmax, ''.join(chr(x) for x in range(256)), -2392392) + audioop.findmax, bytes(range(256)), -2392392) def test_issue7673(self): state = None @@ -222,9 +367,9 @@ self.assertRaises(audioop.error, audioop.lin2adpcm, data, size, state) def test_wrongsize(self): - data = b'abc' + data = b'abcdefgh' state = None - for size in (-1, 3, 5): + for size in (-1, 0, 3, 5, 1024): self.assertRaises(audioop.error, audioop.ulaw2lin, data, size) self.assertRaises(audioop.error, audioop.alaw2lin, data, size) self.assertRaises(audioop.error, audioop.adpcm2lin, data, size, state) -------------- next part -------------- import math __all__ = ['error', 'getsample', 'max', 'minmax', 'avg', 'rms', 'bias', 'add', 'mul', 'reverse', 'cross', 'maxpp', 'avgpp', 'lin2lin','tomono', 'tostereo', 'ratecv', 'findfactor', 'findmax', 'findfit', 'lin2ulaw', 'ulaw2lin', 'lin2alaw', 'alaw2lin', 'lin2adpcm', 'adpcm2lin', ] _max = max class error(Exception): """This exception is raised on all audioop errors, such as unknown number of bytes per sample, etc.""" pass _formats = { 1: 'b', 2: 'h', 4: 'i', } def _assamples(fragment, width): if isinstance(fragment, str): fragment = fragment.encode() view = memoryview(fragment) try: format = _formats[width] except KeyError: raise error('Size should be 1, 2 or 4') from None try: return view.cast(format) except TypeError: if len(fragment) % width: raise error('not a whole number of frames') from None if not fragment: # cannot cast view with zeros in shape or strides return memoryview(b'') raise def _newsamples(length, width): try: format = _formats[width] except KeyError: raise error('Size should be 1, 2 or 4') from None try: return memoryview(bytearray(length * width)).cast(format) except TypeError: if not length: return memoryview(b'') raise def getsample(fragment, width, index): """Return the value of sample index from the fragment.""" fragment = _assamples(fragment, width) if not (0 <= index < len(fragment)): raise error('Index out of range') return fragment[index] def _bound(value, min, max): if value < min + 1: value = min elif value > max: value = max return value _bounds = { 1: lambda value: _bound(value, -0x80, 0x7f), 2: lambda value: _bound(value, -0x8000, 0x7fff), 4: lambda value: _bound(value, -0x80000000, 0x7fffffff), } def _from16(value, width): if width == 1: value >>= 8 elif width == 4: value <<= 16 return value def _to16(value, width): if width == 1: value <<= 8 elif width == 4: value >>= 16 return value def _from32(value, width): if width == 1: value >>= 24 elif width == 2: value >>= 16 return value def _to32(value, width): if width == 1: value <<= 24 elif width == 2: value <<= 16 return value def max(fragment, width): """Return the maximum of the absolute value of all samples in a fragment.""" fragment = _assamples(fragment, width) if not fragment: return 0 return _max(map(abs, fragment)) def minmax(fragment, width): """Return a tuple consisting of the minimum and maximum values of all samples in the sound fragment.""" fragment = _assamples(fragment, width) if not fragment: return 0x7fffffff, -0x80000000 return min(fragment), _max(fragment) def avg(fragment, width): """Return the average over all samples in the fragment.""" fragment = _assamples(fragment, width) if not fragment: return 0 return sum(fragment) // len(fragment) def rms(fragment, width): """Return the root-mean-square of the fragment, i.e. sqrt(sum(S_i^2)/n).""" fragment = _assamples(fragment, width) if not fragment: return 0 return int(math.sqrt(_sqsum(fragment) / len(fragment))) def bias(fragment, width, bias): """Return a fragment that is the original fragment with a bias added to each sample.""" fragment = _assamples(fragment, width) bound = _bounds[width] output = _newsamples(len(fragment), width) for i, val in enumerate(fragment): output[i] = bound(val + bias) return output.tobytes() def add(fragment1, fragment2, width): """Return a fragment which is the addition of the two samples passed as parameters.""" fragment1 = _assamples(fragment1, width) fragment2 = _assamples(fragment2, width) if len(fragment1) != len(fragment2): raise error('Lengths should be the same') bound = _bounds[width] output = _newsamples(len(fragment1), width) for i in range(len(fragment1)): output[i] = bound(fragment1[i] + fragment2[i]) return output.tobytes() def mul(fragment, width, factor): """Return a fragment that has all samples in the original fragment multiplied by the floating-point value factor.""" fragment = _assamples(fragment, width) bound = _bounds[width] output = _newsamples(len(fragment), width) for i, val in enumerate(fragment): output[i] = int(bound(val * factor)) return output.tobytes() def reverse(fragment, width): """Reverse the samples in a fragment and returns the modified fragment.""" fragment = _assamples(fragment, width) output = _newsamples(len(fragment), width) for i in range(len(fragment)): output[len(fragment) - 1 - i] = fragment[i] return output.tobytes() def cross(fragment, width): """Return the number of zero crossings in the fragment passed as an argument.""" fragment = _assamples(fragment, width) ncross = -1 prevsign = None for val in fragment: sign = val < 0 if sign is not prevsign: ncross += 1 prevsign = sign return ncross def maxpp(fragment, width): """Return the maximum peak-peak value in the sound fragment.""" fragment = _assamples(fragment, width) if not fragment: return 0 prevextreme = None maxdiff = 0 prevval = fragment[0] prevdiff = None for val in fragment[1:]: if val != prevval: diff = val < prevval if prevdiff is (not diff): # Derivative changed sign. Compute difference to last # extreme value and remember. if prevextreme is not None: maxdiff = _max(maxdiff, abs(prevval - prevextreme)) prevextreme = prevval prevval = val prevdiff = diff return maxdiff def avgpp(fragment, width): """Return the average peak-peak value over all samples in the fragment.""" fragment = _assamples(fragment, width) if not fragment: return 0 prevextreme = None sumextreme = 0 nextreme = 0 prevval = fragment[0] prevdiff = None for val in fragment[1:]: if val != prevval: diff = val < prevval if prevdiff is (not diff): # Derivative changed sign. Compute difference to last # extreme value and remember. if prevextreme is not None: sumextreme += abs(prevval - prevextreme) nextreme += 1 prevextreme = prevval prevval = val prevdiff = diff return sumextreme // nextreme if nextreme else 0 def _sqsum(fragment): return sum(val * val for val in fragment) def _dotprod(fragment1, fragment2): return sum(val1 * val2 for val1, val2 in zip(fragment1, fragment2)) def findfactor(fragment, reference): """Return the factor with which you should multiply reference to make it match as well as possible to fragment.""" if isinstance(fragment, str): fragment = fragment.encode() if isinstance(reference, str): reference = reference.encode() if len(fragment) & 1 or len(reference) & 1: raise error('Strings should be even-sized') if len(fragment) != len(reference): raise error('Samples should be same size') fragment = memoryview(fragment).cast('h') reference = memoryview(reference).cast('h') sum_ri_2 = _sqsum(reference) sum_aij_ri = _dotprod(fragment, reference) return sum_aij_ri / sum_ri_2 def findmax(fragment, length): """Search fragment for a slice of length `length' samples (not bytes!) with maximum energy.""" if isinstance(fragment, str): fragment = fragment.encode() if len(fragment) & 1: raise error('Strings should be even-sized') if not (0 <= length <= len(fragment)): raise error('Input sample should be longer') fragment = memoryview(fragment).cast('h') result = _sqsum(fragment[:length]) best_result = result best_j = 0 for j in range(len(fragment) - length): aj_m1 = fragment[j] aj_lm1 = fragment[j + length] result += aj_lm1 * aj_lm1 - aj_m1 * aj_m1 if result > best_result: best_result = result best_j = j + 1 return best_j def findfit(fragment, reference): """Return a tuple (offset, factor) where offset is the (integer) offset into fragment where the optimal match started and factor is the (floating-point) factor as per findfactor().""" if isinstance(fragment, str): fragment = fragment.encode() if isinstance(reference, str): reference = reference.encode() if len(fragment) & 1 or len(reference) & 1: raise error('Strings should be even-sized') if len(fragment) < len(reference): raise error('First sample should be longer') fragment = memoryview(fragment).cast('h') reference = memoryview(reference).cast('h') sum_ri_2 = _sqsum(reference) sum_aij_2 = _sqsum(fragment[:len(reference)]) sum_aij_ri = _dotprod(fragment, reference) result = (sum_ri_2 * sum_aij_2 - sum_aij_ri * sum_aij_ri) / sum_aij_2 best_result = result best_j = 0 for j in range(len(fragment) - len(reference)): aj_m1 = fragment[j] aj_lm1 = fragment[j + len(reference)] sum_aij_2 += aj_lm1 * aj_lm1 - aj_m1 * aj_m1 sum_aij_ri = _dotprod(fragment[j + 1:], reference) result = (sum_ri_2 * sum_aij_2 - sum_aij_ri * sum_aij_ri) / sum_aij_2 if result < best_result: best_result = result best_j = j + 1 return best_j, _dotprod(fragment[best_j:], reference) / sum_ri_2 def lin2lin(fragment, width, newwidth): """Convert samples between 1-, 2- and 4-byte formats.""" fragment = _assamples(fragment, width) output = _newsamples(len(fragment), newwidth) for i, val in enumerate(fragment): output[i] = _from32(_to32(val, width), newwidth) return output.tobytes() def tomono(fragment, width, lfactor, rfactor): """Convert a stereo fragment to a mono fragment. The left channel is multiplied by lfactor and the right channel by rfactor before adding the two channels to give a mono signal. """ fragment = _assamples(fragment, width) if len(fragment) & 1: raise error('not a whole number of frames') bound = _bounds[width] output = _newsamples(len(fragment) // 2, width) for i in range(0, len(fragment), 2): val = fragment[i] * lfactor + fragment[i + 1] * rfactor output[i // 2] = int(bound(val)) return output.tobytes() def tostereo(fragment, width, lfactor, rfactor): """Generate a stereo fragment from a mono fragment. Each pair of samples in the stereo fragment are computed from the mono sample, whereby left channel samples are multiplied by lfactor and right channel samples by rfactor. """ fragment = _assamples(fragment, width) bound = _bounds[width] output = _newsamples(len(fragment) * 2, width) for i, val in enumerate(fragment): output[i * 2 + 0] = int(bound(val * lfactor)) output[i * 2 + 1] = int(bound(val * rfactor)) return output.tobytes() def _gcd(a, b): while b > 0: a, b = b, a % b return a; def ratecv(fragment, width, nchannels, inrate, outrate, state, weightA=1, weightB=0): """Convert the frame rate of the input fragment.""" if nchannels < 1: raise error('# of channels should be >= 1') if weightA < 1 or weightB < 0: raise error('weightA should be >= 1, weightB should be >= 0') if inrate <= 0 or outrate <= 0: raise error('sampling rate not > 0') fragment = _assamples(fragment, width) # divide inrate and outrate by their greatest common divisor d = _gcd(inrate, outrate) inrate //= d outrate //= d # divide weightA and weightB by their greatest common divisor d = _gcd(weightA, weightB) weightA //= d weightB //= d length = len(fragment) // nchannels # number of frames if state is None: d = -outrate samps = [(0, 0)] * nchannels else: d, samps = state if len(samps) != nchannels: raise error('illegal state argument') samps = list(samps) # Space for the output buffer. # There are length input frames, so we need (mathematically) # ceiling(length*outrate/inrate) output frames. outlength = 1 + (length * outrate - 1) // inrate output = _newsamples(outlength * nchannels, width) i = 0 j = 0 while True: while d < 0: if length == 0: return bytes(output[:j]), (d, tuple(samps)) for chan, (_, prev) in enumerate(samps): cur = _to32(fragment[i], width) i += 1 # implements a simple digital filter cur = (weightA * cur + weightB * prev) // (weightA + weightB) samps[chan] = prev, cur length -= 1 d += outrate while d >= 0: for prev, cur in samps: cur_o = (prev * d + cur * (outrate - d)) // outrate output[j] = _from32(cur_o, width) j += 1 d -= inrate def _st_14linear2ulaw(pcm_val): # 2's complement (14-bit range) # The original sox code does this in the calling function, not here pcm_val >>= 2 # u-law inverts all bits # Get the sign and the magnitude of the value. if pcm_val < 0: pcm_val = -pcm_val mask = 0xff ^ 0x80 else: mask = 0xff pcm_val += 0b100001 # Convert the scaled magnitude to segment number. seg = pcm_val.bit_length() - 6 # Combine the sign, segment, quantization bits; # and complement the code word. if seg > 7: # out of range, return maximum value. uval = 0x7f elif seg <= 0: uval = (pcm_val >> 1) & 0xf else: uval = (seg << 4) | ((pcm_val >> (seg + 1)) & 0xf) return uval ^ mask _st_ulaw2linear16 = [ -32124, -31100, -30076, -29052, -28028, -27004, -25980, -24956, -23932, -22908, -21884, -20860, -19836, -18812, -17788, -16764, -15996, -15484, -14972, -14460, -13948, -13436, -12924, -12412, -11900, -11388, -10876, -10364, -9852, -9340, -8828, -8316, -7932, -7676, -7420, -7164, -6908, -6652, -6396, -6140, -5884, -5628, -5372, -5116, -4860, -4604, -4348, -4092, -3900, -3772, -3644, -3516, -3388, -3260, -3132, -3004, -2876, -2748, -2620, -2492, -2364, -2236, -2108, -1980, -1884, -1820, -1756, -1692, -1628, -1564, -1500, -1436, -1372, -1308, -1244, -1180, -1116, -1052, -988, -924, -876, -844, -812, -780, -748, -716, -684, -652, -620, -588, -556, -524, -492, -460, -428, -396, -372, -356, -340, -324, -308, -292, -276, -260, -244, -228, -212, -196, -180, -164, -148, -132, -120, -112, -104, -96, -88, -80, -72, -64, -56, -48, -40, -32, -24, -16, -8, 0, 32124, 31100, 30076, 29052, 28028, 27004, 25980, 24956, 23932, 22908, 21884, 20860, 19836, 18812, 17788, 16764, 15996, 15484, 14972, 14460, 13948, 13436, 12924, 12412, 11900, 11388, 10876, 10364, 9852, 9340, 8828, 8316, 7932, 7676, 7420, 7164, 6908, 6652, 6396, 6140, 5884, 5628, 5372, 5116, 4860, 4604, 4348, 4092, 3900, 3772, 3644, 3516, 3388, 3260, 3132, 3004, 2876, 2748, 2620, 2492, 2364, 2236, 2108, 1980, 1884, 1820, 1756, 1692, 1628, 1564, 1500, 1436, 1372, 1308, 1244, 1180, 1116, 1052, 988, 924, 876, 844, 812, 780, 748, 716, 684, 652, 620, 588, 556, 524, 492, 460, 428, 396, 372, 356, 340, 324, 308, 292, 276, 260, 244, 228, 212, 196, 180, 164, 148, 132, 120, 112, 104, 96, 88, 80, 72, 64, 56, 48, 40, 32, 24, 16, 8, 0, ] def lin2ulaw(fragment, width): """Convert samples in the audio fragment to u-LAW encoding.""" fragment = _assamples(fragment, width) output = bytearray(len(fragment)) for i, val in enumerate(fragment): output[i] = _st_14linear2ulaw(_to16(val, width)) return bytes(output) def ulaw2lin(fragment, width): """Convert sound fragments in u-LAW encoding to linearly encoded sound fragments.""" if isinstance(fragment, str): fragment = fragment.encode() output = _newsamples(len(fragment), width) for i, val in enumerate(fragment): output[i] = _from16(_st_ulaw2linear16[val], width) return output.tobytes() _SIGN_BIT = 0x80 # Sign bit for a A-law byte. _QUANT_MASK = 0xf # Quantization field mask. _SEG_SHIFT = 4 # Left shift for segment number. _SEG_MASK = 0x70 # Segment field mask. def _st_linear2alaw(pcm_val): # 2's complement (13-bit range) # The original sox code does this in the calling function, not here pcm_val >>= 3 # A-law using even bit inversion if pcm_val >= 0: mask = 0x55 | 0x80 # sign (7th) bit = 1 else: mask = 0x55 # sign bit = 0 pcm_val = ~pcm_val # Convert the scaled magnitude to segment number. seg = pcm_val.bit_length() - 5 # Combine the sign, segment, and quantization bits. if seg > 7: # out of range, return maximum value. aval = 0x7F elif seg <= 0: aval = pcm_val >> 1 else: aval = (seg << 4) | (pcm_val >> seg) & 0xf return aval ^ mask _st_alaw2linear16 = [ -5504, -5248, -6016, -5760, -4480, -4224, -4992, -4736, -7552, -7296, -8064, -7808, -6528, -6272, -7040, -6784, -2752, -2624, -3008, -2880, -2240, -2112, -2496, -2368, -3776, -3648, -4032, -3904, -3264, -3136, -3520, -3392, -22016, -20992, -24064, -23040, -17920, -16896, -19968, -18944, -30208, -29184, -32256, -31232, -26112, -25088, -28160, -27136, -11008, -10496, -12032, -11520, -8960, -8448, -9984, -9472, -15104, -14592, -16128, -15616, -13056, -12544, -14080, -13568, -344, -328, -376, -360, -280, -264, -312, -296, -472, -456, -504, -488, -408, -392, -440, -424, -88, -72, -120, -104, -24, -8, -56, -40, -216, -200, -248, -232, -152, -136, -184, -168, -1376, -1312, -1504, -1440, -1120, -1056, -1248, -1184, -1888, -1824, -2016, -1952, -1632, -1568, -1760, -1696, -688, -656, -752, -720, -560, -528, -624, -592, -944, -912, -1008, -976, -816, -784, -880, -848, 5504, 5248, 6016, 5760, 4480, 4224, 4992, 4736, 7552, 7296, 8064, 7808, 6528, 6272, 7040, 6784, 2752, 2624, 3008, 2880, 2240, 2112, 2496, 2368, 3776, 3648, 4032, 3904, 3264, 3136, 3520, 3392, 22016, 20992, 24064, 23040, 17920, 16896, 19968, 18944, 30208, 29184, 32256, 31232, 26112, 25088, 28160, 27136, 11008, 10496, 12032, 11520, 8960, 8448, 9984, 9472, 15104, 14592, 16128, 15616, 13056, 12544, 14080, 13568, 344, 328, 376, 360, 280, 264, 312, 296, 472, 456, 504, 488, 408, 392, 440, 424, 88, 72, 120, 104, 24, 8, 56, 40, 216, 200, 248, 232, 152, 136, 184, 168, 1376, 1312, 1504, 1440, 1120, 1056, 1248, 1184, 1888, 1824, 2016, 1952, 1632, 1568, 1760, 1696, 688, 656, 752, 720, 560, 528, 624, 592, 944, 912, 1008, 976, 816, 784, 880, 848, ] def lin2alaw(fragment, width): """Convert samples in the audio fragment to a-LAW encoding.""" fragment = _assamples(fragment, width) output = bytearray(len(fragment)) for i, val in enumerate(fragment): output[i] = _st_linear2alaw(_to16(val, width)) return bytes(output) def alaw2lin(fragment, width): """Convert sound fragments in a-LAW encoding to linearly encoded sound fragments.""" if isinstance(fragment, str): fragment = fragment.encode() output = _newsamples(len(fragment), width) for i, cval in enumerate(fragment): output[i] = _from16(_st_alaw2linear16[cval], width) return output.tobytes() # Intel ADPCM step variation table _indexTable = [ -1, -1, -1, -1, 2, 4, 6, 8, -1, -1, -1, -1, 2, 4, 6, 8, ] _stepsizeTable = [ 7, 8, 9, 10, 11, 12, 13, 14, 16, 17, 19, 21, 23, 25, 28, 31, 34, 37, 41, 45, 50, 55, 60, 66, 73, 80, 88, 97, 107, 118, 130, 143, 157, 173, 190, 209, 230, 253, 279, 307, 337, 371, 408, 449, 494, 544, 598, 658, 724, 796, 876, 963, 1060, 1166, 1282, 1411, 1552, 1707, 1878, 2066, 2272, 2499, 2749, 3024, 3327, 3660, 4026, 4428, 4871, 5358, 5894, 6484, 7132, 7845, 8630, 9493, 10442, 11487, 12635, 13899, 15289, 16818, 18500, 20350, 22385, 24623, 27086, 29794, 32767 ] def lin2adpcm(fragment, width, state): """Convert samples to 4 bit Intel/DVI ADPCM encoding.""" fragment = _assamples(fragment, width) output = bytearray(len(fragment) // 2) if state is None: state = 0, 0 valpred, index = state outputbuffer = None step = _stepsizeTable[index] for i, val in enumerate(fragment): val = _to16(val, width) # Step 1 - compute difference with previous value diff = val - valpred sign = 8 if diff < 0 else 0 diff = abs(diff) # Step 2 - Divide and clamp # Note: # This code *approximately* computes: # delta = diff*4/step; # vpdiff = (delta+0.5)*step/4; # but in shift step bits are dropped. The net result of this # is that even if you have fast mul/div hardware you cannot # put it to good use since the fixup would be too expensive. delta = 0 vpdiff = step >> 3 if diff >= step: delta = 4 diff -= step vpdiff += step step >>= 1 if diff >= step: delta |= 2 diff -= step vpdiff += step step >>= 1 if diff >= step: delta |= 1 vpdiff += step # Step 3 - Update previous value if sign: valpred -= vpdiff else: valpred += vpdiff # Step 4 - Clamp previous value to 16 bits valpred = _bounds[2](valpred) # Step 5 - Assemble value, update index and step values delta |= sign index += _indexTable[delta] index = _bound(index, 0, 88) step = _stepsizeTable[index] # Step 6 - Output value if outputbuffer is None: outputbuffer = (delta << 4) & 0xf0 else: output[i >> 1] = (delta & 0x0f) | outputbuffer outputbuffer = None return bytes(output), (valpred, index) def adpcm2lin(fragment, width, state): """Decode an Intel/DVI ADPCM coded fragment to a linear fragment.""" if isinstance(fragment, str): fragment = fragment.encode() if state is None: state = 0, 0 valpred, index = state output = _newsamples(len(fragment) * 2, width) step = _stepsizeTable[index] for i in range(len(output)): # Step 1 - get the delta value and compute next index if i & 1: delta = inputbuffer & 0xf else: inputbuffer = fragment[i >> 1] delta = (inputbuffer >> 4) & 0xf # Step 2 - Find new index value (for later) index += _indexTable[delta] index = _bound(index, 0, 88) # Step 3 - Separate sign and magnitude sign = delta & 8 delta &= 7 # Step 4 - Compute difference and new predicted value # Computes 'vpdiff = (delta+0.5)*step/4', but see comment # in adpcm_coder. vpdiff = step >> 3 if delta & 4: vpdiff += step if delta & 2: vpdiff += step >> 1 if delta & 1: vpdiff += step >> 2 if sign: valpred -= vpdiff else: valpred += vpdiff # Step 5 - clamp output value valpred = _bounds[2](valpred) # Step 6 - Update step value step = _stepsizeTable[index] # Step 6 - Output value output[i] = _from16(valpred, width) return output.tobytes(), (valpred, index) From report at bugs.python.org Thu Dec 20 09:17:28 2012 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 20 Dec 2012 08:17:28 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1355991448.55.0.00600821549303.issue16718@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: I don't know, you should probably ask there. One blocker is to make builtin and extension modules participate in GC, search "pep3121" to see the many intermediate issues. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 09:17:45 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Thu, 20 Dec 2012 08:17:45 +0000 Subject: [issue16734] Delay interpreter startup phase until script is read In-Reply-To: <1355982926.73.0.55538190201.issue16734@psf.upfronthosting.co.za> Message-ID: <1355991465.73.0.218508181535.issue16734@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: I may be missing something, but nothing's wrong here. When you start a subprocess, the child process keeps running (in background). If you want to wait for its termination, just use p.wait() or p.communicate(). ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 09:30:11 2012 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Thu, 20 Dec 2012 08:30:11 +0000 Subject: [issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip Message-ID: <1355992211.63.0.283559299274.issue16735@psf.upfronthosting.co.za> New submission from Bohuslav "Slavek" Kabrda: When I use zipfile.is_zipfile on file fastjar (sample uploaded at [1]) from libgcj, I get True, while I should get False (reproducible with fastjar from libgcj 4.7.2 on Fedora 18). This is caused by stringEndArchive string being present in the file, but the file still isn't zip. Would it be possible to add some further checks to eliminate this kind of errors? I'd like to submit a patch but I'm not sure what to check for, maybe some other constants mentioned in the ZIP format definition? Thanks a lot. [1] http://bkabrda.fedorapeople.org/fastjar ---------- components: Library (Lib) messages: 177804 nosy: bkabrda priority: normal severity: normal status: open title: zipfile.is_zipfile wrongly recognizes non-zip as zip versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 09:37:53 2012 From: report at bugs.python.org (Trent Nelson) Date: Thu, 20 Dec 2012 08:37:53 +0000 Subject: [issue16733] Solaris ctypes_test failures In-Reply-To: <1355959487.2.0.457059136813.issue16733@psf.upfronthosting.co.za> Message-ID: <1355992673.6.0.452572941674.issue16733@psf.upfronthosting.co.za> Changes by Trent Nelson : ---------- nosy: +trent _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 09:54:32 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 08:54:32 +0000 Subject: [issue16734] Delay interpreter startup phase until script is read In-Reply-To: <1355982926.73.0.55538190201.issue16734@psf.upfronthosting.co.za> Message-ID: <1355993672.48.0.816030208943.issue16734@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You should use some kind of inter-process communication to synchronize your processes. In particular, for get rid of a temporary script file you can either send script via pipe: p = Popen([sys.executable], stdin=PIPE) p.stdin.write(longscript) or use it as a program argument: p = Popen([sys.executable, '-c', longscript]) ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 09:59:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 08:59:51 +0000 Subject: [issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip In-Reply-To: <1355992211.63.0.283559299274.issue16735@psf.upfronthosting.co.za> Message-ID: <1355993991.92.0.612592848165.issue16735@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: You can upload a sample file on bug tracker. Actually jar files are just zip files (with some limitation and special files). zipfile.is_zipfile should return True on a jar file. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 10:01:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 09:01:41 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1355994101.35.0.337640200922.issue14373@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 10:04:35 2012 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Thu, 20 Dec 2012 09:04:35 +0000 Subject: [issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip In-Reply-To: <1355992211.63.0.283559299274.issue16735@psf.upfronthosting.co.za> Message-ID: <1355994275.79.0.869745823434.issue16735@psf.upfronthosting.co.za> Bohuslav "Slavek" Kabrda added the comment: Oh, sorry, I will upload it on the bugtracker next time. I know that jar files are zip files, but this is not a jar (although it has "jar" in file). This is a binary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 10:18:06 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 20 Dec 2012 09:18:06 +0000 Subject: [issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS In-Reply-To: <1327519681.79.0.252690630069.issue13863@psf.upfronthosting.co.za> Message-ID: <1355995086.25.0.885850124771.issue13863@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 11:04:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 10:04:57 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1355997897.44.0.916522180625.issue14373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thanks, Alexey. However most of my comments were not considered. I have repeated them and added some new comments. ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 11:06:29 2012 From: report at bugs.python.org (Encolpe DEGOUTE) Date: Thu, 20 Dec 2012 10:06:29 +0000 Subject: [issue12876] Make Test Error : ImportError: No module named _sha256 In-Reply-To: <1314873741.02.0.732192179897.issue12876@psf.upfronthosting.co.za> Message-ID: <1355997989.13.0.319711199164.issue12876@psf.upfronthosting.co.za> Encolpe DEGOUTE added the comment: I my experience this error comes when SASL headers are missing during the build. Under debian or ubuntu it's the package named libsasl2-dev. ---------- nosy: +encolpe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 12:42:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 11:42:51 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1356003771.08.0.873187979883.issue16694@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, I forgot push a "Publish All My Drafts" button. Please consider other my comments to first patch. I also have added new comments about length_hint(). Your implementation of attrgetter() looks good. One possible disadvantage of pure functional approach is that attrgetter() will be not a class. Unlikely someone subclass attrgetter, but it can be used in an isinstance() check. You solve this issue. The same approach can be applied to itemgetter(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 12:57:36 2012 From: report at bugs.python.org (Ned Batchelder) Date: Thu, 20 Dec 2012 11:57:36 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1356004656.29.0.0703327653959.issue14373@psf.upfronthosting.co.za> Changes by Ned Batchelder : ---------- nosy: -nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 13:12:44 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 20 Dec 2012 12:12:44 +0000 Subject: [issue16736] select.poll() converts long to int without checking for overflow Message-ID: <1356005564.78.0.448488855242.issue16736@psf.upfronthosting.co.za> New submission from Richard Oudkerk: Relevant code: int timeout = 0, poll_result, i, j; ... tout = PyNumber_Long(tout); if (!tout) return NULL; timeout = PyLong_AsLong(tout); <-- implicit cast to int ---------- messages: 177811 nosy: sbt priority: normal severity: normal status: open title: select.poll() converts long to int without checking for overflow type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 13:57:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 12:57:02 +0000 Subject: [issue13153] IDLE crashes when pasting non-BMP unicode char on Py3 In-Reply-To: <1318363292.9.0.682519731008.issue13153@psf.upfronthosting.co.za> Message-ID: <1356008222.68.0.914686538381.issue13153@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: A simplest solution is to raise a TclError instead of ValueError for non-BMP characters. This should not break any existing code, because a user code should be ready to catch a TclError in any case. Here is a patch. A more complicated solution is to add ValueError to any catch of TclError. And this will fix only IDLE, user programs should fix self every. Also we can silently encode non-BMP characters for Tcl with UTF-16 (and decode a result back). This can cause some subtle errors with shifted indices however. ---------- keywords: +patch nosy: +serhiy.storchaka versions: +Python 2.7 Added file: http://bugs.python.org/file28376/tkinter_nobmp_error.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:01:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 13:01:52 +0000 Subject: [issue16736] select.poll() converts long to int without checking for overflow In-Reply-To: <1356005564.78.0.448488855242.issue16736@psf.upfronthosting.co.za> Message-ID: <1356008512.59.0.988755190155.issue16736@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is a part of issue15989. ---------- nosy: +serhiy.storchaka resolution: -> duplicate superseder: -> Possible integer overflow of PyLong_AsLong() results _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:37:02 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 20 Dec 2012 13:37:02 +0000 Subject: [issue16737] Different behaviours in script run directly and via runpy.run_module Message-ID: <1356010622.32.0.479096681415.issue16737@psf.upfronthosting.co.za> New submission from Vinay Sajip: If a script is run directly, the value of __file__ in it is relative to the current directory. If run via runpy.run_module, the value of __file__ is an absolute path. This is a problem in certain scenarios - e.g. if the script is a distribution's setup.py, a lot of distributions (rightly or wrongly) assume that the __file__ in setup.py will be relative, and mess up if it's absolute. Example: # script.py print(__file__, __name__) #runscript.py import runpy runpy.run_module('script', run_name='__main__') Example output (2.7): $ python script.py ('script.py', '__main__') $ python runscript.py ('/home/vinay/projects/scratch/script.py', '__main__') Example output (3.2): $ python3.2 script.py script.py __main__ $ python3.2 runscript.py /home/vinay/projects/scratch/script.py __main__ ---------- components: Library (Lib) messages: 177814 nosy: ncoghlan, vinay.sajip priority: normal severity: normal status: open title: Different behaviours in script run directly and via runpy.run_module type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:38:03 2012 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 20 Dec 2012 13:38:03 +0000 Subject: [issue6514] "python -m unittest " does not run any tests In-Reply-To: <1247928686.78.0.475658449787.issue6514@psf.upfronthosting.co.za> Message-ID: <1356010683.49.0.348241664773.issue6514@psf.upfronthosting.co.za> anatoly techtonik added the comment: The documentation should be fixed then: http://docs.python.org/2/library/unittest#command-line-interface ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:41:41 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Thu, 20 Dec 2012 13:41:41 +0000 Subject: [issue879399] socket line buffering Message-ID: <1356010901.05.0.863432816059.issue879399@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: New patch, with unittest. ---------- Added file: http://bugs.python.org/file28377/_fileobject.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:49:38 2012 From: report at bugs.python.org (Ivan Bykov) Date: Thu, 20 Dec 2012 13:49:38 +0000 Subject: [issue16738] Comparisons difference: bytes with bytes, str with str Message-ID: <1356011378.26.0.0858380724322.issue16738@psf.upfronthosting.co.za> New submission from Ivan Bykov: Python 3.3.0 (v3.3.0:bd8afb90ebf2, Sep 29 2012, 10:55:48) [MSC v.1600 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> b = b't' >>> b[0] in [b] False >>> u = 't' >>> u[0] in [u] True ---------- messages: 177817 nosy: ivb priority: normal severity: normal status: open title: Comparisons difference: bytes with bytes, str with str type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:53:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 13:53:36 +0000 Subject: [issue16737] Different behaviours in script run directly and via runpy.run_module In-Reply-To: <1356010622.32.0.479096681415.issue16737@psf.upfronthosting.co.za> Message-ID: <1356011616.91.0.145730894267.issue16737@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: $ ./python -m script /home/serhiy/py/cpython/script.py __main__ $ ./python -c "import runpy; runpy.run_path('script.py', run_name='__main__')" script.py __main__ This looks consistent. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:55:34 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 20 Dec 2012 13:55:34 +0000 Subject: [issue16738] Comparisons difference: bytes with bytes, str with str In-Reply-To: <1356011378.26.0.0858380724322.issue16738@psf.upfronthosting.co.za> Message-ID: <1356011734.95.0.0818645399765.issue16738@psf.upfronthosting.co.za> Christian Heimes added the comment: That's the correct behaviour. Iteration and item access of bytes don't return bytes but a small number, e.g. b[0] returns 116 and not b't'. >>> b = b't' >>> b[0] in [b] False >>> b[0] 116 >>> ord(b) 116 But: >>> b in [b] True ---------- nosy: +christian.heimes resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:58:41 2012 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 20 Dec 2012 13:58:41 +0000 Subject: [issue2721] unittest.makeSuite undocumented and "obsolete" - but what to use instead? In-Reply-To: <1209507990.95.0.785874849779.issue2721@psf.upfronthosting.co.za> Message-ID: <1356011921.52.0.850156281782.issue2721@psf.upfronthosting.co.za> anatoly techtonik added the comment: What about? suite = unittest.makeSuite(SConfTestCase, 'test_') ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 14:59:07 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 20 Dec 2012 13:59:07 +0000 Subject: [issue16734] Delay interpreter startup phase until script is read In-Reply-To: <1355982926.73.0.55538190201.issue16734@psf.upfronthosting.co.za> Message-ID: <1356011947.55.0.309567606857.issue16734@psf.upfronthosting.co.za> Christian Heimes added the comment: That's the way fork() and the subprocess module work. Please follow Serhiy's advice. ---------- nosy: +christian.heimes resolution: -> rejected stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:05:28 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 20 Dec 2012 14:05:28 +0000 Subject: [issue16692] Support TLS 1.1 and TLS 1.2 In-Reply-To: <1355592665.89.0.539973629387.issue16692@psf.upfronthosting.co.za> Message-ID: <1356012328.33.0.242787540607.issue16692@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- components: +Extension Modules nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:05:39 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 20 Dec 2012 14:05:39 +0000 Subject: [issue16736] select.poll() converts long to int without checking for overflow In-Reply-To: <1356005564.78.0.448488855242.issue16736@psf.upfronthosting.co.za> Message-ID: <1356012339.05.0.550417426844.issue16736@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Thanks. I will close. ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:11:36 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 20 Dec 2012 14:11:36 +0000 Subject: [issue16727] Windows installers for 2.7.3 don't install python27.dll correctly In-Reply-To: <1355916649.59.0.0223605375699.issue16727@psf.upfronthosting.co.za> Message-ID: <1356012696.71.0.220323821498.issue16727@psf.upfronthosting.co.za> Christian Heimes added the comment: On my Windows box the 32bit python27.dll is in C:\Windows\System32\ and the 64bit DLL is in c:\Windows\SysWOW64\. Can you recall the installation order, did you install the 32 or 64bit version first? Did you choose "install for all users" for both installations? Which version of Windows are you running (release and service pack)? For some applications like COM the DLL must be installed the system directory. ---------- nosy: +christian.heimes, loewis type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:13:06 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 20 Dec 2012 14:13:06 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1356012786.58.0.117235115753.issue16597@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:18:01 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 20 Dec 2012 14:18:01 +0000 Subject: [issue16737] Different behaviours in script run directly and via runpy.run_module In-Reply-To: <1356010622.32.0.479096681415.issue16737@psf.upfronthosting.co.za> Message-ID: <1356013081.23.0.884077461212.issue16737@psf.upfronthosting.co.za> Vinay Sajip added the comment: I'd use runpy.run_path if I could, but it's not available on Python 2.6 - that's why I'm using run_module. A lot of setup.py files out there use __file__ to compute additional package names, package data locations etc. - this can lead to bogus package names computed blindly from paths assumed to be relative, when the setup.py file is run using run_module. I'm not sure what you mean when you say "looks consistent" - ISTM there is a difference, i.e. inconsistency, between a direct run and a run via run_module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:27:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 14:27:02 +0000 Subject: [issue16737] Different behaviours in script run directly and via runpy.run_module In-Reply-To: <1356010622.32.0.479096681415.issue16737@psf.upfronthosting.co.za> Message-ID: <1356013622.16.0.764942432174.issue16737@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm just pointing that run_module() and run_path() differs in the same way as `python -m` and `python`. If you want to change behavior of run_module(), then you should to change behavior of `python -m` too. And I'm not sure that this change will not break a lot of third-part code. Try to backport run_path() to 2.6 if you need it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:43:17 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 20 Dec 2012 14:43:17 +0000 Subject: [issue16727] Windows installers for 2.7.3 don't install python27.dll correctly In-Reply-To: <1355916649.59.0.0223605375699.issue16727@psf.upfronthosting.co.za> Message-ID: <1356014597.13.0.802622536012.issue16727@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Are you sure that the file in SysWOW64 is a 64-bit binary? On Win64, system32 contains the 64-bit DLLs, and SysWOW64 contains the 32-bit DLLs: http://en.wikipedia.org/wiki/WoW64#Registry_and_file_system Indeed, on my system, it's exactly reversed to what Christian reports. I'm closing this report as invalid: I can't see a problem in Keith original message. *Of course* the x86 installer won't install to system32 on a Win64 system; this is correct behavior. Of course, the 64-bit installer should install to system32, this is what it should do. It should *not* install to SysWOW64. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 15:52:39 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 20 Dec 2012 14:52:39 +0000 Subject: [issue16727] Windows installers for 2.7.3 don't install python27.dll correctly In-Reply-To: <1355916649.59.0.0223605375699.issue16727@psf.upfronthosting.co.za> Message-ID: <1356015159.12.0.0781533894613.issue16727@psf.upfronthosting.co.za> Christian Heimes added the comment: No, I'm not sure. I peaked into python27.dll in system32 and saw that it refers to kernel32.dll. I guess I made the wrong conclusion ... You have to admit that the naming convention is a tiny bit confusion. ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:23:32 2012 From: report at bugs.python.org (Keith Sabine) Date: Thu, 20 Dec 2012 15:23:32 +0000 Subject: [issue16727] Windows installers for 2.7.3 don't install python27.dll correctly In-Reply-To: <1355916649.59.0.0223605375699.issue16727@psf.upfronthosting.co.za> Message-ID: <1356017012.97.0.782857942794.issue16727@psf.upfronthosting.co.za> Keith Sabine added the comment: Well all I can say is having installed BOTH the 32 and 64 bit versions, I found I only had the 32 bit dll installed. I can raise a second issue for the request to put a copy of the dll in the DLL directory, so that it's easier to locate the correct dll if needed to ship with an embedded python application. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:29:12 2012 From: report at bugs.python.org (Ashish Nitin Patil) Date: Thu, 20 Dec 2012 15:29:12 +0000 Subject: [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <1356017352.33.0.670628749451.issue14901@psf.upfronthosting.co.za> Ashish Nitin Patil added the comment: Always happy to contribute! My first! Looking forward to getting accustomed to it & doing my part for python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 16:30:30 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 20 Dec 2012 15:30:30 +0000 Subject: [issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip In-Reply-To: <1355992211.63.0.283559299274.issue16735@psf.upfronthosting.co.za> Message-ID: <1356017430.35.0.840037354757.issue16735@psf.upfronthosting.co.za> R. David Murray added the comment: I'm imagining that it creates jar files, and thus has the signature as a constant. The is_zipfile check is much more complicated than just looking for that string, though, so what is going on must be even more perverse than that. It would be interesting to know if other zip tools have an issue with it, although be careful when comparing, since is_zipfile only does the initial check, whereas running another unzip tool against it may produce an error, but only later in the process (after the zip tool has decided it is a zip file and tries to process it). ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 17:08:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 16:08:08 +0000 Subject: [issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip In-Reply-To: <1355992211.63.0.283559299274.issue16735@psf.upfronthosting.co.za> Message-ID: <1356019688.86.0.931163946626.issue16735@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: $ zipinfo fastjar Archive: fastjar Zip file size: 47664 bytes, number of entries: 31883 [fastjar]: Zipfile is disk 33807 of a multi-disk archive, and this is not the disk on which the central zipfile directory begins (disk 190). I.e. zipinfo detects fastjar as a zip file, but fails to read a contents (`unzip -l fastjar` and `python -m zipinfo -l fastjar` fail too). The file contains an obviously incorrect values in the control structures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 17:15:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 16:15:30 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1356020130.08.0.988326462101.issue16597@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There are a lot of people in the nosy list already. Does anyone have enough experience with exception machinery to review the patch (especially C part)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 17:16:21 2012 From: report at bugs.python.org (Leo Arias) Date: Thu, 20 Dec 2012 16:16:21 +0000 Subject: [issue16739] texttestresult should decorate the stream with _WritelnDecorator Message-ID: <1356020181.84.0.076442170736.issue16739@psf.upfronthosting.co.za> New submission from Leo Arias: Using the unittest's texttestresult with stdout and verbosity 2 will fail because that stream doesn't have a writeln method. File "/usr/lib/python2.7/unittest/suite.py", line 108, in run test(result) File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__ return self.run(*args, **kwds) File "/usr/lib/python2.7/unittest/suite.py", line 108, in run test(result) File "/usr/lib/python2.7/unittest/suite.py", line 70, in __call__ return self.run(*args, **kwds) File "/usr/lib/python2.7/unittest/suite.py", line 108, in run test(result) File "/usr/lib/python2.7/dist-packages/unittest2/case.py", line 398, in __call__ return self.run(*args, **kwds) File "/usr/lib/python2.7/dist-packages/unittest2/case.py", line 375, in run result.addSuccess(self) File "/home/elopio/canonical/ubuntuone/photos-acceptance-2/lib/testtools/testresult/real.py", line 253, in addSuccess return self._dispatch('addSuccess', test, details=details) File "/home/elopio/canonical/ubuntuone/photos-acceptance-2/lib/testtools/testresult/real.py", line 231, in _dispatch for result in self._results) File "/home/elopio/canonical/ubuntuone/photos-acceptance-2/lib/testtools/testresult/real.py", line 231, in for result in self._results) File "/home/elopio/canonical/ubuntuone/photos-acceptance-2/lib/testtools/testresult/real.py", line 555, in addSuccess return self.decorated.addSuccess(test) File "/usr/lib/python2.7/unittest/runner.py", line 60, in addSuccess self.stream.writeln("ok") AttributeError: 'file' object has no attribute 'writeln' It would be nice if the stream is decorated with _WritelnDecorator, as it is done on TextTestRunner. ---------- components: Library (Lib) messages: 177833 nosy: elopio priority: normal severity: normal status: open title: texttestresult should decorate the stream with _WritelnDecorator type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 17:21:52 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 20 Dec 2012 16:21:52 +0000 Subject: [issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip In-Reply-To: <1355992211.63.0.283559299274.issue16735@psf.upfronthosting.co.za> Message-ID: <1356020512.56.0.623451947884.issue16735@psf.upfronthosting.co.za> R. David Murray added the comment: So, it looks like this is not a bug in Python, just a weirdness of fastjar. Or, if you prefer, a bug in fastjar (they could assemble the signature instead of coding it as a single constant). ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 17:25:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 16:25:38 +0000 Subject: [issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip In-Reply-To: <1355992211.63.0.283559299274.issue16735@psf.upfronthosting.co.za> Message-ID: <1356020738.19.0.230245006422.issue16735@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It's rather a bug in the ZIP format design. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 17:51:53 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 20 Dec 2012 16:51:53 +0000 Subject: [issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip In-Reply-To: <1355992211.63.0.283559299274.issue16735@psf.upfronthosting.co.za> Message-ID: <1356022313.38.0.968409243964.issue16735@psf.upfronthosting.co.za> R. David Murray added the comment: Well, yes, but that ship has already sunk :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 18:00:45 2012 From: report at bugs.python.org (Matthias Klose) Date: Thu, 20 Dec 2012 17:00:45 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1356022845.28.0.208134765796.issue16480@psf.upfronthosting.co.za> Matthias Klose added the comment: having the posix_prefix as the default in Debian is an oversight on my side. it always should be posix_local. I'll fix this at least for 3.3 in current development releases. The rationale for this is that distutils based installs install by default into the path which is used by the distributor and get in conflict with the packages distributed by Debian/Ubuntu. At one of the language summits in Chicago I asked that the default installation target should be changed to the user dir, but this idea was rejected. Therefore you do have two site directories, called /usr/lib/pythonX.Y/dist-packages /usr/local/lib/pythonX.Y/dist-packages The renaming from site to dist was done to not conflict with a default python installation (without any configure parameters). The default install should go to /usr/local, packagers for Debian usually should use the Debian local distutils option --install-layout=deb. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 18:37:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 17:37:53 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1356025073.1.0.313207876971.issue16597@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Patch updated with Benjamin's nit. ---------- Added file: http://bugs.python.org/file28378/bufferedio_finally_close_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 18:45:23 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 20 Dec 2012 17:45:23 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1356025523.54.0.355004644759.issue16480@psf.upfronthosting.co.za> Vinay Sajip added the comment: Even when "posix_local" becomes the default scheme on Debian python builds, it's not clear whether the suggested fix is the correct one to make, unless "posix_local" is added to sysconfig's list of _INSTALL_SCHEMES. Matthias comment makes sense when considering system-wide installs, but when installing into a venv, these considerations don't seem to apply. Technically the change is not hard to do, but I'm a little uncomfortable whether it's the right thing to do, as it's only for a specific Linux distribution, and it seems a bit of a kludge. Although the ideal situation is for software not to care whether it's running in a venv, I'm not sure whether installers like pip/distribute need to be completely ignorant of whether they're installing in a venv. For example, the posix_local scheme says that the site-packages directory is to be called 'dist-packages', which seems unnecessary in a venv since its purpose is really for system-wide installations. Yet, virtualenv names the directory 'site-packages', so it appears not to be following the scheme faithfully as far as that part of it is concerned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 18:55:28 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Dec 2012 17:55:28 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <3YS0xW5m5GzRVW@mail.python.org> Roundup Robot added the comment: New changeset b0602a1eb3f6 by Benjamin Peterson in branch '3.3': call close on the underlying stream even if flush raises (closes #16597) http://hg.python.org/cpython/rev/b0602a1eb3f6 New changeset 142012e47c3b by Benjamin Peterson in branch 'default': merge 3.3 (#16597) http://hg.python.org/cpython/rev/142012e47c3b ---------- nosy: +python-dev resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:13:00 2012 From: report at bugs.python.org (Leo Arias) Date: Thu, 20 Dec 2012 18:13:00 +0000 Subject: [issue16739] texttestresult should decorate the stream with _WritelnDecorator In-Reply-To: <1356020181.84.0.076442170736.issue16739@psf.upfronthosting.co.za> Message-ID: <1356027180.2.0.223951967117.issue16739@psf.upfronthosting.co.za> Leo Arias added the comment: A test with a fix. I'm not sure if this is the way to go, because the stream in TextTestRunner will be decorated twice. ---------- keywords: +patch Added file: http://bugs.python.org/file28379/fix-16739-texttestresult_writeln.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:14:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 18:14:47 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1356027287.55.0.281894552214.issue16597@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch for 3.2. ---------- Added file: http://bugs.python.org/file28380/bufferedio_finally_close-3.2_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:18:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 18:18:53 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1356027533.94.0.913582564454.issue16597@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch for 2.7. ---------- Added file: http://bugs.python.org/file28381/bufferedio_finally_close-2.7_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:20:01 2012 From: report at bugs.python.org (Berker Peksag) Date: Thu, 20 Dec 2012 18:20:01 +0000 Subject: [issue6514] "python -m unittest " does not run any tests In-Reply-To: <1247928686.78.0.475658449787.issue6514@psf.upfronthosting.co.za> Message-ID: <1356027601.47.0.771132534722.issue6514@psf.upfronthosting.co.za> Berker Peksag added the comment: > The documentation should be fixed then: > http://docs.python.org/2/library/unittest#command-line-interface The documentation already covers that "python -m unittest test_module" usage works only in 2.7+. "Changed in version 2.7: In earlier versions it was only possible to run individual test methods and not modules or classes." ---------- nosy: +berker.peksag _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:23:07 2012 From: report at bugs.python.org (Michael Foord) Date: Thu, 20 Dec 2012 18:23:07 +0000 Subject: [issue16739] texttestresult should decorate the stream with _WritelnDecorator In-Reply-To: <1356020181.84.0.076442170736.issue16739@psf.upfronthosting.co.za> Message-ID: <1356027787.26.0.371575402155.issue16739@psf.upfronthosting.co.za> Michael Foord added the comment: TextTestResult could decorate a raw stream (and not redecorate an already decorated one). ---------- assignee: -> michael.foord nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:23:57 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 20 Dec 2012 18:23:57 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1356027837.05.0.58964780191.issue16597@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think we can leave 3.2 alone. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:24:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Dec 2012 18:24:22 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <3YS1Zt1cWyzNW4@mail.python.org> Roundup Robot added the comment: New changeset b6ff6ac1f049 by Benjamin Peterson in branch '2.7': call close on the underlying stream even if flush raises (#16597) http://hg.python.org/cpython/rev/b6ff6ac1f049 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:26:23 2012 From: report at bugs.python.org (Barry A. Warsaw) Date: Thu, 20 Dec 2012 18:26:23 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1356027983.97.0.387836177712.issue16480@psf.upfronthosting.co.za> Changes by Barry A. Warsaw : ---------- nosy: +barry _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:26:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 18:26:55 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1356028015.24.0.482179238806.issue16597@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What is the peculiarity of 3.2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:31:10 2012 From: report at bugs.python.org (Matthias Klose) Date: Thu, 20 Dec 2012 18:31:10 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1356028270.99.0.808977142655.issue16480@psf.upfronthosting.co.za> Matthias Klose added the comment: virtualenv for 2.7, when used with a Debian/Ubuntu system installation, should only see site-packages. Same thing should be done for venv for 3.3 and up. Even if needed patches will not go upstream, they are welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:36:18 2012 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 20 Dec 2012 18:36:18 +0000 Subject: [issue6514] "python -m unittest " does not run any tests In-Reply-To: <1247928686.78.0.475658449787.issue6514@psf.upfronthosting.co.za> Message-ID: <1356028578.85.0.963359272946.issue6514@psf.upfronthosting.co.za> anatoly techtonik added the comment: > The documentation already covers that "python -m unittest test_module" > usage works only in 2.7+. > > "Changed in version 2.7: In earlier versions it was only possible to > run individual test methods and not modules or classes." But the command line help says otherwise: $ python -m unittest -h Usage: unittest.py [options] [test] [...] Options: -h, --help Show this message -v, --verbose Verbose output -q, --quiet Minimal output Examples: unittest.py - run default set of tests unittest.py MyTestSuite - run suite 'MyTestSuite' unittest.py MyTestCase.testSomething - run MyTestCase.testSomething unittest.py MyTestCase - run all 'test*' test methods in MyTestCase $ python --version Python 2.6.6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:52:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 18:52:06 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1356029526.62.0.163830492425.issue16597@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: About Misc/NEWS. Actually fixed close() methods of: Python implementation of BaseIO (C implementation already do right things), C implemettation of Buffered(Reader|Writer|Random) (Python implementation already do right things) and both implementations of TextIOWrapper. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 19:56:07 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Dec 2012 18:56:07 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <3YS2HV44tyzMh2@mail.python.org> Roundup Robot added the comment: New changeset 54372f38932e by Benjamin Peterson in branch '3.3': improve message (#16597) http://hg.python.org/cpython/rev/54372f38932e New changeset faaac6ceffff by Benjamin Peterson in branch 'default': merge 3.3 (#16597) http://hg.python.org/cpython/rev/faaac6ceffff New changeset a057d9985fb8 by Benjamin Peterson in branch '2.7': add news note (#16597) http://hg.python.org/cpython/rev/a057d9985fb8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 20:10:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 19:10:31 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1354490693.79.0.337514443024.issue16597@psf.upfronthosting.co.za> Message-ID: <1356030631.91.0.257875599141.issue16597@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you for all commits, Benjamin. What is the peculiarity of 3.2? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 20:11:20 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 20 Dec 2012 19:11:20 +0000 Subject: [issue16597] file descriptor not being closed with context manager on IOError when device is full In-Reply-To: <1356030631.91.0.257875599141.issue16597@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: 2012/12/20 Serhiy Storchaka : > > Serhiy Storchaka added the comment: > > Thank you for all commits, Benjamin. > > What is the peculiarity of 3.2? Applying bugfixes is optional. It should move to security-fix mode soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 20:11:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 20 Dec 2012 19:11:22 +0000 Subject: [issue8853] getaddrinfo should accept port of type long In-Reply-To: <1275155293.8.0.373298822378.issue8853@psf.upfronthosting.co.za> Message-ID: <3YS2d55j7zzQwB@mail.python.org> Roundup Robot added the comment: New changeset 39803c20c9bf by Petri Lehtinen in branch '2.7': #8853: Allow port to be of type long for socket.getaddrinfo() http://hg.python.org/cpython/rev/39803c20c9bf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 20:12:14 2012 From: report at bugs.python.org (Petri Lehtinen) Date: Thu, 20 Dec 2012 19:12:14 +0000 Subject: [issue8853] getaddrinfo should accept port of type long In-Reply-To: <1275155293.8.0.373298822378.issue8853@psf.upfronthosting.co.za> Message-ID: <1356030734.43.0.950447219305.issue8853@psf.upfronthosting.co.za> Petri Lehtinen added the comment: Fixed. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 20:48:21 2012 From: report at bugs.python.org (Jeff Knupp) Date: Thu, 20 Dec 2012 19:48:21 +0000 Subject: [issue16687] Fix small gramatical error and add reference link in hashlib documentation In-Reply-To: <1355518554.59.0.0791078366076.issue16687@psf.upfronthosting.co.za> Message-ID: <1356032901.85.0.757723935774.issue16687@psf.upfronthosting.co.za> Jeff Knupp added the comment: Previous patch had unintentional local changes. Uploaded correct patch. ---------- Added file: http://bugs.python.org/file28382/new_patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 20:48:45 2012 From: report at bugs.python.org (Jeff Knupp) Date: Thu, 20 Dec 2012 19:48:45 +0000 Subject: [issue16687] Fix small gramatical error and add reference link in hashlib documentation In-Reply-To: <1355518554.59.0.0791078366076.issue16687@psf.upfronthosting.co.za> Message-ID: <1356032925.76.0.245640737436.issue16687@psf.upfronthosting.co.za> Changes by Jeff Knupp : Removed file: http://bugs.python.org/file28318/patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 21:00:25 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 20 Dec 2012 20:00:25 +0000 Subject: [issue16718] Mysterious atexit fail In-Reply-To: <1355862940.68.0.167478798513.issue16718@psf.upfronthosting.co.za> Message-ID: <1356033625.73.0.153096874833.issue16718@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Perhaps the simplest thing would be to stop doing anything special when a module is garbage collected: the garbage collector can take care of any orphaned ref-cycles involving the module dict. Then at shutdown the remaining modules in sys.modules could have their dicts "purged" in the old way. This would be orthogonal to issue812369. In fact Armin's original post says that this is a change worth investigating, though his patch does not do it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 21:06:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 20:06:01 +0000 Subject: [issue4071] ntpath.abspath fails for long str paths In-Reply-To: <1223425635.48.0.940202056696.issue4071@psf.upfronthosting.co.za> Message-ID: <1356033961.89.0.68023276114.issue4071@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 21:51:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 20:51:33 +0000 Subject: [issue11383] compilation seg faults on insanely large expressions In-Reply-To: <1299149806.17.0.789738887671.issue11383@psf.upfronthosting.co.za> Message-ID: <1356036693.56.0.850224082777.issue11383@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This bug does not reproduced on 3.3+ more as it was fixed in issue5765. But it is yet here in 2.7 and 3.2. ---------- versions: +Python 2.7, Python 3.2 -Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 21:52:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 20 Dec 2012 20:52:16 +0000 Subject: [issue11383] compilation seg faults on insanely large expressions In-Reply-To: <1299149806.17.0.789738887671.issue11383@psf.upfronthosting.co.za> Message-ID: <1356036736.77.0.924187391611.issue11383@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Interpreter Core _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 20 22:08:56 2012 From: report at bugs.python.org (STINNER Victor) Date: Thu, 20 Dec 2012 21:08:56 +0000 Subject: [issue11383] compilation seg faults on insanely large expressions In-Reply-To: <1299149806.17.0.789738887671.issue11383@psf.upfronthosting.co.za> Message-ID: <1356037736.6.0.846846525802.issue11383@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 00:23:29 2012 From: report at bugs.python.org (Bradley Froehle) Date: Thu, 20 Dec 2012 23:23:29 +0000 Subject: [issue16740] Types created with PyType_FromSpec lack a __module__ attribute. Message-ID: <1356045809.14.0.050460489719.issue16740@psf.upfronthosting.co.za> New submission from Bradley Froehle: Types created using PyType_FromSpec do not have a __module__ attribute by default. This caught me off guard. $ python3 Python 3.2.3 (default, Oct 19 2012, 20:10:41) [GCC 4.6.3] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import xxlimited >>> xxlimited.Null.__module__ Traceback (most recent call last): File "", line 1, in AttributeError: __module__ Do we expect module authors to set the __module__ attribute immediately after calling PyType_FromSpec? To refresh your memory, non-heap types determine the module/name combo according to something like:: try: __module__, __name__ = tp_name.rsplit('.', 1) except ValueError: __module__, __name__ = 'builtins', tp_name whereas heap types use something like:: __name__ = tp_name @property def __module__(self): return self.__dict__['__module__'] I think this is unnecessarily confusing, and, as far as I know, not documented anywhere. I see from reading the commit logs that it was felt that by allowing users to set __name__ (and therefore tp_name), it could have an unintended impact on the value __module__. If so, why didn't we just disallow setting __name__? There are likely some unintended impacts of this decision, for example weird error message in other library functions: >>> import inspect >>> inspect.getfile(xxlimited.Null) Traceback (most recent call last): File "", line 1, in File "/usr/lib/python3.2/inspect.py", line 415, in getfile object = sys.modules.get(object.__module__) AttributeError: __module__ Is there anything we can do here? ---------- components: Interpreter Core messages: 177860 nosy: bfroehle priority: normal severity: normal status: open title: Types created with PyType_FromSpec lack a __module__ attribute. type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 00:27:05 2012 From: report at bugs.python.org (Bradley Froehle) Date: Thu, 20 Dec 2012 23:27:05 +0000 Subject: [issue16740] Types created with PyType_FromSpec lack a __module__ attribute. In-Reply-To: <1356045809.14.0.050460489719.issue16740@psf.upfronthosting.co.za> Message-ID: <1356046025.51.0.243581894638.issue16740@psf.upfronthosting.co.za> Bradley Froehle added the comment: For example, in PyType_FromSpec can we split the provided name into a module component and name component, and create the '__module__' entry in the dict? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 00:28:58 2012 From: report at bugs.python.org (Bradley Froehle) Date: Thu, 20 Dec 2012 23:28:58 +0000 Subject: [issue16740] Types created with PyType_FromSpec lack a __module__ attribute. In-Reply-To: <1356045809.14.0.050460489719.issue16740@psf.upfronthosting.co.za> Message-ID: <1356046138.18.0.95182843192.issue16740@psf.upfronthosting.co.za> Bradley Froehle added the comment: I see this has already been fixed in Python 3.3. My apologies. ---------- resolution: -> invalid status: open -> closed versions: -Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 00:37:21 2012 From: report at bugs.python.org (ganges master) Date: Thu, 20 Dec 2012 23:37:21 +0000 Subject: [issue16741] `int()`, `float()`, etc think python strings are null-terminated Message-ID: <1356046641.74.0.314140910069.issue16741@psf.upfronthosting.co.za> New submission from ganges master: I'm not sure if it's a bug or just an inconvenience, but when a string containing \x00 is passed to int/float/etc, they return a misleading exception: >>> int("abc") Traceback (most recent call last): File "", line 1, in ValueError: invalid literal for int() with base 10: 'abc' >>> int("\x00abc") Traceback (most recent call last): File "", line 1, in ValueError: invalid literal for int() with base 10: '' >>> float("\x00abc") Traceback (most recent call last): File "", line 1, in ValueError: could not convert string to float: I noticed the code does actually try to handle it: http://hg.python.org/cpython/file/39803c20c9bf/Objects/intobject.c#l1066 but still, the reported error is very misleading. ---------- components: Interpreter Core messages: 177863 nosy: gangesmaster priority: normal severity: normal status: open title: `int()`, `float()`, etc think python strings are null-terminated type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 03:03:46 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 21 Dec 2012 02:03:46 +0000 Subject: [issue16741] `int()`, `float()`, etc think python strings are null-terminated In-Reply-To: <1356046641.74.0.314140910069.issue16741@psf.upfronthosting.co.za> Message-ID: <1356055426.2.0.286439813666.issue16741@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 03:20:16 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 21 Dec 2012 02:20:16 +0000 Subject: [issue16687] Fix small gramatical error and add reference link in hashlib documentation In-Reply-To: <1355518554.59.0.0791078366076.issue16687@psf.upfronthosting.co.za> Message-ID: <1356056416.94.0.266037939642.issue16687@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- versions: +Python 3.3, Python 3.4 -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 03:25:18 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Dec 2012 02:25:18 +0000 Subject: [issue16687] Fix small gramatical error and add reference link in hashlib documentation In-Reply-To: <1355518554.59.0.0791078366076.issue16687@psf.upfronthosting.co.za> Message-ID: <3YSDFm5hmbzQsY@mail.python.org> Roundup Robot added the comment: New changeset abfd3bc38b5d by Benjamin Peterson in branch '3.3': fix typo (#16687) http://hg.python.org/cpython/rev/abfd3bc38b5d New changeset 95cb2f09ac50 by Benjamin Peterson in branch 'default': merge 3.3 (closes #16687) http://hg.python.org/cpython/rev/95cb2f09ac50 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 07:43:07 2012 From: report at bugs.python.org (Zachary Ware) Date: Fri, 21 Dec 2012 06:43:07 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1356072187.27.0.182893722435.issue16694@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's v4, addressing Serhiy's comments on Reitveld. ---------- Added file: http://bugs.python.org/file28383/py_operator.v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 08:17:55 2012 From: report at bugs.python.org (Bohuslav "Slavek" Kabrda) Date: Fri, 21 Dec 2012 07:17:55 +0000 Subject: [issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip In-Reply-To: <1355992211.63.0.283559299274.issue16735@psf.upfronthosting.co.za> Message-ID: <1356074275.63.0.528350565264.issue16735@psf.upfronthosting.co.za> Bohuslav "Slavek" Kabrda added the comment: Tried is_zipfile on /usr/bin/zip and it returns True, too, so it seems that this is a more general problem for zip-handling binaries... Anyway, thank you both, I agree that there is not much that can be done here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 09:05:05 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Fri, 21 Dec 2012 08:05:05 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1356077105.05.0.943047878912.issue14373@psf.upfronthosting.co.za> Alexey Kachayev added the comment: Serhiy, thank you for review. Working further on fixes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 09:27:27 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 21 Dec 2012 08:27:27 +0000 Subject: [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1356078447.89.0.237014851516.issue16728@psf.upfronthosting.co.za> Nick Coghlan added the comment: Many algorithms that require a sequence only need __len__ and __getitem__. The term "sequence" is used to distinguish such containers from mere iterables that only provide "__iter__" (and may be consumed by iteration). The glossary entry covers this use of the term. collections.abc.Sequence is a much richer interface, which defines many additional operations beyond those iteration, indexing and slicing. Types which implement that full API can be registered explicitly (or else an application can define it's own custom ABC for a subset of the Sequence API). However, the glossary entry should link to http://docs.python.org/3.3/library/stdtypes#sequence-types-list-tuple-range to expand on the second meaning of the term. PySequence_Check is an unreliable guide (albeit not quite as unreliable as PyMapping_Check) that checks a CPython implementation detail. ---------- assignee: -> docs at python components: +Documentation -Library (Lib) nosy: +docs at python, ncoghlan stage: -> needs patch title: collections.abc.Sequence shoud provide __subclasshook__ -> Missing cross-reference in sequence glossary entry type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 09:29:00 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 21 Dec 2012 08:29:00 +0000 Subject: [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1356078540.07.0.269596402655.issue16728@psf.upfronthosting.co.za> Nick Coghlan added the comment: As Amaury notes, implicit ducktyping is not feasible for sequences or mappings, as the method names overlap - you have to add explicit semantic information to say which kind of container you're implementing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 10:24:04 2012 From: report at bugs.python.org (INADA Naoki) Date: Fri, 21 Dec 2012 09:24:04 +0000 Subject: [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1356081844.01.0.948537096226.issue16728@psf.upfronthosting.co.za> INADA Naoki added the comment: Thanks, Nick. I see that the "sequence" doesn't have strict definition. Though, I think collections.abc module's document should describe this manner. For example: "But checking type with these abc may be too strict for most case. For example, some user defined sequence class may not cover :class:`Sequence` abc. Using :term:`EAFP` manner is preferred in Python." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 10:39:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Dec 2012 09:39:25 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1356082765.34.0.104041227432.issue16694@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: About length_hint(): I were mean something like (even explicit getattr() not needed): try: hint = type(obj).__length_hint__ except AttributeError: return default try: val = hint(obj) except TypeError: return default ... This is a little faster because there is only one attribute lookup instead two. This is a little safer because there is a little less chance of race when an attribute changed between two lookups (it is enough non-probably and doesn't matter). There is type(obj) here because the C code uses _PyObject_LookupSpecial() which doesn't honor instance attributes and looks only class attributes. About concat() and iconcat(): I think only first argument can be checked. If arguments are not concatenable then '+'/'+=' operator will raise an exception. I'm not sure. Does anyone have any thoughts about this? About methodcaller(): Here is a catch. With this implementation you can't use `methodcaller('foo', name='spam')` or `methodcaller('foo', self='spam')` (please add tests for those cases). Here is a trick needed: def __init__(*args, **kwargs): self = args[0] self._name = args[1] self._args = args[2:] self._kwargs = kwargs (You can add a code for better error reporting). I have added smaller comments on Rietveld. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 10:47:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Dec 2012 09:47:43 +0000 Subject: [issue16735] zipfile.is_zipfile wrongly recognizes non-zip as zip In-Reply-To: <1356074275.63.0.528350565264.issue16735@psf.upfronthosting.co.za> Message-ID: <1356083655.2672.2.camel@raxxla> Serhiy Storchaka added the comment: zipinfo detects /usr/bin/zip as a zip archive too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 11:22:46 2012 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 21 Dec 2012 10:22:46 +0000 Subject: [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1356085366.76.0.292066406706.issue16728@psf.upfronthosting.co.za> Nick Coghlan added the comment: No, that runs counter to the purpose of ABCs. If you have a type that is "good enough" for your purposes, then you can just register it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 11:39:50 2012 From: report at bugs.python.org (Trent Nelson) Date: Fri, 21 Dec 2012 10:39:50 +0000 Subject: [issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe Message-ID: <1356086390.48.0.327620937355.issue16742@psf.upfronthosting.co.za> New submission from Trent Nelson: Relevant thread: http://mail.python.org/pipermail/python-dev/2012-December/123225.html PyOS_StdioReadline features numerous calls that require the GIL to be held. Ideally, the GIL drop-take should be moved closer to the actual underlying read system call. ---------- assignee: trent components: Interpreter Core messages: 177874 nosy: trent priority: normal severity: normal stage: needs patch status: open title: PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 11:45:39 2012 From: report at bugs.python.org (Matthias Klose) Date: Fri, 21 Dec 2012 10:45:39 +0000 Subject: [issue16480] pyvenv 3.3 fails to create symlinks for /local/{bin, lib} to /{bin, lib} In-Reply-To: <1352998528.6.0.478630003119.issue16480@psf.upfronthosting.co.za> Message-ID: <1356086739.25.0.909958573358.issue16480@psf.upfronthosting.co.za> Matthias Klose added the comment: fixed in experimental, pyvenv's are now handled the same way as python-virtualenvs. closing the issue here. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 14:30:19 2012 From: report at bugs.python.org (amundell) Date: Fri, 21 Dec 2012 13:30:19 +0000 Subject: [issue16365] IDLE for Windows 8 In-Reply-To: <1351624899.92.0.657222579655.issue16365@psf.upfronthosting.co.za> Message-ID: <1356096619.73.0.0159846340083.issue16365@psf.upfronthosting.co.za> amundell added the comment: I had a similar issue in Win8, but occured after installing another program. My issue was related to the TCL_Library environment variable. If it is related to this error it can be confirmed by opening the command prompt, changing dir to cd c:\python33\ and typing python. Once python has started write import idlelib.idle. If idle does not start, read the errors and check to see if a TCL-related error has been generated. If this error has occured change the environment variable (ControlPanel\right click System\change settings\advanced tab\environment variable\select TCL_Library. Alter the the path to C:\Python33\tcl\tcl8.5. idle should then start. However you may have issues/conflict with other installed programs that access the TCL_Library. Hope this helps. ---------- nosy: +amundell _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 14:55:42 2012 From: report at bugs.python.org (INADA Naoki) Date: Fri, 21 Dec 2012 13:55:42 +0000 Subject: [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1356098142.15.0.508267053823.issue16728@psf.upfronthosting.co.za> INADA Naoki added the comment: So, I feel the 2nd meaning of "sequence" should be collections.abc.(Mutable)Sequence. "sequence types in stdlib" have richer API then the ABC. (e.g. comparison, +, *, etc...) They are "APIs that sequence may have" but not "APIs makes the type sequence." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 14:57:56 2012 From: report at bugs.python.org (INADA Naoki) Date: Fri, 21 Dec 2012 13:57:56 +0000 Subject: [issue16728] Missing cross-reference in sequence glossary entry In-Reply-To: <1355919289.81.0.186820029813.issue16728@psf.upfronthosting.co.za> Message-ID: <1356098276.76.0.0971414708861.issue16728@psf.upfronthosting.co.za> INADA Naoki added the comment: And nice symmetry with mapping entry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 15:43:31 2012 From: report at bugs.python.org (Marc Schlaich) Date: Fri, 21 Dec 2012 14:43:31 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB Message-ID: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> New submission from Marc Schlaich: Platform: Windows 7 64 bit Interpreter: Python 2.7.2 (default, Jun 12 2011, 15:08:59) [MSC v.1500 32 bit Intel)] on win32 Here are the steps to reproduce: 1. Create a big file (5 GB): with open('big', 'wb') as fobj: for _ in xrange(1024 * 1024 * 5): fobj.write('1' + '0' * 1023) 2. Open and process it with `mmap`: import mmap import re import sys with open('big', 'rb') as fobj: data = mmap.mmap(fobj.fileno(), 0, access=mmap.ACCESS_READ) print data.size() try: counter = 0 for match in re.finditer('1' + '0' * 1023, data): counter += 1 print len(data[1073740800:1073741824]) # (1 GB - 1024, 1 GB) print len(data[1073741824:1073742848]) # (1 GB, 1 GB + 1024) finally: data.close() print counter This returns the following lines: 5368709120 1024 0 1048576 So this is a behavioral issue. `mmap` accepts a file which cannot fit in the interpreter memory but fits in the system memory. On processing the data, it only reads data until the maximum interpreter memory is reached (1 GB). ---------- components: None messages: 177879 nosy: schlamar priority: normal severity: normal status: open title: mmap accepts files > 1 GB, but processes only 1 GB type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 17:03:07 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Fri, 21 Dec 2012 16:03:07 +0000 Subject: [issue16731] xxlimited/xxmodule docstrings ambiguous In-Reply-To: <1355946646.69.0.259699636535.issue16731@psf.upfronthosting.co.za> Message-ID: <1356105787.41.0.184576701601.issue16731@psf.upfronthosting.co.za> Daniel Shahaf added the comment: Re the review, yes there is a typo in the comment: the comment in xxlimited.c should say "xxmodule.c" rather than "xxlimited.c". (Got a traceback from the review app) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:04:11 2012 From: report at bugs.python.org (rappy) Date: Fri, 21 Dec 2012 17:04:11 +0000 Subject: [issue16744] sys.path.append causes wrong behaviour Message-ID: <1356109451.75.0.486337776247.issue16744@psf.upfronthosting.co.za> New submission from rappy: In bug.py print gives ['C:\\Users\\Glenn\\Desktop', 'C:\\Windows\\system32\\python27.zip', C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Users\\Glenn\\Documents\\ua\\mosis\x07ssignment6'] What it should give is ['C:\\Users\\Glenn\\Desktop', 'C:\\Windows\\system32\\python27.zip', C:\\Python27\\DLLs', 'C:\\Python27\\lib', 'C:\\Python27\\lib\\plat-win', 'C:\\Python27\\lib\\lib-tk', 'C:\\Python27', 'C:\\Python27\\lib\\site-packages', 'C:\\Users\\Glenn\\Documents\\ua\\mosis\assignment6'] ---------- components: Library (Lib) files: bug.py messages: 177881 nosy: rappy priority: normal severity: normal status: open title: sys.path.append causes wrong behaviour type: behavior versions: Python 2.7 Added file: http://bugs.python.org/file28384/bug.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:06:32 2012 From: report at bugs.python.org (Christian Heimes) Date: Fri, 21 Dec 2012 17:06:32 +0000 Subject: [issue16744] sys.path.append causes wrong behaviour In-Reply-To: <1356109451.75.0.486337776247.issue16744@psf.upfronthosting.co.za> Message-ID: <1356109592.51.0.986418612721.issue16744@psf.upfronthosting.co.za> Christian Heimes added the comment: You have to either quote the backslashes or use raw strings: >>> "\a" '\x07' >>> "\\a" '\\a' >>> r"\a" '\\a' ---------- nosy: +christian.heimes resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:15:33 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 21 Dec 2012 17:15:33 +0000 Subject: [issue16745] Hide symbols in _decimal.so Message-ID: <1356110133.55.0.310128337459.issue16745@psf.upfronthosting.co.za> New submission from Stefan Krah: This issue is for the _decimal specific parts from #4555. The patch depends on _Pragma (C99) and gcc >= 4.0 for the contents of the pragma. I think it will work for clang, too. Should the libmpdec API symbols (i.e. the ones starting with mpd_*) be hidden for _decimal.c, too? ---------- assignee: skrah components: Extension Modules files: libmpdec-hide-non-api-symbols.diff keywords: patch messages: 177883 nosy: skrah priority: normal severity: normal status: open title: Hide symbols in _decimal.so type: enhancement versions: Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28385/libmpdec-hide-non-api-symbols.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:16:14 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 21 Dec 2012 17:16:14 +0000 Subject: [issue16737] Different behaviours in script run directly and via runpy.run_module In-Reply-To: <1356010622.32.0.479096681415.issue16737@psf.upfronthosting.co.za> Message-ID: <1356110173.93.0.425055812921.issue16737@psf.upfronthosting.co.za> ?ric Araujo added the comment: FTR, distutils only recommends and supports running ?python setup.py?, i.e. relative path in the script?s directory. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:17:09 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 21 Dec 2012 17:17:09 +0000 Subject: [issue16731] xxlimited/xxmodule docstrings ambiguous In-Reply-To: <1355946646.69.0.259699636535.issue16731@psf.upfronthosting.co.za> Message-ID: <1356110229.26.0.188730496323.issue16731@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:18:55 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 21 Dec 2012 17:18:55 +0000 Subject: [issue16713] "tel" URIs should support params In-Reply-To: <1355841024.52.0.600019146787.issue16713@psf.upfronthosting.co.za> Message-ID: <1356110335.7.0.341766364341.issue16713@psf.upfronthosting.co.za> ?ric Araujo added the comment: It?s easy sure, but I think it?s still a bug :) ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:20:58 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 21 Dec 2012 17:20:58 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1356110458.4.0.61060726018.issue16694@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:22:01 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 21 Dec 2012 17:22:01 +0000 Subject: [issue16745] Hide symbols in _decimal.so In-Reply-To: <1356110133.55.0.310128337459.issue16745@psf.upfronthosting.co.za> Message-ID: <1356110521.14.0.810717773765.issue16745@psf.upfronthosting.co.za> Stefan Krah added the comment: Adding everyone from issue #4555, in case you can think of a different (portable) solution for hiding symbols (with minimal effort). ---------- nosy: +christian.heimes, dmalcolm, doko, lemburg, loewis, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:26:41 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 21 Dec 2012 17:26:41 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1356110801.74.0.325011155191.issue16651@psf.upfronthosting.co.za> ?ric Araujo added the comment: Oops, sorry I slipped :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 18:38:02 2012 From: report at bugs.python.org (Meador Inge) Date: Fri, 21 Dec 2012 17:38:02 +0000 Subject: [issue16745] Hide symbols in _decimal.so In-Reply-To: <1356110133.55.0.310128337459.issue16745@psf.upfronthosting.co.za> Message-ID: <1356111482.36.0.377205944256.issue16745@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 19:30:42 2012 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 21 Dec 2012 18:30:42 +0000 Subject: [issue16737] Different behaviours in script run directly and via runpy.run_module In-Reply-To: <1356010622.32.0.479096681415.issue16737@psf.upfronthosting.co.za> Message-ID: <1356114642.8.0.569227156691.issue16737@psf.upfronthosting.co.za> Vinay Sajip added the comment: > FTR, distutils only recommends and supports running ?python setup.py?, i.e. relative path in the script?s directory. Right, but this behaviour is seen even when the script is in the current directory. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 20:38:44 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Fri, 21 Dec 2012 19:38:44 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1356118724.37.0.477647693749.issue14373@psf.upfronthosting.co.za> Alexey Kachayev added the comment: Fixed my previous patch according to all comments from review, except removing keyword arguments from lru_cache_new function. ---------- Added file: http://bugs.python.org/file28386/14373.v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 20:51:49 2012 From: report at bugs.python.org (Meador Inge) Date: Fri, 21 Dec 2012 19:51:49 +0000 Subject: [issue16745] Hide symbols in _decimal.so In-Reply-To: <1356110133.55.0.310128337459.issue16745@psf.upfronthosting.co.za> Message-ID: <1356119509.53.0.400862819802.issue16745@psf.upfronthosting.co.za> Meador Inge added the comment: Personally I prefer using attributes instead of pragmas. The GCC manual recommends such as well. There are also other sources in Modules/* that use '__attribute__ ((visibility ("hidden")))'. Namely ctypes and zlib. I can understand that it is more work, but I find something like the following more readable (I am not actually suggesting names here, just an example): #define PY_LOCAL __attribute__ ((visibility ("hidden"))) ... void foo(void) PY_LOCAL; void bar(void) PY_LOCAL; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 21:02:42 2012 From: report at bugs.python.org (Meador Inge) Date: Fri, 21 Dec 2012 20:02:42 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1356120162.19.0.654943032897.issue16651@psf.upfronthosting.co.za> Meador Inge added the comment: I noticed functools in the list. issue14373 was opened somewhat recently to reimplement functools.lru_cache in C. This issue seems to be promoting have more things implemented in pure Python. Someone involved in this issue might want to weigh in on issue14373 if that is the case. ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 21:10:43 2012 From: report at bugs.python.org (Philip Jenvey) Date: Fri, 21 Dec 2012 20:10:43 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1356120643.56.0.0653865975881.issue16651@psf.upfronthosting.co.za> Philip Jenvey added the comment: The guidelines for this are in PEP 399. Basically, adding 'accelerated' implementations when necessary isn't a bad thing as long as there are pure Python equivalents (unless it's a special case) and both are tested. issue14373's latest patch seems to be following the PEP ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 21:10:52 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 21 Dec 2012 20:10:52 +0000 Subject: [issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS In-Reply-To: <1327519681.79.0.252690630069.issue13863@psf.upfronthosting.co.za> Message-ID: <1356120652.32.0.110720895265.issue13863@psf.upfronthosting.co.za> Mark Dickinson added the comment: Whoops. int.from_bytes doesn't exist in Python 2.7. ---------- Added file: http://bugs.python.org/file28387/pyc_mtime4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 21:50:07 2012 From: report at bugs.python.org (Stefan Krah) Date: Fri, 21 Dec 2012 20:50:07 +0000 Subject: [issue16745] Hide symbols in _decimal.so In-Reply-To: <1356119509.53.0.400862819802.issue16745@psf.upfronthosting.co.za> Message-ID: <20121221205009.GA21137@sleipnir.bytereef.org> Stefan Krah added the comment: Meador Inge wrote: > Personally I prefer using attributes instead of pragmas. The GCC manual recommends such as well. I followed www.akkadia.org/drepper/dsohowto.pdf . Drepper seems to be fine with the use of pragmas in internal headers. > There are also other sources in Modules/* that use '__attribute__ ((visibility ("hidden")))'. Namely ctypes and zlib. They do, but for a tiny amount of functions. mpdecimal.h, which is internal as far as _decimal.so is concerned, also needs to be changed. There you have something like 200 lines of [...] void mpd_qrescale(mpd_t *result, const mpd_t *a, mpd_ssize_t exp, const mpd_context_t *ctx, uint32_t *status) Py_HIDDEN; void mpd_qrescale_fmt(mpd_t *result, const mpd_t *a, mpd_ssize_t exp, const mpd_context_t *ctx, uint32_t *status) Py_HIDDEN; [...], which increases the size of the diff between the standalone libmpdec and the one shipped with Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 22:05:46 2012 From: report at bugs.python.org (Zachary Ware) Date: Fri, 21 Dec 2012 21:05:46 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1356123946.44.0.250454208784.issue16694@psf.upfronthosting.co.za> Zachary Ware added the comment: Here's another new version. Changes include: - Address Serhiy's Rietveld comments - Fix length_hint() the way it was meant to be fixed last time. - Remove __getitem__ check on 'b' in concat and iconcat. More notes on this below. - Fix methodcaller as Serhiy suggested - Add test case for methodcaller for 'name' and 'self' keyword arguments - Add comments to 'subdivide' the module into the rough sections the docs are divided into. Move length_hint() with other sequence operations to also match the doc order. On concat and iconcat: Looking at the glossary, a sequence should actually have both __getitem__ and __len__. The test class in the test case for iconcat only defines __getitem__, though. Should we check only for __getitem__ on the first argument, or check for both __getitem__ and __len__, and add __len__ to the test class? Requiring __len__ may cause breakage for anyone using the Python implementation with a class they defined and used with the C implementation with only __getitem__, so I'm leaning towards only checking for __getitem__. I can't really tell what the C implementation really looks for as I don't speak C, but it almost looks to me like it may be only checking for __getitem__. Latest patch only checks argument 'a' for __getitem__. ---------- Added file: http://bugs.python.org/file28388/py_operator.v5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 22:06:17 2012 From: report at bugs.python.org (Meador Inge) Date: Fri, 21 Dec 2012 21:06:17 +0000 Subject: [issue16745] Hide symbols in _decimal.so In-Reply-To: <1356110133.55.0.310128337459.issue16745@psf.upfronthosting.co.za> Message-ID: <1356123977.87.0.586439378241.issue16745@psf.upfronthosting.co.za> Meador Inge added the comment: Ah, I missed how big of a line range these pragmas are covering when I scanned the patch before. In that case, I agree with the current patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 22:27:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 21 Dec 2012 21:27:03 +0000 Subject: [issue16746] clarify what should be sent to peps@ Message-ID: <1356125223.11.0.663199729281.issue16746@psf.upfronthosting.co.za> New submission from Chris Jerdonek: Currently, PEP 1 can be read to mean that should be CC'ed on all e-mails related to PEPs. However, this isn't the intent because, for example, it is okay to have discussions about PEPs on python-dev or python-ideas without involving . I'm attaching a patch to clarify this language. [This issue is from: http://mail.python.org/pipermail/python-dev/2012-December/123251.html ] ---------- keywords: easy messages: 177897 nosy: chris.jerdonek priority: normal severity: normal status: open title: clarify what should be sent to peps@ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 22:28:39 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 21 Dec 2012 21:28:39 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356125319.93.0.73984992062.issue16743@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- components: +Library (Lib), Windows -None nosy: +brian.curtin, tim.golden versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 22:29:35 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 21 Dec 2012 21:29:35 +0000 Subject: [issue16746] clarify what should be sent to peps@ In-Reply-To: <1356125223.11.0.663199729281.issue16746@psf.upfronthosting.co.za> Message-ID: <1356125375.46.0.310475751345.issue16746@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- keywords: +patch Added file: http://bugs.python.org/file28389/issue-16746-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 22:37:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Dec 2012 21:37:00 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1356125820.19.0.719884055769.issue16651@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I'm involved in both issues and I think it's good to have so much simple Python implementations as possible and to have C accelerators for any performance critical code. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 22:45:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Dec 2012 21:45:20 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1356126320.72.0.754975531235.issue16694@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good work, Zachary. I have no more nitpicks for you. ;) LGTM. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 22:53:08 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Dec 2012 21:53:08 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <3YSk9H48HszNmQ@mail.python.org> Roundup Robot added the comment: New changeset db75553ff333 by Mark Dickinson in branch 'default': Simplify random_seed to use _PyLong_AsByteArray. Closes issue #16496. http://hg.python.org/cpython/rev/db75553ff333 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 22:53:37 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 21 Dec 2012 21:53:37 +0000 Subject: [issue16496] Simplify and optimize random_seed() In-Reply-To: <1353187964.7.0.945658199305.issue16496@psf.upfronthosting.co.za> Message-ID: <1356126817.18.0.298624545812.issue16496@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 23:06:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 21 Dec 2012 22:06:45 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1356127605.2.0.64757332743.issue16694@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: One comment to a committer. Don't forget to run `hg rename Modules/operator.c Modules/_operator.c` before applying the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 23:07:33 2012 From: report at bugs.python.org (Zachary Ware) Date: Fri, 21 Dec 2012 22:07:33 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1356127653.47.0.520741972384.issue16694@psf.upfronthosting.co.za> Zachary Ware added the comment: Nits are no fun; thank you for picking them, Serhiy ;) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 23:13:52 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Fri, 21 Dec 2012 22:13:52 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1356128032.51.0.559977237222.issue14373@psf.upfronthosting.co.za> Alexey Kachayev added the comment: Added additional Py_DECREF(s) for key and value. ---------- Added file: http://bugs.python.org/file28390/14373.v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 23:28:11 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 21 Dec 2012 22:28:11 +0000 Subject: [issue16745] Hide symbols in _decimal.so In-Reply-To: <1356110133.55.0.310128337459.issue16745@psf.upfronthosting.co.za> Message-ID: <3YSkxl27v1zRVx@mail.python.org> Roundup Robot added the comment: New changeset 24f6c6f3b7bf by Stefan Krah in branch '3.3': Issue #16745: Hide a couple of symbols by making them local. http://hg.python.org/cpython/rev/24f6c6f3b7bf ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 23:50:31 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 21 Dec 2012 22:50:31 +0000 Subject: [issue16746] clarify what should be sent to peps@ In-Reply-To: <1356125223.11.0.663199729281.issue16746@psf.upfronthosting.co.za> Message-ID: <1356130231.21.0.177072749983.issue16746@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- assignee: -> brett.cannon nosy: +brett.cannon priority: normal -> low stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 23:53:06 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 21 Dec 2012 22:53:06 +0000 Subject: [issue16746] clarify what should be sent to peps@ In-Reply-To: <1356125223.11.0.663199729281.issue16746@psf.upfronthosting.co.za> Message-ID: <1356130386.7.0.0183309455168.issue16746@psf.upfronthosting.co.za> R. David Murray added the comment: The editors do more than your sentence suggests. They also (sometimes) edit peps, (sometimes) provide advice about preparing one, and commit and update peps when the author(s) do not have commit access. The distinction in the types of email that PEP 1 is attempting to make is the distinction between public discussions of the PEP (which go to python-dev or python-ideas) and semi-private discussions about the mechanics of preparing and posting and updating PEPs, which should go to all the pep editors (thus the instruction to cc the list). In other words, if you want non-editors involved in the discussion, post to python-dev or whatnot, and do *not* CC the PEP editors. All other PEP matters should go to the PEP editors, and *not* be CCed to any other list. That's what the original text says, but admittedly you have to parse it like a computer would to understand that :) ---------- assignee: brett.cannon -> nosy: +r.david.murray priority: low -> normal stage: patch review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 21 23:59:13 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Dec 2012 22:59:13 +0000 Subject: [issue16682] Document that audioop works with bytes, not strings In-Reply-To: <1355506064.79.0.581209145854.issue16682@psf.upfronthosting.co.za> Message-ID: <1356130753.65.0.444039789456.issue16682@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Patch looks good to me, all three occurrences of 'string' are fixed. ---------- nosy: +terry.reedy stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 00:22:31 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 21 Dec 2012 23:22:31 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1356132151.49.0.979639358538.issue16694@psf.upfronthosting.co.za> ?ric Araujo added the comment: FYI Mercurial can use the extended diff format invented by git, which supports renames, changes to file permissions, etc. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 00:28:45 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 21 Dec 2012 23:28:45 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1356132525.59.0.966507552724.issue16694@psf.upfronthosting.co.za> ?ric Araujo added the comment: The base test class should not inherit from TestCase: it will be picked up by test discovery and then will break, as self.module will be None. Typical usage: class OperatorTestsMixin: module = None class COperatorTests(OperatorTestsMixin, unittest.TestCase): module = _operator ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 00:32:07 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 21 Dec 2012 23:32:07 +0000 Subject: [issue16684] Unicode property value abbreviated names and long names In-Reply-To: <1355506392.97.0.314398568458.issue16684@psf.upfronthosting.co.za> Message-ID: <1356132727.47.0.300918317985.issue16684@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This seems like a plausible request to me. The three dicts comprise 70 code-alias pairs. If unicodedata had a Python version (should it?), the simplest thing would be to add bididict, eawdist, and gcdict to that version (and not to the C version). I don't know how well putting dicts in C code works. A unicodealias module could be added but I do not really like that idea. I would prefer adding data attributes and correspond docs to the current module. Pander: submitting a proof-of-concept script that accesses and parses that url and produces ready-to-go python code like below might encourage adoption of your proposal. In any case, it would be here for others to use. bididict = { 'AL': 'Arabic_Letter', ... 'WS': 'White_Space', } eawdict = ... ---------- nosy: +loewis, terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 00:45:35 2012 From: report at bugs.python.org (Zachary Ware) Date: Fri, 21 Dec 2012 23:45:35 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1356133535.57.0.101770264845.issue16694@psf.upfronthosting.co.za> Zachary Ware added the comment: Did not know that about test discovery, thank you ?ric. Fixed in v6. A few other test modules may need the same fix; I based my changes to Lib/test/test_operator.py on Lib/test/test_heapq.py which has the same issue. I'll open a new report for it and any others I find. Also, this patch was created with `hg diff -g`; the operator.c rename should be well taken care of by this patch. ---------- Added file: http://bugs.python.org/file28391/py_operator.v6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 01:06:53 2012 From: report at bugs.python.org (Zachary Ware) Date: Sat, 22 Dec 2012 00:06:53 +0000 Subject: [issue16747] Remove 'file' type reference from 'iterable' glossary entry Message-ID: <1356134813.58.0.26000957124.issue16747@psf.upfronthosting.co.za> New submission from Zachary Ware: Here's a patch that changes the reference to :class:`file` in the iterable entry in Doc/glossary.rst to :term:`file objects `, along with minor grammatical fixes to make it fit, and reflowing of the text. ---------- assignee: docs at python components: Documentation files: iterable_glossary.diff keywords: patch messages: 177911 nosy: docs at python, zach.ware priority: normal severity: normal status: open title: Remove 'file' type reference from 'iterable' glossary entry versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28392/iterable_glossary.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 01:43:07 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Dec 2012 00:43:07 +0000 Subject: [issue16686] audioop overflow issues In-Reply-To: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> Message-ID: <1356136987.39.0.0504813323516.issue16686@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 01:55:57 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Dec 2012 00:55:57 +0000 Subject: [issue16689] stdout stderr redirection mess In-Reply-To: <1355533013.89.0.974705743737.issue16689@psf.upfronthosting.co.za> Message-ID: <1356137757.33.0.88535129459.issue16689@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Is that really the simplest example that will exhibit the cited behavior? Why do you think this is a Python issue rather than a Windows issue? What happens, for instance, with a C program than alternately outputs to stdout and stderr? ---------- nosy: +terry.reedy versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 02:01:50 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Dec 2012 01:01:50 +0000 Subject: [issue16709] unittest discover order is filesystem specific - hard to reproduce In-Reply-To: <1355797737.36.0.999533489695.issue16709@psf.upfronthosting.co.za> Message-ID: <1356138110.68.0.667217978403.issue16709@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 3.1, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 02:02:27 2012 From: report at bugs.python.org (Zachary Ware) Date: Sat, 22 Dec 2012 01:02:27 +0000 Subject: [issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations Message-ID: <1356138147.12.0.530314626781.issue16748@psf.upfronthosting.co.za> New submission from Zachary Ware: As pointed out by ?ric Araujo in msg177908 of issue16694, tests using the idiom presented in PEP 399 are subject to breakage of test discovery. This issue's goal is to root out and fix all usages of this idiom. So far, only test_heapq is known to be affected. As for fixing the issue, each module get its own mixin class, or should a simple class such as: class TestPyAndCMixin: module = None be added to test.support? ---------- components: Tests messages: 177913 nosy: eric.araujo, zach.ware priority: normal severity: normal status: open title: Ensure test discovery doesn't break for modules testing C and Python implementations type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 02:07:45 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Dec 2012 01:07:45 +0000 Subject: [issue16712] collections.abc.Sequence should not provide __reversed__ In-Reply-To: <1355835361.63.0.373231585566.issue16712@psf.upfronthosting.co.za> Message-ID: <1356138465.7.0.336454934426.issue16712@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I would expect that the default method of reversed() and collections.abc.Sequence.__reverse__ are more or less the same. If so, this should be closed as invalid. But I want to hear from the abc experts. ---------- nosy: +rhettinger, stutzbach, terry.reedy versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 02:17:18 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Dec 2012 01:17:18 +0000 Subject: [issue16741] `int()`, `float()`, etc think python strings are null-terminated In-Reply-To: <1356046641.74.0.314140910069.issue16741@psf.upfronthosting.co.za> Message-ID: <1356139038.41.0.993921432042.issue16741@psf.upfronthosting.co.za> Changes by Terry J. Reedy : ---------- versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 02:30:16 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sat, 22 Dec 2012 01:30:16 +0000 Subject: [issue16741] `int()`, `float()`, etc think python strings are null-terminated In-Reply-To: <1356046641.74.0.314140910069.issue16741@psf.upfronthosting.co.za> Message-ID: <1356139816.18.0.452391860006.issue16741@psf.upfronthosting.co.za> Matthew Barnett added the comment: Python takes a long way round when converting strings to int. It does the following (I'll be talking about Python 3.3 here): 1. In function 'fix_decimal_and_space_to_ascii', the different kinds of spaces are converted to " " and the different kinds of digits are converted to their equivalents in the ASCII range; 2. The resulting string is converted to UTF-8; 3. The resulting string is passed to 'PyLong_FromString', which expects a null-terminated string. 4. If 'PyLong_FromString' is unable to parse the string as an int, it builds an error message using the string that was passed into it, which it does by converting that string _back_ into Unicode. As a result of step 4, the string that's reported as the value in the error message is _not_ necessarily correct. For example: >>> int("\N{ARABIC-INDIC DIGIT ONE}") 1 >>> int("#\N{ARABIC-INDIC DIGIT ONE}") Traceback (most recent call last): File "", line 1, in int("#\N{ARABIC-INDIC DIGIT ONE}") ValueError: invalid literal for int() with base 10: '#1' And it also means a "\x00" and anything after it will be omitted: >>> int("foo\x00bar") Traceback (most recent call last): File "", line 1, in int("foo\x00bar") ValueError: invalid literal for int() with base 10: 'foo' And in a final point, 'PyLong_FromString' limits the length of the value it reports in the error message, and the code that does it includes this line: slen = strlen(orig_str) < 200 ? strlen(orig_str) : 200; ---------- nosy: +mrabarnett _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 02:58:17 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Dec 2012 01:58:17 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356141497.0.0.271537080619.issue16743@psf.upfronthosting.co.za> Terry J. Reedy added the comment: The immediate fix is to use a 64 bit build. That aside, what change in behavior are you suggesting? (and for 32 bit builds only?) Should mmap.mmap warn if the file is longer that would be supported? This could be added to all current versions. Should it raise in the same circumstance? What is a person *knows* that the file is 'too big' but only wants to access the first gigabyte? Forcing people to explicitly pass the magic number 1073741824 would, to me, effectively be a 3.4-at-best api change. Perhaps mmap.mmap should be left alone and only the attempt to access beyond the cutoff should raise or warn. (Is the 32-bit cutoff OS specific?) Given that there are multiple access methods and methods that access, and that all accesses are ultimately delegated to the os mmap functions, this could be major nuisance to get right. Now that disks have grown to larger than a gigabyte, the doc should explicitly mention the memory space issue. ---------- nosy: +terry.reedy stage: -> needs patch type: behavior -> enhancement versions: -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 03:09:52 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 22 Dec 2012 02:09:52 +0000 Subject: [issue16749] Fatal Python Error In-Reply-To: Message-ID: <1356142192.14.0.200458493129.issue16749@psf.upfronthosting.co.za> R. David Murray added the comment: Given the error message, my guess would be that there is a bug in the Solidoodle Python extension module. That is, it is unlikely to be a bug in Python. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 03:17:36 2012 From: report at bugs.python.org (Leonardo DaVinci) Date: Sat, 22 Dec 2012 02:17:36 +0000 Subject: [issue16749] Fatal Python Error In-Reply-To: <1356142192.14.0.200458493129.issue16749@psf.upfronthosting.co.za> Message-ID: Leonardo DaVinci added the comment: Ok thanks for the quick reply. I'll check with them. Regards Ciro On Fri, Dec 21, 2012 at 9:09 PM, R. David Murray wrote: > > R. David Murray added the comment: > > Given the error message, my guess would be that there is a bug in the > Solidoodle Python extension module. That is, it is unlikely to be a bug in > Python. > > ---------- > nosy: +r.david.murray > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 03:26:21 2012 From: report at bugs.python.org (INADA Naoki) Date: Sat, 22 Dec 2012 02:26:21 +0000 Subject: [issue16712] collections.abc.Sequence should not provide __reversed__ In-Reply-To: <1355835361.63.0.373231585566.issue16712@psf.upfronthosting.co.za> Message-ID: <1356143181.77.0.603217781448.issue16712@psf.upfronthosting.co.za> INADA Naoki added the comment: I believe that using Sequence ABC as mix-in is recommended when implementing custom sequence. But mixing-in it violates "should only provide __reversed__() if they can provide an implementation that is more efficient than the one provided by reversed()." Defining __reversed__ in Sequence ABC also means that classes doesn't have __reversed__ aren't Sequence. While not implementing it is recommended for most cases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 03:58:39 2012 From: report at bugs.python.org (Leonardo DaVinci) Date: Sat, 22 Dec 2012 02:58:39 +0000 Subject: [issue16749] Fatal Python Error In-Reply-To: <1356142192.14.0.200458493129.issue16749@psf.upfronthosting.co.za> Message-ID: Leonardo DaVinci added the comment: Hi David, I keep trying to unsuccessfully. Here's the problem details Problem signature: Problem Event Name: APPCRASH Application Name: python.exe Application Version: 0.0.0.0 Application Timestamp: 4f84a6c8 Fault Module Name: python27.dll Fault Module Version: 2.7.3150.1013 Fault Module Timestamp: 4f84a6c7 Exception Code: 40000015 Exception Offset: 0006016a OS Version: 6.1.7601.2.1.0.256.1 Locale ID: 3084 Additional Information 1: 8c07 Additional Information 2: 8c07c320598b1e31bf5de83aa7155e8f Additional Information 3: 8e83 Additional Information 4: 8e835205385ec5be9858c1342251f482 Hope this helps Regards Ciro On Fri, Dec 21, 2012 at 9:09 PM, R. David Murray wrote: > > R. David Murray added the comment: > > Given the error message, my guess would be that there is a bug in the > Solidoodle Python extension module. That is, it is unlikely to be a bug in > Python. > > ---------- > nosy: +r.david.murray > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 04:17:30 2012 From: report at bugs.python.org (Brett Cannon) Date: Sat, 22 Dec 2012 03:17:30 +0000 Subject: [issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations In-Reply-To: <1356138147.12.0.530314626781.issue16748@psf.upfronthosting.co.za> Message-ID: <1356146250.73.0.993607249006.issue16748@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 05:37:39 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 22 Dec 2012 04:37:39 +0000 Subject: [issue16689] stdout stderr redirection mess In-Reply-To: <1355533013.89.0.974705743737.issue16689@psf.upfronthosting.co.za> Message-ID: <1356151059.63.0.913089705048.issue16689@psf.upfronthosting.co.za> anatoly techtonik added the comment: I don't know. I don't write C. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 07:17:34 2012 From: report at bugs.python.org (pleed) Date: Sat, 22 Dec 2012 06:17:34 +0000 Subject: [issue16750] Python Code module implements uncomputable function Message-ID: <1356157054.86.0.248139493582.issue16750@psf.upfronthosting.co.za> New submission from pleed: The "code" class implements the __eq__ operator which is known to be uncomputable. ---------- messages: 177923 nosy: pleed priority: normal severity: normal status: open title: Python Code module implements uncomputable function type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 09:34:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 08:34:04 +0000 Subject: [issue16751] Using modern unittest asserts in the documentation Message-ID: <1356165243.99.0.0485025285676.issue16751@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch update the documentation examples to use more modern unittest asserts. ---------- assignee: docs at python components: Documentation, Tests files: docs_unittest_assert.patch keywords: easy, patch messages: 177924 nosy: docs at python, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Using modern unittest asserts in the documentation type: enhancement versions: Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28394/docs_unittest_assert.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 10:00:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 09:00:04 +0000 Subject: [issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations In-Reply-To: <1356138147.12.0.530314626781.issue16748@psf.upfronthosting.co.za> Message-ID: <1356166804.05.0.113676337754.issue16748@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: No need to add this trivial class to test.support. Mixin can have different parameters in additional to 'module' (see 16659). I found a lot of usages of this idiom in tests and some of them can't be changed so simple (for example test_genericpath and test_functools). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 10:01:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 09:01:23 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1356166883.94.0.423224519461.issue16694@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't understand what is difference between v5 and v6. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 10:03:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 09:03:51 +0000 Subject: [issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations In-Reply-To: <1356138147.12.0.530314626781.issue16748@psf.upfronthosting.co.za> Message-ID: <1356167031.33.0.406507689398.issue16748@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: ?ric, can you submit a test which exposes the problem? ---------- stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 10:12:29 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 22 Dec 2012 09:12:29 +0000 Subject: [issue16689] stdout stderr redirection mess In-Reply-To: <1355533013.89.0.974705743737.issue16689@psf.upfronthosting.co.za> Message-ID: <1356167549.92.0.247584728534.issue16689@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: It's not an issue at all, it's simply buffering in effect. Depending on the version, stdout/stderr is either unbuffured or fully buffered, see http://bugs.python.org/issue13597 Simply pass '-u' and streams will be unbuffered, and appear in the order in chich the print() calls are made. ---------- nosy: +neologix resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 10:16:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 09:16:07 +0000 Subject: [issue16689] stdout stderr redirection mess In-Reply-To: <1355533013.89.0.974705743737.issue16689@psf.upfronthosting.co.za> Message-ID: <1356167767.24.0.0531320508383.issue16689@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It looks as for example stdout is line-buffered when output to terminal and block-buffered when redirected to file or pipe and stderr is line-buffered in any case in Python 3.3 (this a common behavior for all C programs). Or something like. Python has an option -u to control this. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 10:35:21 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 22 Dec 2012 09:35:21 +0000 Subject: [issue16712] collections.abc.Sequence should not provide __reversed__ In-Reply-To: <1355835361.63.0.373231585566.issue16712@psf.upfronthosting.co.za> Message-ID: <1356168921.87.0.920650717888.issue16712@psf.upfronthosting.co.za> Nick Coghlan added the comment: This sounds like a legitimate complaint to me, as the one in the ABC will be at least marginally slower in CPython since it's written in Python while reversed uses a builtin C implementation. Classing it as an enhancement rather than a behavioural bug though, as what we have now isn't *wrong*, it's just not optimal. ---------- nosy: +ncoghlan stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 10:36:26 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 22 Dec 2012 09:36:26 +0000 Subject: [issue16712] collections.abc.Sequence should not provide __reversed__ In-Reply-To: <1355835361.63.0.373231585566.issue16712@psf.upfronthosting.co.za> Message-ID: <1356168986.5.0.151026861461.issue16712@psf.upfronthosting.co.za> Nick Coghlan added the comment: The observation about it incorrectly flagging __reversed__ as an expected method for Sequence objects is also valid. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 11:12:00 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 22 Dec 2012 10:12:00 +0000 Subject: [issue16737] Different behaviours in script run directly and via runpy.run_module In-Reply-To: <1356010622.32.0.479096681415.issue16737@psf.upfronthosting.co.za> Message-ID: <1356171120.76.0.156312188369.issue16737@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, some glorious (in)consistency here: $ cat > echo_file.py print(__file__) (2.7, old import system) $ python -c "import echo_file" echo_file.pyc $ python -m "echo_file" /home/ncoghlan/devel/play/echo_file.py $ python echo_file.py echo_file.py (3.2, cache directories) $ python3 -c "import echo_file" echo_file.py $ python3 -m "echo_file" /home/ncoghlan/devel/play/echo_file.py $ python3 echo_file.py echo_file.py (3.3, new import system) $ ../py33/python -c "import echo_file" ./echo_file.py $ ../py33/python -m "echo_file" /home/ncoghlan/devel/play/echo_file.py $ ../py33/python echo_file.py echo_file.py However, if we change Python's behaviour here, it's more likely to be in the direction of making __file__ reliably absolute, as allowing relative paths in __file__ can cause problems if the current directory ever changes. (I do wonder if this could be the reason nosetests doesn't work with -m, though). ---------- nosy: +brett.cannon versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 11:16:15 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 22 Dec 2012 10:16:15 +0000 Subject: [issue16737] Different behaviours in script run directly and via runpy.run_module In-Reply-To: <1356010622.32.0.479096681415.issue16737@psf.upfronthosting.co.za> Message-ID: <1356171375.49.0.0126866834296.issue16737@psf.upfronthosting.co.za> Nick Coghlan added the comment: So yes, any code that assumes __main__.__file__ is a relative path is just plain wrong, as Python provides no such guarantee. It may currently be either relative or absolute at the implementation's discretion. If the status quo ever changes, it would be to switch to requiring that all module __file__ attributes be absolute paths (including in __main__). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 11:27:27 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 22 Dec 2012 10:27:27 +0000 Subject: [issue16531] Allow IPNetwork to take a tuple In-Reply-To: <1353621566.3.0.0992835206333.issue16531@psf.upfronthosting.co.za> Message-ID: <1356172047.68.0.139713487099.issue16531@psf.upfronthosting.co.za> Nick Coghlan added the comment: IIRC, construction from existing instances in general is an issue in the current version of the module. One particularly murky question if it were allowed is what should happen if you pass an IPAdapter instance (which already has associated network info) rather than an ordinary IPAddress. Forcing people to go through an integer or a string in that case, or call one of the explicit conversion methods, forces them to be explicit about the fact that they're deliberate discarding any other information associated with the original object. (Note that I like the 2-tuple idea - I'm just pointing out that allowing an IPAddress object as the first element of that 2-tuple isn't quite as straightforward as it may first appear) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 11:54:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 10:54:05 +0000 Subject: [issue16686] audioop overflow issues In-Reply-To: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> Message-ID: <1356173645.34.0.119225086076.issue16686@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I found that the documentation contains a receipt which depends on the fact that bias() wraps around samples. Here is an updated patch. Also some docs changes included. ---------- Added file: http://bugs.python.org/file28395/audioop_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 11:56:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 10:56:11 +0000 Subject: [issue16686] audioop overflow issues In-Reply-To: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> Message-ID: <1356173771.98.0.840512785062.issue16686@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28396/audioop_2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 11:56:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 10:56:38 +0000 Subject: [issue16686] audioop overflow issues In-Reply-To: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> Message-ID: <1356173798.91.0.311777281246.issue16686@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28397/audioop_2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 11:57:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 10:57:18 +0000 Subject: [issue16686] audioop overflow issues In-Reply-To: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> Message-ID: <1356173838.26.0.367786383504.issue16686@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28364/audioop.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 11:57:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 10:57:34 +0000 Subject: [issue16686] audioop overflow issues In-Reply-To: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> Message-ID: <1356173854.39.0.0151379803445.issue16686@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28365/audioop_tests.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 11:57:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 10:57:50 +0000 Subject: [issue16686] audioop overflow issues In-Reply-To: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> Message-ID: <1356173870.47.0.726269307403.issue16686@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Removed file: http://bugs.python.org/file28366/audioop.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 11:58:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 10:58:16 +0000 Subject: [issue16686] audioop overflow issues In-Reply-To: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> Message-ID: <1356173896.61.0.753476804606.issue16686@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 12:14:54 2012 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 22 Dec 2012 11:14:54 +0000 Subject: [issue16750] Python Code module implements uncomputable function In-Reply-To: <1356157054.86.0.248139493582.issue16750@psf.upfronthosting.co.za> Message-ID: <1356174894.52.0.949628735276.issue16750@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing as invalid. There's no issue with comparing code objects---__eq__ implements a perfectly good equivalence relation. This is not an extensional definition of function equality. ---------- nosy: +mark.dickinson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 12:38:00 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 22 Dec 2012 11:38:00 +0000 Subject: [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1356176280.52.0.963613630429.issue16581@psf.upfronthosting.co.za> Nick Coghlan added the comment: Committed, along with a few other changes, as http://hg.python.org/peps/rev/24d5623ab21e Subsequent commit addresses Ezio's comment by changing the phrase to "list for contacting the PEP editors". The attitude I mainly take to PEP 1 now is that if I notice cases where what it says and what we actually do really don't match, I update the PEP accordingly. If I get anything glaringly wrong, I trust people will yell at me on python-checkins about it :) ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 13:33:38 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 22 Dec 2012 12:33:38 +0000 Subject: [issue16581] define "PEP editor" in PEP 1 In-Reply-To: <1354240810.61.0.280116049987.issue16581@psf.upfronthosting.co.za> Message-ID: <1356179618.12.0.470134486093.issue16581@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks a lot, Nick. It looks like you also went ahead and took care of issue 16746. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 13:42:55 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 22 Dec 2012 12:42:55 +0000 Subject: [issue16746] clarify what should be sent to peps@ In-Reply-To: <1356125223.11.0.663199729281.issue16746@psf.upfronthosting.co.za> Message-ID: <1356180175.47.0.638114272833.issue16746@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This issue was just addressed by Nick's fix for issue 16581, specifically the following parts of http://hg.python.org/peps/rev/24d5623ab21e : + is a mailing list consisting of PEP editors. All +email related to PEP administration (such as requesting a PEP number +or providing an updated version of a PEP for posting) should be sent to +this address (no cross-posting please). + + Submitting a PEP ---------------- -The PEP editors assign PEP numbers and change their status. Please send -all PEP-related email to (no cross-posting please). -Also see `PEP Editor Responsibilities & Workflow`_ below. - A PEP editor must subscribe to the list. All -PEP-related correspondence should be sent (or CC'd) to +correspondence related to PEP administration should be sent (or forwarded) to (but please do not cross-post!). ---------- nosy: +ncoghlan resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 13:49:15 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 22 Dec 2012 12:49:15 +0000 Subject: [issue16746] clarify what should be sent to peps@ In-Reply-To: <1356125223.11.0.663199729281.issue16746@psf.upfronthosting.co.za> Message-ID: <1356180555.58.0.882133299734.issue16746@psf.upfronthosting.co.za> Chris Jerdonek added the comment: By the way, thanks for the clarifying info, David. Also, I thought I was the one that was going to be accused of reading the original text like a computer. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 14:25:58 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 22 Dec 2012 13:25:58 +0000 Subject: [issue16745] Hide symbols in _decimal.so In-Reply-To: <1356110133.55.0.310128337459.issue16745@psf.upfronthosting.co.za> Message-ID: <3YT6sd3PRqzNcq@mail.python.org> Roundup Robot added the comment: New changeset 51b0a150f8aa by Stefan Krah in branch '3.3': Issue #16745: Hide symbols in _decimal.so. http://hg.python.org/cpython/rev/51b0a150f8aa ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 14:49:43 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 22 Dec 2012 13:49:43 +0000 Subject: [issue16689] stdout stderr redirection mess In-Reply-To: <1355533013.89.0.974705743737.issue16689@psf.upfronthosting.co.za> Message-ID: <1356184183.53.0.10997825299.issue16689@psf.upfronthosting.co.za> anatoly techtonik added the comment: I am not convinced that "won't fix" is the solution. If you're redirecting both output streams to the same destination, you expect that the output will appear in the final file exactly as it appears on the screen. tag:wart ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 15:46:58 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 22 Dec 2012 14:46:58 +0000 Subject: [issue16749] Fatal Python Error In-Reply-To: Message-ID: <1356187618.95.0.0716847632844.issue16749@psf.upfronthosting.co.za> R. David Murray added the comment: Not really, I'm afraid. You'd have to look at the crash dump in a debugger to get more useful information. Perhaps one of the windows devs will have more concrete advice, I don't use Windows myself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 15:54:17 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 22 Dec 2012 14:54:17 +0000 Subject: [issue16751] Using modern unittest asserts in the documentation In-Reply-To: <1356165243.99.0.0485025285676.issue16751@psf.upfronthosting.co.za> Message-ID: <1356188057.56.0.135163861597.issue16751@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 16:42:57 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sat, 22 Dec 2012 15:42:57 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> Message-ID: <1356190977.66.0.851902031965.issue16618@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Serhiy, are you going to update your patches? I can implement the feedback of our Q4 Community Service Award awardee too in case you?re busy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 18:32:37 2012 From: report at bugs.python.org (Leonardo DaVinci) Date: Sat, 22 Dec 2012 17:32:37 +0000 Subject: [issue16749] Fatal Python Error In-Reply-To: <1356187618.95.0.0716847632844.issue16749@psf.upfronthosting.co.za> Message-ID: Leonardo DaVinci added the comment: Ok I'll try booting and installing in Mac to see if the issue reappears. Thanks for your time. Happy holidays. Ciro On Sat, Dec 22, 2012 at 9:46 AM, R. David Murray wrote: > > R. David Murray added the comment: > > Not really, I'm afraid. You'd have to look at the crash dump in a > debugger to get more useful information. Perhaps one of the windows devs > will have more concrete advice, I don't use Windows myself. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 18:44:45 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 22 Dec 2012 17:44:45 +0000 Subject: [issue16689] stdout stderr redirection mess In-Reply-To: <1356184183.53.0.10997825299.issue16689@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > I am not convinced that "won't fix" is the solution. If you're redirecting both output streams to the same destination, you expect that the output will appear in the final file exactly as it appears on the screen. There's nothing to fix. The order in which the output appears in the final file depends on the buffering. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 18:55:44 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sat, 22 Dec 2012 17:55:44 +0000 Subject: [issue16689] stdout stderr redirection mess In-Reply-To: Message-ID: Charles-Fran?ois Natali added the comment: To be more specific, for performance reasons, you definitely don't want stdout to be line buffered when redirected to a file, but fully buffered. It makes sense to have stderr unbuffered or line buffered either way to make sure that errors get printed - right away. See http://www.delorie.com/gnu/docs/glibc/libc_226.html for an explanation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 18:59:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 17:59:01 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> Message-ID: <1356199141.04.0.557318258217.issue16618@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Aha! It's OS/2 where glob('*/') returns result without trailing slash. Here also glob() can return str (on 2.7) result for unicode pattern. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 19:33:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 18:33:12 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1356190977.66.0.851902031965.issue16618@psf.upfronthosting.co.za> Message-ID: <1356201574.4088.4.camel@raxxla> Serhiy Storchaka added the comment: Here is an updated patches. I hope it satisfies Antoine's comments. ---------- Added file: http://bugs.python.org/file28398/glob_dotfiles_3.patch Added file: http://bugs.python.org/file28399/glob_tests-2.7_3.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 8006110102c5 Lib/glob.py --- a/Lib/glob.py Sat Dec 22 10:36:45 2012 +0100 +++ b/Lib/glob.py Sat Dec 22 20:32:21 2012 +0200 @@ -57,8 +57,8 @@ names = os.listdir(dirname) except OSError: return [] - if pattern[0] != '.': - names = [x for x in names if x[0] != '.'] + if not _ishidden(pattern): + names = [x for x in names if not _ishidden(x)] return fnmatch.filter(names, pattern) def glob0(dirname, basename): @@ -82,3 +82,6 @@ else: match = magic_check.search(s) return match is not None + +def _ishidden(path): + return path[0] in ('.', b'.'[0]) diff -r 8006110102c5 Lib/test/test_glob.py --- a/Lib/test/test_glob.py Sat Dec 22 10:36:45 2012 +0100 +++ b/Lib/test/test_glob.py Sat Dec 22 20:32:21 2012 +0200 @@ -31,7 +31,8 @@ self.mktemp('a', 'bcd', 'efg', 'ha') if can_symlink(): os.symlink(self.norm('broken'), self.norm('sym1')) - os.symlink(self.norm('broken'), self.norm('sym2')) + os.symlink('broken', self.norm('sym2')) + os.symlink(os.path.join('a', 'bcd'), self.norm('sym3')) def tearDown(self): shutil.rmtree(self.tempdir) @@ -44,10 +45,16 @@ p = os.path.join(self.tempdir, pattern) res = glob.glob(p) self.assertEqual(list(glob.iglob(p)), res) + bres = [os.fsencode(x) for x in res] + self.assertEqual(glob.glob(os.fsencode(p)), bres) + self.assertEqual(list(glob.iglob(os.fsencode(p))), bres) return res def assertSequencesEqual_noorder(self, l1, l2): + l1 = list(l1) + l2 = list(l2) self.assertEqual(set(l1), set(l2)) + self.assertEqual(sorted(l1), sorted(l2)) def test_glob_literal(self): eq = self.assertSequencesEqual_noorder @@ -56,15 +63,15 @@ eq(self.glob('aab'), [self.norm('aab')]) eq(self.glob('zymurgy'), []) - # test return types are unicode, but only if os.listdir - # returns unicode filenames - uniset = set([str]) - tmp = os.listdir('.') - if set(type(x) for x in tmp) == uniset: - u1 = glob.glob('*') - u2 = glob.glob('./*') - self.assertEqual(set(type(r) for r in u1), uniset) - self.assertEqual(set(type(r) for r in u2), uniset) + res = glob.glob('*') + self.assertEqual({type(r) for r in res}, {str}) + res = glob.glob(os.path.join(os.curdir, '*')) + self.assertEqual({type(r) for r in res}, {str}) + + res = glob.glob(b'*') + self.assertEqual({type(r) for r in res}, {bytes}) + res = glob.glob(os.path.join(os.fsencode(os.curdir), b'*')) + self.assertEqual({type(r) for r in res}, {bytes}) def test_glob_one_directory(self): eq = self.assertSequencesEqual_noorder @@ -93,18 +100,18 @@ eq(self.glob('*', '*a'), []) eq(self.glob('a', '*', '*', '*a'), [self.norm('a', 'bcd', 'efg', 'ha')]) - eq(self.glob('?a?', '*F'), map(self.norm, [os.path.join('aaa', 'zzzF'), - os.path.join('aab', 'F')])) + eq(self.glob('?a?', '*F'), [self.norm('aaa', 'zzzF'), + self.norm('aab', 'F')]) def test_glob_directory_with_trailing_slash(self): # Patterns ending with a slash shouldn't match non-dirs - res = glob.glob(os.path.join(self.tempdir, 'Z*Z') + os.sep) + res = glob.glob(self.norm('Z*Z') + os.sep) self.assertEqual(res, []) - res = glob.glob(os.path.join(self.tempdir, 'ZZZ') + os.sep) + res = glob.glob(self.norm('ZZZ') + os.sep) self.assertEqual(res, []) # When there is wildcard pattern which ends with os.sep, glob() # doesn't blow up. - res = glob.glob(os.path.join(self.tempdir, 'aa*') + os.sep) + res = glob.glob(self.norm('aa*') + os.sep) self.assertEqual(len(res), 2) # either of these results are reasonable self.assertIn(set(res), [ @@ -115,22 +122,35 @@ def test_glob_bytes_directory_with_trailing_slash(self): # Same as test_glob_directory_with_trailing_slash, but with a # bytes argument. - res = glob.glob(os.fsencode(os.path.join(self.tempdir, 'Z*Z') + os.sep)) + res = glob.glob(os.fsencode(self.norm('Z*Z') + os.sep)) self.assertEqual(res, []) - res = glob.glob(os.fsencode(os.path.join(self.tempdir, 'ZZZ') + os.sep)) + res = glob.glob(os.fsencode(self.norm('ZZZ') + os.sep)) self.assertEqual(res, []) - res = glob.glob(os.fsencode(os.path.join(self.tempdir, 'aa*') + os.sep)) + res = glob.glob(os.fsencode(self.norm('aa*') + os.sep)) self.assertEqual(len(res), 2) # either of these results are reasonable - self.assertIn({os.fsdecode(x) for x in res}, [ - {self.norm('aaa'), self.norm('aab')}, - {self.norm('aaa') + os.sep, self.norm('aab') + os.sep}, + self.assertIn(set(res), [ + {os.fsencode(self.norm('aaa')), os.fsencode(self.norm('aab'))}, + {os.fsencode(self.norm('aaa') + os.sep), + os.fsencode(self.norm('aab') + os.sep)}, ]) @skip_unless_symlink + def test_glob_symlinks(self): + eq = self.assertSequencesEqual_noorder + eq(self.glob('sym3'), [self.norm('sym3')]) + eq(self.glob('sym3', '*'), [self.norm('sym3', 'EF'), + self.norm('sym3', 'efg')]) + self.assertIn(self.glob('sym3' + os.sep), + [[self.norm('sym3')], [self.norm('sym3') + os.sep]]) + eq(self.glob('*', '*F'), [self.norm('aaa', 'zzzF'), + self.norm('aab', 'F'), self.norm('sym3', 'EF')]) + + @skip_unless_symlink def test_glob_broken_symlinks(self): eq = self.assertSequencesEqual_noorder - eq(self.glob('sym*'), [self.norm('sym1'), self.norm('sym2')]) + eq(self.glob('sym*'), [self.norm('sym1'), self.norm('sym2'), + self.norm('sym3')]) eq(self.glob('sym1'), [self.norm('sym1')]) eq(self.glob('sym2'), [self.norm('sym2')]) -------------- next part -------------- diff -r 231e4889b117 Lib/test/test_glob.py --- a/Lib/test/test_glob.py Sat Dec 22 10:44:11 2012 +0100 +++ b/Lib/test/test_glob.py Sat Dec 22 20:32:15 2012 +0200 @@ -5,6 +5,8 @@ import shutil import sys +def fsdecode(s): + return unicode(s, sys.getfilesystemencoding()) class GlobTests(unittest.TestCase): @@ -31,7 +33,8 @@ self.mktemp('a', 'bcd', 'efg', 'ha') if hasattr(os, 'symlink'): os.symlink(self.norm('broken'), self.norm('sym1')) - os.symlink(self.norm('broken'), self.norm('sym2')) + os.symlink('broken', self.norm('sym2')) + os.symlink(os.path.join('a', 'bcd'), self.norm('sym3')) def tearDown(self): shutil.rmtree(self.tempdir) @@ -44,10 +47,16 @@ p = os.path.join(self.tempdir, pattern) res = glob.glob(p) self.assertEqual(list(glob.iglob(p)), res) + ures = [fsdecode(x) for x in res] + self.assertEqual(glob.glob(fsdecode(p)), ures) + self.assertEqual(list(glob.iglob(fsdecode(p))), ures) return res def assertSequencesEqual_noorder(self, l1, l2): + l1 = list(l1) + l2 = list(l2) self.assertEqual(set(l1), set(l2)) + self.assertEqual(sorted(l1), sorted(l2)) def test_glob_literal(self): eq = self.assertSequencesEqual_noorder @@ -56,15 +65,19 @@ eq(self.glob('aab'), [self.norm('aab')]) eq(self.glob('zymurgy'), []) + res = glob.glob('*') + self.assertEqual({type(r) for r in res}, {str}) + res = glob.glob(os.path.join(os.curdir, '*')) + self.assertEqual({type(r) for r in res}, {str}) + # test return types are unicode, but only if os.listdir # returns unicode filenames - uniset = set([unicode]) - tmp = os.listdir(u'.') - if set(type(x) for x in tmp) == uniset: - u1 = glob.glob(u'*') - u2 = glob.glob(u'./*') - self.assertEqual(set(type(r) for r in u1), uniset) - self.assertEqual(set(type(r) for r in u2), uniset) + tmp = os.listdir(fsdecode(os.curdir)) + if {type(x) for x in tmp} == {unicode}: + res = glob.glob(u'*') + self.assertEqual({type(r) for r in res}, {unicode}) + res = glob.glob(os.path.join(fsdecode(os.curdir), u'*')) + self.assertEqual({type(r) for r in res}, {unicode}) def test_glob_one_directory(self): eq = self.assertSequencesEqual_noorder @@ -93,21 +106,57 @@ eq(self.glob('*', '*a'), []) eq(self.glob('a', '*', '*', '*a'), [self.norm('a', 'bcd', 'efg', 'ha')]) - eq(self.glob('?a?', '*F'), map(self.norm, [os.path.join('aaa', 'zzzF'), - os.path.join('aab', 'F')])) + eq(self.glob('?a?', '*F'), [self.norm('aaa', 'zzzF'), + self.norm('aab', 'F')]) def test_glob_directory_with_trailing_slash(self): - # We are verifying that when there is wildcard pattern which - # ends with os.sep doesn't blow up. - res = glob.glob(self.tempdir + '*' + os.sep) - self.assertEqual(len(res), 1) + # Patterns ending with a slash shouldn't match non-dirs + res = glob.glob(self.norm('Z*Z') + os.sep) + self.assertEqual(res, []) + res = glob.glob(self.norm('ZZZ') + os.sep) + self.assertEqual(res, []) + # When there is wildcard pattern which ends with os.sep, glob() + # doesn't blow up. + res = glob.glob(self.norm('aa*') + os.sep) + self.assertEqual(len(res), 2) # either of these results are reasonable - self.assertIn(res[0], [self.tempdir, self.tempdir + os.sep]) + self.assertIn(set(res), [ + {self.norm('aaa'), self.norm('aab')}, + {self.norm('aaa') + os.sep, self.norm('aab') + os.sep}, + ]) + + def test_glob_unicode_directory_with_trailing_slash(self): + # Same as test_glob_directory_with_trailing_slash, but with an + # unicode argument. + res = glob.glob(fsdecode(self.norm('Z*Z') + os.sep)) + self.assertEqual(res, []) + res = glob.glob(fsdecode(self.norm('ZZZ') + os.sep)) + self.assertEqual(res, []) + res = glob.glob(fsdecode(self.norm('aa*') + os.sep)) + self.assertEqual(len(res), 2) + # either of these results are reasonable + self.assertIn(set(res), [ + {fsdecode(self.norm('aaa')), fsdecode(self.norm('aab'))}, + {fsdecode(self.norm('aaa') + os.sep), + fsdecode(self.norm('aab') + os.sep)}, + ]) + + def test_glob_symlinks(self): + if hasattr(os, 'symlink'): + eq = self.assertSequencesEqual_noorder + eq(self.glob('sym3'), [self.norm('sym3')]) + eq(self.glob('sym3', '*'), [self.norm('sym3', 'EF'), + self.norm('sym3', 'efg')]) + self.assertIn(self.glob('sym3' + os.sep), + [[self.norm('sym3')], [self.norm('sym3') + os.sep]]) + eq(self.glob('*', '*F'), [self.norm('aaa', 'zzzF'), + self.norm('aab', 'F'), self.norm('sym3', 'EF')]) def test_glob_broken_symlinks(self): if hasattr(os, 'symlink'): eq = self.assertSequencesEqual_noorder - eq(self.glob('sym*'), [self.norm('sym1'), self.norm('sym2')]) + eq(self.glob('sym*'), [self.norm('sym1'), self.norm('sym2'), + self.norm('sym3')]) eq(self.glob('sym1'), [self.norm('sym1')]) eq(self.glob('sym2'), [self.norm('sym2')]) From report at bugs.python.org Sat Dec 22 19:46:33 2012 From: report at bugs.python.org (Jonathan McDougall) Date: Sat, 22 Dec 2012 18:46:33 +0000 Subject: [issue1195571] simple callback system for Py_FatalError Message-ID: <1356201992.99.0.259509366974.issue1195571@psf.upfronthosting.co.za> Jonathan McDougall added the comment: The latest patch does not allow changing the default behaviour of aborting the process, which is for me a problem. I am both embedding and extending python using Boost.Python, but scripting is optional. In case python fails to initialize, I want to disable scripting but keep the program running. Libraries shouldn't abort; they should report errors to the caller and let it figure out what to do. ---------- nosy: +jonathanmcdougall _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 20:34:29 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 22 Dec 2012 19:34:29 +0000 Subject: [issue16686] audioop overflow issues In-Reply-To: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> Message-ID: <1356204869.35.0.0796716049635.issue16686@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 20:39:27 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 22 Dec 2012 19:39:27 +0000 Subject: [issue16737] Different behaviours in script run directly and via runpy.run_module In-Reply-To: <1356010622.32.0.479096681415.issue16737@psf.upfronthosting.co.za> Message-ID: <1356205167.41.0.0381805246675.issue16737@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 20:45:53 2012 From: report at bugs.python.org (Thomas Heller) Date: Sat, 22 Dec 2012 19:45:53 +0000 Subject: [issue16752] Missing import in modulefinder.py Message-ID: <1356205548.55.0.954996181109.issue16752@psf.upfronthosting.co.za> New submission from Thomas Heller: It seems the statement import importlib is missing in 3.3's modulefinder.py ---------- components: Library (Lib) messages: 177951 nosy: theller priority: normal severity: normal status: open title: Missing import in modulefinder.py versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 21:12:05 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 22 Dec 2012 20:12:05 +0000 Subject: [issue16689] stdout stderr redirection mess In-Reply-To: <1355533013.89.0.974705743737.issue16689@psf.upfronthosting.co.za> Message-ID: <1356207125.25.0.526913010255.issue16689@psf.upfronthosting.co.za> Antoine Pitrou added the comment: And arguably you shouldn't redirect stdout and stderr to the same place, except for temporary debugging purposes. ---------- nosy: +pitrou status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 21:21:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 20:21:16 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1356207676.27.0.542114264584.issue14373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. Thank you, Matt and Alexey. Here is a simple benchmark. On my computer it shows 10-25x speedup using the C accelerator. ---------- stage: needs patch -> commit review Added file: http://bugs.python.org/file28400/lru_cache_bench.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 21:37:34 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 22 Dec 2012 20:37:34 +0000 Subject: [issue16689] stdout stderr redirection mess In-Reply-To: <1355533013.89.0.974705743737.issue16689@psf.upfronthosting.co.za> Message-ID: <1356208654.43.0.930162673576.issue16689@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Anatoly, we are not going to change the default buffering to the most inefficient possible to meet your expectation -- especially when there is a simple option to give you what you want. Unix/C and hence windows has two output streams because people often want the two streams to go to different places. Anyone who knows and uses the magic incantation '2>&1' to mix them together had better know (or learn) what this really means and what the options are. This issue has nothing in particular to do with Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 22:01:00 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 22 Dec 2012 21:01:00 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1356210060.73.0.913726011151.issue14373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Antoine reminded me about a lock. In Python implementation it needed because linked list modifications are not atomic. In C implementation linked list modifications are atomic. However dict operations can call Python code and therefore they are not atomic. I don't know what bad things can happened with concurrent cache updating, however using lock will be safer and cheap enought. Please add lock field to lru_cache_object and use it as in Python implementation. If no one can prove that a lock is not needed. ---------- stage: commit review -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 22:05:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 22 Dec 2012 21:05:18 +0000 Subject: [issue16747] Remove 'file' type reference from 'iterable' glossary entry In-Reply-To: <1356134813.58.0.26000957124.issue16747@psf.upfronthosting.co.za> Message-ID: <1356210318.18.0.837218307631.issue16747@psf.upfronthosting.co.za> Chris Jerdonek added the comment: If you are changing just a few minor things, can you resubmit the patch without reflowing? It will be easier to see what minor things have changed. (It is okay to have the occasional short line to avoid having long lines. Reflowing can be done as part of a separate commit if it is severe.) ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 23:03:54 2012 From: report at bugs.python.org (Berker Peksag) Date: Sat, 22 Dec 2012 22:03:54 +0000 Subject: [issue16752] Missing import in modulefinder.py In-Reply-To: <1356205548.55.0.954996181109.issue16752@psf.upfronthosting.co.za> Message-ID: <1356213834.8.0.0982615730334.issue16752@psf.upfronthosting.co.za> Berker Peksag added the comment: Here is a patch with a test case. ---------- keywords: +patch nosy: +berker.peksag versions: +Python 3.4 Added file: http://bugs.python.org/file28401/issue16752.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 23:08:41 2012 From: report at bugs.python.org (Vance Maverick) Date: Sat, 22 Dec 2012 22:08:41 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1356214121.82.0.892198200123.issue15853@psf.upfronthosting.co.za> Vance Maverick added the comment: FYI, http://downloads.activestate.com/ActiveTcl/releases/8.5.11.1/ is no longer online, so that workaround is no longer possible. ---------- nosy: +Vance.Maverick _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 23:09:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 22 Dec 2012 22:09:37 +0000 Subject: [issue16745] Hide symbols in _decimal.so In-Reply-To: <1356110133.55.0.310128337459.issue16745@psf.upfronthosting.co.za> Message-ID: <3YTLTr6CwbzNm8@mail.python.org> Roundup Robot added the comment: New changeset ccc372b37fbb by Stefan Krah in branch '3.3': Issue #16745: The gcc visibility pragma is buggy on OpenIndiana and NetBSD. http://hg.python.org/cpython/rev/ccc372b37fbb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 01:22:09 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 23 Dec 2012 00:22:09 +0000 Subject: [issue16737] Different behaviours in script run directly and via runpy.run_module In-Reply-To: <1356010622.32.0.479096681415.issue16737@psf.upfronthosting.co.za> Message-ID: <1356222129.78.0.899258238552.issue16737@psf.upfronthosting.co.za> Brett Cannon added the comment: I would totally support tossing relative file paths in Python 3.4 as it has been nothing but backwards-compatibility headaches and is essentially wrong as the module's file is not relative to the current directory necessarily. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 01:38:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Dec 2012 00:38:41 +0000 Subject: [issue16752] Missing import in modulefinder.py In-Reply-To: <1356205548.55.0.954996181109.issue16752@psf.upfronthosting.co.za> Message-ID: <3YTPns0XfBzNwr@mail.python.org> Roundup Robot added the comment: New changeset 1b9b7cb136db by Brett Cannon in branch '3.3': Issue #16752: Add a missing import to modulefinder. http://hg.python.org/cpython/rev/1b9b7cb136db ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 01:40:51 2012 From: report at bugs.python.org (Brett Cannon) Date: Sun, 23 Dec 2012 00:40:51 +0000 Subject: [issue16752] Missing import in modulefinder.py In-Reply-To: <1356205548.55.0.954996181109.issue16752@psf.upfronthosting.co.za> Message-ID: <1356223251.19.0.225461313162.issue16752@psf.upfronthosting.co.za> Brett Cannon added the comment: This was committed in default through rev d22e9e3a3326 but there was some error in the connection from hg.python.org and so it didn't get tacked on. Thanks to Thomas for the report and Berker for the patch! ---------- nosy: +brett.cannon resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 01:41:28 2012 From: report at bugs.python.org (Guilherme Polo) Date: Sun, 23 Dec 2012 00:41:28 +0000 Subject: [issue15861] ttk.Treeview "unmatched open brace in list" In-Reply-To: <1346794903.35.0.326071924778.issue15861@psf.upfronthosting.co.za> Message-ID: <1356223288.22.0.0720361775922.issue15861@psf.upfronthosting.co.za> Guilherme Polo added the comment: I consider myself the main responsible for this bug, so if the current patch (which I didn't look at) passes all tests, doesn't slow things up (unlikely, I would think) and also works with some more involved styling code then I'm fine with it. These formatting functions were added to the ttk module to make it easier to create and adjust styles using Python. It wouldn't be possible without them unless the person basically coded in Tcl while in Python. These functions ended up being used in other places (as was noticed here) for convenience. All in all, I'm glad someone else is using the module, reporting, and improving it. ---------- nosy: +gpolo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 04:38:39 2012 From: report at bugs.python.org (pmoody) Date: Sun, 23 Dec 2012 03:38:39 +0000 Subject: [issue16531] Allow IPNetwork to take a tuple In-Reply-To: <1353621566.3.0.0992835206333.issue16531@psf.upfronthosting.co.za> Message-ID: <1356233919.47.0.544039355737.issue16531@psf.upfronthosting.co.za> pmoody added the comment: Sorry. I thought I'd uploaded this earlier. I'm working on a version that pushes the parsing into _split_optional_netmask ---------- Added file: http://bugs.python.org/file28402/issue16531-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 05:58:39 2012 From: report at bugs.python.org (Jonathan McDougall) Date: Sun, 23 Dec 2012 04:58:39 +0000 Subject: [issue1195571] simple callback system for Py_FatalError Message-ID: <1356238719.79.0.75990976585.issue1195571@psf.upfronthosting.co.za> Jonathan McDougall added the comment: While trying to come up with a patch, I'm starting to realize the number of modifications needed to make this work. Py_FatalError() is called all over the place assuming that it never returns. The scope of this feature is enormous. I'm wondering what would happen if I threw an exception from there :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 10:33:18 2012 From: report at bugs.python.org (Daniel Gonzalez) Date: Sun, 23 Dec 2012 09:33:18 +0000 Subject: [issue1927] raw_input behavior incorrect if readline not enabled In-Reply-To: <1201206078.95.0.997961854688.issue1927@psf.upfronthosting.co.za> Message-ID: <1356255198.1.0.100802013167.issue1927@psf.upfronthosting.co.za> Daniel Gonzalez added the comment: Please see this stackoverflow thread where more information is given about this issue: http://stackoverflow.com/questions/14009714/strange-redirection-effect-with-raw-input ---------- nosy: +Daniel.Gonzalez _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 11:08:24 2012 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 23 Dec 2012 10:08:24 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1356257304.05.0.191753633479.issue14373@psf.upfronthosting.co.za> Stefan Behnel added the comment: Just for the record, I've compiled Raymond's roadmap version in Cython (with only slight changes to make 'self.maxsize' a Py_ssize_t and using an external .pxd for typing) and ran Serhiy's benchmark over it (Ubuntu 12.10, 64bit). This is what I get in Py3.4: 0.022 untyped_cy(i) 0.023 untyped_cy("spam", i) 0.024 untyped_cy("spam", "spam", i) 0.106 untyped_cy(a=i) 0.133 untyped_cy(a="spam", b=i) 0.152 untyped_cy(a="spam", b="spam", c=i) 0.033 typed_cy(i) 0.038 typed_cy("spam", i) 0.039 typed_cy("spam", "spam", i) 0.129 typed_cy(a=i) 0.168 typed_cy(a="spam", b=i) 0.183 typed_cy(a="spam", b="spam", c=i) 0.143 untyped_py(i) 0.234 untyped_py("spam", i) 0.247 untyped_py("spam", "spam", i) 0.368 untyped_py(a=i) 0.406 untyped_py(a="spam", b=i) 0.425 untyped_py(a="spam", b="spam", c=i) 0.447 typed_py(i) 0.469 typed_py("spam", i) 0.480 typed_py("spam", "spam", i) 0.745 typed_py(a=i) 0.783 typed_py(a="spam", b=i) 0.819 typed_py(a="spam", b="spam", c=i) Looking at the factors, that's about the same speedup that the dedicated hand tuned C implementation presented according to Serhiy's own runs (he reported 10-25x). Makes me wonder why we should have two entirely separate implementations for this. Here's the lru_cache_class.pxd file I used: """ cimport cython cdef make_key(tuple args, dict kwds, bint typed, tuple kwd_mark) @cython.final @cython.internal cdef class c_lru_cache: cdef dict cache cdef Py_ssize_t hits cdef Py_ssize_t misses cdef Py_ssize_t maxsize cdef bint typed cdef object user_function cdef object cache_info_type cdef tuple kwd_mark cdef list root """ ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 11:14:44 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 23 Dec 2012 10:14:44 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356257684.55.0.131810948813.issue16743@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Terry, what makes you think this is a feature request? This is a bug, quite simply. ---------- nosy: +pitrou versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 11:16:49 2012 From: report at bugs.python.org (Anton Kasyanov) Date: Sun, 23 Dec 2012 10:16:49 +0000 Subject: [issue16045] add more unit tests for built-in int() In-Reply-To: <1348579722.08.0.96812684384.issue16045@psf.upfronthosting.co.za> Message-ID: <1356257809.62.0.756373067073.issue16045@psf.upfronthosting.co.za> Anton Kasyanov added the comment: looks good to me ---------- nosy: +asvetlov, mindmaster _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 11:26:44 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 23 Dec 2012 10:26:44 +0000 Subject: [issue13178] Need tests for Unicode handling in install_distinfo and install_data In-Reply-To: <1318604483.39.0.256027567702.issue13178@psf.upfronthosting.co.za> Message-ID: <1356258404.79.0.313160219824.issue13178@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 11:28:31 2012 From: report at bugs.python.org (Viktor Ershov) Date: Sun, 23 Dec 2012 10:28:31 +0000 Subject: [issue9856] Change object.__format__(s) where s is non-empty to a TypeError In-Reply-To: <1284485218.75.0.159147258754.issue9856@psf.upfronthosting.co.za> Message-ID: <1356258511.15.0.522967340026.issue9856@psf.upfronthosting.co.za> Viktor Ershov added the comment: As I can see this is already implemented in 3.4 ---------- nosy: +asvetlov, krinart _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 11:35:15 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 23 Dec 2012 10:35:15 +0000 Subject: [issue16753] #include broken on FreeBSD 9.1-RELEASE Message-ID: <1356258915.36.0.46771608396.issue16753@psf.upfronthosting.co.za> New submission from Stefan Krah: This is strictly a buildbot issue. #include seems broken on http://buildbot.python.org/all/builders/AMD64%20FreeBSD%209.0%20dtrace%203.3/builds/248/steps/compile/logs/stdio In file included from /usr/include/ctype.h:83, from /usr/home/buildbot/python/3.3.koobs-freebsd/build/Modules/_decimal/libmpdec/io.c:33: /usr/include/xlocale/_ctype.h:56:38: error: operator '!' has no right operand Also note that the buildbot software reports success (i.e. the compile step is green) despite the error. ---------- keywords: buildbot messages: 177971 nosy: koobs, skrah priority: normal severity: normal status: open title: #include broken on FreeBSD 9.1-RELEASE versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 11:37:24 2012 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 23 Dec 2012 10:37:24 +0000 Subject: [issue11379] Remove "lightweight" from minidom description In-Reply-To: <1299093908.17.0.828802315354.issue11379@psf.upfronthosting.co.za> Message-ID: <1356259044.78.0.90984192961.issue11379@psf.upfronthosting.co.za> Stefan Behnel added the comment: Any news on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 11:52:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Dec 2012 10:52:10 +0000 Subject: [issue16045] add more unit tests for built-in int() In-Reply-To: <1348579722.08.0.96812684384.issue16045@psf.upfronthosting.co.za> Message-ID: <3YTgPj5rWdzR0T@mail.python.org> Roundup Robot added the comment: New changeset c502a2dc0345 by Andrew Svetlov in branch '2.7': Issue #16045: add more unit tests for built-in int() http://hg.python.org/cpython/rev/c502a2dc0345 New changeset a90d7003966e by Andrew Svetlov in branch '3.3': Issue #16045: add more unit tests for built-in int() http://hg.python.org/cpython/rev/a90d7003966e New changeset ec7146b18274 by Andrew Svetlov in branch 'default': Issue #16045: add more unit tests for built-in int() http://hg.python.org/cpython/rev/ec7146b18274 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 11:53:04 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 23 Dec 2012 10:53:04 +0000 Subject: [issue16045] add more unit tests for built-in int() In-Reply-To: <1348579722.08.0.96812684384.issue16045@psf.upfronthosting.co.za> Message-ID: <1356259984.27.0.576065875099.issue16045@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 11:53:22 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 23 Dec 2012 10:53:22 +0000 Subject: [issue16045] add more unit tests for built-in int() In-Reply-To: <1348579722.08.0.96812684384.issue16045@psf.upfronthosting.co.za> Message-ID: <1356260002.33.0.0220657867046.issue16045@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 12:09:58 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 23 Dec 2012 11:09:58 +0000 Subject: [issue16745] Hide symbols in _decimal.so In-Reply-To: <1356110133.55.0.310128337459.issue16745@psf.upfronthosting.co.za> Message-ID: <1356260998.07.0.00344522541581.issue16745@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 12:56:43 2012 From: report at bugs.python.org (Anton Kasyanov) Date: Sun, 23 Dec 2012 11:56:43 +0000 Subject: [issue16443] Add docstrings to regular expression match objects In-Reply-To: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> Message-ID: <1356263803.62.0.573122786753.issue16443@psf.upfronthosting.co.za> Anton Kasyanov added the comment: Created a patch with docstrings for match objects. Also added empty lines in pattern object docstrings according to http://www.python.org/dev/peps/pep-0007/#id7 ---------- keywords: +patch nosy: +a.kasyanov, asvetlov versions: -Python 2.7 Added file: http://bugs.python.org/file28403/issue-16443.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 13:10:56 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 23 Dec 2012 12:10:56 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1356264656.54.0.492620136088.issue14373@psf.upfronthosting.co.za> Stefan Krah added the comment: Hmm. Judging by the numbers for the Python version, my machine appears to be slower than Stefan (Behnel)'s machine, and yet the C version is much faster here than the posted Cython numbers. If I adjust the results for the machine differences, the C version would appear to be 2.5x faster than the Cython version. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 13:27:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Dec 2012 12:27:27 +0000 Subject: [issue9856] Change object.__format__(s) where s is non-empty to a TypeError In-Reply-To: <1284485218.75.0.159147258754.issue9856@psf.upfronthosting.co.za> Message-ID: <3YTjWf3blDzQwl@mail.python.org> Roundup Robot added the comment: New changeset d91c14788729 by Andrew Svetlov in branch 'default': Issue #9856: Replace deprecation warinigs to raising TypeError in object.__format__ http://hg.python.org/cpython/rev/d91c14788729 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 13:30:23 2012 From: report at bugs.python.org (Anton Kasyanov) Date: Sun, 23 Dec 2012 12:30:23 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356265823.14.0.620150954899.issue15302@psf.upfronthosting.co.za> Anton Kasyanov added the comment: I've looked through the second patch and I'm not sure about how argparse usage was implemented here - parse_args() result is being converted to getopt-style list of (option, value) pairs. Is there any sense in using argparse this way? ---------- nosy: +a.kasyanov, asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 13:36:06 2012 From: report at bugs.python.org (Sandro Mani) Date: Sun, 23 Dec 2012 12:36:06 +0000 Subject: [issue16754] Incorrect shared library extension on linux Message-ID: <1356266166.76.0.178044154393.issue16754@psf.upfronthosting.co.za> New submission from Sandro Mani: I'm using Python3 as available in Fedora rawhide (python3-3.3.0-2.fc19.x86_64). Attempting to build a project using python3/distutils, I noticed that find_library_file would not find any library at all. Some investigation showed that this was due to the fact that libraries were searched with the ".cpython-33m.so" extension. Even more investigation showed that the library extension was read being overridden by the one defined in the /usr/lib64/python3.3/config-3.3m/Makefile shipped by python3-libs. See below for the detailed analysis. The python-versioned extension obviously makes no sense for regular shared objects which are not python binary modules, so this is clearly wrong. As a workaround I patched sysconfig.py to comment out customize_compiler::235 (compiler.shared_lib_extension = so_ext, see below), recompiled python (all tests still pass), and things seem to work. Detailed analysis: setup.py: def _find_library_file(self, library): return self.compiler.find_library_file(self.compiler.library_dirs, library) --- In function /usr/lib64/python3.3/distutils/unixcompiler.py at find_library_file::266: shared_f = self.library_filename(lib, lib_type='shared') In function /usr/lib64/python3.3/distutils/ccompiler.py at library_filename::882: ext = getattr(self, lib_type + "_lib_extension") -> Where does shared_lib_extension get defined? * At /usr/lib64/python3.3/distutils/ccompiler.py::66 shared_lib_extension = None -> default for abstract class * At /usr/lib64/python3.3/distutils/unixcompiler.py::77 shared_lib_extension = ".so" -> this is the correct value * In function /usr/lib64/python3.3/distutils/sysconfig.py at customize_compiler::235 by /usr/lib64/python3.3/distutils/sysconfig.py at customize_compiler::235 compiler.shared_lib_extension = so_ext by /usr/lib64/python3.3/distutils/sysconfig.py at customize_compiler::194 (cc, cxx, opt, cflags, ccshared, ldshared, so_ext, ar, ar_flags) = \ get_config_vars('CC', 'CXX', 'OPT', 'CFLAGS', 'CCSHARED', 'LDSHARED', 'SO', 'AR', 'ARFLAGS')) by /usr/lib64/python3.3/distutils/sysconfig.py at get_config_vars::530 526 global _config_vars 527 if _config_vars is None: 528 func = globals().get("_init_" + os.name) # -> os.name = posix 529 if func: 530 func() # -> _init_posix, populates _config_vars by /usr/lib64/python3.3/distutils/sysconfig.py at _init_posix::439 435 g = {} 436 # load the installed Makefile: 437 try: 438 filename = get_makefile_filename() # /usr/lib64/python3.3/config-3.3m/Makefile 439 parse_makefile(filename, g) ... 476 global _config_vars 477 _config_vars = g # -> _config_vars["SO"] = ".cpython-33m.so" by /usr/lib64/python3.3/config-3.3m/Makefile::122 SO= .cpython-33m.so ---------- assignee: eric.araujo components: Distutils messages: 177979 nosy: eric.araujo, smani, tarek priority: normal severity: normal status: open title: Incorrect shared library extension on linux type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 13:40:00 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 23 Dec 2012 12:40:00 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1356266400.29.0.938419571329.issue14373@psf.upfronthosting.co.za> Stefan Krah added the comment: I've managed to build the Cython version now. It's in fact between 4 and 6 times slower here than the C version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 13:42:02 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 23 Dec 2012 12:42:02 +0000 Subject: [issue9856] Change object.__format__(s) where s is non-empty to a TypeError In-Reply-To: <1284485218.75.0.159147258754.issue9856@psf.upfronthosting.co.za> Message-ID: <1356266522.18.0.584197676804.issue9856@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Committed. Thanks. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 13:50:02 2012 From: report at bugs.python.org (oleg chubin) Date: Sun, 23 Dec 2012 12:50:02 +0000 Subject: [issue879399] socket line buffering Message-ID: <1356267002.82.0.214536974628.issue879399@psf.upfronthosting.co.za> oleg chubin added the comment: I just have updated patch for current version of code. It looks good for me. ---------- nosy: +0lejka, asvetlov Added file: http://bugs.python.org/file28404/_fileobject23122012.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 14:12:31 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Dec 2012 13:12:31 +0000 Subject: [issue9856] Change object.__format__(s) where s is non-empty to a TypeError In-Reply-To: <1284485218.75.0.159147258754.issue9856@psf.upfronthosting.co.za> Message-ID: <3YTkWf36c2zRXK@mail.python.org> Roundup Robot added the comment: New changeset 2f6ec67636b8 by Andrew Svetlov in branch 'default': Add NEWS and docs for #9856 http://hg.python.org/cpython/rev/2f6ec67636b8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 14:19:26 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 23 Dec 2012 13:19:26 +0000 Subject: [issue9856] Change object.__format__(s) where s is non-empty to a TypeError In-Reply-To: <1284485218.75.0.159147258754.issue9856@psf.upfronthosting.co.za> Message-ID: <1356268766.72.0.953663314618.issue9856@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Updated NEWS and docs ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 14:34:00 2012 From: report at bugs.python.org (Pander) Date: Sun, 23 Dec 2012 13:34:00 +0000 Subject: [issue16684] Unicode property value abbreviated names and long names In-Reply-To: <1355506392.97.0.314398568458.issue16684@psf.upfronthosting.co.za> Message-ID: <1356269640.47.0.720341555755.issue16684@psf.upfronthosting.co.za> Pander added the comment: Attached is the requested proof-of-concept script. ---------- Added file: http://bugs.python.org/file28405/create-unicodedata-dicts-prop-value-alias-20121223.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 14:47:52 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 23 Dec 2012 13:47:52 +0000 Subject: [issue879399] socket line buffering Message-ID: <1356270472.83.0.887415849655.issue879399@psf.upfronthosting.co.za> Andrew Svetlov added the comment: LGTM. Kristj?n, would you like to commit? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 15:12:38 2012 From: report at bugs.python.org (koobs) Date: Sun, 23 Dec 2012 14:12:38 +0000 Subject: [issue16753] #include broken on FreeBSD 9.1-RELEASE In-Reply-To: <1356258915.36.0.46771608396.issue16753@psf.upfronthosting.co.za> Message-ID: <1356271958.5.0.877981329915.issue16753@psf.upfronthosting.co.za> koobs added the comment: This was noted by Dmitry Sivachenko during tests of my python33 port for FreeBSD, with the following commits going to HEAD (CURRENT) and RELENG_9 (9-STABLE) respectively: http://svnweb.freebsd.org/base?view=revision&revision=243032 http://svnweb.freebsd.org/base?view=revision&revision=243331 If you need me to get any more info let me know ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 15:26:59 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 23 Dec 2012 14:26:59 +0000 Subject: [issue16753] #include broken on FreeBSD 9.1-RELEASE In-Reply-To: <1356258915.36.0.46771608396.issue16753@psf.upfronthosting.co.za> Message-ID: <1356272819.38.0.683627105574.issue16753@psf.upfronthosting.co.za> Stefan Krah added the comment: Thanks, it's really a FreeBSD issue then. I was wondering how this could go undetected in a production release. The reason is probably that __GNUC_STDC_INLINE__ (which libmpdec uses) is quite rare. ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 15:34:27 2012 From: report at bugs.python.org (Stefan Krah) Date: Sun, 23 Dec 2012 14:34:27 +0000 Subject: [issue16753] #include broken on FreeBSD 9.1-RELEASE In-Reply-To: <1356272819.38.0.683627105574.issue16753@psf.upfronthosting.co.za> Message-ID: <20121223143429.GA5955@sleipnir.bytereef.org> Stefan Krah added the comment: On second thought, gcc defines __GNUC_STDC_INLINE__ to 1, so probably libmpdec should do the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 15:46:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Dec 2012 14:46:47 +0000 Subject: [issue16753] #include broken on FreeBSD 9.1-RELEASE In-Reply-To: <1356258915.36.0.46771608396.issue16753@psf.upfronthosting.co.za> Message-ID: <3YTmcQ5cV1zRXK@mail.python.org> Roundup Robot added the comment: New changeset f05d29353f02 by Stefan Krah in branch '3.3': Issue #16753: Define __GNUC_STDC_INLINE__ to an integer (same as gcc). http://hg.python.org/cpython/rev/f05d29353f02 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 16:04:42 2012 From: report at bugs.python.org (Volodymyr Hotsyk) Date: Sun, 23 Dec 2012 15:04:42 +0000 Subject: [issue16755] Distutils2 incorrectly works with unicode package names Message-ID: <1356275082.9.0.0209714500898.issue16755@psf.upfronthosting.co.za> New submission from Volodymyr Hotsyk: While testing #13178, found that Distutils2 incorrectly works with the package names containing unicode symbols. Please check test attached. ---------- assignee: eric.araujo components: Distutils2 files: unicode_test.diff keywords: patch messages: 177991 nosy: alexis, asvetlov, eric.araujo, hotsyk, tarek priority: normal severity: normal status: open title: Distutils2 incorrectly works with unicode package names type: enhancement versions: Python 3.3 Added file: http://bugs.python.org/file28406/unicode_test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 17:19:25 2012 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 23 Dec 2012 16:19:25 +0000 Subject: [issue9856] Change object.__format__(s) where s is non-empty to a TypeError In-Reply-To: <1284485218.75.0.159147258754.issue9856@psf.upfronthosting.co.za> Message-ID: <1356279565.67.0.676153734327.issue9856@psf.upfronthosting.co.za> Eric V. Smith added the comment: The more I think about this, the more overly restrictive I realize it is. If the type of the object really is "object", then it can use string formatting. It's only for non-objects that I want to add the error. I'll re-open it and give it some more thought. ---------- resolution: fixed -> stage: committed/rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 17:20:54 2012 From: report at bugs.python.org (Stefan Behnel) Date: Sun, 23 Dec 2012 16:20:54 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1356279654.55.0.418363761406.issue14373@psf.upfronthosting.co.za> Stefan Behnel added the comment: Yep, I basically didn't do any optimisation, it's the plain Python code compiled, just with the class being converted into an extension type. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 17:28:46 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 23 Dec 2012 16:28:46 +0000 Subject: [issue9856] Change object.__format__(s) where s is non-empty to a TypeError In-Reply-To: <1284485218.75.0.159147258754.issue9856@psf.upfronthosting.co.za> Message-ID: <1356280126.83.0.436127876384.issue9856@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Ok ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 17:33:03 2012 From: report at bugs.python.org (jp) Date: Sun, 23 Dec 2012 16:33:03 +0000 Subject: [issue16756] buggy assignment to items of a list created by a * operator Message-ID: <1356280383.46.0.680609909291.issue16756@psf.upfronthosting.co.za> New submission from jp: The following code: li = [[1,0]]*5 a = [[1,10], [2,20], [3,30]] for line in a: li[line[0]][0] = 2 print(li) prints [[2,0],[2,0],[2,0],[2,0],[2,0]], but should print [[1,0],[2,0],[2,0],[2,0],[1,0]]. The output is correct if you, instead of using li = [[1,0]]*5, initialize the array as follows: li = [] for i in range(5): li.append([1,0]) ---------- components: Interpreter Core messages: 177995 nosy: jenda.petrov at gmail.com priority: normal severity: normal status: open title: buggy assignment to items of a list created by a * operator versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 17:40:18 2012 From: report at bugs.python.org (Christian Heimes) Date: Sun, 23 Dec 2012 16:40:18 +0000 Subject: [issue16756] buggy assignment to items of a list created by a * operator In-Reply-To: <1356280383.46.0.680609909291.issue16756@psf.upfronthosting.co.za> Message-ID: <1356280818.05.0.862047396924.issue16756@psf.upfronthosting.co.za> Christian Heimes added the comment: The outcome is correct. You have fallen for a common beginners gotcha: http://www.enricozini.org/2011/tips/python-list-gotcha ---------- nosy: +christian.heimes resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 17:46:47 2012 From: report at bugs.python.org (Janus Troelsen) Date: Sun, 23 Dec 2012 16:46:47 +0000 Subject: [issue9584] Allow curly brace expansion In-Reply-To: <1281688613.27.0.00233773234268.issue9584@psf.upfronthosting.co.za> Message-ID: <1356281207.3.0.940851165718.issue9584@psf.upfronthosting.co.za> Changes by Janus Troelsen : ---------- nosy: +ysangkok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 17:50:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Dec 2012 16:50:36 +0000 Subject: [issue16757] Faster _PyUnicode_FindMaxChar() Message-ID: <1356281435.93.0.623434455043.issue16757@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: The proposed patch optimizes _PyUnicode_FindMaxChar(). This affects string formatting of long patterns (speedup to 15-25% for classic formatting and 5-8% for new style formatting). ---------- components: Interpreter Core, Unicode files: unicode_findmaxchar.patch keywords: patch messages: 177997 nosy: ezio.melotti, haypo, serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Faster _PyUnicode_FindMaxChar() type: performance versions: Python 3.4 Added file: http://bugs.python.org/file28407/unicode_findmaxchar.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 17:51:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Dec 2012 16:51:11 +0000 Subject: [issue16757] Faster _PyUnicode_FindMaxChar() In-Reply-To: <1356281435.93.0.623434455043.issue16757@psf.upfronthosting.co.za> Message-ID: <1356281471.87.0.860878286881.issue16757@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28408/format_bench.sh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 18:13:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Dec 2012 17:13:57 +0000 Subject: [issue15701] AttributeError from HTTPError when using digest auth In-Reply-To: <1345149357.77.0.903430006119.issue15701@psf.upfronthosting.co.za> Message-ID: <3YTqtD59TZzQml@mail.python.org> Roundup Robot added the comment: New changeset 3046bfea59f3 by Senthil Kumaran in branch '2.7': Fix Issue15701 - HTTPError info method call raises AttributeError. Fix that to return headers correctly http://hg.python.org/cpython/rev/3046bfea59f3 New changeset 919ebf74bfdb by Senthil Kumaran in branch '3.2': Fix Issue15701 - HTTPError info method call raises AttributeError. Fix that to return headers correctly http://hg.python.org/cpython/rev/919ebf74bfdb New changeset a15109398294 by Senthil Kumaran in branch '3.3': merge from 3.2 http://hg.python.org/cpython/rev/a15109398294 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 18:14:40 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Sun, 23 Dec 2012 17:14:40 +0000 Subject: [issue15701] AttributeError from HTTPError when using digest auth In-Reply-To: <1345149357.77.0.903430006119.issue15701@psf.upfronthosting.co.za> Message-ID: <1356282880.31.0.504687621439.issue15701@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Okay. this is fixed in all versions of python. Sorry for the delay. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 18:58:50 2012 From: report at bugs.python.org (Lieutenant Commander Mohd Nazri Mohd Nasir RMN) Date: Sun, 23 Dec 2012 17:58:50 +0000 Subject: [issue16758] SubprocessStartupError Message-ID: <1356285530.15.0.755787775309.issue16758@psf.upfronthosting.co.za> New submission from Lieutenant Commander Mohd Nazri Mohd Nasir RMN: I always get this message lately, when I try to run python in IDLE. ---------- components: IDLE files: SubprocessStartupErrorMessage.jpg messages: 178000 nosy: Lieutenant.Commander.Mohd.Nazri.Mohd.Nasir.RMN priority: normal severity: normal status: open title: SubprocessStartupError type: performance versions: Python 2.7 Added file: http://bugs.python.org/file28409/SubprocessStartupErrorMessage.jpg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 19:01:11 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Dec 2012 18:01:11 +0000 Subject: [issue16443] Add docstrings to regular expression match objects In-Reply-To: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> Message-ID: <3YTrwk31SvzRTL@mail.python.org> Roundup Robot added the comment: New changeset e4f1b3565509 by Andrew Svetlov in branch '3.2': Issue #16443: Add docstrings to regular expression match objects. http://hg.python.org/cpython/rev/e4f1b3565509 New changeset 64e050c2d010 by Andrew Svetlov in branch '3.3': Issue #16443: Add docstrings to regular expression match objects. http://hg.python.org/cpython/rev/64e050c2d010 New changeset e3d0417d8266 by Andrew Svetlov in branch 'default': Issue #16443: Add docstrings to regular expression match objects. http://hg.python.org/cpython/rev/e3d0417d8266 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 19:09:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Dec 2012 18:09:10 +0000 Subject: [issue16443] Add docstrings to regular expression match objects In-Reply-To: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> Message-ID: <3YTs5x3cz7zM2d@mail.python.org> Roundup Robot added the comment: New changeset c390dc999fcc by Andrew Svetlov in branch '2.7': Issue #16443: Add docstrings to regular expression match objects. http://hg.python.org/cpython/rev/c390dc999fcc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 19:12:33 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 23 Dec 2012 18:12:33 +0000 Subject: [issue16741] `int()`, `float()`, etc think python strings are null-terminated In-Reply-To: <1356046641.74.0.314140910069.issue16741@psf.upfronthosting.co.za> Message-ID: <1356286353.8.0.380793055064.issue16741@psf.upfronthosting.co.za> Matthew Barnett added the comment: It occurred to me that the truncation of the string when building the error message could cause a UnicodeDecodeError: >>> int("1".ljust(199) + "\u0100") Traceback (most recent call last): File "", line 1, in int("1".ljust(199) + "\u0100") UnicodeDecodeError: 'utf-8' codec can't decode byte 0xc4 in position 199: unexpected end of data This is because it's truncating a UTF-8 string, and the truncation is in the middle of a multi-byte sequence. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 19:14:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 23 Dec 2012 18:14:40 +0000 Subject: [issue16443] Add docstrings to regular expression match objects In-Reply-To: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> Message-ID: <1356286480.0.0.52790407616.issue16443@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Pushed. Thank you, Anton! ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 19:49:15 2012 From: report at bugs.python.org (anatoly techtonik) Date: Sun, 23 Dec 2012 18:49:15 +0000 Subject: [issue16689] stdout stderr redirection mess In-Reply-To: <1355533013.89.0.974705743737.issue16689@psf.upfronthosting.co.za> Message-ID: <1356288555.46.0.302169495368.issue16689@psf.upfronthosting.co.za> anatoly techtonik added the comment: Can Python detect when output file descriptor for both stderr and stdout streams is the same and use the single buffer itself? ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 19:54:57 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 23 Dec 2012 18:54:57 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356288897.65.0.865742494898.issue15302@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The reason in part is because of the lack of unit tests of regrtest (as commenters above have noted). By preserving the getopt interface, we can keep almost all of the untested code as is. You should view the patch as a first step in refactoring to use argparse. We can remove the conversion code and the main for loop in later steps. Note to committers: I was meaning to rename regrlib.py when I was working on this. Until regrtest-related code is in its own subpackage, I think the file name should begin with "regrtest" -- perhaps regrtester.py or regrtestlib.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 19:55:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Dec 2012 18:55:10 +0000 Subject: [issue15303] Minor revision to the method in Tkinter In-Reply-To: <1341822350.55.0.995662615633.issue15303@psf.upfronthosting.co.za> Message-ID: <1356288910.3.0.829826478701.issue15303@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch against 3.4 which contains proposed OP change and a lot of similar changes in different places. I'm not sure that this should be considered as a bug fix and not as an enhancement. Drew, as a workaround you can implement __bool__() method which returns True for your widget. Or even better, do not make your container sequence-like. ---------- keywords: +patch nosy: +serhiy.storchaka stage: needs patch -> patch review versions: +Python 3.4 -Python 2.7 Added file: http://bugs.python.org/file28410/tkinter_widget_is_none.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 20:12:16 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Dec 2012 19:12:16 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356289936.22.0.473077917723.issue16743@psf.upfronthosting.co.za> Terry J. Reedy added the comment: It is a report of behavior that lacks a specific request for change (that I can see). The implied code-change request could break working code. We don't usually do that. What do you think should be done? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 20:15:37 2012 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Sun, 23 Dec 2012 19:15:37 +0000 Subject: [issue16689] stdout stderr redirection mess In-Reply-To: <1355533013.89.0.974705743737.issue16689@psf.upfronthosting.co.za> Message-ID: <1356290137.87.0.554126259185.issue16689@psf.upfronthosting.co.za> ?ukasz Langa added the comment: No. Please, don't reopen without a patch. Better yet: move the discussion to python-ideas. Better yet: simply accept that you should either use -u or stop treating stdout/stderr as synchronized. This issue has been closed twice already by distinct contributors. To keep reopening it is passive?aggressive behaviour, so is the wording of the title you chose for the report. ---------- nosy: +lukasz.langa status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 20:21:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Dec 2012 19:21:50 +0000 Subject: [issue16758] SubprocessStartupError In-Reply-To: <1356285530.15.0.755787775309.issue16758@psf.upfronthosting.co.za> Message-ID: <1356290510.24.0.399295625584.issue16758@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Lieutenant.Commander.Mohd.Nazri.Mohd.Nasir.RMN, can you please choose a shorter login name? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 20:25:25 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 23 Dec 2012 19:25:25 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356290725.46.0.750393741663.issue15302@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Hi Chris. Today we had python sprint and I've guessed to Anton to refactor the patch in good way with properly setting default values from regrtest.main to argparse args. Then use proper argparse actions for manipulating that args. After all we can use Namespace object returned from argparse.parse() or argparse.parse_known_args() if needed as input for next processing. It will be big enough patch but I like to move it forward after double checking. regrtestlib.py name is good to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 20:27:28 2012 From: report at bugs.python.org (Juan Benavente Ponce) Date: Sun, 23 Dec 2012 19:27:28 +0000 Subject: [issue7263] Fix set.intersection docstring In-Reply-To: <1257351879.79.0.961594941998.issue7263@psf.upfronthosting.co.za> Message-ID: <1356290848.21.0.313864118984.issue7263@psf.upfronthosting.co.za> Juan Benavente Ponce added the comment: set.intersection and frozenset.intersection docstrings are back to the wrong two-sets-only version in Python 3.3 (Python 2.7 is not affected): """ intersection(...) Return the intersection of two sets as a new set. (i.e. all elements that are in both sets.) """ The correct docstring should be the one already submitted by Alexander Belopolsky: """ intersection(...) Return the intersection of two or more sets as a new set. (i.e. all elements that are in all sets.) """ Thanks everyone for your great work and Merry Christmas! ---------- nosy: +turgon versions: +Python 3.3 -Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 20:55:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 23 Dec 2012 19:55:22 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356292522.71.0.364000856553.issue16743@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As I understand, the issue is that mmap slicing returns an empty string for large (but less than ssize_t limit) indices on 2.7. May be it relates to 30-bit digits long integer implementation? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 21:01:16 2012 From: report at bugs.python.org (Brian Curtin) Date: Sun, 23 Dec 2012 20:01:16 +0000 Subject: [issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS In-Reply-To: <1327519681.79.0.252690630069.issue13863@psf.upfronthosting.co.za> Message-ID: <1356292876.77.0.810107975491.issue13863@psf.upfronthosting.co.za> Brian Curtin added the comment: Latest patch looks ok to me and the tests pass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 21:02:08 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 23 Dec 2012 20:02:08 +0000 Subject: [issue14715] test.support.DirsOnSysPath should be replaced by importlib.test.util.import_state In-Reply-To: <1336079069.84.0.625762752869.issue14715@psf.upfronthosting.co.za> Message-ID: <1356292928.8.0.319213315531.issue14715@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 21:11:18 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 23 Dec 2012 20:11:18 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356293478.84.0.228743621812.issue15302@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Yes, I agree with all of that but thought it would be easier to review if done incrementally as separate steps. In any case, I will look for Anton's patch on the review tool in case I have any comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 21:51:25 2012 From: report at bugs.python.org (Juan Benavente Ponce) Date: Sun, 23 Dec 2012 20:51:25 +0000 Subject: [issue7263] Fix set.intersection docstring In-Reply-To: <1257351879.79.0.961594941998.issue7263@psf.upfronthosting.co.za> Message-ID: <1356295885.53.0.985468368404.issue7263@psf.upfronthosting.co.za> Juan Benavente Ponce added the comment: Comparing the docstrings with the on-line documentation, I have found that, in addition to the already mentioned issue, the fact that many methods only require the first argument to be a set (or frozenset) object is not mentioned anywhere in the docstrings. Would it be useful if I write here a list of all the cases where this happens, and a possible alternative? An example: Python 2.7 set.union current docstring: """Return the union of sets as a new set. (i.e. all elements that are in either set.)""" possible enhancement: """union(set1, *iterables) --> new set Return a new set with elements from set1 and all the iterables.""" Would it be a good idea to create a different docstring for the bound method? E.g: unbound version: """union(set1, *iterables) --> new set Return a new set with elements from set1 and all the iterables.""" bound version: """set1.union(*iterables) --> new set Return a new set with elements from set1 and all the iterables.""" If writing this list would be useful, please tell me so, and I will do it. Thanks for your time! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 22:23:53 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 23 Dec 2012 21:23:53 +0000 Subject: [issue16712] collections.abc.Sequence should not provide __reversed__ In-Reply-To: <1355835361.63.0.373231585566.issue16712@psf.upfronthosting.co.za> Message-ID: <1356297833.84.0.29656090568.issue16712@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Guido put a number of non-optimal implementations in the ABCs. His goal was to define the interface and to supply a working default implementation (see MutableMapping.clear() for a prime example). In the case of __reversed__(), it is unfortunate that it slows down the default implementation of reverse(). The latter only runs faster because it is in C, not because of any algorithmic issue. FWIW, the same is also true of Sequence.__contains__(). This logic in the ABC is straight-forward but slows down the code as compared to Python's C optimizations which can infer a __contains__ method from a sequence that defines __getitem__(). Given that the "issue" isn't algorithmic and is merely a C vs pure Python issue, I recommend leaving the current code as-is. If someone truly cares about the speed issue, it would be an easy matter to supply a C helper function in the ABCs for speeding-up __reversed__ and __contains__ (for an example of how to do this, see _count_elements() in the collections module). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 23:11:42 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Dec 2012 22:11:42 +0000 Subject: [issue16684] Unicode property value abbreviated names and long names In-Reply-To: <1355506392.97.0.314398568458.issue16684@psf.upfronthosting.co.za> Message-ID: <1356300702.15.0.12253139562.issue16684@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I verified that the prototype file works in 2.7.3. I rewrote it for 3.3 using a refactored approach (and discovered that the site sometimes times out). ---------- Added file: http://bugs.python.org/file28411/bc_ea_gc.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 23:55:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 23 Dec 2012 22:55:20 +0000 Subject: [issue14470] Remove using of w9xopen in subprocess module In-Reply-To: <1333303587.03.0.401233973218.issue14470@psf.upfronthosting.co.za> Message-ID: <3YTzS72V9lzQnM@mail.python.org> Roundup Robot added the comment: New changeset c903e4f1121d by Brian Curtin in branch 'default': Fix #14470. Remove w9xpopen per PEP 11. http://hg.python.org/cpython/rev/c903e4f1121d New changeset ae1845e4006a by Brian Curtin in branch 'default': Add NEWS item for fixing #14470. http://hg.python.org/cpython/rev/ae1845e4006a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 23 23:57:54 2012 From: report at bugs.python.org (Brian Curtin) Date: Sun, 23 Dec 2012 22:57:54 +0000 Subject: [issue14470] Remove using of w9xopen in subprocess module In-Reply-To: <1333303587.03.0.401233973218.issue14470@psf.upfronthosting.co.za> Message-ID: <1356303474.78.0.239222270092.issue14470@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 00:01:36 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 23 Dec 2012 23:01:36 +0000 Subject: [issue879399] socket line buffering Message-ID: <1356303696.82.0.58281933589.issue879399@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Sure, Leave it to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 00:09:52 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 23 Dec 2012 23:09:52 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356304192.86.0.413326435956.issue16743@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To me, Marc's title and penultimate sentence imply that he thinks that mmap should not accept such files. (But he should speak for himself.) As I said, not accepting such files could break working code. As for the alternative of 'fixing' methods: Is it only slicing or other methods, even *every* method that 'misbehaves' when attempting to read (or write) beyond the 1 gig limit? I am guessing the last. If so, just about every method (inherited from bytearray, like slicing, or mmap specific) would need a fix conditional on the build and access location (and OS or hardware?). Even for slices, what change would you (or anyone) make? Keep in mind that is it a *feature* of slices that they generally always work, and that this is specifically true of bytearrays. ("Memory-mapped file objects behave like both bytearray and like file objects.") I am actually a bit surprised that the limit is 1 gb rather than 2, 3, or 4 gb. Is it the same on *nix? What is the limit for a bytearray on Win 7? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 00:13:06 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Sun, 23 Dec 2012 23:13:06 +0000 Subject: [issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe In-Reply-To: <1356086390.48.0.327620937355.issue16742@psf.upfronthosting.co.za> Message-ID: <1356304386.54.0.0898179089611.issue16742@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- nosy: +gregory.p.smith priority: normal -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 01:14:19 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 24 Dec 2012 00:14:19 +0000 Subject: [issue14420] winreg SetValueEx DWord type incompatible with value argument In-Reply-To: <1332800536.64.0.0868580471921.issue14420@psf.upfronthosting.co.za> Message-ID: <1356308059.83.0.0260916138506.issue14420@psf.upfronthosting.co.za> Brian Curtin added the comment: Here is a patch for the first part (SetValueEx). ---------- keywords: +needs review, patch stage: needs patch -> patch review Added file: http://bugs.python.org/file28412/issue14420_part1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 01:16:51 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 24 Dec 2012 00:16:51 +0000 Subject: [issue16759] winreg.QueryValueEx returns signed 32bit value instead of unsigned Message-ID: <1356308211.5.0.474246954205.issue16759@psf.upfronthosting.co.za> New submission from Brian Curtin: Making this its own issue from msg156935 on #14420: "Likewise, the winreg.QueryValueEx method returns a signed 32 bit value, instead of a 32 bit unsigned value." ---------- assignee: brian.curtin components: Extension Modules, Windows messages: 178023 nosy: RoSanford, brian.curtin priority: normal severity: normal stage: needs patch status: open title: winreg.QueryValueEx returns signed 32bit value instead of unsigned type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 01:33:35 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 24 Dec 2012 00:33:35 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356309215.14.0.190672419517.issue15302@psf.upfronthosting.co.za> R. David Murray added the comment: I am -1 on doing this as one big refactoring, unless tests are written for regrtest first. Incremental (over a period of weeks or months, so that the changes get some soak time each time) is I think acceptable even without tests, given that this is a test runner and not part of Python proper. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 01:33:58 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 24 Dec 2012 00:33:58 +0000 Subject: [issue16759] winreg.QueryValueEx returns signed 32bit value instead of unsigned In-Reply-To: <1356308211.5.0.474246954205.issue16759@psf.upfronthosting.co.za> Message-ID: <1356309238.97.0.232156303537.issue16759@psf.upfronthosting.co.za> Brian Curtin added the comment: Marking this dependent on #14420 because we can't reliably test QueryValueEx's unsigned value without being able to SetValueEx an unsigned value. ---------- dependencies: +winreg SetValueEx DWord type incompatible with value argument _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 02:05:53 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 24 Dec 2012 01:05:53 +0000 Subject: [issue16759] winreg.QueryValueEx returns signed 32bit value instead of unsigned In-Reply-To: <1356308211.5.0.474246954205.issue16759@psf.upfronthosting.co.za> Message-ID: <1356311153.46.0.137812232113.issue16759@psf.upfronthosting.co.za> Brian Curtin added the comment: Here's a patch. It depends on the patch from #14420 being applied in some way (I cloned from a branch which included it). ---------- keywords: +needs review, patch stage: needs patch -> patch review Added file: http://bugs.python.org/file28413/issue16759.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 03:23:25 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 24 Dec 2012 02:23:25 +0000 Subject: [issue10919] Environment variables are not expanded in _winreg when using REG_EXPAND_SZ. In-Reply-To: <1295202210.05.0.625952484383.issue10919@psf.upfronthosting.co.za> Message-ID: <1356315805.74.0.583267661757.issue10919@psf.upfronthosting.co.za> Brian Curtin added the comment: Yep. The documentation you linked says "A null-terminated string that contains unexpanded references to environment variables (for example, "%PATH%"). It will be a Unicode or ANSI string depending on whether you use the Unicode or ANSI functions. To expand the environment variable references, use the ExpandEnvironmentStrings function." Based on that, we're doing the right thing. ---------- resolution: -> invalid stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 04:39:22 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 24 Dec 2012 03:39:22 +0000 Subject: [issue13384] Unnecessary __future__ import in random module In-Reply-To: <1321024786.01.0.759110473236.issue13384@psf.upfronthosting.co.za> Message-ID: <1356320362.77.0.321500795282.issue13384@psf.upfronthosting.co.za> Brian Curtin added the comment: This went over a year without a request to undo it, and we've since made several releases that includes it, so I'm closing this. Please re-open if it does need to be reverted. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 04:42:09 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 24 Dec 2012 03:42:09 +0000 Subject: [issue13000] unhandled exception at install In-Reply-To: <1316261175.24.0.481643908897.issue13000@psf.upfronthosting.co.za> Message-ID: <1356320529.41.0.500356461344.issue13000@psf.upfronthosting.co.za> Brian Curtin added the comment: Unassigning myself. Jorge - are you still able to reproduce this, and if so, are you able to capture the log as mentioned by Martin? ---------- assignee: brian.curtin -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 06:04:17 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2012 05:04:17 +0000 Subject: [issue16751] Using modern unittest asserts in the documentation In-Reply-To: <1356165243.99.0.0485025285676.issue16751@psf.upfronthosting.co.za> Message-ID: <1356325457.08.0.201142613708.issue16751@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Please don't change the Basic Example section. It is designed to get people up and running with a minimal set of asserts (including assertEqual, assertTrue, and the two ways of using assertRaises). "Modernizing" the example will defeat its purpose. ---------- assignee: docs at python -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:08:53 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Dec 2012 07:08:53 +0000 Subject: [issue16751] Using modern unittest asserts in the documentation In-Reply-To: <1356165243.99.0.0485025285676.issue16751@psf.upfronthosting.co.za> Message-ID: <1356332933.38.0.58467007403.issue16751@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #11468. ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:22:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 07:22:56 +0000 Subject: [issue16751] Using modern unittest asserts in the documentation In-Reply-To: <1356165243.99.0.0485025285676.issue16751@psf.upfronthosting.co.za> Message-ID: <1356333776.01.0.775694190852.issue16751@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: But with the patch the minimal set of asserts will be assertEqual, assertIn, and assertRaises. The example is just too old (assertIn was added in 3.1). If you want to minimize assert's set, you can get rid of assertEqual too (using only assertTrue). But I don't think it is a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:36:21 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 07:36:21 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356304192.86.0.413326435956.issue16743@psf.upfronthosting.co.za> Message-ID: <1356334974.2459.8.camel@raxxla> Serhiy Storchaka added the comment: I have only 32-bit OS and can't answer this questions. I'm surprised by 1 GiB limit too. Marc, can you please check 4.5 GiB file? What limit in this case, 1 GiB or 0.5 GiB? What about slicing a big bytes object or bytearray (if you have enough memory)? If mmap on Windows can't work with files larger 4 GiB, then it should raise exception on creation or at least on access. Silent production of wrong result is not a way. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 08:37:38 2012 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 24 Dec 2012 07:37:38 +0000 Subject: [issue16689] stdout stderr redirection mess In-Reply-To: <1355533013.89.0.974705743737.issue16689@psf.upfronthosting.co.za> Message-ID: <1356334658.68.0.800604157478.issue16689@psf.upfronthosting.co.za> anatoly techtonik added the comment: I need to track issues the same way as you. You act as if the issue is resolved while it is (or rather wasn't) until the last comment that Python is unable to detect if stdout and stderr stream share the same output descriptor. And your separation of the world to "distinct contributors" and everybody else is the source of this conflict - not somebody doing some passive actions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:01:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 08:01:07 +0000 Subject: [issue16443] Add docstrings to regular expression match objects In-Reply-To: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> Message-ID: <1356336067.18.0.0396900328163.issue16443@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: `MatchObject` term is not defined anywhere in the documentation. It will be better to use `match object` instead. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:35:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 08:35:55 +0000 Subject: [issue16760] Get rid of MatchObject in regex HOWTO Message-ID: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: MatchObject is not defined anywhere and is not used except HOWTO (see issue6538). ---------- assignee: docs at python components: Documentation, Regular Expressions messages: 178036 nosy: asvetlov, docs at python, ezio.melotti, mrabarnett, pitrou, serhiy.storchaka priority: normal severity: normal status: open title: Get rid of MatchObject in regex HOWTO type: enhancement versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:37:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 08:37:24 +0000 Subject: [issue6538] MatchObject is not a hyperlink in the 're' module documentation In-Reply-To: <1248215363.5.0.63292386695.issue6538@psf.upfronthosting.co.za> Message-ID: <1356338244.38.0.0608263943471.issue6538@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have opened a new issue16760 for regex HOWTO. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:38:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 08:38:54 +0000 Subject: [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <1356338334.04.0.793405032128.issue16760@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +akuchling _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:39:48 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 24 Dec 2012 08:39:48 +0000 Subject: [issue16751] Using modern unittest asserts in the documentation In-Reply-To: <1356165243.99.0.0485025285676.issue16751@psf.upfronthosting.co.za> Message-ID: <1356338388.24.0.0458600668157.issue16751@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Sorry, I'm going to reject this one. FWIW, I'm working on revising the example anyway (to not use the random module and instead test something more straight-forward). ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 09:47:55 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Dec 2012 08:47:55 +0000 Subject: [issue16751] Using modern unittest asserts in the documentation In-Reply-To: <1356165243.99.0.0485025285676.issue16751@psf.upfronthosting.co.za> Message-ID: <1356338875.94.0.820346964038.issue16751@psf.upfronthosting.co.za> Ezio Melotti added the comment: Raymond, the changes in the "mock" documentation look good to me, and I think they can be applied. Regarding the basic example in the "unittest" doc, I think the patch attached to #11468 (or something similar) should be applied instead. That patch uses straight-forward string methods and the basic assertEqual/True/False/Raises. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:00:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 09:00:09 +0000 Subject: [issue11468] Improve unittest basic example in the doc In-Reply-To: <1299867342.41.0.388080450116.issue11468@psf.upfronthosting.co.za> Message-ID: <1356339609.41.0.168123702031.issue11468@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I think `self.assertRaises(TypeError, s.split, 2)` looks simpler. In any case two examples for assertRaises needed, simple inlined and more complicated use as context manager. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:02:52 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Dec 2012 09:02:52 +0000 Subject: [issue11468] Improve unittest basic example in the doc In-Reply-To: <1299867342.41.0.388080450116.issue11468@psf.upfronthosting.co.za> Message-ID: <1356339772.69.0.392621876128.issue11468@psf.upfronthosting.co.za> Ezio Melotti added the comment: Given that this is a basic example, it's not necessary to introduce both the forms of assertRaises. I personally find the context manager form more readable, and I prefer it to the regular one even if it takes two lines instead of one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:14:23 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 24 Dec 2012 09:14:23 +0000 Subject: [issue13555] cPickle MemoryError when loading large file (while pickle works) In-Reply-To: <1323348723.51.0.524535293585.issue13555@psf.upfronthosting.co.za> Message-ID: <1356340463.57.0.511131912792.issue13555@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Could someone with a 64-bit box take over this one? I won't go anywhere with my 32-bit box... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 10:33:58 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 24 Dec 2012 09:33:58 +0000 Subject: [issue15523] Block on close TCP socket in SocketServer.py In-Reply-To: <1343815668.28.0.0910478510187.issue15523@psf.upfronthosting.co.za> Message-ID: <1356341638.36.0.529092600097.issue15523@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:16:05 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 24 Dec 2012 10:16:05 +0000 Subject: [issue879399] socket line buffering Message-ID: <1356344165.14.0.326385400706.issue879399@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- assignee: -> kristjan.jonsson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:16:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 10:16:19 +0000 Subject: [issue16761] Fix int(base=X) Message-ID: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Currently int() ignores base keyword argument if first string argument omitted. Such usage is no other than bug. The proposed patch raises TypeError in such case. See also discussion at Python-Dev: http://comments.gmane.org/gmane.comp.python.cvs/92290 . ---------- components: Interpreter Core files: int_without_x.patch keywords: patch messages: 178043 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Fix int(base=X) type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28414/int_without_x.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:17:59 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 10:17:59 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356344279.08.0.835175015853.issue16761@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +asvetlov, chris.jerdonek, terry.reedy Added file: http://bugs.python.org/file28415/int_without_x-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:19:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 10:19:55 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356344395.05.0.401474204427.issue16761@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: In additional some int creation tests backported to old Python versions. ---------- Added file: http://bugs.python.org/file28416/int_without_x-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:23:55 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 24 Dec 2012 10:23:55 +0000 Subject: [issue16762] test_subprocess failure on OpenBSD/NetBSD buildbots Message-ID: <1356344635.01.0.0408386674119.issue16762@psf.upfronthosting.co.za> New submission from Charles-Fran?ois Natali: test_subprocess fails on OpenBSD/NetBSD buildbots: http://buildbot.python.org/all/builders/AMD64 NetBSD 5.1.2 [SB] 2.7/builds/158/steps/test/logs/stdio """ ====================================================================== ERROR: test_kill_dead (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/test/test_subprocess.py", line 940, in test_kill_dead self._kill_dead_process('kill') File "/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/test/test_subprocess.py", line 913, in _kill_dead_process getattr(p, method)(*args) File "/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/subprocess.py", line 1506, in kill self.send_signal(signal.SIGKILL) File "/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/subprocess.py", line 1496, in send_signal os.kill(self.pid, sig) OSError: [Errno 3] No such process ====================================================================== ERROR: test_send_signal_dead (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/test/test_subprocess.py", line 936, in test_send_signal_dead self._kill_dead_process('send_signal', signal.SIGINT) File "/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/test/test_subprocess.py", line 913, in _kill_dead_process getattr(p, method)(*args) File "/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/subprocess.py", line 1496, in send_signal os.kill(self.pid, sig) OSError: [Errno 3] No such process ====================================================================== ERROR: test_terminate_dead (test.test_subprocess.POSIXProcessTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/test/test_subprocess.py", line 944, in test_terminate_dead self._kill_dead_process('terminate') File "/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/test/test_subprocess.py", line 913, in _kill_dead_process getattr(p, method)(*args) File "/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/subprocess.py", line 1501, in terminate self.send_signal(signal.SIGTERM) File "/home/cpython/buildslave/2.7.snakebite-netbsd51-amd64-1/build/Lib/subprocess.py", line 1496, in send_signal os.kill(self.pid, sig) OSError: [Errno 3] No such process """ According to POSIX, kill shoudln't fail with ESRCH on a zombie processes: """ Existing implementations vary on the result of a kill() with pid indicating an inactive process (a terminated process that has not been waited for by its parent). Some indicate success on such a call (subject to permission checking), while others give an error of [ESRCH]. Since the definition of process lifetime in this volume of POSIX.1-2008 covers inactive processes, the [ESRCH] error as described is inappropriate in this case. In particular, this means that an application cannot have a parent process check for termination of a particular child with kill(). (Usually this is done with the null signal; this can be done reliably with waitpid().) """ ---------- components: Tests keywords: buildbot, needs review, patch messages: 178045 nosy: neologix priority: low severity: normal stage: patch review status: open title: test_subprocess failure on OpenBSD/NetBSD buildbots type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:24:34 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Dec 2012 10:24:34 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356344674.4.0.278751122628.issue16761@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:28:37 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 24 Dec 2012 10:28:37 +0000 Subject: [issue16762] test_subprocess failure on OpenBSD/NetBSD buildbots In-Reply-To: <1356344635.01.0.0408386674119.issue16762@psf.upfronthosting.co.za> Message-ID: <1356344917.65.0.466306711936.issue16762@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : Added file: http://bugs.python.org/file28417/kill_esrch.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 11:59:10 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 24 Dec 2012 10:59:10 +0000 Subject: [issue13582] IDLE and pythonw.exe stderr problem In-Reply-To: <1323632290.53.0.810720020667.issue13582@psf.upfronthosting.co.za> Message-ID: <1356346750.25.0.732346427797.issue13582@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 12:17:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Dec 2012 11:17:23 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <3YVHwL6qxbzRk8@mail.python.org> Roundup Robot added the comment: New changeset ffe091ebd5de by Andrew Svetlov in branch '3.2': Issue #16511: Use default IDLE width and height if config param is not valid. http://hg.python.org/cpython/rev/ffe091ebd5de New changeset 10656b0975b3 by Andrew Svetlov in branch '3.3': Issue #16511: Use default IDLE width and height if config param is not valid. http://hg.python.org/cpython/rev/10656b0975b3 New changeset a7c9869a5114 by Andrew Svetlov in branch 'default': Issue #16511: Use default IDLE width and height if config param is not valid. http://hg.python.org/cpython/rev/a7c9869a5114 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 12:18:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Dec 2012 11:18:10 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <3YVHxF4lyVzRm6@mail.python.org> Roundup Robot added the comment: New changeset 133f87a7dbf5 by Andrew Svetlov in branch '2.7': Issue #16511: Use default IDLE width and height if config param is not valid. http://hg.python.org/cpython/rev/133f87a7dbf5 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 12:20:18 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 24 Dec 2012 11:20:18 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <1356348018.8.0.485897302949.issue16511@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Trung, I think installation procedure is not subject of this issue. If needed please create new one. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 12:32:55 2012 From: report at bugs.python.org (Trung Doan) Date: Mon, 24 Dec 2012 11:32:55 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1356348018.8.0.485897302949.issue16511@psf.upfronthosting.co.za> Message-ID: Trung Doan added the comment: I think I will leave it at that, because in the general case probably some things should be re-initialised during a new/re-install while others should be left as is, but as a beginner I am far from knowing which ones are which. Trung ============== On Mon, Dec 24, 2012 at 10:20 PM, Andrew Svetlov wrote: > > Andrew Svetlov added the comment: > > Fixed. > > Trung, I think installation procedure is not subject of this issue. > If needed please create new one. > > ---------- > resolution: -> fixed > stage: patch review -> committed/rejected > status: open -> closed > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 12:36:21 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 24 Dec 2012 11:36:21 +0000 Subject: [issue16511] IDLE configuration file: blank height and width fields trip up IDLE In-Reply-To: <1353402683.59.0.506153006404.issue16511@psf.upfronthosting.co.za> Message-ID: <1356348981.54.0.396527522224.issue16511@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Ok. Agree with you. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 12:41:48 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 24 Dec 2012 11:41:48 +0000 Subject: [issue16763] test_ssl with connect_ex don't handle unreachable server correctly Message-ID: <1356349308.1.0.276929202525.issue16763@psf.upfronthosting.co.za> New submission from Charles-Fran?ois Natali: test_ssl tests calling connect_ex don't handle unreachable servers properly: """ test_ssl Resource 'svn.python.org' is not available Resource 'svn.python.org' is not available test test_ssl failed -- Traceback (most recent call last): File "/srv/buildbot/buildarea/2.7.bolen-ubuntu/build/Lib/test/test_ssl.py", line 246, in test_connect_ex self.assertEqual(0, s.connect_ex(("svn.python.org", 443))) AssertionError: 0 != None """ support.transient doesn't help here since no exception is raised. Note that I'm not sure that connect_ex returning None is normal in the first place... There's a related failure on OpenBSD/NetBSD buildbots: """ test_timeout_connect_ex (test.test_ssl.NetworkedTests) ... ok ====================================================================== ERROR: test_non_blocking_connect_ex (test.test_ssl.NetworkedTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/cpython/buildslave/3.x.snakebite-openbsd51-amd64-1/build/Lib/test/test_ssl.py", line 685, in test_non_blocking_connect_ex select.select([], [s], [], 5.0) OSError: [Errno 22] Invalid argument """ I guess that connect() can't succeed because of an unreachable host/connection refused, and the subsequent select() fails with EINVAL. This is most likely a kernel bug, select should report the socket as ready for write (one could then use getsockopt() to find the actual error). ---------- components: Tests messages: 178051 nosy: neologix, pitrou priority: normal severity: normal stage: needs patch status: open title: test_ssl with connect_ex don't handle unreachable server correctly type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 13:02:15 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 24 Dec 2012 12:02:15 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1356309215.14.0.190672419517.issue15302@psf.upfronthosting.co.za> Message-ID: Andrew Svetlov added the comment: Well. Do you like to apply Chris patch and wait for next step appear? On Mon, Dec 24, 2012 at 2:33 AM, R. David Murray wrote: > > R. David Murray added the comment: > > I am -1 on doing this as one big refactoring, unless tests are written for regrtest first. Incremental (over a period of weeks or months, so that the changes get some soak time each time) is I think acceptable even without tests, given that this is a test runner and not part of Python proper. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 13:45:08 2012 From: report at bugs.python.org (Lukas Lueg) Date: Mon, 24 Dec 2012 12:45:08 +0000 Subject: [issue16764] Make zlib accept keyword-arguments Message-ID: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> New submission from Lukas Lueg: The patch "zlib_keywords.patch" makes zlib's classes and functions accept keyword arguments as documented. It also fixes two cases in which the docstring differ from the documentation (decompress(data) vs. decompress(string) and compressobj(memlevel) vs. compressobj(memLevel)). Additional tests are provided. ---------- components: Library (Lib) files: zlib_keywords.patch keywords: patch messages: 178053 nosy: ebfe priority: normal severity: normal status: open title: Make zlib accept keyword-arguments versions: Python 3.4 Added file: http://bugs.python.org/file28418/zlib_keywords.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 13:46:58 2012 From: report at bugs.python.org (Lukas Lueg) Date: Mon, 24 Dec 2012 12:46:58 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1356353218.13.0.891780046267.issue16764@psf.upfronthosting.co.za> Lukas Lueg added the comment: Attaching a patch to fix all pep8/pyflakes warnings and errors in test_zlib.py ---------- Added file: http://bugs.python.org/file28419/zlib_tests_pep8.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 13:53:37 2012 From: report at bugs.python.org (Michiel Holtkamp) Date: Mon, 24 Dec 2012 12:53:37 +0000 Subject: [issue16765] Superfluous import in cgi module Message-ID: <1356353617.65.0.761345333654.issue16765@psf.upfronthosting.co.za> New submission from Michiel Holtkamp: The standard module cgi.py from Python 2.x imports urllib, but urllib is not used. This causes a little bit of extra memory usage and a small increase in load time. It's not much, but it was enough for me to notice when I was profiling my program. I think the urllib import can be safely removed in 2.6 and 2.7. I've tested without the import and it works as expected in my case. In Python 3.2 (other 3.x versions not checked), urllib.parse is imported but here it is actually used, so no problem there. PS. first time submitting a bug here, so if I'm doing something wrong, please be gentle :) ---------- components: Library (Lib) messages: 178055 nosy: mjholtkamp priority: normal severity: normal status: open title: Superfluous import in cgi module type: performance versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 13:54:10 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Dec 2012 12:54:10 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1356353650.29.0.672087453361.issue16764@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 13:58:18 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Dec 2012 12:58:18 +0000 Subject: [issue16765] Superfluous import in cgi module In-Reply-To: <1356353617.65.0.761345333654.issue16765@psf.upfronthosting.co.za> Message-ID: <1356353898.82.0.93983601458.issue16765@psf.upfronthosting.co.za> Ezio Melotti added the comment: Python 2.6/3.1 only get security fixes, and 2.7/3.2/3.3 only get bug fixes. This is technically a performance issue, so I'm not sure it can go in 2.7, but if the change is as simple as it seems it could be considered. ---------- keywords: +easy nosy: +ezio.melotti stage: -> needs patch versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 14:04:51 2012 From: report at bugs.python.org (Michiel Holtkamp) Date: Mon, 24 Dec 2012 13:04:51 +0000 Subject: [issue16765] Superfluous import in cgi module In-Reply-To: <1356353617.65.0.761345333654.issue16765@psf.upfronthosting.co.za> Message-ID: <1356354291.82.0.279628979409.issue16765@psf.upfronthosting.co.za> Michiel Holtkamp added the comment: Fair enough, I think I'm using 2.7 only. I wasn't sure about the patch format, so I added a unified diff. If you require a different format, please let me know. ---------- keywords: +patch Added file: http://bugs.python.org/file28420/patch-python2.7-cgi.py.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 14:39:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 13:39:05 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1356356345.8.0.282888427028.issue16764@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't think it worth to add support of keyword for the first mandatory argument. This can freeze the poor and inconsistent () names. For example compress()/decompress() methods of bz2 and lzma objects doesn't support keyword arguments. And why you use "string" name for decompress() argument? Renaming of "memLevel" argument to "memlevel" is not backward compatible and can break third-part code (if anyone use it). This may require starting of deprecation process. Difference between a code and a documentation is a bug and should be fixed for all Python versions. Note, that calling a function with keyword arguments is a little slower (a lot of slower for fast functions) than calling a function with positional-only arguments. ---------- components: +Extension Modules -Library (Lib) nosy: +serhiy.storchaka stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 15:31:45 2012 From: report at bugs.python.org (Lukas Lueg) Date: Mon, 24 Dec 2012 14:31:45 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1356359505.75.0.0892930491649.issue16764@psf.upfronthosting.co.za> Lukas Lueg added the comment: Nothing of what you mention is a problem of this patch. The memLevel-keyword was not supported as of now, only the docstring ("memLevel") and the documentation ("memlevel") mentioned it. There is no third-party code that could have used it. The current docstring says that a "string"-keyword should be used with decompress(), the documentation talks about a "data"-keyword. Both are not supported, the patch adds support for a "data"-keyword and fixes the docstring. ---------- components: +Library (Lib) -Extension Modules type: enhancement -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 15:39:58 2012 From: report at bugs.python.org (Al Korgun) Date: Mon, 24 Dec 2012 14:39:58 +0000 Subject: [issue16766] small disadvantage of htmlentitydefs Message-ID: <1356359998.55.0.0415174560622.issue16766@psf.upfronthosting.co.za> New submission from Al Korgun: >>> import htmlentitydefs >>> htmlentitydefs.name2codepoint.get("quot") # ok 34 >>> htmlentitydefs.name2codepoint.get("apos", "null") # ' -> chr(39) 'null' ---------- components: Library (Lib) messages: 178060 nosy: WitcherGeralt priority: normal severity: normal status: open title: small disadvantage of htmlentitydefs versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 15:44:50 2012 From: report at bugs.python.org (Al Korgun) Date: Mon, 24 Dec 2012 14:44:50 +0000 Subject: [issue16766] small disadvantage of htmlentitydefs In-Reply-To: <1356359998.55.0.0415174560622.issue16766@psf.upfronthosting.co.za> Message-ID: <1356360290.33.0.67595779852.issue16766@psf.upfronthosting.co.za> Changes by Al Korgun : ---------- versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 15:53:55 2012 From: report at bugs.python.org (Joe Borg) Date: Mon, 24 Dec 2012 14:53:55 +0000 Subject: [issue16767] Cannot install Python 2.7 in Wine 1.4.1 Message-ID: <1356360831.52.0.153505228673.issue16767@psf.upfronthosting.co.za> New submission from Joe Borg: Trying to install Python 2.7 (in particular) under Wine 1.4.1, but keep getting the "Installer has ended prematurely" error. I've also tried with 2.6 and 3.2 and different versions of wine; same error. Also tried with winetricks; again, same error. I've used the msiexec command to log the output of the installer and will attach. Thanks. ---------- components: Windows files: install.log messages: 178061 nosy: Joe.Borg priority: normal severity: normal status: open title: Cannot install Python 2.7 in Wine 1.4.1 versions: Python 2.7 Added file: http://bugs.python.org/file28421/install.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 15:55:29 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 24 Dec 2012 14:55:29 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356360929.64.0.823863682671.issue15302@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Do you like to apply Chris patch and wait for next step appear? Just to clarify, I think this should read "apply Chris patch after updating/reviewing." A couple file renames are needed, and I noticed a typo in a docstring. Other changes may be needed since 5 months have elapsed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 15:58:05 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 14:58:05 +0000 Subject: [issue16764] Make zlib accept keyword-arguments In-Reply-To: <1356353108.66.0.0747083241018.issue16764@psf.upfronthosting.co.za> Message-ID: <1356361085.85.0.0713335540266.issue16764@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, I missed, not decompress(), but compress(). Except this small error all of what I said *is* a problem of this patch. ---------- components: +Extension Modules -Library (Lib) type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 16:06:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 15:06:13 +0000 Subject: [issue16766] small disadvantage of htmlentitydefs In-Reply-To: <1356359998.55.0.0415174560622.issue16766@psf.upfronthosting.co.za> Message-ID: <1356361573.55.0.811040171909.issue16766@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +ezio.melotti versions: +Python 3.2, Python 3.3, Python 3.4 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 16:50:20 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 24 Dec 2012 15:50:20 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356364220.68.0.450573505502.issue15302@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, I apologize for not getting around to a review previously. Chris: why regrlib.py at all? Why isn't the code in regrtest.py? And I'm not clear on why there is a desire to have regrtest be a package. Did I miss that discussion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 16:50:46 2012 From: report at bugs.python.org (Ziga) Date: Mon, 24 Dec 2012 15:50:46 +0000 Subject: [issue16768] CTRL-Y, yank, behaves as CTRL-Z with curses on OS X Message-ID: <1356364246.33.0.381686861789.issue16768@psf.upfronthosting.co.za> New submission from Ziga: `getch()` interprets CTRL-Y as CTRL-Z on OS X 10.7.3. Tested with python 2.5, 2.6, 2.7 32-bit and 64-bit. How to recreate behavior: >>> import curses >>> stdscr = curses.initscr() # CTRL-Y works as expected until now. >>> stdscr.getch() # press $ [1] + 407 suspended python ---------- assignee: ronaldoussoren components: Extension Modules, Library (Lib), Macintosh messages: 178065 nosy: agiz, ronaldoussoren priority: normal severity: normal status: open title: CTRL-Y, yank, behaves as CTRL-Z with curses on OS X type: behavior versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 16:59:04 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Dec 2012 15:59:04 +0000 Subject: [issue16757] Faster _PyUnicode_FindMaxChar() In-Reply-To: <1356281435.93.0.623434455043.issue16757@psf.upfronthosting.co.za> Message-ID: <1356364744.83.0.911385452968.issue16757@psf.upfronthosting.co.za> STINNER Victor added the comment: See issues #14687 and #14716 for benchmarks and information about the changes introducing and using _PyUnicodeWriter for str%args and str.format(args). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:03:58 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Dec 2012 16:03:58 +0000 Subject: [issue16757] Faster _PyUnicode_FindMaxChar() In-Reply-To: <1356281435.93.0.623434455043.issue16757@psf.upfronthosting.co.za> Message-ID: <1356365038.2.0.0934469716104.issue16757@psf.upfronthosting.co.za> STINNER Victor added the comment: Avoid scanning a substring to compute the maximum character is a good thing, so +1 for the idea. Instead of modifying an existing function, it might be safer to rename it. Even if it is private, a third party module *can* use it outside Python. It is also surprising that you have to specifiy a "maxchar" argument whereas the purpose of the function is to compute the maximum character. Ex: rename _PyUnicode_FindMaxChar() to _PyUnicode_FindMaxChar2(), and add _PyUnicode_FindMaxChar() as the macro: #define _PyUnicode_FindMaxChar(str, start, length) _PyUnicode_FindMaxChar2(str, start, length, 127) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:11:43 2012 From: report at bugs.python.org (R. David Murray) Date: Mon, 24 Dec 2012 16:11:43 +0000 Subject: [issue16767] Cannot install Python 2.7 in Wine 1.4.1 In-Reply-To: <1356360831.52.0.153505228673.issue16767@psf.upfronthosting.co.za> Message-ID: <1356365503.53.0.275534830804.issue16767@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the report, however WINE is not an environment we support. A quick google indicates people have occasionally succeeded in getting it to install and run (for some definition of run), but it sounds like you've read about those. If you want to work out the problem, and if it proves to be an in issue in Python and not WINE, and if the patch to fix it isn't too complex, it will be considered. You can probably get help with this on the python-list mailing list. ---------- nosy: +r.david.murray resolution: -> wont fix stage: -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:15:03 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 24 Dec 2012 16:15:03 +0000 Subject: [issue16637] py-bt, py-locals, etc. GDB commands fail with output-radix 16 In-Reply-To: <1354903492.9.0.822155625877.issue16637@psf.upfronthosting.co.za> Message-ID: <1356365703.56.0.535830259486.issue16637@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:15:12 2012 From: report at bugs.python.org (Ziga) Date: Mon, 24 Dec 2012 16:15:12 +0000 Subject: [issue16768] CTRL-Y, yank, behaves as CTRL-Z with curses on OS X In-Reply-To: <1356364246.33.0.381686861789.issue16768@psf.upfronthosting.co.za> Message-ID: <1356365712.45.0.322754296647.issue16768@psf.upfronthosting.co.za> Ziga added the comment: Same behavior with: >>> import sys >>> sys.stdin.read(1) # press [1] + 1024 suspended python ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:20:18 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 24 Dec 2012 16:20:18 +0000 Subject: [issue16672] improve tracing performances when f_trace is NULL In-Reply-To: <1355348258.81.0.121484844419.issue16672@psf.upfronthosting.co.za> Message-ID: <1356366018.4.0.735951177677.issue16672@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:31:37 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 24 Dec 2012 16:31:37 +0000 Subject: [issue812369] module shutdown procedure based on GC Message-ID: <1356366697.0.0.84312773674.issue812369@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:33:42 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 24 Dec 2012 16:33:42 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356366822.64.0.98084574927.issue15302@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > why regrlib.py at all? Why isn't the code in regrtest.py? It was for a few related reasons. It was primarily to make it easier to reason about testing regrtest, and to avoid at the outset any pitfalls that might arise from the circularity of regrtest testing itself. For example, the regrtest module seems to carry a fair bit of state and top-level code, whereas the "library" module being added would be stateless. It would also let us maintain an obvious line between what is tested and what is not. There was no discussion of creating a package. However, if we go this route I would foresee moving functionality from regrtest to the library module as we expand the amount of regrtest-support code under test. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:33:48 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Dec 2012 16:33:48 +0000 Subject: [issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS In-Reply-To: <1327519681.79.0.252690630069.issue13863@psf.upfronthosting.co.za> Message-ID: <3YVQxR5DJNzRnt@mail.python.org> Roundup Robot added the comment: New changeset 002d5f3b240d by Mark Dickinson in branch '2.7': Issue #13863: fix incorrect .pyc timestamps on Windows / NTFS (apparently due to buggy fstat) http://hg.python.org/cpython/rev/002d5f3b240d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:35:40 2012 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 24 Dec 2012 16:35:40 +0000 Subject: [issue13863] import.c sometimes generates incorrect timestamps on Windows + NTFS In-Reply-To: <1327519681.79.0.252690630069.issue13863@psf.upfronthosting.co.za> Message-ID: <1356366940.49.0.52944679111.issue13863@psf.upfronthosting.co.za> Mark Dickinson added the comment: Fixed for 2.7. I don't think this is worth fixing to 3.2, given that it's not an issue for 3.3. Thanks Brian and Serhiy for reviewing! ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:36:48 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 24 Dec 2012 16:36:48 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356367008.95.0.0389125727065.issue15302@psf.upfronthosting.co.za> Chris Jerdonek added the comment: By the way, I am in the process of cleaning up the patch a bit. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:44:45 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Dec 2012 16:44:45 +0000 Subject: [issue14470] Remove using of w9xopen in subprocess module In-Reply-To: <1333303587.03.0.401233973218.issue14470@psf.upfronthosting.co.za> Message-ID: <3YVRB50CjgzRcp@mail.python.org> Roundup Robot added the comment: New changeset deee9f0a4b98 by Brian Curtin in branch 'default': Fix #14470. Remove mentions of w9xpopen on old versions of Visual Studio. http://hg.python.org/cpython/rev/deee9f0a4b98 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:46:32 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 24 Dec 2012 16:46:32 +0000 Subject: [issue14470] Remove using of w9xopen in subprocess module In-Reply-To: <3YVRB50CjgzRcp@mail.python.org> Message-ID: Andrew Svetlov added the comment: Thanks On Mon, Dec 24, 2012 at 6:44 PM, Roundup Robot wrote: > > Roundup Robot added the comment: > > New changeset deee9f0a4b98 by Brian Curtin in branch 'default': > Fix #14470. Remove mentions of w9xpopen on old versions of Visual Studio. > http://hg.python.org/cpython/rev/deee9f0a4b98 > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 17:48:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 16:48:09 +0000 Subject: [issue16757] Faster _PyUnicode_FindMaxChar() In-Reply-To: <1356281435.93.0.623434455043.issue16757@psf.upfronthosting.co.za> Message-ID: <1356367689.27.0.875413446941.issue16757@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: It is not more surprising that specify a "start" argument for sum(). I don't think we should worry about third party module which violate the API. It will crash in any case when the exported function will disappear and will be replaced by macros. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 18:01:31 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 24 Dec 2012 17:01:31 +0000 Subject: [issue16769] Remove some old Visual Studio versions from PC/ directory Message-ID: <1356368491.28.0.606279812477.issue16769@psf.upfronthosting.co.za> New submission from Brian Curtin: While fixing #14470 to remove w9xpopen support, removing it from old Visual Studio projects came up. 1. I can't imagine anyone is attempting to use most of these. 2. Since we don't backport build changes to these older versions, some of them are very out of date and can't be that useful. I propose to remove the following: 1. PC/VC6 - this version is from 1998 and is the last compiler to support Win9x, which we just removed support for with the w9xpopen change via PEP 11. 2. PC/VS7.1 - this version is from 2003 and still contains references to WISE installer, which IIRC has not been used since 2.3. On top of that, it's missing many of the current project files. I'm skeptical of PC/VS8.0's use as Visual Studio 2005 is pretty old and it too is missing many current project files, but there is a conversion script that may help point someone in the right direction. I do remember Hirokazu Yamamoto mentioning using 2005 for some purposes, but this was years ago. ---------- assignee: brian.curtin components: Build, Windows messages: 178077 nosy: brian.curtin, loewis priority: normal severity: normal status: open title: Remove some old Visual Studio versions from PC/ directory type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 18:12:08 2012 From: report at bugs.python.org (Jeremy Kloth) Date: Mon, 24 Dec 2012 17:12:08 +0000 Subject: [issue16769] Remove some old Visual Studio versions from PC/ directory In-Reply-To: <1356368491.28.0.606279812477.issue16769@psf.upfronthosting.co.za> Message-ID: <1356369128.75.0.619805920227.issue16769@psf.upfronthosting.co.za> Changes by Jeremy Kloth : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 18:14:04 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 24 Dec 2012 17:14:04 +0000 Subject: [issue16769] Remove some old Visual Studio versions from PC/ directory In-Reply-To: <1356368491.28.0.606279812477.issue16769@psf.upfronthosting.co.za> Message-ID: <1356369244.52.0.162966777322.issue16769@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Do you want to keep VS9.0 only? Sounds good to me. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 18:16:58 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 24 Dec 2012 17:16:58 +0000 Subject: [issue16769] Remove some old Visual Studio versions from PC/ directory In-Reply-To: <1356368491.28.0.606279812477.issue16769@psf.upfronthosting.co.za> Message-ID: <1356369418.63.0.241795003865.issue16769@psf.upfronthosting.co.za> Brian Curtin added the comment: Definitely keeping PC/VS9.0 as it's still fairly common and VS2008 is still used by us for 2.7. I would like to remove PC/VS8.0 but if anyone speaks towards keeping it then I think it's fine. ---------- nosy: +ocean-city _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 18:31:07 2012 From: report at bugs.python.org (Anton Kasyanov) Date: Mon, 24 Dec 2012 17:31:07 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356370267.17.0.192669224682.issue15302@psf.upfronthosting.co.za> Anton Kasyanov added the comment: So I see that there is no need in full refactoring now. BTW, maybe someone should create an issue for full tests coverage of regrtest? Then it would be much easier to make a full refactoring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 18:45:10 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 24 Dec 2012 17:45:10 +0000 Subject: [issue16757] Faster _PyUnicode_FindMaxChar() In-Reply-To: <1356367689.27.0.875413446941.issue16757@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: > It is not more surprising that specify a "start" argument for sum(). Un pythin, the start attribute of sum is optional. > I don't think we should worry about third party module which violate the API. It will crash in any case when the exported function will disappear and will be replaced by macros. The compilation will fail, whereas it will crash with your patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 18:54:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Dec 2012 17:54:27 +0000 Subject: [issue16672] improve tracing performances when f_trace is NULL In-Reply-To: <1355348258.81.0.121484844419.issue16672@psf.upfronthosting.co.za> Message-ID: <3YVSkW0BpPzRmG@mail.python.org> Roundup Robot added the comment: New changeset 1fb26db7d719 by Benjamin Peterson in branch 'default': improve tracing performance when f_trace is NULL (closes #16672) http://hg.python.org/cpython/rev/1fb26db7d719 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 19:00:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Dec 2012 18:00:15 +0000 Subject: [issue16720] Get rid of os.error. Use OSError instead In-Reply-To: <1355868456.72.0.79747952931.issue16720@psf.upfronthosting.co.za> Message-ID: <3YVSsB6BC5zRps@mail.python.org> Roundup Robot added the comment: New changeset 6cfe2982de42 by Andrew Svetlov in branch 'default': Use OESeeror instead of os.error (#16720) http://hg.python.org/cpython/rev/6cfe2982de42 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 19:00:43 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 24 Dec 2012 18:00:43 +0000 Subject: [issue16720] Get rid of os.error. Use OSError instead In-Reply-To: <1355868456.72.0.79747952931.issue16720@psf.upfronthosting.co.za> Message-ID: <1356372043.85.0.520444018829.issue16720@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Thanks! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 19:09:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Dec 2012 18:09:39 +0000 Subject: [issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope In-Reply-To: <1355036600.83.0.376355184043.issue16650@psf.upfronthosting.co.za> Message-ID: <3YVT424hhNzRmy@mail.python.org> Roundup Robot added the comment: New changeset 0cc4fe5634cf by Andrew Svetlov in branch '3.2': Keep ref to ECHILD in local scope (#16650) http://hg.python.org/cpython/rev/0cc4fe5634cf New changeset 0b1a49f99169 by Andrew Svetlov in branch '3.3': Keep ref to ECHILD in local scope (#16650) http://hg.python.org/cpython/rev/0b1a49f99169 New changeset 8f30461395b1 by Andrew Svetlov in branch 'default': Keep ref to ECHILD in local scope (#16650) http://hg.python.org/cpython/rev/8f30461395b1 New changeset a963dd401a63 by Andrew Svetlov in branch '2.7': Keep ref to ECHILD in local scope (#16650) http://hg.python.org/cpython/rev/a963dd401a63 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 19:11:52 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Mon, 24 Dec 2012 18:11:52 +0000 Subject: [issue16650] Popen._internal_poll() references errno.ECHILD outside of the local scope In-Reply-To: <1355036600.83.0.376355184043.issue16650@psf.upfronthosting.co.za> Message-ID: <1356372712.75.0.518803356389.issue16650@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Close the issue. For future improvements (like ChildProcessError using) please open new one. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 19:21:54 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 24 Dec 2012 18:21:54 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356373314.96.0.572417198707.issue15302@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is an updated, improved patch. ---------- Added file: http://bugs.python.org/file28422/issue-15302-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 19:32:04 2012 From: report at bugs.python.org (Irwin Jungreis) Date: Mon, 24 Dec 2012 18:32:04 +0000 Subject: [issue16770] Selection in IDLE often skips first character Message-ID: <1356373924.27.0.67520730715.issue16770@psf.upfronthosting.co.za> New submission from Irwin Jungreis: Often, when selecting text in IDLE, the first character of the selected region does not get selected. The problem occurs because sometimes, not always, when clicking on the left half of a character the insertion point gets put after the character, while other times it gets put before the character, even when clicking in the exact same spot. This can be consistently reproduced as follows. In IDLE, File | New Window. In the new window type the two characters 'M1' (without the quotes). Now position the cursor over the left half of the M. Slowly click several times without moving the cursor (with enough delay that it does not interpret it as a double-click). Note that after some clicks the insertion point is before the M and after others it is after the M, even though the cursor has not moved. I am running Python 2.7.3, IDLE version 2.7.3, Tk version 8.5, on Mac OS X 10.6.8 Snow Leopard, on a MacBook Pro. (Same problem occurs on laptop screen and external monitor, and with USB mouse or built in trackpad) ---------- assignee: ronaldoussoren components: IDLE, Macintosh messages: 178088 nosy: jungreis, ronaldoussoren priority: normal severity: normal status: open title: Selection in IDLE often skips first character type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 20:09:09 2012 From: report at bugs.python.org (rurpy) Date: Mon, 24 Dec 2012 19:09:09 +0000 Subject: [issue16665] doc for builtin hex() is poor In-Reply-To: <1355257997.08.0.0348964643873.issue16665@psf.upfronthosting.co.za> Message-ID: <1356376149.32.0.681533936893.issue16665@psf.upfronthosting.co.za> rurpy added the comment: I would like to submit the following post made to c.l.p in support of my claim that a cross-reference to the string formatting "x" format specifier would be desireable in the documentation for the hex() builtin: Newsgroups: comp.lang.python Subject: Re: Integer as raw hex string? Date: Mon, 24 Dec 2012 11:21:15 -0500 https://groups.google.com/group/comp.lang.python/msg/054706d112f6385d?hl=en (In case the link goes away... the post asks how to get the same results as hex() but without the leading "0x".) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 20:24:15 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 24 Dec 2012 19:24:15 +0000 Subject: [issue11939] Implement stat.st_dev and os.path.samefile on windows In-Reply-To: <1303923583.07.0.177662562381.issue11939@psf.upfronthosting.co.za> Message-ID: <1356377055.19.0.778745521044.issue11939@psf.upfronthosting.co.za> Brian Curtin added the comment: Here's a patch that fills st_dev, and while we're at it st_rdev (which is the same value). I've moved the implementation of samefile/sameopenfile/samestat from Lib/posixpath.py over to Lib/genericpath.py and then removed the implementation from Lib/ntpath.py, so those functions are now common. The same goes for tests - I've rearranged tests towards test_genericpath. I also removed _getfileinformation from Modules/posixmodule.c because it's no longer being used. ---------- keywords: +needs review, patch stage: needs patch -> patch review Added file: http://bugs.python.org/file28423/issue11939.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 20:26:49 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 24 Dec 2012 19:26:49 +0000 Subject: [issue13000] unhandled exception at install In-Reply-To: <1316261175.24.0.481643908897.issue13000@psf.upfronthosting.co.za> Message-ID: <1356377209.51.0.260957372165.issue13000@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 20:27:18 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 24 Dec 2012 19:27:18 +0000 Subject: [issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations In-Reply-To: <1356138147.12.0.530314626781.issue16748@psf.upfronthosting.co.za> Message-ID: <1356377238.03.0.17236813333.issue16748@psf.upfronthosting.co.za> ?ric Araujo added the comment: I won?t be online for the next two weeks. I think there is a bug with Michael Foord, RDM and I where we talk about this very issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 20:28:45 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 24 Dec 2012 19:28:45 +0000 Subject: [issue16754] Incorrect shared library extension on linux In-Reply-To: <1356266166.76.0.178044154393.issue16754@psf.upfronthosting.co.za> Message-ID: <1356377325.39.0.0127506438593.issue16754@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +barry versions: +Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 20:30:30 2012 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 24 Dec 2012 19:30:30 +0000 Subject: [issue16755] Distutils2 incorrectly works with unicode package names In-Reply-To: <1356275082.9.0.0209714500898.issue16755@psf.upfronthosting.co.za> Message-ID: <1356377430.12.0.435720107611.issue16755@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks, will check this when I come back online after the holidays. ---------- versions: +3rd party -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 20:44:33 2012 From: report at bugs.python.org (Nurhusien Hasen) Date: Mon, 24 Dec 2012 19:44:33 +0000 Subject: [issue16771] issuse Message-ID: New submission from Nurhusien Hasen: No find bug python any issuse masseg Please not find you masseg or I am out bug python Account ---------- messages: 178093 nosy: Nurhusien2 priority: normal severity: normal status: open title: issuse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 20:47:06 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 24 Dec 2012 19:47:06 +0000 Subject: [issue16771] issuse In-Reply-To: Message-ID: <1356378426.13.0.141817639462.issue16771@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 20:47:33 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Dec 2012 19:47:33 +0000 Subject: [issue16720] Get rid of os.error. Use OSError instead In-Reply-To: <1355868456.72.0.79747952931.issue16720@psf.upfronthosting.co.za> Message-ID: <3YVWF03tZBzRml@mail.python.org> Roundup Robot added the comment: New changeset e2e5181b10f8 by Andrew Svetlov in branch 'default': fix typo (#16720) http://hg.python.org/cpython/rev/e2e5181b10f8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 21:10:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 20:10:16 +0000 Subject: [issue16772] int() accepts float number base Message-ID: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: I'm not sure this is a bug. In 2.7 int() and long() with float number base raises TypeError. But in 3.x int() accepts float number base and truncate it to int. ---------- components: Interpreter Core messages: 178095 nosy: serhiy.storchaka priority: normal severity: normal status: open title: int() accepts float number base versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 21:11:12 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Dec 2012 20:11:12 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356379872.69.0.807349294674.issue16772@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 21:15:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 20:15:16 +0000 Subject: [issue16773] int() half-accepts UserString Message-ID: <1356380115.98.0.739133485355.issue16773@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: In Python 3 int() accepts UserString argument without explicit base and reject it with explicit base. >>> from collections import UserString >>> int(UserString('100')) 100 >>> int(UserString('100'), 2) Traceback (most recent call last): File "", line 1, in TypeError: int() can't convert non-string with explicit base In 2.7 the same behavior also for MutableString and bytearray. ---------- components: Interpreter Core messages: 178096 nosy: serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: int() half-accepts UserString type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 21:18:07 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Dec 2012 20:18:07 +0000 Subject: [issue16773] int() half-accepts UserString In-Reply-To: <1356380115.98.0.739133485355.issue16773@psf.upfronthosting.co.za> Message-ID: <1356380287.58.0.512146050498.issue16773@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 21:22:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 20:22:07 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <201212242221.45329.storchaka@gmail.com> Serhiy Storchaka added the comment: Patches updated to address Cris's comments on Rietveld (thank you, Cris, for review). In additional new tests added. I think merging test_int and test_long is hard task and should be done in separated issue. Instead I have merged and simplified some test to make synchronization simpler. Two new possible bugs were found during working on these tests (issue16772 and issue16773). ---------- Added file: http://bugs.python.org/file28424/int_without_x-3.3_2.patch Added file: http://bugs.python.org/file28425/int_without_x-3.2_2.patch Added file: http://bugs.python.org/file28426/int_without_x-2.7_2.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r 10656b0975b3 Lib/test/test_int.py --- a/Lib/test/test_int.py Mon Dec 24 13:16:47 2012 +0200 +++ b/Lib/test/test_int.py Mon Dec 24 21:40:02 2012 +0200 @@ -74,8 +74,6 @@ self.assertEqual(x >> 1, x//2) self.assertRaises(ValueError, int, '123\0') - self.assertRaises(ValueError, int, '53', 40) - # SF bug 1545497: embedded NULs were not detected with # explicit base self.assertRaises(ValueError, int, '123\0', 10) @@ -85,7 +83,8 @@ self.assertIsInstance(x, int) - self.assertRaises(TypeError, int, 1, 12) + self.assertRaises(TypeError, int, 1, 10) + self.assertRaises(TypeError, int, 1, 0) self.assertEqual(int('0o123', 0), 83) self.assertEqual(int('0x123', 16), 291) @@ -100,10 +99,6 @@ self.assertRaises(ValueError, int, "0b", 2) self.assertRaises(ValueError, int, "0b", 0) - # Bug #3236: Return small longs from PyLong_FromString - self.assertTrue(int("10") is 10) - self.assertTrue(int("-1") is -1) - # SF bug 1334662: int(string, base) wrong answers # Various representations of 2**32 evaluated to 0 # rather than 2**32 in previous versions @@ -221,24 +216,22 @@ self.assertEqual(int('2br45qc', 35), 4294967297) self.assertEqual(int('1z141z5', 36), 4294967297) + @support.cpython_only + def test_small_ints(self): + # Bug #3236: Return small longs from PyLong_FromString + self.assertIs(int("10"), 10) + self.assertIs(int("-1"), -1) + def test_no_args(self): - self.assertEquals(int(), 0) + self.assertEqual(int(), 0) def test_keyword_args(self): # Test invoking int() using keyword arguments. - self.assertEquals(int(x=1.2), 1) - self.assertEquals(int('100', base=2), 4) - self.assertEquals(int(x='100', base=2), 4) - - # For example, PyPy 1.9.0 raised TypeError for these cases because it - # expects x to be a string if base is given. - @support.cpython_only - def test_base_arg_with_no_x_arg(self): - self.assertEquals(int(base=6), 0) - # Even invalid bases don't raise an exception. - self.assertEquals(int(base=1), 0) - self.assertEquals(int(base=1000), 0) - self.assertEquals(int(base='foo'), 0) + self.assertEqual(int(x=1.2), 1) + self.assertEqual(int('100', base=2), 4) + self.assertEqual(int(x='100', base=2), 4) + self.assertRaises(TypeError, int, base=10) + self.assertRaises(TypeError, int, base=0) def test_non_numeric_input_types(self): # Test possible non-numeric types for the argument x, including @@ -254,13 +247,36 @@ CustomByteArray(b'100')] for x in values: - msg = 'x has type %s' % type(x).__name__ - self.assertEquals(int(x), 100, msg=msg) - self.assertEquals(int(x, 2), 4, msg=msg) + msg = 'x has value %r and type %s' % (x, type(x).__name__) + try: + self.assertEqual(int(x), 100, msg=msg) + self.assertEqual(int(x, 2), 4, msg=msg) + except TypeError as err: + raise AssertionError('For %s got TypeError: %s' % + (type(x).__name__, err)) + + from collections import UserString + values = [UserString('100')] + for x in values: + msg = 'x has value %r and type %s' % (x, type(x).__name__) + try: + self.assertEqual(int(x), 100, msg=msg) + except TypeError as err: + raise AssertionError('For %s got TypeError: %s' % + (type(x).__name__, err)) + self.assertRaises(TypeError, int, x, 2) def test_string_float(self): self.assertRaises(ValueError, int, '1.2') + def test_invalid_base(self): + for base in -1, 1, 37, 2**1000, -2**1000: + self.assertRaises(ValueError, int, '100', base) + for base in '10',: + self.assertRaises(TypeError, int, '100', base) + # XXX ? + self.assertEqual(int('100', 10.5), 100) + def test_intconversion(self): # Test __int__() class ClassicMissingMethods: diff -r 10656b0975b3 Objects/longobject.c --- a/Objects/longobject.c Mon Dec 24 13:16:47 2012 +0200 +++ b/Objects/longobject.c Mon Dec 24 21:40:02 2012 +0200 @@ -4267,8 +4267,14 @@ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OO:int", kwlist, &x, &obase)) return NULL; - if (x == NULL) + if (x == NULL) { + if (obase != NULL) { + PyErr_SetString(PyExc_TypeError, + "int() missing string argument"); + return NULL; + } return PyLong_FromLong(0L); + } if (obase == NULL) return PyNumber_Long(x); @@ -4277,7 +4283,7 @@ return NULL; if (overflow || (base != 0 && base < 2) || base > 36) { PyErr_SetString(PyExc_ValueError, - "int() arg 2 must be >= 2 and <= 36"); + "int() base must be >= 2 and <= 36"); return NULL; } -------------- next part -------------- diff -r ffe091ebd5de Lib/test/test_int.py --- a/Lib/test/test_int.py Mon Dec 24 13:15:43 2012 +0200 +++ b/Lib/test/test_int.py Mon Dec 24 21:43:43 2012 +0200 @@ -1,6 +1,7 @@ import sys import unittest +from test import support from test.support import run_unittest L = [ @@ -74,8 +75,6 @@ self.assertEqual(x >> 1, x//2) self.assertRaises(ValueError, int, '123\0') - self.assertRaises(ValueError, int, '53', 40) - # SF bug 1545497: embedded NULs were not detected with # explicit base self.assertRaises(ValueError, int, '123\0', 10) @@ -85,7 +84,8 @@ self.assertIsInstance(x, int) - self.assertRaises(TypeError, int, 1, 12) + self.assertRaises(TypeError, int, 1, 10) + self.assertRaises(TypeError, int, 1, 0) self.assertEqual(int('0o123', 0), 83) self.assertEqual(int('0x123', 16), 291) @@ -100,10 +100,6 @@ self.assertRaises(ValueError, int, "0b", 2) self.assertRaises(ValueError, int, "0b", 0) - # Bug #3236: Return small longs from PyLong_FromString - self.assertTrue(int("10") is 10) - self.assertTrue(int("-1") is -1) - # SF bug 1334662: int(string, base) wrong answers # Various representations of 2**32 evaluated to 0 # rather than 2**32 in previous versions @@ -221,6 +217,67 @@ self.assertEqual(int('2br45qc', 35), 4294967297) self.assertEqual(int('1z141z5', 36), 4294967297) + @support.cpython_only + def test_small_ints(self): + # Bug #3236: Return small longs from PyLong_FromString + self.assertIs(int("10"), 10) + self.assertIs(int("-1"), -1) + + def test_no_args(self): + self.assertEqual(int(), 0) + + def test_keyword_args(self): + # Test invoking int() using keyword arguments. + self.assertEqual(int(x=1.2), 1) + self.assertEqual(int('100', base=2), 4) + self.assertEqual(int(x='100', base=2), 4) + self.assertRaises(TypeError, int, base=10) + self.assertRaises(TypeError, int, base=0) + + def test_non_numeric_input_types(self): + # Test possible non-numeric types for the argument x, including + # subclasses of the explicitly documented accepted types. + class CustomStr(str): pass + class CustomBytes(bytes): pass + class CustomByteArray(bytearray): pass + + values = [b'100', + bytearray(b'100'), + CustomStr('100'), + CustomBytes(b'100'), + CustomByteArray(b'100')] + + for x in values: + msg = 'x has value %r and type %s' % (x, type(x).__name__) + try: + self.assertEqual(int(x), 100, msg=msg) + self.assertEqual(int(x, 2), 4, msg=msg) + except TypeError as err: + raise AssertionError('For %s got TypeError: %s' % + (type(x).__name__, err)) + + from collections import UserString + values = [UserString('100')] + for x in values: + msg = 'x has value %r and type %s' % (x, type(x).__name__) + try: + self.assertEqual(int(x), 100, msg=msg) + except TypeError as err: + raise AssertionError('For %s got TypeError: %s' % + (type(x).__name__, err)) + self.assertRaises(TypeError, int, x, 2) + + def test_string_float(self): + self.assertRaises(ValueError, int, '1.2') + + def test_invalid_base(self): + for base in -1, 1, 37, 2**1000, -2**1000: + self.assertRaises(ValueError, int, '100', base) + for base in '10',: + self.assertRaises(TypeError, int, '100', base) + # XXX ? + self.assertEqual(int('100', 10.5), 100) + def test_intconversion(self): # Test __int__() class ClassicMissingMethods: diff -r ffe091ebd5de Objects/longobject.c --- a/Objects/longobject.c Mon Dec 24 13:15:43 2012 +0200 +++ b/Objects/longobject.c Mon Dec 24 21:43:43 2012 +0200 @@ -4130,8 +4130,14 @@ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OO:int", kwlist, &x, &obase)) return NULL; - if (x == NULL) + if (x == NULL) { + if (obase != NULL) { + PyErr_SetString(PyExc_TypeError, + "int() missing string argument"); + return NULL; + } return PyLong_FromLong(0L); + } if (obase == NULL) return PyNumber_Long(x); @@ -4140,7 +4146,7 @@ return NULL; if (overflow || (base != 0 && base < 2) || base > 36) { PyErr_SetString(PyExc_ValueError, - "int() arg 2 must be >= 2 and <= 36"); + "int() base must be >= 2 and <= 36"); return NULL; } -------------- next part -------------- diff -r 133f87a7dbf5 Lib/test/test_int.py --- a/Lib/test/test_int.py Mon Dec 24 13:17:59 2012 +0200 +++ b/Lib/test/test_int.py Mon Dec 24 21:42:08 2012 +0200 @@ -95,7 +95,6 @@ self.assertEqual(x >> 1, x//2) self.assertRaises(ValueError, int, '123\0') - self.assertRaises(ValueError, int, '53', 40) # SF bug 1545497: embedded NULs were not detected with # explicit base @@ -109,7 +108,8 @@ x = int(unichr(0x661) * 600) self.assertIsInstance(x, long) - self.assertRaises(TypeError, int, 1, 12) + self.assertRaises(TypeError, int, 1, 10) + self.assertRaises(TypeError, int, 1, 0) self.assertEqual(int('0123', 0), 83) self.assertEqual(int('0x123', 16), 291) @@ -316,18 +316,26 @@ self.assertEqual(int(float(2**54+10)), 2**54+8) self.assertEqual(int(float(2**54+11)), 2**54+12) + @test_support.cpython_only + def test_small_ints(self): + # Bug #3236: Return small longs from PyLong_FromString + self.assertTrue(int("10") is 10) + self.assertTrue(int("-1") is -1) + def test_no_args(self): - self.assertEquals(int(), 0) + self.assertEqual(int(), 0) def test_keyword_args(self): # Test invoking int() using keyword arguments. - self.assertEquals(int(x=1.2), 1) - self.assertEquals(int('100', base=2), 4) - self.assertEquals(int(x='100', base=2), 4) + self.assertEqual(int(x=1.2), 1) + self.assertEqual(int('100', base=2), 4) + self.assertEqual(int(x='100', base=2), 4) + self.assertRaises(TypeError, int, base=10) + self.assertRaises(TypeError, int, base=0) - def test_valid_non_numeric_input_types_for_x(self): - # Test possible valid non-numeric types for x, including subclasses - # of the allowed built-in types. + def test_non_numeric_input_types(self): + # Test possible non-numeric types for the argument x, including + # subclasses of the explicitly documented accepted types. class CustomStr(str): pass values = ['100', CustomStr('100')] @@ -336,38 +344,35 @@ values += [unicode('100'), CustomUnicode(unicode('100'))] for x in values: - msg = 'x has value %s and type %s' % (x, type(x).__name__) + msg = 'x has value %r and type %s' % (x, type(x).__name__) try: - self.assertEquals(int(x), 100, msg=msg) - self.assertEquals(int(x, 2), 4, msg=msg) - except TypeError, err: + self.assertEqual(int(x), 100, msg=msg) + self.assertEqual(int(x, 2), 4, msg=msg) + except TypeError as err: raise AssertionError('For %s got TypeError: %s' % (type(x).__name__, err)) - def test_error_on_string_float_for_x(self): + from UserString import UserString, MutableString + values = [bytearray('100'), UserString('100'), MutableString('100')] + for x in values: + msg = 'x has value %r and type %s' % (x, type(x).__name__) + try: + self.assertEqual(int(x), 100, msg=msg) + except TypeError as err: + raise AssertionError('For %s got TypeError: %s' % + (type(x).__name__, err)) + self.assertRaises(TypeError, int, x, 2) + + def test_string_float(self): self.assertRaises(ValueError, int, '1.2') - def test_error_on_bytearray_for_x(self): - self.assertRaises(TypeError, int, bytearray('100'), 2) - - def test_error_on_invalid_int_bases(self): - for base in [-1, 1, 1000]: + def test_invalid_base(self): + for base in -1, 1, 37: self.assertRaises(ValueError, int, '100', base) - - def test_error_on_string_base(self): - self.assertRaises(TypeError, int, 100, base='foo') - # Include the following because in contrast CPython raises no error - # for bad integer bases when x is not given. - self.assertRaises(TypeError, int, base='foo') - - # For example, PyPy 1.9.0 raised TypeError for these cases because it - # expects x to be a string if base is given. - @test_support.cpython_only - def test_int_base_without_x_returns_0(self): - self.assertEquals(int(base=6), 0) - # Even invalid bases don't raise an exception. - self.assertEquals(int(base=1), 0) - self.assertEquals(int(base=1000), 0) + for base in 2**1000, -2**1000: + self.assertRaises(OverflowError, int, '100', base) + for base in 10.5, '10': + self.assertRaises(TypeError, int, '100', base) def test_intconversion(self): # Test __int__() diff -r 133f87a7dbf5 Lib/test/test_long.py --- a/Lib/test/test_long.py Mon Dec 24 13:17:59 2012 +0200 +++ b/Lib/test/test_long.py Mon Dec 24 21:42:08 2012 +0200 @@ -353,8 +353,8 @@ pass self.assertRaises(ValueError, long, '123\0') - self.assertRaises(ValueError, long, '53', 40) - self.assertRaises(TypeError, long, 1, 12) + self.assertRaises(TypeError, long, 1, 10) + self.assertRaises(TypeError, long, 1, 0) # tests with base 0 self.assertEqual(long(' 0123 ', 0), 83) @@ -452,6 +452,57 @@ self.assertEqual(long('2br45qc', 35), 4294967297) self.assertEqual(long('1z141z5', 36), 4294967297) + def test_no_args(self): + self.assertEqual(long(), 0) + + def test_keyword_args(self): + # Test invoking long() using keyword arguments. + self.assertEqual(long(x=1.2), 1) + self.assertEqual(long('100', base=2), 4) + self.assertEqual(long(x='100', base=2), 4) + self.assertRaises(TypeError, long, base=10) + self.assertRaises(TypeError, long, base=0) + + def test_non_numeric_input_types(self): + # Test possible non-numeric types for the argument x, including + # subclasses of the explicitly documented accepted types. + class CustomStr(str): pass + values = ['100', CustomStr('100')] + + if test_support.have_unicode: + class CustomUnicode(unicode): pass + values += [unicode('100'), CustomUnicode(unicode('100'))] + + for x in values: + msg = 'x has value %r and type %s' % (x, type(x).__name__) + try: + self.assertEqual(long(x), 100, msg=msg) + self.assertEqual(long(x, 2), 4, msg=msg) + except TypeError as err: + raise AssertionError('For %s got TypeError: %s' % + (type(x).__name__, err)) + + from UserString import UserString, MutableString + values = [bytearray('100'), UserString('100'), MutableString('100')] + for x in values: + msg = 'x has value %r and type %s' % (x, type(x).__name__) + try: + self.assertEqual(long(x), 100, msg=msg) + except TypeError as err: + raise AssertionError('For %s got TypeError: %s' % + (type(x).__name__, err)) + self.assertRaises(TypeError, long, x, 2) + + def test_string_float(self): + self.assertRaises(ValueError, long, '1.2') + + def test_invalid_base(self): + for base in -1, 1, 37: + self.assertRaises(ValueError, long, '100', base) + for base in 2**1000, -2**1000: + self.assertRaises(OverflowError, long, '100', base) + for base in 10.5, '10': + self.assertRaises(TypeError, long, '100', base) def test_conversion(self): # Test __long__() diff -r 133f87a7dbf5 Objects/intobject.c --- a/Objects/intobject.c Mon Dec 24 13:17:59 2012 +0200 +++ b/Objects/intobject.c Mon Dec 24 21:42:08 2012 +0200 @@ -1059,8 +1059,14 @@ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oi:int", kwlist, &x, &base)) return NULL; - if (x == NULL) + if (x == NULL) { + if (base != -909) { + PyErr_SetString(PyExc_TypeError, + "int() missing string argument"); + return NULL; + } return PyInt_FromLong(0L); + } if (base == -909) return PyNumber_Int(x); if (PyString_Check(x)) { diff -r 133f87a7dbf5 Objects/longobject.c --- a/Objects/longobject.c Mon Dec 24 13:17:59 2012 +0200 +++ b/Objects/longobject.c Mon Dec 24 21:42:08 2012 +0200 @@ -3987,8 +3987,14 @@ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oi:long", kwlist, &x, &base)) return NULL; - if (x == NULL) + if (x == NULL) { + if (base != -909) { + PyErr_SetString(PyExc_TypeError, + "long() missing string argument"); + return NULL; + } return PyLong_FromLong(0L); + } if (base == -909) return PyNumber_Long(x); else if (PyString_Check(x)) { From report at bugs.python.org Mon Dec 24 21:22:09 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 24 Dec 2012 20:22:09 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356380529.62.0.785948615585.issue16772@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 21:22:45 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 24 Dec 2012 20:22:45 +0000 Subject: [issue16773] int() half-accepts UserString In-Reply-To: <1356380115.98.0.739133485355.issue16773@psf.upfronthosting.co.za> Message-ID: <1356380565.19.0.429911392221.issue16773@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 21:40:15 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Mon, 24 Dec 2012 20:40:15 +0000 Subject: [issue16774] Additional recipes for itertools docs Message-ID: <1356381615.1.0.91798699559.issue16774@psf.upfronthosting.co.za> New submission from Alexey Kachayev: Additional recipes for itertools documentation (widespread functions in other programming languages): * drop * split-at * split-by ---------- assignee: docs at python components: Documentation files: itertools.doc.diff keywords: patch messages: 178098 nosy: asvetlov, docs at python, kachayev priority: normal severity: normal status: open title: Additional recipes for itertools docs versions: Python 3.4 Added file: http://bugs.python.org/file28427/itertools.doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 21:41:36 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 24 Dec 2012 20:41:36 +0000 Subject: [issue16774] Additional recipes for itertools docs In-Reply-To: <1356381615.1.0.91798699559.issue16774@psf.upfronthosting.co.za> Message-ID: <1356381696.02.0.447480946547.issue16774@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: docs at python -> rhettinger nosy: +ezio.melotti, rhettinger stage: -> patch review type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 21:53:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 20:53:38 +0000 Subject: [issue16757] Faster _PyUnicode_FindMaxChar() In-Reply-To: Message-ID: <201212242253.15079.storchaka@gmail.com> Serhiy Storchaka added the comment: I think it is redundant and useless, but do as you want. ---------- Added file: http://bugs.python.org/file28428/unicode_findmaxchar_2.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r a7c9869a5114 Include/unicodeobject.h --- a/Include/unicodeobject.h Mon Dec 24 13:17:11 2012 +0200 +++ b/Include/unicodeobject.h Mon Dec 24 22:52:17 2012 +0200 @@ -739,10 +739,15 @@ #ifndef Py_LIMITED_API /* Compute the maximum character of the substring unicode[start:end]. Return 127 for an empty string. */ -PyAPI_FUNC(Py_UCS4) _PyUnicode_FindMaxChar ( +#define _PyUnicode_FindMaxChar(unicode, start, end) \ + _PyUnicode_FindMaxChar2((unicode), (start), (end), 127) +/* Compute the maximum character of the substring unicode[start:end] and + maxchar. */ +PyAPI_FUNC(Py_UCS4) _PyUnicode_FindMaxChar2( PyObject *unicode, Py_ssize_t start, - Py_ssize_t end); + Py_ssize_t end, + Py_UCS4 maxchar); #endif /* Copy the string into a UCS4 buffer including the null character if copy_null diff -r a7c9869a5114 Objects/stringlib/unicode_format.h --- a/Objects/stringlib/unicode_format.h Mon Dec 24 13:17:11 2012 +0200 +++ b/Objects/stringlib/unicode_format.h Mon Dec 24 22:52:17 2012 +0200 @@ -886,8 +886,9 @@ &format_spec_needs_expanding)) == 2) { sublen = literal.end - literal.start; if (sublen) { - maxchar = _PyUnicode_FindMaxChar(literal.str, - literal.start, literal.end); + maxchar = _PyUnicode_FindMaxChar2(literal.str, + literal.start, literal.end, + writer->maxchar); err = _PyUnicodeWriter_Prepare(writer, sublen, maxchar); if (err == -1) return 0; diff -r a7c9869a5114 Objects/unicodeobject.c --- a/Objects/unicodeobject.c Mon Dec 24 13:17:11 2012 +0200 +++ b/Objects/unicodeobject.c Mon Dec 24 22:52:17 2012 +0200 @@ -2002,24 +2002,31 @@ } Py_UCS4 -_PyUnicode_FindMaxChar(PyObject *unicode, Py_ssize_t start, Py_ssize_t end) +_PyUnicode_FindMaxChar2(PyObject *unicode, Py_ssize_t start, Py_ssize_t end, + Py_UCS4 maxchar) { enum PyUnicode_Kind kind; void *startptr, *endptr; + Py_UCS4 maxchar2; assert(PyUnicode_IS_READY(unicode)); assert(0 <= start); assert(end <= PyUnicode_GET_LENGTH(unicode)); assert(start <= end); - if (start == 0 && end == PyUnicode_GET_LENGTH(unicode)) - return PyUnicode_MAX_CHAR_VALUE(unicode); + if (start == 0 && end == PyUnicode_GET_LENGTH(unicode)) { + maxchar2 = PyUnicode_MAX_CHAR_VALUE(unicode); + return MAX_MAXCHAR(maxchar, maxchar2); + } if (start == end) - return 127; + return maxchar; if (PyUnicode_IS_ASCII(unicode)) - return 127; + return maxchar; + + if (maxchar >= PyUnicode_MAX_CHAR_VALUE(unicode)) + return maxchar; kind = PyUnicode_KIND(unicode); startptr = PyUnicode_DATA(unicode); @@ -2027,15 +2034,19 @@ startptr = (char *)startptr + start * kind; switch(kind) { case PyUnicode_1BYTE_KIND: - return ucs1lib_find_max_char(startptr, endptr); + maxchar2 = ucs1lib_find_max_char(startptr, endptr); + break; case PyUnicode_2BYTE_KIND: - return ucs2lib_find_max_char(startptr, endptr); + maxchar2 = ucs2lib_find_max_char(startptr, endptr); + break; case PyUnicode_4BYTE_KIND: - return ucs4lib_find_max_char(startptr, endptr); + maxchar2 = ucs4lib_find_max_char(startptr, endptr); + break; default: assert(0); return 0; } + return MAX_MAXCHAR(maxchar, maxchar2); } /* Ensure that a string uses the most efficient storage, if it is not the @@ -13740,7 +13751,7 @@ Py_ssize_t pindex; Py_UCS4 signchar; Py_ssize_t buflen; - Py_UCS4 maxchar, bufmaxchar; + Py_UCS4 bufmaxchar; Py_ssize_t sublen; _PyUnicodeWriter *writer = &ctx->writer; Py_UCS4 fill; @@ -13793,7 +13804,7 @@ arg->width = len; /* Prepare the writer */ - bufmaxchar = 127; + bufmaxchar = writer->maxchar; if (!(arg->flags & F_LJUST)) { if (arg->sign) { if ((arg->width-1) > len) @@ -13804,8 +13815,7 @@ bufmaxchar = MAX_MAXCHAR(bufmaxchar, fill); } } - maxchar = _PyUnicode_FindMaxChar(str, 0, pindex+len); - bufmaxchar = MAX_MAXCHAR(bufmaxchar, maxchar); + bufmaxchar = _PyUnicode_FindMaxChar2(str, 0, pindex+len, bufmaxchar); buflen = arg->width; if (arg->sign && len == arg->width) buflen++; @@ -13975,8 +13985,9 @@ ctx.writer.overallocate = 0; } sublen = ctx.fmtpos - nonfmtpos; - maxchar = _PyUnicode_FindMaxChar(ctx.fmtstr, - nonfmtpos, nonfmtpos + sublen); + maxchar = _PyUnicode_FindMaxChar2(ctx.fmtstr, + nonfmtpos, nonfmtpos + sublen, + ctx.writer.maxchar); if (_PyUnicodeWriter_Prepare(&ctx.writer, sublen, maxchar) == -1) goto onError; diff -r a7c9869a5114 Python/formatter_unicode.c --- a/Python/formatter_unicode.c Mon Dec 24 13:17:11 2012 +0200 +++ b/Python/formatter_unicode.c Mon Dec 24 22:52:17 2012 +0200 @@ -771,7 +771,7 @@ calc_padding(len, format->width, format->align, &lpad, &rpad, &total); - maxchar = _PyUnicode_FindMaxChar(value, 0, len); + maxchar = _PyUnicode_FindMaxChar2(value, 0, len, writer->maxchar); if (lpad != 0 || rpad != 0) maxchar = Py_MAX(maxchar, format->fill_char); From report at bugs.python.org Mon Dec 24 22:13:40 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Mon, 24 Dec 2012 21:13:40 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356383620.05.0.950048267771.issue16761@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This is good work. Thanks. > I think merging test_int and test_long is hard task and should be done in separated issue. I meant "share" rather than "merge." For the tests you're adding, isn't it simply a matter of putting the test cases into a separate mixin or TestCase class in a different module, and then importing and subclassing that (and setting the type to use as an attribute of the subclass)? Or am I missing something? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 22:20:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 21:20:14 +0000 Subject: [issue11939] Implement stat.st_dev and os.path.samefile on windows In-Reply-To: <1303923583.07.0.177662562381.issue11939@psf.upfronthosting.co.za> Message-ID: <1356384014.08.0.846053372226.issue11939@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What about macpath? I think test_macpath will fail. ---------- nosy: +serhiy.storchaka versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 22:32:12 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 24 Dec 2012 21:32:12 +0000 Subject: [issue11939] Implement stat.st_dev and os.path.samefile on windows In-Reply-To: <1303923583.07.0.177662562381.issue11939@psf.upfronthosting.co.za> Message-ID: <1356384732.32.0.359006269051.issue11939@psf.upfronthosting.co.za> Brian Curtin added the comment: Why do you think that? I don't have a mac so I can't test it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 22:33:16 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 24 Dec 2012 21:33:16 +0000 Subject: [issue11939] Implement stat.st_dev and os.path.samefile on windows In-Reply-To: <1303923583.07.0.177662562381.issue11939@psf.upfronthosting.co.za> Message-ID: <1356384796.86.0.350671311904.issue11939@psf.upfronthosting.co.za> Brian Curtin added the comment: Here is an updated patch addressing the sameopenfile that remained in Lib/ntpath.py, thanks to Sehriy's comment on the review. ---------- Added file: http://bugs.python.org/file28429/issue11939_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 22:55:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 21:55:01 +0000 Subject: [issue11939] Implement stat.st_dev and os.path.samefile on windows In-Reply-To: <1303923583.07.0.177662562381.issue11939@psf.upfronthosting.co.za> Message-ID: <1356386101.01.0.844810996699.issue11939@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Hmm. test_macpath will now run the tests for samefile etc. macpath doesn't contain os.path.samefile. But in Modules/posixmodule.c I don't see any special cases for classic MacOS. Actually, I don't know how tests behave on classic MacOS. Please update the documentation (availability, versionchanged). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 23:01:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 24 Dec 2012 22:01:26 +0000 Subject: [issue11939] Implement stat.st_dev and os.path.samefile on windows In-Reply-To: <1303923583.07.0.177662562381.issue11939@psf.upfronthosting.co.za> Message-ID: <1356386486.25.0.35142259101.issue11939@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: On other hand, you should add "samefile", "sameopenfile" and "samestat" back to __all__ in posixpath and ntpath. __all__ is a list of exported names, not a list of defined names. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 23:04:00 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 24 Dec 2012 22:04:00 +0000 Subject: [issue16713] "tel" URIs should support params In-Reply-To: <1355841024.52.0.600019146787.issue16713@psf.upfronthosting.co.za> Message-ID: <3YVZGS1J4nzNvZ@mail.python.org> Roundup Robot added the comment: New changeset d002a2e46383 by Senthil Kumaran in branch '3.2': Fix issue16713 - tel url parsing with params http://hg.python.org/cpython/rev/d002a2e46383 New changeset 727f26d1806f by Senthil Kumaran in branch '3.3': Fix issue16713 - tel url parsing with params http://hg.python.org/cpython/rev/727f26d1806f New changeset e147d5f3c897 by Senthil Kumaran in branch 'default': Fix issue16713 - tel url parsing with params http://hg.python.org/cpython/rev/e147d5f3c897 New changeset ff0426b5d75e by Senthil Kumaran in branch '2.7': Fix issue16713 - tel url parsing with params http://hg.python.org/cpython/rev/ff0426b5d75e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 23:05:31 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 24 Dec 2012 22:05:31 +0000 Subject: [issue16713] "tel" URIs should support params In-Reply-To: <1355841024.52.0.600019146787.issue16713@psf.upfronthosting.co.za> Message-ID: <1356386731.79.0.499715746001.issue16713@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in all codelines. Thank you! ---------- assignee: -> orsenthil resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 23:13:30 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 24 Dec 2012 22:13:30 +0000 Subject: [issue11939] Implement stat.st_dev and os.path.samefile on windows In-Reply-To: <1303923583.07.0.177662562381.issue11939@psf.upfronthosting.co.za> Message-ID: <1356387210.97.0.517657725436.issue11939@psf.upfronthosting.co.za> Brian Curtin added the comment: Docs and the __all__ changes in V3 patch. ---------- Added file: http://bugs.python.org/file28430/issue11939_v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 24 23:35:29 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Mon, 24 Dec 2012 22:35:29 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356388529.62.0.524653964536.issue16743@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Windows memory-maps multi-gigabyte files just fine as long as one uses the proper build (64-bit), which we provide. Given that mmap produces a finite-length sequence object, as documented, slicing is working as it should. Slicing beyond the length returns an empty sequence. The is no different from 'abc'[4:6]==''. Running Python with finite memory has many memory-associated limitations. They are mostly undocumented as the exact details may depend on hardware, OS, implementation, version, and build. One practical limitation is that mmap with a 32-bit build cannot completely map multi-gigabyte files. The current doc says: "class mmap.mmap(fileno, length, tagname=None, access=ACCESS_DEFAULT[, offset]) (Windows version) Maps length bytes from the file specified by the file handle fileno, and creates a mmap object. If length is larger than the current size of the file, the file is extended to contain length bytes. If length is 0, the maximum length of the map is the current size of the file, except that if the file is empty Windows raises an exception (you cannot create an empty mapping on Windows)." It does not say what happens if the requested length is larger than the max possible on a particular system. In particular, there is no mention of exception raising. So failure to raise is not a bug for tracker purposes. The two possibilities of what to do is such situations are best effort and bailout. The current choice (at least on Windows, and whether by us, Microsoft, or the original mmap authors, I don't know) is best effort. I think that is fine, but should be documented. Users who care can compare the mmap object length with the file length or needed length and raise or do whatever if the mmap length is too short. So I think we should change this to a doc issue and add something like "If the requested length is larger than the limit for the current system, then that limit is used as the length." or "The length of the returned mmap object has a limit that depends on the details of the running system." Or the header should say that there is a system limit and two of the sentences above revised. In the first, change 'length bytes' to 'min(length, system limit) bytes. (I am presuming this is true also when length is not given as 0.) In the last sentence, change 'current size' to 'min(current size, system limit)'. The Unix version doc should also clarify behavior. --- If we were to change mmap() (but only in a future release), then users who want the current behavior would have to discover, hard-code, and explicitly but conditionally pass the limit for each system their code might ever run on. I do not know that that is sensibly possible. I would not be surprised if the limit for a given 32-bit build varies for different windows versions and setups. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 00:51:46 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 24 Dec 2012 23:51:46 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356393106.8.0.131714380646.issue16743@psf.upfronthosting.co.za> Richard Oudkerk added the comment: I suspect that the size of the 5GB file is originally a 64 bit quantity, but gets cast unsafely to a 32 bit size_t to give 1GB. This is causing the miscalculations. There is no way to map all of a 5GB file in a 32 bit process -- 4GB is the maximum -- so any such attempt should raise an error. This does not prevent us from mapping *part* of a 5GB file. ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 01:15:16 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Tue, 25 Dec 2012 00:15:16 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356394516.75.0.499972679253.issue16743@psf.upfronthosting.co.za> Richard Oudkerk added the comment: This bit looks wrong to me: if (offset - size > PY_SSIZE_T_MAX) /* Map area too large to fit in memory */ m_obj->size = (Py_ssize_t) -1; Should it not be "size - offset" instead of "offset - size"? (offset and size are Py_LONG_LONG.) And there is no check that offset is non-negative. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 07:11:38 2012 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Dec 2012 06:11:38 +0000 Subject: [issue16768] CTRL-Y, yank, behaves as CTRL-Z with curses on OS X In-Reply-To: <1356364246.33.0.381686861789.issue16768@psf.upfronthosting.co.za> Message-ID: <1356415898.13.0.770888587239.issue16768@psf.upfronthosting.co.za> Ned Deily added the comment: What you are seeing is platform-specific behavior, a difference between BSD-based systems including OS X and other systems including Linux. The difference is that the former systems support the DSUSP (suspend on reading input) terminal character in addition to the normal SUSP (suspend immediately) terminal character. The default value for DSUSP is CTRL-Y which you can see in the output of stty(1): $ stty -a [..] cchars: discard = ^O; dsusp = ^Y; eof = ^D; eol = ; eol2 = ; erase = ^?; intr = ^C; kill = ^U; lnext = ^V; min = 1; quit = ^\; reprint = ^R; start = ^Q; status = ^T; stop = ^S; susp = ^Z; time = 0; werase = ^W; You should see the same CTRL-Y suspend behavior with other utilities reading from standard input, like cat(1), unless they handle that signal. You can modify the behavior of CTRL-Y by disabling the DSUSP character, for example: $ stty dsusp undef See the OS X stty(1) man page and other references like: http://www.gnu.org/software/libc/manual/html_node/Signal-Characters.html ---------- nosy: +ned.deily resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 09:03:50 2012 From: report at bugs.python.org (Ned Deily) Date: Tue, 25 Dec 2012 08:03:50 +0000 Subject: [issue16770] Selection in IDLE often skips first character In-Reply-To: <1356373924.27.0.67520730715.issue16770@psf.upfronthosting.co.za> Message-ID: <1356422630.09.0.0732805189181.issue16770@psf.upfronthosting.co.za> Ned Deily added the comment: Sorry, I'm not able to reproduce the behavior you report, either using a current OS X 10.8.2 system with python.org 2.7.3 and ActiveTcl 8.5.13 or on a virtual 10.6.8 system with an 8.5.12 ActiveTcl. That said, such behavior would almost certainly be due to behavior within Tk or OS X rather than IDLE or Python itself. It might also depend on what font and font size you are using and on OS X extension programs you might have installed. Or on one or more System Preferences settings like input method. Since there are so many variables, it can be very difficult to isolate exactly what difference is significant in such cases. Just to be sure, exactly which version of Tk 8.5 are you using with this IDLE? Assuming you have a version of Xcode command line tools installed, type the following commands in the IDLE shell window: import Tkinter, subprocess, _tkinter Tkinter.Tcl().eval('info patchlevel') print(subprocess.check_output(["otool", "-L", _tkinter.__file__])) ---------- assignee: ronaldoussoren -> ned.deily nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 09:36:50 2012 From: report at bugs.python.org (Ed Campbell) Date: Tue, 25 Dec 2012 08:36:50 +0000 Subject: [issue16773] int() half-accepts UserString In-Reply-To: <1356380115.98.0.739133485355.issue16773@psf.upfronthosting.co.za> Message-ID: <1356424610.32.0.967237146042.issue16773@psf.upfronthosting.co.za> Changes by Ed Campbell : ---------- nosy: +esc24 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 11:17:47 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 10:17:47 +0000 Subject: [issue16775] Add test coverage for os.removedirs() Message-ID: <1356430667.93.0.960297281672.issue16775@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- components: Library (Lib) keywords: easy nosy: asvetlov priority: normal severity: normal status: open title: Add test coverage for os.removedirs() versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 11:22:01 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 10:22:01 +0000 Subject: [issue16775] Add test coverage for os.removedirs() Message-ID: <3YVtf10ll8zRgx@mail.python.org> New submission from Roundup Robot: New changeset c3acc5ead883 by Andrew Svetlov in branch '3.2': Add test coverage for os.removedirs (#16775) http://hg.python.org/cpython/rev/c3acc5ead883 New changeset dbe9413686b3 by Andrew Svetlov in branch '3.3': Add test coverage for os.removedirs (#16775) http://hg.python.org/cpython/rev/dbe9413686b3 New changeset 60240ce64789 by Andrew Svetlov in branch 'default': Add test coverage for os.removedirs (#16775) http://hg.python.org/cpython/rev/60240ce64789 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 11:23:05 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 10:23:05 +0000 Subject: [issue16775] Add test coverage for os.removedirs() In-Reply-To: <3YVtf10ll8zRgx@mail.python.org> Message-ID: <1356430985.57.0.555843744848.issue16775@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- resolution: -> fixed stage: -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 11:23:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 10:23:19 +0000 Subject: [issue16775] Add test coverage for os.removedirs() In-Reply-To: <3YVtf10ll8zRgx@mail.python.org> Message-ID: <1356430999.19.0.980922840296.issue16775@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 12:11:33 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 11:11:33 +0000 Subject: [issue16644] Wrong code in ContextManagerTests.test_invalid_args() in test_subprocess.py In-Reply-To: <1354986235.92.0.873586035968.issue16644@psf.upfronthosting.co.za> Message-ID: <1356433893.29.0.261254970803.issue16644@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 12:15:54 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 11:15:54 +0000 Subject: [issue16776] Document PyCFunction_New and PyCFunction_NewEx functions Message-ID: <1356434154.16.0.0981038830976.issue16776@psf.upfronthosting.co.za> New submission from Andrew Svetlov: c-api docs has no documentation for those public API functions. ---------- assignee: docs at python components: Documentation keywords: easy messages: 178115 nosy: asvetlov, docs at python priority: normal severity: normal status: open title: Document PyCFunction_New and PyCFunction_NewEx functions type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 12:16:30 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 11:16:30 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <1356434190.9.0.565944836489.issue15422@psf.upfronthosting.co.za> Andrew Svetlov added the comment: #16776 created for documenting PyCFunction_New/PyCFunction_NewEx ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 12:32:45 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 11:32:45 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <3YVwCc748NzRnR@mail.python.org> Roundup Robot added the comment: New changeset 3a86a3f1d89a by Andrew Svetlov in branch 'default': Issue #15422: get rid of PyCFunction_New macro http://hg.python.org/cpython/rev/3a86a3f1d89a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 12:33:04 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 11:33:04 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <1356435184.35.0.964302741014.issue15422@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 12:35:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 11:35:19 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1356435319.15.0.02594536132.issue16218@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Victor, are you done all work for the issue? Can it be closed? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 13:27:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 12:27:42 +0000 Subject: [issue16765] Superfluous import in cgi module In-Reply-To: <1356353617.65.0.761345333654.issue16765@psf.upfronthosting.co.za> Message-ID: <3YVxR16rx1zRrV@mail.python.org> Roundup Robot added the comment: New changeset f77648af7ff0 by Ezio Melotti in branch '2.7': #16765: remove unused import. http://hg.python.org/cpython/rev/f77648af7ff0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 13:29:45 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 12:29:45 +0000 Subject: [issue16765] Superfluous import in cgi module In-Reply-To: <1356353617.65.0.761345333654.issue16765@psf.upfronthosting.co.za> Message-ID: <1356438585.53.0.0306955359702.issue16765@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! > I wasn't sure about the patch format, so I added a unified diff. The best way is to get a clone of CPython and use "hg diff > patch.diff". You can find more information about it in the devguide. ---------- assignee: -> ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 13:30:24 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 12:30:24 +0000 Subject: [issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations In-Reply-To: <1356138147.12.0.530314626781.issue16748@psf.upfronthosting.co.za> Message-ID: <1356438624.12.0.410333964069.issue16748@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 13:46:29 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 12:46:29 +0000 Subject: [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <3YVxrh2gYwzRlj@mail.python.org> Roundup Robot added the comment: New changeset 1e5e7064e872 by Ezio Melotti in branch '2.7': #16666: document default values for socket.getaddrinfo in the text to clarify that it doesn't accept keyword args. http://hg.python.org/cpython/rev/1e5e7064e872 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 13:47:59 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 12:47:59 +0000 Subject: [issue16666] docs wrongly imply socket.getaddrinfo takes keyword arguments in 2.x In-Reply-To: <1355266809.79.0.222027583908.issue16666@psf.upfronthosting.co.za> Message-ID: <1356439679.79.0.969347765854.issue16666@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 14:06:55 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 13:06:55 +0000 Subject: [issue879399] socket line buffering Message-ID: <3YVyJG4GWgzRnD@mail.python.org> Roundup Robot added the comment: New changeset 5be3fa83d436 by Kristj?n Valur J?nsson in branch '2.7': issue #879399 http://hg.python.org/cpython/rev/5be3fa83d436 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 14:08:05 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 25 Dec 2012 13:08:05 +0000 Subject: [issue879399] socket line buffering Message-ID: <1356440885.77.0.00787533615438.issue879399@psf.upfronthosting.co.za> Changes by Kristj?n Valur J?nsson : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 14:11:05 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 25 Dec 2012 13:11:05 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1334358462.67.0.980544384901.issue14574@psf.upfronthosting.co.za> Message-ID: <1356441065.47.0.994547848477.issue14574@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: So, should I commit this? The change is really trivial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 14:14:47 2012 From: report at bugs.python.org (Michiel Holtkamp) Date: Tue, 25 Dec 2012 13:14:47 +0000 Subject: [issue16765] Superfluous import in cgi module In-Reply-To: <1356353617.65.0.761345333654.issue16765@psf.upfronthosting.co.za> Message-ID: <1356441287.12.0.572989267605.issue16765@psf.upfronthosting.co.za> Michiel Holtkamp added the comment: Thanks, I will do that next time. Happy holidays everyone! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 14:24:07 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 25 Dec 2012 13:24:07 +0000 Subject: [issue16742] PyOS_Readline drops GIL and calls PyOS_StdioReadline, which isn't thread safe In-Reply-To: <1356086390.48.0.327620937355.issue16742@psf.upfronthosting.co.za> Message-ID: <1356441847.51.0.709472160856.issue16742@psf.upfronthosting.co.za> Changes by Kristj?n Valur J?nsson : ---------- nosy: +kristjan.jonsson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 14:34:19 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 13:34:19 +0000 Subject: [issue879399] socket line buffering Message-ID: <1356442459.72.0.112002087806.issue879399@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 14:47:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 13:47:57 +0000 Subject: [issue16677] Hard to find operator precedence in Lang Ref. In-Reply-To: <1355465395.03.0.430403844231.issue16677@psf.upfronthosting.co.za> Message-ID: <3YVzCd076CzRm5@mail.python.org> Roundup Robot added the comment: New changeset a0f6c68ea12f by Ezio Melotti in branch '2.7': #16677: rename section header and fix markup. http://hg.python.org/cpython/rev/a0f6c68ea12f New changeset 2eab4f7b7280 by Ezio Melotti in branch '3.2': #16677: rename section header and fix markup. http://hg.python.org/cpython/rev/2eab4f7b7280 New changeset 356af3fc6471 by Ezio Melotti in branch '3.3': #16677: merge with 3.2. http://hg.python.org/cpython/rev/356af3fc6471 New changeset 9a65501a71e6 by Ezio Melotti in branch 'default': #16677: merge with 3.3. http://hg.python.org/cpython/rev/9a65501a71e6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 14:54:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 13:54:48 +0000 Subject: [issue16777] "Evaluation order" doc section is wrong about dicts Message-ID: <1356443687.99.0.545943442406.issue16777@psf.upfronthosting.co.za> New submission from Ezio Melotti: http://docs.python.org/2/reference/expressions.html#evaluation-order says that the dicts are evaluated in this order: {expr1: expr2, expr3: expr4} however each value is evaluated before the respective key: def f(x): print(x) return x {f('k1'): f('v1'), f('k2'): f('v2')} v1 k1 v2 k2 {'k1': 'v1', 'k2': 'v2'} ---------- assignee: ezio.melotti components: Documentation messages: 178127 nosy: chris.jerdonek, ezio.melotti priority: normal severity: normal stage: needs patch status: open title: "Evaluation order" doc section is wrong about dicts type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 14:58:30 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 13:58:30 +0000 Subject: [issue16677] Hard to find operator precedence in Lang Ref. In-Reply-To: <1355465395.03.0.430403844231.issue16677@psf.upfronthosting.co.za> Message-ID: <1356443910.26.0.865144423055.issue16677@psf.upfronthosting.co.za> Ezio Melotti added the comment: I think it's better to keep the two sections separate, so I just changed the title from "Summary" to "Operator precedence". While I was at it I also fixed the markup in a few places in the section and noticed a mistake in the "Evaluation order" (reported in #16777). Regarding the index entries I don't see anything wrong with the current ones, but I'm not sure how they are supposed to work and I generally find Google more reliable than the Sphinx search. ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 15:41:50 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 14:41:50 +0000 Subject: [issue16777] "Evaluation order" doc section is wrong about dicts In-Reply-To: <1356443687.99.0.545943442406.issue16777@psf.upfronthosting.co.za> Message-ID: <1356446510.03.0.420357715636.issue16777@psf.upfronthosting.co.za> Ezio Melotti added the comment: This has already been reported in #11205. ---------- resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> Evaluation order of dictionary display is different from reference manual. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 15:47:58 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 14:47:58 +0000 Subject: [issue16715] Get rid of IOError. Use OSError instead Message-ID: <3YW0Xs2j15zRkN@mail.python.org> New submission from Roundup Robot: New changeset 7d69d04522e3 by Andrew Svetlov in branch 'default': Replace IOError with OSError (#16715) http://hg.python.org/cpython/rev/7d69d04522e3 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 15:48:26 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 14:48:26 +0000 Subject: [issue16715] Get rid of IOError. Use OSError instead In-Reply-To: <3YW0Xs2j15zRkN@mail.python.org> Message-ID: <1356446906.38.0.665575101094.issue16715@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 15:58:39 2012 From: report at bugs.python.org (Georg Brandl) Date: Tue, 25 Dec 2012 14:58:39 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <1356447518.99.0.488016059779.issue15422@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think this is the only use of this particular idiom; I recall it is used every time we "amend" a function with an _Ex version. Why was this change necessary? ---------- nosy: +georg.brandl, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 15:58:49 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 14:58:49 +0000 Subject: [issue11205] Evaluation order of dictionary display is different from reference manual. In-Reply-To: <1297589953.69.0.371220549392.issue11205@psf.upfronthosting.co.za> Message-ID: <1356447529.89.0.102940178431.issue11205@psf.upfronthosting.co.za> Ezio Melotti added the comment: I came across the same problem in #16777. IMHO the current behavior is better, and the documentation should be fixed instead, for the following reasons: 1) it's consistent with assignments, where the RHS is evaluated before the LHS (see also msg128500). This should also be the behavior of the dict(k=v) syntax, and what I personally expect; 2) changing it back is not backward-compatible with any code written during the last 10 years; 3) keeping the current behavior and fixing the docs is simpler than fixing the code to match the docs; In addition, I would avoid writing code with side-effects in a dict literal, even if the order was documented and guaranteed. The fact that we don't see many reports about this seems to indicate that people don't write such code, or if they do they rely on the current order. ---------- nosy: +ezio.melotti, gvanrossum type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 15:59:26 2012 From: report at bugs.python.org (Georg Brandl) Date: Tue, 25 Dec 2012 14:59:26 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <1356447566.71.0.918835808855.issue15422@psf.upfronthosting.co.za> Georg Brandl added the comment: BTW it would be good if you could have at least one other developer look at issues like this and get a "LGTM" vote before committing all by yourself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 16:00:55 2012 From: report at bugs.python.org (Georg Brandl) Date: Tue, 25 Dec 2012 15:00:55 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356447655.57.0.717450314999.issue16772@psf.upfronthosting.co.za> Georg Brandl added the comment: Can you give examples? I'm unable to guess what exactly you are reporting from quick experiments. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 16:03:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 15:03:35 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356447815.4.0.386428731915.issue16772@psf.upfronthosting.co.za> Ezio Melotti added the comment: 2.7$ ./python -c 'int("5", 12.5)' Traceback (most recent call last): File "", line 1, in TypeError: integer argument expected, got float 3.2$ ./python -c 'int("5", 12.5)' 3.2$ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 16:08:28 2012 From: report at bugs.python.org (Georg Brandl) Date: Tue, 25 Dec 2012 15:08:28 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356448108.84.0.860288424557.issue16772@psf.upfronthosting.co.za> Georg Brandl added the comment: Ah. I was thinking of things like ``int('1.2', 10)``, not the base itself being a float. In this case, looks like a bug to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 16:16:34 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 25 Dec 2012 15:16:34 +0000 Subject: [issue9022] TypeError in wsgiref.handlers when using CGIHandler In-Reply-To: <1276820747.2.0.467969862682.issue9022@psf.upfronthosting.co.za> Message-ID: <1356448594.57.0.162833183263.issue9022@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Add fixups for encoding problems to wsgiref _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 16:17:52 2012 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 25 Dec 2012 15:17:52 +0000 Subject: [issue15005] trace corrupts return result on chained execution In-Reply-To: <1338907211.87.0.323271147876.issue15005@psf.upfronthosting.co.za> Message-ID: <1356448672.78.0.107586348919.issue15005@psf.upfronthosting.co.za> anatoly techtonik added the comment: The trace module helps to gather program flow statistics and see the differences in patterns for large systems when program evolves. In particular, components ported to Python 3 should still behave the same way on Python 2. Right now the behavior under the trace is broken. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 16:17:54 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 15:17:54 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <1356448674.3.0.0818419387886.issue15422@psf.upfronthosting.co.za> Andrew Svetlov added the comment: 1. Yes, you right. We use this idiom also for PyAST_CompileEx, PyErr_WarnEx and bunch of functions in ./Include/pythonrun.h 2. Patch is very simple and was available for review almost 3 months. I assumed that developers looked on this and had no objections. Sorry if I was wrong. 3. The change is not required. But, I think, it can be helpful to use direct function calls instead of macros, especially for functions which are part of Stable API. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 16:36:37 2012 From: report at bugs.python.org (Stefan Krah) Date: Tue, 25 Dec 2012 15:36:37 +0000 Subject: [issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations In-Reply-To: <1356138147.12.0.530314626781.issue16748@psf.upfronthosting.co.za> Message-ID: <1356449797.2.0.638606452828.issue16748@psf.upfronthosting.co.za> Stefan Krah added the comment: Perhaps I misunderstood something, but test_decimal.py *is* using the exact idiom from PEP-399 and it works. Why do you want to "fix" the usage of this idiom? ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 16:40:19 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 15:40:19 +0000 Subject: [issue16709] unittest discover order is filesystem specific - hard to reproduce In-Reply-To: <1355797737.36.0.999533489695.issue16709@psf.upfronthosting.co.za> Message-ID: <1356450019.56.0.142529831438.issue16709@psf.upfronthosting.co.za> Ezio Melotti added the comment: Should this be considered a new feature or should it be applied to older versions as well? ---------- keywords: +easy stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 16:48:18 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 15:48:18 +0000 Subject: [issue16684] Unicode property value abbreviated names and long names In-Reply-To: <1355506392.97.0.314398568458.issue16684@psf.upfronthosting.co.za> Message-ID: <1356450498.96.0.229741947224.issue16684@psf.upfronthosting.co.za> Ezio Melotti added the comment: The script should probably be integrated in Tools/unicode/makeunicodedata.py. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:11:22 2012 From: report at bugs.python.org (Irwin Jungreis) Date: Tue, 25 Dec 2012 16:11:22 +0000 Subject: [issue16770] Selection in IDLE often skips first character In-Reply-To: <1356373924.27.0.67520730715.issue16770@psf.upfronthosting.co.za> Message-ID: <1356451882.8.0.692078699865.issue16770@psf.upfronthosting.co.za> Irwin Jungreis added the comment: The output of the commands you suggested is below. I've attached a short video showing the problem (listen for the mouse clicks). I also tried with a variety of fonts (proportional and fixed) and font sizes, both bold and not bold, and all had the same problem. (Set a large font size to make the problem easier to reproduce.) I don't think I have changed any settings in Universal Access, and can't think of any extensions that are related. I probably have changed Mouse settings like Tracking Speed, but since the problem occurs using the mouse and the trackpad it seems unlikely to be due to settings in either. Thanks for your attention. >>> import Tkinter, subprocess, _tkinter >>> Tkinter.Tcl().eval('info patchlevel') '8.5.11' >>> print(subprocess.check_output(["otool", "-L", _tkinter.__file__])) /Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/lib-dynload/_tkinter.so: /Library/Frameworks/Tcl.framework/Versions/8.5/Tcl (compatibility version 8.5.0, current version 8.5.11) /Library/Frameworks/Tk.framework/Versions/8.5/Tk (compatibility version 8.5.0, current version 8.5.11) /usr/lib/libSystem.B.dylib (compatibility version 1.0.0, current version 125.2.0) ---------- Added file: http://bugs.python.org/file28431/IMG_1194.MOV _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:16:56 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 16:16:56 +0000 Subject: [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <3YW2WW5ZVBzRkS@mail.python.org> Roundup Robot added the comment: New changeset b11f98872c0f by Ezio Melotti in branch '2.7': #16760: use ref:`match-objects` instead of :class:`MatchObject`. http://hg.python.org/cpython/rev/b11f98872c0f New changeset 7c4ef8faeb4a by Ezio Melotti in branch '3.2': #16760: use ref:`match-objects` instead of :class:`MatchObject`. http://hg.python.org/cpython/rev/7c4ef8faeb4a New changeset 4ba1e90e0119 by Ezio Melotti in branch '3.3': #16760: merge with 3.2. http://hg.python.org/cpython/rev/4ba1e90e0119 New changeset f2222684dd2d by Ezio Melotti in branch 'default': #16760: merge with 3.3. http://hg.python.org/cpython/rev/f2222684dd2d ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:20:28 2012 From: report at bugs.python.org (Glynn Clements) Date: Tue, 25 Dec 2012 16:20:28 +0000 Subject: [issue16778] Logger.findCaller needs to be smarter Message-ID: <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za> New submission from Glynn Clements: The current behaviour of logging.Logger.findCaller() makes it awkward to add custom logging interfaces. E.g. suppose that you define a custom logging level (NOTICE) then add a notice() function (analogous to logging.info() etc), the resulting LogRecord structure will have pathname, filename, module, funcName and lineno members which refer to the notice() function itself, rather than to its caller. This can be hacked around e.g. by using code.compile_command to lie about the source filename, but that's ugly and highly unintuitive. ---------- components: Library (Lib) messages: 178145 nosy: glynnc priority: normal severity: normal status: open title: Logger.findCaller needs to be smarter type: enhancement versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:21:01 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 16:21:01 +0000 Subject: [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <1356452461.09.0.0447278896331.issue16760@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report! ---------- assignee: docs at python -> ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:26:34 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 25 Dec 2012 16:26:34 +0000 Subject: [issue16778] Logger.findCaller needs to be smarter In-Reply-To: <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za> Message-ID: <1356452794.09.0.137153841876.issue16778@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:29:15 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 25 Dec 2012 16:29:15 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356452955.21.0.70087494133.issue16772@psf.upfronthosting.co.za> Mark Dickinson added the comment: I agree that this should be fixed. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:42:03 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 16:42:03 +0000 Subject: [issue16766] small disadvantage of htmlentitydefs In-Reply-To: <1356359998.55.0.0415174560622.issue16766@psf.upfronthosting.co.za> Message-ID: <1356453723.52.0.706448541714.issue16766@psf.upfronthosting.co.za> Ezio Melotti added the comment: That's because ' is not a valid character reference in HTML 4, but only in HTML5/XML/XHTML. A mapping that contains a list of HTML 5 entities has been added from Python 3.3. Modules like HTMLParser also include ' among the entities while parsing. ---------- assignee: -> ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:44:51 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 16:44:51 +0000 Subject: [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <1356453891.9.0.69574312364.issue16760@psf.upfronthosting.co.za> Andrew Svetlov added the comment: We need to rename MatchObject to match object than (see #16443) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:49:35 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 16:49:35 +0000 Subject: [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <3YW3FC0YTBzRhg@mail.python.org> Roundup Robot added the comment: New changeset 3bee420d400f by Andrew Svetlov in branch '3.2': rename MathcObject to match object in doctrings for re module (#16760) http://hg.python.org/cpython/rev/3bee420d400f New changeset 73b24ee09e0a by Andrew Svetlov in branch '3.3': rename MathcObject to match object in doctrings for re module (#16760) http://hg.python.org/cpython/rev/73b24ee09e0a New changeset 8ebbab768e1b by Andrew Svetlov in branch 'default': rename MathcObject to match object in doctrings for re module (#16760) http://hg.python.org/cpython/rev/8ebbab768e1b ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:50:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 16:50:14 +0000 Subject: [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <3YW3Fx3bnZzRhg@mail.python.org> Roundup Robot added the comment: New changeset 6ca8f965fd65 by Andrew Svetlov in branch '2.7': rename MathcObject to match object in doctrings for re module (#16760) http://hg.python.org/cpython/rev/6ca8f965fd65 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:53:28 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 16:53:28 +0000 Subject: [issue16443] Add docstrings to regular expression match objects In-Reply-To: <1352405232.66.0.722959472058.issue16443@psf.upfronthosting.co.za> Message-ID: <1356454408.06.0.683693091472.issue16443@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed in #16760 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:53:54 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 16:53:54 +0000 Subject: [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <1356454434.15.0.0840882147382.issue16760@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Done ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:54:22 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 16:54:22 +0000 Subject: [issue16760] Get rid of MatchObject in regex HOWTO In-Reply-To: <1356338155.64.0.700591517206.issue16760@psf.upfronthosting.co.za> Message-ID: <1356454462.44.0.843250618774.issue16760@psf.upfronthosting.co.za> Ezio Melotti added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 17:57:15 2012 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 25 Dec 2012 16:57:15 +0000 Subject: [issue14468] Update cloning guidelines in devguide In-Reply-To: <1333296467.92.0.464102844472.issue14468@psf.upfronthosting.co.za> Message-ID: <1356454635.72.0.0742878021382.issue14468@psf.upfronthosting.co.za> Ezio Melotti added the comment: "hg graft" should also be mentioned. I now use "hg graft 2.7" instead of "hg export 2.7 | hg import -" to copy changeset from 2.7 to 3.2 (and then merge on 3.3/3.x). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 18:02:18 2012 From: report at bugs.python.org (Stefan Krah) Date: Tue, 25 Dec 2012 17:02:18 +0000 Subject: [issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations In-Reply-To: <1356449797.2.0.638606452828.issue16748@psf.upfronthosting.co.za> Message-ID: <20121225170220.GA13264@sleipnir.bytereef.org> Stefan Krah added the comment: I finally understood the issue. So this does not work: ./python -m unittest discover Lib/test/ 'test_dec*.py' Neither does this: ./python -m unittest discover Lib/test/ 'test_multipro*.py' And this fails, too (still hanging): ./python -m unittest discover Lib/test/ 'test_thread*.py' I'm not sure why tests in the Python test suite should be discoverable. If I read this ... http://www.voidspace.org.uk/python/weblog/arch_d7_2009_05_30.shtml ..., the feature is for projects that don't have a test collection machinery. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 18:13:46 2012 From: report at bugs.python.org (Georg Brandl) Date: Tue, 25 Dec 2012 17:13:46 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <1356455626.03.0.382293579627.issue15422@psf.upfronthosting.co.za> Georg Brandl added the comment: There is no silent acceptance. No comment means that nobody reviewed it, which is no surprise given the number of open issues :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 18:15:48 2012 From: report at bugs.python.org (Georg Brandl) Date: Tue, 25 Dec 2012 17:15:48 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <1356455748.67.0.450919859373.issue15422@psf.upfronthosting.co.za> Georg Brandl added the comment: So given #1 and #3, I would recommend reverting the part of the patch that removes the macro. Changing caller sites in CPython sources is fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 18:29:17 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 17:29:17 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <1356456557.06.0.080604072141.issue15422@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- resolution: fixed -> stage: committed/rejected -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 19:19:07 2012 From: report at bugs.python.org (Michael Foord) Date: Tue, 25 Dec 2012 18:19:07 +0000 Subject: [issue16709] unittest discover order is filesystem specific - hard to reproduce In-Reply-To: <1355797737.36.0.999533489695.issue16709@psf.upfronthosting.co.za> Message-ID: <1356459547.49.0.706525663528.issue16709@psf.upfronthosting.co.za> Michael Foord added the comment: It smells like a feature to me (it isn't a direct "bug" fix anyway). It can be applied to earlier versions of Python through a new unittest2 release. ---------- versions: +Python 3.5 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 19:38:54 2012 From: report at bugs.python.org (Jeremy Kloth) Date: Tue, 25 Dec 2012 18:38:54 +0000 Subject: [issue16779] Fix compiler warning when building extension modules on 64-bit Windows Message-ID: <1356460734.84.0.660480375945.issue16779@psf.upfronthosting.co.za> New submission from Jeremy Kloth: The 64-bit linker doesn't mangle the dllexport'ed module init function (from PyMODINIT_FUNC) so it causes an exported name conflict. We cannot just remove that name from export_symbols as the module may not have used PyMODINIT_FUNC on its init function. The attached patch "fixes" the problem by suppressing the warning. I personally would prefer the "pure" approach by assuming that the module initialization function would be required to be declared by PyMODINIT_FUNC and therefore the symbol would not need to be exported on the command line. ---------- assignee: eric.araujo components: Build, Distutils files: msvc9compiler.diff keywords: patch messages: 178160 nosy: eric.araujo, jkloth, tarek priority: normal severity: normal status: open title: Fix compiler warning when building extension modules on 64-bit Windows versions: Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file28432/msvc9compiler.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 20:36:27 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Tue, 25 Dec 2012 19:36:27 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1356441065.47.0.994547848477.issue14574@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > So, should I commit this? The change is really trivial. LGTM. This should be applied to 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 21:48:05 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 25 Dec 2012 20:48:05 +0000 Subject: [issue16773] int() half-accepts UserString In-Reply-To: <1356380115.98.0.739133485355.issue16773@psf.upfronthosting.co.za> Message-ID: <1356468485.58.0.836246893287.issue16773@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 22:05:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 21:05:41 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <3YW8wh49SYzRgD@mail.python.org> Roundup Robot added the comment: New changeset e510e028c486 by Gregory P. Smith in branch 'default': Fixes issue #16772: int() constructor second argument (base) must be an int. http://hg.python.org/cpython/rev/e510e028c486 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 22:07:24 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Tue, 25 Dec 2012 21:07:24 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356469644.06.0.378745075711.issue16772@psf.upfronthosting.co.za> Gregory P. Smith added the comment: If someone thinks this should go into 3.2 and 3.3 they're welcome to do it; no objections from me. (The behavior was unintentional and thus a bug, but it is still a minor behavior change) ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 22:23:31 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Tue, 25 Dec 2012 21:23:31 +0000 Subject: [issue16774] Additional recipes for itertools docs In-Reply-To: <1356381615.1.0.91798699559.issue16774@psf.upfronthosting.co.za> Message-ID: <1356470611.03.0.391169969501.issue16774@psf.upfronthosting.co.za> Alexey Kachayev added the comment: Added: * takelast * droplast ---------- Added file: http://bugs.python.org/file28433/itertools.doc.v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 22:54:11 2012 From: report at bugs.python.org (Lee Long) Date: Tue, 25 Dec 2012 21:54:11 +0000 Subject: [issue16780] fail to compile python in msys with mingw Message-ID: <1356472451.03.0.664575682974.issue16780@psf.upfronthosting.co.za> New submission from Lee Long: Hi all, For some reason, I have to develop my software with mingw under windows. First of all, I need python installed in the msys but I try all my ways to install 2.6.x, 2.7.x, 3.2.x and 3.3.0, no one succeed. I search all issues and google the related information online, it seems that it doesn't support python on mingw? But what stranger is there are a few posts here with the patch presented, so is there any way to make the source compiled in mingw? I try all the available patches but again, it didn't solve the problem. Here are the error messages when I try to compile the 3.3.0 in mingw, ./configure ---> no problem make ---> errors shown below Objects/exceptions.c:2527:5: error: 'EALREADY' undeclared (first use in this function) Objects/exceptions.c:2527:5: note: each undeclared identifier is reported only once for each function it appears in Objects/exceptions.c:2528:5: error: 'EINPROGRESS' undeclared (first use in this function) Objects/exceptions.c:2529:5: error: 'EWOULDBLOCK' undeclared (first use in this function) Objects/exceptions.c:2532:5: error: 'ESHUTDOWN' undeclared (first use in this function) Objects/exceptions.c:2536:5: error: 'ECONNABORTED' undeclared (first use in this function) Objects/exceptions.c:2538:5: error: 'ECONNREFUSED' undeclared (first use in this function) Objects/exceptions.c:2540:5: error: 'ECONNRESET' undeclared (first use in this function) Objects/exceptions.c:2557:5: error: 'ETIMEDOUT' undeclared (first use in this function) make: *** [Objects/exceptions.o] Error 1 I've been working on these for two days, really has no idea what's wrong with these. BTW, I saw in some similar posts, there are more then one patch uploaded in different time, I patch each at a time from old to new, is that the right order to do so or I only have to patch the latest one? Thanks. ---------- components: Build, Windows messages: 178165 nosy: mwtree priority: normal severity: normal status: open title: fail to compile python in msys with mingw versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 22:54:59 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Tue, 25 Dec 2012 21:54:59 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356472499.55.0.790065976508.issue16772@psf.upfronthosting.co.za> Chris Jerdonek added the comment: A test also needs to be added, though I'm sure one will be added as part of issue 16761. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 23:10:59 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Tue, 25 Dec 2012 22:10:59 +0000 Subject: [issue16677] Hard to find operator precedence in Lang Ref. In-Reply-To: <1355465395.03.0.430403844231.issue16677@psf.upfronthosting.co.za> Message-ID: <1356473459.76.0.133983642781.issue16677@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Changing 'datum' to 'value' is a nice touch that I overlooked. It is definitely friendlier to people whose native language is not latin-infested. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 23:47:03 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 22:47:03 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1334358462.67.0.980544384901.issue14574@psf.upfronthosting.co.za> Message-ID: <3YWC9g2ZRLzRjg@mail.python.org> Roundup Robot added the comment: New changeset df51cb946d27 by Kristj?n Valur J?nsson in branch '2.7': Issue #14574: Ignore socket errors raised when flushing a connection on close. http://hg.python.org/cpython/rev/df51cb946d27 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 23:47:31 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 25 Dec 2012 22:47:31 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1334358462.67.0.980544384901.issue14574@psf.upfronthosting.co.za> Message-ID: <1356475651.59.0.156391758259.issue14574@psf.upfronthosting.co.za> Changes by Kristj?n Valur J?nsson : ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Dec 25 23:52:21 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 22:52:21 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1334358462.67.0.980544384901.issue14574@psf.upfronthosting.co.za> Message-ID: <1356475941.26.0.547278624018.issue14574@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Not clean to me: has python3 the same bug? ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 00:00:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 23:00:52 +0000 Subject: [issue15990] solidify argument/parameter terminology In-Reply-To: <1348169057.62.0.370171802379.issue15990@psf.upfronthosting.co.za> Message-ID: <3YWCTc1K1WzRp0@mail.python.org> Roundup Robot added the comment: New changeset ecf3cd3af502 by Chris Jerdonek in branch '2.7': Add additional links and index entries for "argument" and "parameter". http://hg.python.org/cpython/rev/ecf3cd3af502 New changeset 31e1f0b7f42e by Chris Jerdonek in branch '3.2': Add additional links and index entries for "argument" and "parameter". http://hg.python.org/cpython/rev/31e1f0b7f42e New changeset 7a4a1fc6b3ee by Chris Jerdonek in branch '3.3': Merge from 3.2: add links and index entries for "argument" and "parameter." http://hg.python.org/cpython/rev/7a4a1fc6b3ee New changeset 10e4d28d0090 by Chris Jerdonek in branch 'default': Merge from 3.3: add links and index entries for "argument" and "parameter." http://hg.python.org/cpython/rev/10e4d28d0090 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 00:04:19 2012 From: report at bugs.python.org (STINNER Victor) Date: Tue, 25 Dec 2012 23:04:19 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1356435319.15.0.02594536132.issue16218@psf.upfronthosting.co.za> Message-ID: STINNER Victor added the comment: The issue is now fixed on all platforms for Python 3.4. Please keep the issue open until all changes are backported to Python 3.3 or even Python 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 00:06:13 2012 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 25 Dec 2012 23:06:13 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356476773.77.0.0808574796785.issue16772@psf.upfronthosting.co.za> Mark Dickinson added the comment: Greg: please could you add a test? I think that the new check may be too strict: should we also be prepared to accept any object that implements __index__ as a base? (Similar to the way that round accepts an __index__-aware object for its second argument.) It would have been nice to have a chance to review this change before it was committed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 00:20:58 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Tue, 25 Dec 2012 23:20:58 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1356477658.78.0.0199136068636.issue16218@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I assign the issue to you than. Is it ok? ---------- assignee: asvetlov -> haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 00:29:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Tue, 25 Dec 2012 23:29:37 +0000 Subject: [issue14901] Python Windows FAQ is Very Outdated In-Reply-To: <1337873167.77.0.855144378298.issue14901@psf.upfronthosting.co.za> Message-ID: <3YWD6l3fhqzRlr@mail.python.org> Roundup Robot added the comment: New changeset e8793c5f0ebc by Chris Jerdonek in branch '3.2': Fix Sphinx warning (missing "setting-envvars" reference). http://hg.python.org/cpython/rev/e8793c5f0ebc ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 00:44:28 2012 From: report at bugs.python.org (Lee Long) Date: Tue, 25 Dec 2012 23:44:28 +0000 Subject: [issue16780] fail to compile python in msys with mingw In-Reply-To: <1356472451.03.0.664575682974.issue16780@psf.upfronthosting.co.za> Message-ID: <1356479068.04.0.792569643071.issue16780@psf.upfronthosting.co.za> Lee Long added the comment: I then try compiling the version 2.7.3, different errors were shown while 'make' ./Modules/posixmodule.c:6151:5: warning: implicit declaration of function 'wait'[-Wimplicit-function-declaration] ./Modules/posixmodule.c: In function 'posix_fdopen': ./Modules/posixmodule.c:6751:9: warning: implicit declaration of function 'fcntl' [-Wimplicit-function-declaration] ./Modules/posixmodule.c:6751:27: error: 'F_GETFL' undeclared (first use in this function) ./Modules/posixmodule.c:6751:27: note: each undeclared identifier is reported only once for each function it appears in ./Modules/posixmodule.c:6753:23: error: 'F_SETFL' undeclared (first use in this function) ./Modules/posixmodule.c: In function 'posix_pipe': ./Modules/posixmodule.c:6816:5: warning: implicit declaration of function 'pipe' [-Wimplicit-function-declaration] ./Modules/posixmodule.c: At top level: ./Modules/posixmodule.c:671:1: warning: 'posix_fildes' defined but not used [-Wunused-function] ./Modules/posixmodule.c:7480:1: warning: 'conv_confname' defined but not used [-Wunused-function] ./Modules/posixmodule.c:8387:1: warning: 'setup_confname_table' defined but not used [-Wunused-function] make: *** [Modules/posixmodule.o] Error 1 ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 00:58:40 2012 From: report at bugs.python.org (R. David Murray) Date: Tue, 25 Dec 2012 23:58:40 +0000 Subject: [issue16780] fail to compile python in msys with mingw In-Reply-To: <1356472451.03.0.664575682974.issue16780@psf.upfronthosting.co.za> Message-ID: <1356479920.63.0.17488282968.issue16780@psf.upfronthosting.co.za> R. David Murray added the comment: The bug tracker is not a place to get help, but is rather for reporting bugs and proposing patches. We do not currently support msys/mingw. As you have observed, various patches have been proposed; however, in order for any of them to get committed, we need the modifications to be broken down into easily reviewable pieces. If you are interested in tackling this project, please post individually motivated and reviewable patches as separate issues. Since you are seeking help in this issue rather than proposing a patch, I recommend you post to the python-list mailing list, and see if there is anyone with answers to your questions, or interested in working on this with you. ---------- nosy: +r.david.murray stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 01:15:51 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 26 Dec 2012 00:15:51 +0000 Subject: [issue16781] execfile/exec messes up with imports in executed file Message-ID: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> New submission from anatoly techtonik: When a Python file is exec()uted, it magically fails to find names in imported modules. The most magical thing in the examples below (b3.py in attach for Python 3) is that first reference to wintypes.LONG in print statement is actually successfull. --- a.py from ctypes import wintypes print(wintypes.LONG) class LOGFONT(object): field = wintypes.LONG --- b2.py (Python 2 version) def main(): execfile('a.py') main() --- Output Traceback (most recent call last): File "b2.py", line 4, in main() File "b2.py", line 2, in main execfile('a.py') File "a.py", line 5, in class LOGFONT(object): File "a.py", line 6, in LOGFONT field = wintypes.LONG NameError: name 'wintypes' is not defined ---------- components: Interpreter Core files: b3.py messages: 178177 nosy: techtonik priority: normal severity: normal status: open title: execfile/exec messes up with imports in executed file versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28434/b3.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 01:22:21 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 26 Dec 2012 00:22:21 +0000 Subject: [issue16781] execfile/exec messes up with imports in executed file In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356481341.61.0.231337979178.issue16781@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file28435/a.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 01:22:29 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 26 Dec 2012 00:22:29 +0000 Subject: [issue16781] execfile/exec messes up with imports in executed file In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356481349.96.0.682117148291.issue16781@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file28436/b2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 01:50:54 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 26 Dec 2012 00:50:54 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1334358462.67.0.980544384901.issue14574@psf.upfronthosting.co.za> Message-ID: <1356483054.38.0.107730335257.issue14574@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Semantically, but I am told that due to py3k's different file buffering, that those errors don't percolate through. According to Charles-Francois' post from apr, 14th: "Note that Python 3.3 doesn't have this problem." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 01:52:47 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 26 Dec 2012 00:52:47 +0000 Subject: [issue7083] locals() behaviour differs when tracing is in effect In-Reply-To: <1255009798.45.0.553728595296.issue7083@psf.upfronthosting.co.za> Message-ID: <1356483167.47.0.73208022905.issue7083@psf.upfronthosting.co.za> anatoly techtonik added the comment: I'm 3rd to vote for reopening this issue to clarify documentation or to fix (read below). == Why it is important to fix 1. First personal user story. Until I saw the localstest.py I couldn't figure out what all locals() definitions are talking about. Dictionary, that is a copy, but the copy is sporadically updated when nobody is using in background. It is a weird dictionary with inconsistent behavior placed at a rather critical part of the language. 2. Second personal story. I probably run into the same bug in issue16781. Probably, because I still don't understand what really happens. It is only a suspicion, and it is bad because with my experience I'm supposed to know what happens, but I never had the time to dig deeper until now. 3. locals() is referenced in exec/execfile() docs for the explanation of arguments. Magic of locals() multiplied by exec.execfile() gives a next level of headache when you need to resolve this. Add settrace() to the formula to awake a hater in you. exec/execfile() are used in Python-based scripting tools (such as SCons), in trace scripts and when Python is embedded as a scripting language. Coding on this level should be easy to make more interesting tools to appear. == Fix Idea 1. Is it possible to rename locals() to _locals(), and leave user visible API function local() for an object that updates itself every time it is accessed? ---------- components: +Documentation nosy: +techtonik versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 02:25:04 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 26 Dec 2012 01:25:04 +0000 Subject: [issue16781] execfile/exec execution of class statement does not access locals() In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356485104.3.0.927007765197.issue16781@psf.upfronthosting.co.za> R. David Murray added the comment: The fact that the print works should be a clue that Python is in fact finding the module and importing it. So your problem actually has to do with namespaces, which is something you have to think about when using exec or execfile. You can see this by replacing your import with any variable setting (say, a=1) and referencing that in the class body. The problem here is that execfile is operating inside a function, therefore the local and global namespaces are different. wintypes gets imported into the *local* namespace. Now, if you inline this type of code by hand, wintypes (or a) is found in the local namespace when the class statement is executed. But when it is done via execfile, it is not. I'm not clear on whether or not this is a bug, but if it isn't there is certainly missing documentation in the description of execfile. ---------- nosy: +benjamin.peterson, r.david.murray title: execfile/exec messes up with imports in executed file -> execfile/exec execution of class statement does not access locals() type: -> behavior versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 03:12:19 2012 From: report at bugs.python.org (INADA Naoki) Date: Wed, 26 Dec 2012 02:12:19 +0000 Subject: [issue16712] collections.abc.Sequence should not provide __reversed__ In-Reply-To: <1355835361.63.0.373231585566.issue16712@psf.upfronthosting.co.za> Message-ID: <1356487939.39.0.788499347251.issue16712@psf.upfronthosting.co.za> INADA Naoki added the comment: __contains__ is required for Container. So there is a clear reason to define it. Additionaly, http://docs.python.org/3.3/reference/datamodel.html#object.__contains__ doesn't discourage to implement slower pure-python method. In case of __reversed__, I can't find a reason to require it and reference discourage it explicitly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 03:43:54 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 26 Dec 2012 02:43:54 +0000 Subject: [issue14468] Update cloning guidelines in devguide In-Reply-To: <1333296467.92.0.464102844472.issue14468@psf.upfronthosting.co.za> Message-ID: <1356489834.21.0.791317482847.issue14468@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Note that "hg graft" is already mentioned/discussed in the devguide here: http://docs.python.org/devguide/committing.html#porting-between-major-versions ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 03:49:02 2012 From: report at bugs.python.org (Thomas Ballinger) Date: Wed, 26 Dec 2012 02:49:02 +0000 Subject: [issue16782] No curses.initwin: Incorrect package docstring for curses Message-ID: <1356490142.44.0.537785717498.issue16782@psf.upfronthosting.co.za> New submission from Thomas Ballinger: Lib/curses/__init__.py has `curses.initwin()` in the docstring example code, but this function does not exist (should be `initscr()`) Bad in at least back to 2.4 ---------- assignee: docs at python components: Documentation files: docfix.patch keywords: patch messages: 178183 nosy: Thomas.Ballinger, docs at python priority: normal severity: normal status: open title: No curses.initwin: Incorrect package docstring for curses versions: Python 3.3 Added file: http://bugs.python.org/file28437/docfix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 04:25:40 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 26 Dec 2012 03:25:40 +0000 Subject: [issue16781] execfile/exec execution of class statement does not access locals() In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356492340.76.0.48791180113.issue16781@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The best solution is to just always pass an explicit namespace to exec. That should be documented. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 07:38:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Dec 2012 06:38:41 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <3YWPdr6dDRzM2d@mail.python.org> Roundup Robot added the comment: New changeset 60f7197f991f by Gregory P. Smith in branch 'default': Test for issue16772 and redoes the previous fix to accept __index__-aware http://hg.python.org/cpython/rev/60f7197f991f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 07:43:36 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 26 Dec 2012 06:43:36 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356504216.93.0.453646547758.issue16761@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Having just looked added something to test_int as part of issue16772... There appears to be an explicit test _for_ this strange behavior in there: http://hg.python.org/cpython/file/60f7197f991f/Lib/test/test_int.py#l233 test_base_arg_with_no_x_arg I have no idea why this exists or was desired. ---------- nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 07:45:32 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 26 Dec 2012 06:45:32 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356504332.43.0.481858429941.issue16761@psf.upfronthosting.co.za> Chris Jerdonek added the comment: See this thread: http://mail.python.org/pipermail/python-dev/2012-December/123283.html ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 07:45:49 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 26 Dec 2012 06:45:49 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356504349.2.0.885941581111.issue16772@psf.upfronthosting.co.za> Gregory P. Smith added the comment: Thanks for the pointer to round(). PyNumber_AsSsize_t was just what the doctor ordered. PS Grump acknowledged and accepted. Its trunk and we're nowhere near a freeze so I figured it'd be fine to iterate on it in trunk if needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 07:59:16 2012 From: report at bugs.python.org (William D. Colburn) Date: Wed, 26 Dec 2012 06:59:16 +0000 Subject: [issue16783] sqlite3 accepts strings it cannot return Message-ID: <1356505156.77.0.42259028203.issue16783@psf.upfronthosting.co.za> New submission from William D. Colburn: This seems to be just like issue6010, which is closed as "not as bug" which is simple irresponsible on the part of Python. The problem is that I can store data into sqlite3 which cannot be retrieved. The data I encountered was a string with a \xa0 in it that was read from urllib2. I deposited that data into an sqlite3 database with no trouble at all. Later, however, sqlite3 would throw an exception when I tried to retrieve the data. Martin v. L?wis says this is user error because sqlite3 assumes UTF-8. It makes no sense that storeable data cannot be retrieved and that the failure of sqlite3 is a user-error. If sqlite3 assumes UTF-8, then the error should have been caught when I did the store because I was not storing UTF-8 data. Accepting bad input and blaming the user later down the line is bad bug handling, especially because the two events might be separated by a tremendous gap of time and code which makes debugging quite hard. I was only able to find the errant character by popping the streamed webpage into emacs as both python and firefox showed me a normal looking string with nothing wrong with it. ---------- components: Unicode messages: 178189 nosy: William.D..Colburn, ezio.melotti priority: normal severity: normal status: open title: sqlite3 accepts strings it cannot return type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 08:08:18 2012 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 26 Dec 2012 07:08:18 +0000 Subject: [issue16781] execfile/exec execution of class statement does not access locals() In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356505698.18.0.47762069315.issue16781@psf.upfronthosting.co.za> anatoly techtonik added the comment: The workaround with the best case is a magical knowledge, which many don't possess and don't understand (I still don't get it). It's very tempting to ask why passing explicit namespace is the best solution, but instead I'd like to concentrate on this case where execfile() is not given any arguments. The documentation says: If both dictionaries are omitted, the expression is executed in the environment where execfile() is called. >From this description I understand that the code should be executed just like inline code. Why it can not? What limitation of Python doesn't make this possible? Is there any secret reason under cover? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 08:39:34 2012 From: report at bugs.python.org (B. Clausius) Date: Wed, 26 Dec 2012 07:39:34 +0000 Subject: [issue3831] Multiprocessing: Expose underlying pipe in queues In-Reply-To: <1221095639.45.0.136100950642.issue3831@psf.upfronthosting.co.za> Message-ID: <1356507574.84.0.654834459122.issue3831@psf.upfronthosting.co.za> Changes by B. Clausius : ---------- nosy: +barcc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 10:01:08 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 26 Dec 2012 09:01:08 +0000 Subject: [issue16702] Force urllib2_localnet test not to use http proxies In-Reply-To: <1355766012.42.0.0371520737596.issue16702@psf.upfronthosting.co.za> Message-ID: <1356512468.28.0.595012547568.issue16702@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Jeff, Thanks for raising this issue. The aspect of skipping localhost for proxies in urllib2_localnet tests can be handled in a different way as well, namely by setting the environment varible NO_PROXY to "*". By this the skip_proxies in urllib2 returns True and proxies are skipped for both HTTP and HTTPS. ---------- nosy: +orsenthil Added file: http://bugs.python.org/file28438/Issue16702.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 10:15:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 09:15:28 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356513328.32.0.3163665564.issue16761@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sharing only those tests is not enough. We must revise all tests and extract common code to the separated class. I think this is too large change and unrelated to this issue. I will open a new issue for int tests enhancement and refactoring. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 10:40:47 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 26 Dec 2012 09:40:47 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356514847.74.0.460587566061.issue16761@psf.upfronthosting.co.za> Chris Jerdonek added the comment: It's enough not to make the problem worse, which is why I suggested it and what I wanted to avoid. If you copy-paste the tests you're adding now, it worsens the problem and makes it that much more tedious to fix later on (and to maintain in the meantime). Why must the code sharing be all or nothing? Elsewhere we phase in improvements incrementally. Even with the particular refactoring you're suggesting for the future, I'm not sure we'd want to do it all in one patch. If you begin the process now and add appropriate comments and TODO's pointing the way, at least the next person will know how to take the next steps. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 10:42:15 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 26 Dec 2012 09:42:15 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1356483054.38.0.107730335257.issue14574@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > Semantically, but I am told that due to py3k's different file buffering, that those errors don't percolate through. According to Charles-Francois' post from apr, 14th: > "Note that Python 3.3 doesn't have this problem." It's not affected by the problem, but it's really just accidental, so it would probably be better to apply this as well to py3k. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 10:47:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Dec 2012 09:47:27 +0000 Subject: [issue16702] Force urllib2_localnet test not to use http proxies In-Reply-To: <1355766012.42.0.0371520737596.issue16702@psf.upfronthosting.co.za> Message-ID: <3YWTqf3xYDzQkt@mail.python.org> Roundup Robot added the comment: New changeset 6c186caa6285 by Senthil Kumaran in branch '2.7': Issue #16702: Skip proxies for localhost in urllib2_localnet tests http://hg.python.org/cpython/rev/6c186caa6285 New changeset 0eccfb237364 by Senthil Kumaran in branch '3.2': Issue #16702: Skip proxies for localhost in urllib2_localnet tests http://hg.python.org/cpython/rev/0eccfb237364 New changeset 8a524faeb7ae by Senthil Kumaran in branch '3.3': Issue #16702: Skip proxies for localhost in urllib2_localnet tests http://hg.python.org/cpython/rev/8a524faeb7ae New changeset 43b19d9f9af4 by Senthil Kumaran in branch 'default': Issue #16702: Skip proxies for localhost in urllib2_localnet tests http://hg.python.org/cpython/rev/43b19d9f9af4 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 10:48:16 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Wed, 26 Dec 2012 09:48:16 +0000 Subject: [issue16702] Force urllib2_localnet test not to use http proxies In-Reply-To: <1355766012.42.0.0371520737596.issue16702@psf.upfronthosting.co.za> Message-ID: <1356515296.19.0.734906237406.issue16702@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in all branches of CPython. Thanks. ---------- assignee: -> orsenthil resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 11:33:21 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 10:33:21 +0000 Subject: [issue16784] Int tests enhancement and refactoring Message-ID: <1356518001.26.0.44673058371.issue16784@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Int tests should be synchronized between different Python versions. Tests for int and long should be synchronized in 2.7. Common code for int and long tests should be shared in 2.7. CPython tests (i.e. small int identity) should be extracted to separated methods. Tests should be resorted by tested feature. Deprecated assertEquals should be replaced to assertEqual. And may be more. ---------- assignee: serhiy.storchaka components: Tests messages: 178197 nosy: serhiy.storchaka priority: normal severity: normal stage: needs patch status: open title: Int tests enhancement and refactoring type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 11:40:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 10:40:01 +0000 Subject: [issue16784] Int tests enhancement and refactoring In-Reply-To: <1356518001.26.0.44673058371.issue16784@psf.upfronthosting.co.za> Message-ID: <1356518401.31.0.602651361.issue16784@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Fix int(base=X), int() accepts float number base nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 11:47:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 10:47:49 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356513328.32.0.3163665564.issue16761@psf.upfronthosting.co.za> Message-ID: <201212261247.16673.storchaka@gmail.com> Serhiy Storchaka added the comment: Here is a patches which contains only minimal set of required changes. Other unrelated changes will be done in issue16784. ---------- Added file: http://bugs.python.org/file28439/int_without_x-2.7_3.patch Added file: http://bugs.python.org/file28440/int_without_x-3.2_3.patch Added file: http://bugs.python.org/file28441/int_without_x-3.3_3.patch _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff -r ecf3cd3af502 Lib/test/test_int.py --- a/Lib/test/test_int.py Tue Dec 25 14:50:21 2012 -0800 +++ b/Lib/test/test_int.py Wed Dec 26 12:43:10 2012 +0200 @@ -321,9 +321,11 @@ def test_keyword_args(self): # Test invoking int() using keyword arguments. - self.assertEquals(int(x=1.2), 1) - self.assertEquals(int('100', base=2), 4) - self.assertEquals(int(x='100', base=2), 4) + self.assertEqual(int(x=1.2), 1) + self.assertEqual(int('100', base=2), 4) + self.assertEqual(int(x='100', base=2), 4) + self.assertRaises(TypeError, int, base=10) + self.assertRaises(TypeError, int, base=0) def test_valid_non_numeric_input_types_for_x(self): # Test possible valid non-numeric types for x, including subclasses @@ -356,18 +358,6 @@ def test_error_on_string_base(self): self.assertRaises(TypeError, int, 100, base='foo') - # Include the following because in contrast CPython raises no error - # for bad integer bases when x is not given. - self.assertRaises(TypeError, int, base='foo') - - # For example, PyPy 1.9.0 raised TypeError for these cases because it - # expects x to be a string if base is given. - @test_support.cpython_only - def test_int_base_without_x_returns_0(self): - self.assertEquals(int(base=6), 0) - # Even invalid bases don't raise an exception. - self.assertEquals(int(base=1), 0) - self.assertEquals(int(base=1000), 0) def test_intconversion(self): # Test __int__() diff -r ecf3cd3af502 Lib/test/test_long.py --- a/Lib/test/test_long.py Tue Dec 25 14:50:21 2012 -0800 +++ b/Lib/test/test_long.py Wed Dec 26 12:43:10 2012 +0200 @@ -452,6 +452,13 @@ self.assertEqual(long('2br45qc', 35), 4294967297) self.assertEqual(long('1z141z5', 36), 4294967297) + def test_keyword_args(self): + # Test invoking long() using keyword arguments. + self.assertEqual(long(x=1.2), 1) + self.assertEqual(long('100', base=2), 4) + self.assertEqual(long(x='100', base=2), 4) + self.assertRaises(TypeError, long, base=10) + self.assertRaises(TypeError, long, base=0) def test_conversion(self): # Test __long__() diff -r ecf3cd3af502 Objects/intobject.c --- a/Objects/intobject.c Tue Dec 25 14:50:21 2012 -0800 +++ b/Objects/intobject.c Wed Dec 26 12:43:10 2012 +0200 @@ -1059,8 +1059,14 @@ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oi:int", kwlist, &x, &base)) return NULL; - if (x == NULL) + if (x == NULL) { + if (base != -909) { + PyErr_SetString(PyExc_TypeError, + "int() missing string argument"); + return NULL; + } return PyInt_FromLong(0L); + } if (base == -909) return PyNumber_Int(x); if (PyString_Check(x)) { diff -r ecf3cd3af502 Objects/longobject.c --- a/Objects/longobject.c Tue Dec 25 14:50:21 2012 -0800 +++ b/Objects/longobject.c Wed Dec 26 12:43:10 2012 +0200 @@ -3987,8 +3987,14 @@ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|Oi:long", kwlist, &x, &base)) return NULL; - if (x == NULL) + if (x == NULL) { + if (base != -909) { + PyErr_SetString(PyExc_TypeError, + "long() missing string argument"); + return NULL; + } return PyLong_FromLong(0L); + } if (base == -909) return PyNumber_Long(x); else if (PyString_Check(x)) { -------------- next part -------------- diff -r e8793c5f0ebc Lib/test/test_int.py --- a/Lib/test/test_int.py Tue Dec 25 15:26:24 2012 -0800 +++ b/Lib/test/test_int.py Wed Dec 26 12:43:18 2012 +0200 @@ -221,6 +221,14 @@ self.assertEqual(int('2br45qc', 35), 4294967297) self.assertEqual(int('1z141z5', 36), 4294967297) + def test_keyword_args(self): + # Test invoking int() using keyword arguments. + self.assertEqual(int(x=1.2), 1) + self.assertEqual(int('100', base=2), 4) + self.assertEqual(int(x='100', base=2), 4) + self.assertRaises(TypeError, int, base=10) + self.assertRaises(TypeError, int, base=0) + def test_intconversion(self): # Test __int__() class ClassicMissingMethods: diff -r e8793c5f0ebc Objects/longobject.c --- a/Objects/longobject.c Tue Dec 25 15:26:24 2012 -0800 +++ b/Objects/longobject.c Wed Dec 26 12:43:18 2012 +0200 @@ -4130,8 +4130,14 @@ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OO:int", kwlist, &x, &obase)) return NULL; - if (x == NULL) + if (x == NULL) { + if (obase != NULL) { + PyErr_SetString(PyExc_TypeError, + "int() missing string argument"); + return NULL; + } return PyLong_FromLong(0L); + } if (obase == NULL) return PyNumber_Long(x); @@ -4140,7 +4146,7 @@ return NULL; if (overflow || (base != 0 && base < 2) || base > 36) { PyErr_SetString(PyExc_ValueError, - "int() arg 2 must be >= 2 and <= 36"); + "int() base must be >= 2 and <= 36"); return NULL; } -------------- next part -------------- diff -r 517f3432d1b5 Lib/test/test_int.py --- a/Lib/test/test_int.py Tue Dec 25 15:27:56 2012 -0800 +++ b/Lib/test/test_int.py Wed Dec 26 12:43:25 2012 +0200 @@ -226,19 +226,11 @@ def test_keyword_args(self): # Test invoking int() using keyword arguments. - self.assertEquals(int(x=1.2), 1) - self.assertEquals(int('100', base=2), 4) - self.assertEquals(int(x='100', base=2), 4) - - # For example, PyPy 1.9.0 raised TypeError for these cases because it - # expects x to be a string if base is given. - @support.cpython_only - def test_base_arg_with_no_x_arg(self): - self.assertEquals(int(base=6), 0) - # Even invalid bases don't raise an exception. - self.assertEquals(int(base=1), 0) - self.assertEquals(int(base=1000), 0) - self.assertEquals(int(base='foo'), 0) + self.assertEqual(int(x=1.2), 1) + self.assertEqual(int('100', base=2), 4) + self.assertEqual(int(x='100', base=2), 4) + self.assertRaises(TypeError, int, base=10) + self.assertRaises(TypeError, int, base=0) def test_non_numeric_input_types(self): # Test possible non-numeric types for the argument x, including diff -r 517f3432d1b5 Objects/longobject.c --- a/Objects/longobject.c Tue Dec 25 15:27:56 2012 -0800 +++ b/Objects/longobject.c Wed Dec 26 12:43:25 2012 +0200 @@ -4267,8 +4267,14 @@ if (!PyArg_ParseTupleAndKeywords(args, kwds, "|OO:int", kwlist, &x, &obase)) return NULL; - if (x == NULL) + if (x == NULL) { + if (obase != NULL) { + PyErr_SetString(PyExc_TypeError, + "int() missing string argument"); + return NULL; + } return PyLong_FromLong(0L); + } if (obase == NULL) return PyNumber_Long(x); @@ -4277,7 +4283,7 @@ return NULL; if (overflow || (base != 0 && base < 2) || base > 36) { PyErr_SetString(PyExc_ValueError, - "int() arg 2 must be >= 2 and <= 36"); + "int() base must be >= 2 and <= 36"); return NULL; } From report at bugs.python.org Wed Dec 26 11:57:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 10:57:19 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356519439.33.0.435705550656.issue16761@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Let's eat an elephant piece by piece. Only one issue per patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 12:07:24 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 26 Dec 2012 11:07:24 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1334358462.67.0.980544384901.issue14574@psf.upfronthosting.co.za> Message-ID: <1356520044.13.0.723128505587.issue14574@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Ok, I'll have a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 12:20:43 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 26 Dec 2012 11:20:43 +0000 Subject: [issue949667] setblocking() method on file objects Message-ID: <1356520843.92.0.775045590202.issue949667@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: I'm not sure that a setblocking() method to fileobjects would make much sense, since non-blocking IO doesn't work with regular files (only pipes, sockets...). ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 12:22:03 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 26 Dec 2012 11:22:03 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356520923.96.0.22854898411.issue16761@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Yes, it is a better approach. At first glance, the patches look okay to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 12:28:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 26 Dec 2012 11:28:19 +0000 Subject: [issue16784] Int tests enhancement and refactoring In-Reply-To: <1356518001.26.0.44673058371.issue16784@psf.upfronthosting.co.za> Message-ID: <1356521299.04.0.873849294866.issue16784@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Other things that should be done include porting the more comprehensive tests in a recent changeset from 2.7 to 3.x and refactoring the try-except of one of the tests as necessary (see the Rietveld comments of issue 16761 for details on both). The various issues in this comment and above should probably be broken into multiple patches. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 12:29:01 2012 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 26 Dec 2012 11:29:01 +0000 Subject: [issue16784] Int tests enhancement and refactoring In-Reply-To: <1356518001.26.0.44673058371.issue16784@psf.upfronthosting.co.za> Message-ID: <1356521341.31.0.961589904414.issue16784@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 12:35:12 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2012 11:35:12 +0000 Subject: [issue16785] Document the fact that constructing OSError with erron returns subclass if possible Message-ID: <1356521712.57.0.0819210166931.issue16785@psf.upfronthosting.co.za> New submission from Andrew Svetlov: I mean adding examples for constructions like this: >>> OSError(errno.ENOENT, 'error msg') FileNotFoundError(2, 'error msg') ---------- assignee: docs at python components: Documentation keywords: easy messages: 178204 nosy: asvetlov, docs at python priority: normal severity: normal status: open title: Document the fact that constructing OSError with erron returns subclass if possible versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 12:44:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 11:44:12 +0000 Subject: [issue16785] Document the fact that constructing OSError with erron returns subclass if possible In-Reply-To: <1356521712.57.0.0819210166931.issue16785@psf.upfronthosting.co.za> Message-ID: <1356522252.6.0.280769633169.issue16785@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: However >>> OSError(errno.ENOENT) OSError(2,) >>> OSError(errno.ENOENT, 'error msg', 'filename', 'spam') OSError(2, 'error msg', 'filename', 'spam') ---------- nosy: +serhiy.storchaka stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 14:03:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Dec 2012 13:03:39 +0000 Subject: [issue11939] Implement stat.st_dev and os.path.samefile on windows In-Reply-To: <1303923583.07.0.177662562381.issue11939@psf.upfronthosting.co.za> Message-ID: <3YWZB11pYYzRVW@mail.python.org> Roundup Robot added the comment: New changeset 189b21f9bc0c by Brian Curtin in branch 'default': Fix #11939. Set st_dev attribute on Windows to simplify os.path.samefile. http://hg.python.org/cpython/rev/189b21f9bc0c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 14:11:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Dec 2012 13:11:42 +0000 Subject: [issue11939] Implement stat.st_dev and os.path.samefile on windows In-Reply-To: <1303923583.07.0.177662562381.issue11939@psf.upfronthosting.co.za> Message-ID: <3YWZMK39K7zRg5@mail.python.org> Roundup Robot added the comment: New changeset 82531b78b719 by Brian Curtin in branch 'default': Add NEWS entry for fixing #11939 http://hg.python.org/cpython/rev/82531b78b719 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 14:12:24 2012 From: report at bugs.python.org (Brian Curtin) Date: Wed, 26 Dec 2012 13:12:24 +0000 Subject: [issue11939] Implement stat.st_dev and os.path.samefile on windows In-Reply-To: <1303923583.07.0.177662562381.issue11939@psf.upfronthosting.co.za> Message-ID: <1356527544.24.0.0800321085017.issue11939@psf.upfronthosting.co.za> Brian Curtin added the comment: Thanks for the reviews. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 14:15:32 2012 From: report at bugs.python.org (Christian Heimes) Date: Wed, 26 Dec 2012 13:15:32 +0000 Subject: [issue16769] Remove some old Visual Studio versions from PC/ directory In-Reply-To: <1356368491.28.0.606279812477.issue16769@psf.upfronthosting.co.za> Message-ID: <1356527732.2.0.794405990365.issue16769@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 14:19:58 2012 From: report at bugs.python.org (Thorsten Kampe) Date: Wed, 26 Dec 2012 13:19:58 +0000 Subject: [issue16786] argparse doesn't offer localization interface for "version" action Message-ID: <1356527998.28.0.00679479762722.issue16786@psf.upfronthosting.co.za> New submission from Thorsten Kampe: The - deprecated - "version" keyword for argparse.ArgumentParser allowed for localization of the "show program's version number and exit" help text for -v/--version (output of "-h"/"--help") The new version action for add_argument does not allow this - resulting in a partially translated output for the -v/--version option. ---------- components: Library (Lib) messages: 178209 nosy: thorsten priority: normal severity: normal status: open title: argparse doesn't offer localization interface for "version" action type: behavior versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 14:36:31 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Dec 2012 13:36:31 +0000 Subject: [issue10646] ntpath.samefile doesn't work for hard links In-Reply-To: <1291741179.93.0.790815222225.issue10646@psf.upfronthosting.co.za> Message-ID: <3YWZvy377SzNtk@mail.python.org> Roundup Robot added the comment: New changeset 9e980454b85e by Brian Curtin in branch 'default': Add tests for Issue #10646. http://hg.python.org/cpython/rev/9e980454b85e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 14:36:31 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Dec 2012 13:36:31 +0000 Subject: [issue11939] Implement stat.st_dev and os.path.samefile on windows In-Reply-To: <1303923583.07.0.177662562381.issue11939@psf.upfronthosting.co.za> Message-ID: <3YWZvz1W0czNtk@mail.python.org> Roundup Robot added the comment: New changeset 9e980454b85e by Brian Curtin in branch 'default': Add tests for Issue #10646. http://hg.python.org/cpython/rev/9e980454b85e ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 14:41:24 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 26 Dec 2012 13:41:24 +0000 Subject: [issue16786] argparse doesn't offer localization interface for "version" action In-Reply-To: <1356527998.28.0.00679479762722.issue16786@psf.upfronthosting.co.za> Message-ID: <1356529284.83.0.152690062365.issue16786@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +bethard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 14:51:05 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 26 Dec 2012 13:51:05 +0000 Subject: [issue16787] asyncore.dispatcher_with_send - increase the send buffer size Message-ID: <1356529865.78.0.746318746855.issue16787@psf.upfronthosting.co.za> New submission from Charles-Fran?ois Natali: As noted in issue #12498, asyncore.dispatcher_with_send only sends 512 bytes at a time: this is 1/3 of the Ethernet MTU, which reduces greatly the attainable bandwidth and increases the CPU usage. Here's a patch bumping it to 8192 (and making it a class member so that derived classes can customize it if needed, although not documented). Here's the result of a simplistic benchmark using asyncore.dispatcher_with_send to send data to a server: Without patch: """ $ time ./python ~/test_asyncore.py localhost 4242 real 0m6.098s user 0m4.472s sys 0m1.436s """ With patch: """ $ time ./python ~/test_asyncore.py localhost 4242 real 0m0.937s user 0m0.796s sys 0m0.112s """ Of course, this is using the loopback interface, but it shows that the performance gain can non negligible. The test script is attached (use "netcat -l -p 4242" as server). ---------- components: Library (Lib) files: asyncore_buffsize.diff keywords: easy, needs review, patch messages: 178212 nosy: giampaolo.rodola, neologix, xdegaye priority: normal severity: normal stage: patch review status: open title: asyncore.dispatcher_with_send - increase the send buffer size type: performance versions: Python 3.4 Added file: http://bugs.python.org/file28442/asyncore_buffsize.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 14:51:19 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 26 Dec 2012 13:51:19 +0000 Subject: [issue16787] asyncore.dispatcher_with_send - increase the send buffer size In-Reply-To: <1356529865.78.0.746318746855.issue16787@psf.upfronthosting.co.za> Message-ID: <1356529879.08.0.635669479973.issue16787@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : Added file: http://bugs.python.org/file28443/test_asyncore.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 14:57:36 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Wed, 26 Dec 2012 13:57:36 +0000 Subject: [issue8713] multiprocessing needs option to eschew fork() under Linux In-Reply-To: <1273853591.12.0.245920632829.issue8713@psf.upfronthosting.co.za> Message-ID: <1356530256.26.0.427175010456.issue8713@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: Richard, apart from performance, what's the advantage of this approach over the fork+exec version? Because it seems more complicated, and although I didn't have a look a this last patch, I guess that most of the fork+exec version could be factorized with the Windows version, no? Since it's only intented to be used as a "debugging"/special-purpose replacement - it would probably be better if it could be made as simple as possible. Also, as you've noted, FD passing isn't supported by all Unices out there (and we've had some reliability issues on OS-X, too). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:00:12 2012 From: report at bugs.python.org (Stefan Krah) Date: Wed, 26 Dec 2012 14:00:12 +0000 Subject: [issue9709] test_distutils warning: initfunc exported twice on Windows In-Reply-To: <1283101838.76.0.73949668593.issue9709@psf.upfronthosting.co.za> Message-ID: <1356530412.9.0.300394864849.issue9709@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- nosy: +jkloth _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:00:16 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Wed, 26 Dec 2012 14:00:16 +0000 Subject: [issue16787] asyncore.dispatcher_with_send - increase the send buffer size In-Reply-To: <1356529865.78.0.746318746855.issue16787@psf.upfronthosting.co.za> Message-ID: <1356530416.7.0.450670671215.issue16787@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: A couple of years ago I conducted similar tests and it turned out that 64k was the best compromise: http://code.google.com/p/pyftpdlib/issues/detail?id=94 Twisted uses 128k. I'd be for using 64k and also change asynchat.async_chat.ac_*_buffer_size in accordance. ---------- nosy: +josiah.carlson, josiahcarlson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:00:20 2012 From: report at bugs.python.org (Stefan Krah) Date: Wed, 26 Dec 2012 14:00:20 +0000 Subject: [issue16779] Fix compiler warning when building extension modules on 64-bit Windows In-Reply-To: <1356460734.84.0.660480375945.issue16779@psf.upfronthosting.co.za> Message-ID: <1356530420.8.0.130734669713.issue16779@psf.upfronthosting.co.za> Stefan Krah added the comment: I think this is the same as #9709. Please just reopen if it isn't. ---------- nosy: +skrah resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> test_distutils warning: initfunc exported twice on Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:04:19 2012 From: report at bugs.python.org (Brian Curtin) Date: Wed, 26 Dec 2012 14:04:19 +0000 Subject: [issue10646] ntpath.samefile doesn't work for hard links In-Reply-To: <1291741179.93.0.790815222225.issue10646@psf.upfronthosting.co.za> Message-ID: <1356530659.18.0.606313722391.issue10646@psf.upfronthosting.co.za> Brian Curtin added the comment: This was fixed as a result of #11939, and I've refactored the tests to add coverage of hard links in 9e980454b85e. This was originally a bug report but it requires a 3.4 feature so it can't be fixed in 3.2 where it originally appeared. ---------- resolution: -> fixed stage: test needed -> committed/rejected status: open -> closed versions: +Python 3.4 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:11:54 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 26 Dec 2012 14:11:54 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356531114.35.0.703426203064.issue16743@psf.upfronthosting.co.za> Richard Oudkerk added the comment: On 32 bit Unix mmap() will raise ValueError("mmap length is too large") in Marc's example. This is correct since Python's sequence protocol does not support indexes larger than sys.maxsize. But on 32 bit Windows, if length == 0 then the size check always passes, and the actual size mapped is the file size modulo 4GB. Fix for 3.x is attached with tests. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file28444/mmap.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:16:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 14:16:38 +0000 Subject: [issue11939] Implement stat.st_dev and os.path.samefile on windows In-Reply-To: <1303923583.07.0.177662562381.issue11939@psf.upfronthosting.co.za> Message-ID: <1356531398.94.0.504655948689.issue11939@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Try on Windows: >>> import os >>> from os.path import * >>> samestat(os.stat('.'), os.stat('.')) Traceback (most recent call last): File "", line 1, in NameError: name 'samestat' is not defined ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:20:45 2012 From: report at bugs.python.org (Brian Curtin) Date: Wed, 26 Dec 2012 14:20:45 +0000 Subject: [issue16788] Add samestat to Lib/ntpath.py __all__ Message-ID: <1356531645.1.0.5490965013.issue16788@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- assignee: brian.curtin components: Library (Lib), Windows nosy: brian.curtin priority: normal severity: normal stage: needs patch status: open title: Add samestat to Lib/ntpath.py __all__ type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:22:15 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Dec 2012 14:22:15 +0000 Subject: [issue16788] Add samestat to Lib/ntpath.py __all__ Message-ID: <3YWbwk0Q94zQvS@mail.python.org> New submission from Roundup Robot: New changeset cc3f7ef1072e by Brian Curtin in branch 'default': Fix #16788. Add samestat to Lib/ntpath.py http://hg.python.org/cpython/rev/cc3f7ef1072e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:22:43 2012 From: report at bugs.python.org (Brian Curtin) Date: Wed, 26 Dec 2012 14:22:43 +0000 Subject: [issue16788] Add samestat to Lib/ntpath.py __all__ In-Reply-To: <3YWbwk0Q94zQvS@mail.python.org> Message-ID: <1356531763.1.0.753342886044.issue16788@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:23:08 2012 From: report at bugs.python.org (Brian Curtin) Date: Wed, 26 Dec 2012 14:23:08 +0000 Subject: [issue11939] Implement stat.st_dev and os.path.samefile on windows In-Reply-To: <1303923583.07.0.177662562381.issue11939@psf.upfronthosting.co.za> Message-ID: <1356531788.18.0.99542410804.issue11939@psf.upfronthosting.co.za> Brian Curtin added the comment: Separate issue. Fixed in #16788. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 15:47:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 14:47:13 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356533233.68.0.333808853298.issue16743@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This change is not backward compatible. Now user can mmap a larger file and safely access lower 2 GiB. With the patch it will fail. Unix implementation uses unsafe integer overflow idiom which cause undefined behavior (Mark, you have the floor). ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:01:05 2012 From: report at bugs.python.org (Dan Kenigsberg) Date: Wed, 26 Dec 2012 15:01:05 +0000 Subject: [issue16789] :meth:`quit` links to constants instead of own module Message-ID: <1356534065.91.0.932847817194.issue16789@psf.upfronthosting.co.za> New submission from Dan Kenigsberg: ftplib, poplib and smtplib modules define a "quit" function. But when it is refered by :meth:`quit` in the documentation, a reference to constants.quit is generated. The suggested patch spells out the module-specific "quit" function. ---------- assignee: docs at python components: Documentation files: meth:quit.patch keywords: patch messages: 178222 nosy: danken, docs at python priority: normal severity: normal status: open title: :meth:`quit` links to constants instead of own module type: behavior Added file: http://bugs.python.org/file28445/meth:quit.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:05:01 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 26 Dec 2012 15:05:01 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1334358462.67.0.980544384901.issue14574@psf.upfronthosting.co.za> Message-ID: <1356534301.73.0.750367965379.issue14574@psf.upfronthosting.co.za> Changes by Kristj?n Valur J?nsson : ---------- versions: +Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:11:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 15:11:09 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356534669.94.0.447517422341.issue16772@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Why does PyNumber_AsSsize_t() used instead PyLong_AsLongAndOverflow()? The range of "long" enough for all valid values of "base" and code with PyLong_AsLongAndOverflow() produces better error messages. It looks as a regression for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:27:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 15:27:49 +0000 Subject: [issue3236] ints contructed from strings don't use the smallint constants In-Reply-To: <1214739495.01.0.514577579612.issue3236@psf.upfronthosting.co.za> Message-ID: <1356535669.83.0.786118674191.issue3236@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Should it be backported to 2.7? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:30:27 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Dec 2012 15:30:27 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1334358462.67.0.980544384901.issue14574@psf.upfronthosting.co.za> Message-ID: <3YWdRQ64T0zNx8@mail.python.org> Roundup Robot added the comment: New changeset 7e5d7ef4634d by Kristj?n Valur J?nsson in branch '3.2': Issue #14574: Ignore socket errors raised when flushing a connection on close. http://hg.python.org/cpython/rev/7e5d7ef4634d New changeset 7734c3020a47 by Kristj?n Valur J?nsson in branch '3.3': Merge with 3.2 : http://hg.python.org/cpython/rev/7734c3020a47 New changeset 2d1cfbaef9a2 by Kristj?n Valur J?nsson in branch 'default': Merge with 3.3 http://hg.python.org/cpython/rev/2d1cfbaef9a2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:33:01 2012 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Wed, 26 Dec 2012 15:33:01 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1334358462.67.0.980544384901.issue14574@psf.upfronthosting.co.za> Message-ID: <1356535981.36.0.18356742001.issue14574@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: There, applied the same changes to the 3.x branches. apparently the DOC folder wasn't branched off for 3.3, or something, at least, there is no sepatate 3.3 and 'default' version of socketserver.rst. Or maybe it is just Hg that got the better of me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:43:08 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 26 Dec 2012 15:43:08 +0000 Subject: [issue16789] :meth:`quit` links to constants instead of own module In-Reply-To: <1356534065.91.0.932847817194.issue16789@psf.upfronthosting.co.za> Message-ID: <1356536588.66.0.394076504055.issue16789@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: I take care of this. ---------- assignee: docs at python -> jcea nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:43:15 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 26 Dec 2012 15:43:15 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356536595.36.0.47287128859.issue16743@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > This change is not backward compatible. Now user can mmap a larger file > and safely access lower 2 GiB. With the patch it will fail. They should specify length=2GiB-1 if that is what they want. With length=0 you can only access the lower 2GiB if "file_size % 4GiB > 2GiB". If the file size is 4GiB+1 then you can only access *one byte* of the file. And if "2GiB < file_size < 4GiB" then presumably len(data) will be negative (or throw an exception or fail an assertion -- I have not tested that case). I would not be surprised if crashes are possible. Basically if you had a "large" file and you did not hit a problem then it was Windows specific dumb luck. I see no point in retaining such unpredictable behaviour. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:49:23 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Dec 2012 15:49:23 +0000 Subject: [issue16789] :meth:`quit` links to constants instead of own module In-Reply-To: <1356534065.91.0.932847817194.issue16789@psf.upfronthosting.co.za> Message-ID: <3YWdsG6l94zRhC@mail.python.org> Roundup Robot added the comment: New changeset 0ffaf1079a7a by Jesus Cea in branch '2.7': Closes #16789: :meth:`quit` links to constants instead of own module http://hg.python.org/cpython/rev/0ffaf1079a7a New changeset 3801ee5d5d73 by Jesus Cea in branch '3.2': Closes #16789: :meth:`quit` links to constants instead of own module http://hg.python.org/cpython/rev/3801ee5d5d73 New changeset b6a9f8fd9443 by Jesus Cea in branch '3.3': MERGE: Closes #16789: :meth:`quit` links to constants instead of own module http://hg.python.org/cpython/rev/b6a9f8fd9443 New changeset 3f7d5c235d82 by Jesus Cea in branch 'default': MERGE: Closes #16789: :meth:`quit` links to constants instead of own module http://hg.python.org/cpython/rev/3f7d5c235d82 ---------- nosy: +python-dev resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:52:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 15:52:45 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356537165.7.0.812326422845.issue16743@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Agree. Please add the same check for Unix implementation (instead of unsafe overflow trick). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 16:53:57 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Wed, 26 Dec 2012 15:53:57 +0000 Subject: [issue16789] :meth:`quit` links to constants instead of own module In-Reply-To: <1356534065.91.0.932847817194.issue16789@psf.upfronthosting.co.za> Message-ID: <1356537237.54.0.356303723743.issue16789@psf.upfronthosting.co.za> Jes?s Cea Avi?n added the comment: Thanks!. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 17:00:10 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 26 Dec 2012 16:00:10 +0000 Subject: [issue16781] execfile/exec execution of class statement does not access locals() In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356537610.82.0.0769470119408.issue16781@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Basically, it calls locals() in the function scope, which is undefined behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 17:02:55 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 26 Dec 2012 16:02:55 +0000 Subject: [issue3236] ints contructed from strings don't use the smallint constants In-Reply-To: <1214739495.01.0.514577579612.issue3236@psf.upfronthosting.co.za> Message-ID: <1356537775.67.0.711523493495.issue3236@psf.upfronthosting.co.za> Benjamin Peterson added the comment: It's only an optimization, so no. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 17:24:00 2012 From: report at bugs.python.org (STINNER Victor) Date: Wed, 26 Dec 2012 16:24:00 +0000 Subject: [issue16218] Python launcher does not support unicode characters In-Reply-To: <1350138278.8.0.551817049969.issue16218@psf.upfronthosting.co.za> Message-ID: <1356539040.67.0.0888433726171.issue16218@psf.upfronthosting.co.za> STINNER Victor added the comment: Status of the different issues: #16416, Mac OS X: 3.2, 3.3, 3.4 #16455, FreeBSD and Solaris: 3.4 #16218, set_main_loader: 3.3, 3.4 #16218, test_cmd_line_script: 3.4 (3.3 has an old copy of the test) #16414, add support.TESTFN_NONASCII: 3.4 #16444, use support.TESTFN_NONASCII: 3.4 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 18:51:55 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 26 Dec 2012 17:51:55 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356544315.49.0.0229853514344.issue16743@psf.upfronthosting.co.za> Richard Oudkerk added the comment: New patch with same check for Unix. ---------- Added file: http://bugs.python.org/file28446/mmap.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 19:14:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 18:14:38 +0000 Subject: [issue16413] Non cross-platform behavior of os.path.split In-Reply-To: <1352114668.34.0.500502059895.issue16413@psf.upfronthosting.co.za> Message-ID: <1356545678.14.0.513557486643.issue16413@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> invalid status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 19:47:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 18:47:44 +0000 Subject: [issue16599] unittest: Access test result from tearDown In-Reply-To: <1354527723.36.0.769611290906.issue16599@psf.upfronthosting.co.za> Message-ID: <1356547664.18.0.480529054668.issue16599@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Anatoly, if this is good for you, please close the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 20:23:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 19:23:24 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356549804.7.0.175830759023.issue16743@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. Isn't 2 GiB + 1 bytes mmap file enough for testing? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 20:26:45 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2012 19:26:45 +0000 Subject: [issue14574] SocketServer doesn't handle client disconnects properly In-Reply-To: <1334358462.67.0.980544384901.issue14574@psf.upfronthosting.co.za> Message-ID: <1356550005.73.0.585570573389.issue14574@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Everything is fine. Close the issue. ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 20:39:34 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2012 19:39:34 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356550774.59.0.802459325874.issue15302@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Anton, you are free to make that issue and propose a patch :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 20:46:25 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2012 19:46:25 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356551185.09.0.138113649831.issue15302@psf.upfronthosting.co.za> Andrew Svetlov added the comment: New patch is LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 20:46:51 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2012 19:46:51 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356551211.42.0.789150163238.issue15302@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Chris, would you commit it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 20:50:02 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 26 Dec 2012 19:50:02 +0000 Subject: [issue16743] mmap accepts files > 1 GB, but processes only 1 GB In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356551402.25.0.373169467459.issue16743@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > Isn't 2 GiB + 1 bytes mmap file enough for testing? Yes. But creating multigigabyte files is very slow on Windows. On Linux/FreeBSD test_mmap takes a fraction of a second, whereas on Windows it takes over 2 minutes. (Presumably Linux/FreeBSD is automatically creating a sparse file.) So adding assertions to an existing test is more convenient than creating another huge file just for these new tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 20:54:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 26 Dec 2012 19:54:19 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356551659.88.0.248234595959.issue15302@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > BTW, maybe someone should create an issue for full tests coverage of regrtest? I think such an issue would need to be a meta-issue because it is a very large task (involving many patches) and may never be truly finished. > Chris, would you commit it? Sure, I should be able to get to it within a day or two. (By the way, after this is committed, the use of a Namespace return value can be phased in gradually as a replacement for some options in the getopt for loop. It need not be all or nothing.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 20:55:57 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2012 19:55:57 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356551757.7.0.157548950684.issue15302@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Agree with both points ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 20:58:59 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 26 Dec 2012 19:58:59 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356551938.99.0.663191852882.issue15302@psf.upfronthosting.co.za> R. David Murray added the comment: I'm still -0 on making a new file. regrtest will be running as __main__, so I don't see any reason the test file can't import it to test functions within it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 20:59:30 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 26 Dec 2012 19:59:30 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356551970.05.0.730396669317.issue15302@psf.upfronthosting.co.za> R. David Murray added the comment: (I could, of course, be wrong :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 21:06:22 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 26 Dec 2012 20:06:22 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356552382.03.0.323085911785.issue15302@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Yes, please don't make something called regrtestlib.py. Some of us like the bash completetion to work with on a small prefix. :) ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 21:13:10 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2012 20:13:10 +0000 Subject: [issue13198] Remove duplicate definition of write_record_file In-Reply-To: <1318857154.54.0.641953188635.issue13198@psf.upfronthosting.co.za> Message-ID: <1356552790.13.0.296810232722.issue13198@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Close as out of date. Packaging has been removed from stdlib. ---------- nosy: +asvetlov resolution: -> out of date stage: patch review -> status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 21:14:40 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2012 20:14:40 +0000 Subject: [issue12944] Accept arbitrary files for packaging's upload command In-Reply-To: <1315549969.41.0.856641810932.issue12944@psf.upfronthosting.co.za> Message-ID: <1356552880.08.0.611670065693.issue12944@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Close as out of date since packaging has been removed from stdlib. ---------- nosy: +asvetlov resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 21:15:10 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 26 Dec 2012 20:15:10 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356552910.39.0.464768590509.issue15302@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Benjamin, do you not want a new file at all, or are you just asking for a different name? regrlib was the previous name unless you have another suggestion. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 21:18:07 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 26 Dec 2012 20:18:07 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356553087.09.0.806158446622.issue15302@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think bitdancer's suggestion of leaving it in regrtest.py is a good one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 21:52:14 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Dec 2012 20:52:14 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <3YWmZk0gh1zM9d@mail.python.org> Roundup Robot added the comment: New changeset 6a56eaa5e5fb by Andrew Svetlov in branch 'default': Revert back PyCFunction_New macro. Keep PyCFunction_NewEx usage in python core modules (#15422) http://hg.python.org/cpython/rev/6a56eaa5e5fb ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 21:55:09 2012 From: report at bugs.python.org (R. David Murray) Date: Wed, 26 Dec 2012 20:55:09 +0000 Subject: [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356555309.74.0.920714552003.issue16781@psf.upfronthosting.co.za> R. David Murray added the comment: Do you mean that *modifying* locals() in the function scope is undefined behavior? That makes sense, and is a documented limitation. So we need to clarify the execfile/exec documentation to note that if called in anything other than the global scope, locals() will get used as the locals dictionary, and this will lead to undefined behavior if any operation is performed that updates the local namespace...and thus you are best recommend to always pass one or two dictionaries to execfile/exec, so that you *know* what is getting updated. Although I have to say that the exec/execfile doing something that is specified to lead to undefined behavior smells like a bug. (Not that we could fix it even if we agreed that it was, for backward compatibility reasons.) ---------- title: execfile/exec execution of class statement does not access locals() -> execfile/exec execution in other than global scope uses locals(), leading to undefined behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 21:55:22 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2012 20:55:22 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <1356555322.89.0.391382828903.issue15422@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Georg, I've followed your instructions. Close the issue again. Thanks for mentorship. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 21:56:40 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 26 Dec 2012 20:56:40 +0000 Subject: [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356555400.6.0.713127374778.issue16781@psf.upfronthosting.co.za> Benjamin Peterson added the comment: The best thing would be if we could kill the default use of locals() and globals() in execfile, but that's probably Py4 material. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 22:09:06 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Dec 2012 21:09:06 +0000 Subject: [issue15422] Get rid of PyCFunction_New macro In-Reply-To: <1342967583.47.0.436061975286.issue15422@psf.upfronthosting.co.za> Message-ID: <3YWmy92gsdzRhC@mail.python.org> Roundup Robot added the comment: New changeset 70ea05f762a1 by Andrew Svetlov in branch 'default': Fix compilation error for #15422 http://hg.python.org/cpython/rev/70ea05f762a1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 22:36:31 2012 From: report at bugs.python.org (Roundup Robot) Date: Wed, 26 Dec 2012 21:36:31 +0000 Subject: [issue16644] Wrong code in ContextManagerTests.test_invalid_args() in test_subprocess.py In-Reply-To: <1354986235.92.0.873586035968.issue16644@psf.upfronthosting.co.za> Message-ID: <3YWnYp4G3nzRfJ@mail.python.org> Roundup Robot added the comment: New changeset 39be1514c16c by Andrew Svetlov in branch '3.2': fix test for subprocess (#16644) http://hg.python.org/cpython/rev/39be1514c16c New changeset 5d172190c37c by Andrew Svetlov in branch '3.3': fix test for subprocess (#16644) http://hg.python.org/cpython/rev/5d172190c37c New changeset 02d589e2d202 by Andrew Svetlov in branch 'default': fix test for subprocess (#16644) http://hg.python.org/cpython/rev/02d589e2d202 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 22:37:41 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Wed, 26 Dec 2012 21:37:41 +0000 Subject: [issue16644] Wrong code in ContextManagerTests.test_invalid_args() in test_subprocess.py In-Reply-To: <1354986235.92.0.873586035968.issue16644@psf.upfronthosting.co.za> Message-ID: <1356557861.82.0.785817360798.issue16644@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed. Thanks, Serhiy. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 22:41:29 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Wed, 26 Dec 2012 21:41:29 +0000 Subject: [issue16743] mmap on Windows can mishandle files larger than sys.maxsize In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356558089.95.0.649089256538.issue16743@psf.upfronthosting.co.za> Changes by Richard Oudkerk : ---------- title: mmap accepts files > 1 GB, but processes only 1 GB -> mmap on Windows can mishandle files larger than sys.maxsize type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 22:46:33 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Wed, 26 Dec 2012 21:46:33 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356558393.95.0.404451726529.issue16772@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I used it because Mark suggested it could have the same behavior as round() and that is the more abstract API that round uses. Regardless, at this point I've added tests and tested for the TypeError when a float is passed as well as testing that the only valid values (2..36) all work. I did not test to see that something supporting __index__ works as Mark suggests because I don't know off the top of my head of anything that does and it seems like a pointless thing to care about for this API. If you want something different, feel free to change the code. I'm done with this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Dec 26 23:02:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Wed, 26 Dec 2012 22:02:23 +0000 Subject: [issue16743] mmap on Windows can mishandle files larger than sys.maxsize In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356559343.03.0.23997799928.issue16743@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, I had missed you reuse an existing test. It's right. I think decreasing file size to 4 GiB + 1 byte will keep the purpose of the test and save a little time, but this is another issue. Let's go ahead! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 00:11:56 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Wed, 26 Dec 2012 23:11:56 +0000 Subject: [issue16743] mmap on Windows can mishandle files larger than sys.maxsize In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356563516.87.0.173414557973.issue16743@psf.upfronthosting.co.za> Terry J. Reedy added the comment: New data, new thoughts ;-) I agree that an undocumented discrepancy between Windows and *nix should be fixed either in doc, code, or both. The fix might be version specific. If the limit on Windows is less than it should or could be, because of our code, that should be changed. It would be best if the working limit were the same for all major platforms or at least the same for all versions of each major platform. I am a bit reluctant to break working code on existing versions, even if the code depends on dumb luck because of an undocumented version-specific buggy 'feature'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 02:25:45 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 27 Dec 2012 01:25:45 +0000 Subject: [issue16778] Logger.findCaller needs to be smarter In-Reply-To: <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za> Message-ID: <1356571545.56.0.707472355235.issue16778@psf.upfronthosting.co.za> Vinay Sajip added the comment: What about subclassing Logger? Then you could override findCaller() to do whatever you need, as well as adding a notice() method, for example. I agree using the source filename isn't ideal, but it's hard to know how people might arbitrarily wrap logging calls and still expect the wrappers to be skipped by findCaller(). Do you have any suggested mechanism for doing this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 02:25:52 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Thu, 27 Dec 2012 01:25:52 +0000 Subject: [issue16743] mmap on Windows can mishandle files larger than sys.maxsize In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356571552.52.0.920189884122.issue16743@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 03:37:36 2012 From: report at bugs.python.org (Glynn Clements) Date: Thu, 27 Dec 2012 02:37:36 +0000 Subject: [issue16778] Logger.findCaller needs to be smarter In-Reply-To: <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za> Message-ID: <1356575856.9.0.00138189317292.issue16778@psf.upfronthosting.co.za> Glynn Clements added the comment: Subclassing findCaller() is likely to be a bit hairy for the average user, as it deals with some fairly arcane aspects of Python internals. As for mechanism, maybe allow functions/methods to be registered with the logging module, which would store a referenceto the function's func_code member. findCaller() would check the frame's f_code member against the set of registered functions, and continue up the stack until it found an unregistered function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 03:43:38 2012 From: report at bugs.python.org (Ned Deily) Date: Thu, 27 Dec 2012 02:43:38 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1356576218.79.0.653946852507.issue15853@psf.upfronthosting.co.za> Changes by Ned Deily : Added file: http://bugs.python.org/file28447/patch_idle_issue_15853.sh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 03:59:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 02:59:06 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356577146.54.0.945514409001.issue15302@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I'm attaching an updated patch incorporating David and Benjamin's suggestion. (Thanks a lot for the feedback, by the way.) I also added a test for the help option and refactored to avoid having to use context managers to check sys.argv, sys.stderr, etc. ---------- Added file: http://bugs.python.org/file28448/issue-15302-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 04:00:06 2012 From: report at bugs.python.org (Ned Deily) Date: Thu, 27 Dec 2012 03:00:06 +0000 Subject: [issue15853] IDLE crashes selecting Preferences menu with OS X ActiveState Tcl/Tk 8.5.12.1 In-Reply-To: <1346632042.85.0.745944196118.issue15853@psf.upfronthosting.co.za> Message-ID: <1356577206.04.0.36869244644.issue15853@psf.upfronthosting.co.za> Ned Deily added the comment: ActiveTcl 8.5.13 has now been released and, per ActiveState's usual practice of making only the current release and its immediate predecessor publicly downloadable, the ActiveTcl 8.5.11.1 release is no longer available at the URL above, as Vance noted. 8.5.13 includes fixes for other problems including another critical problem introduced in 8.5.12.x (Issue15574). So, until the Python 3.3.1, 3.2.4, and 2.7.4 releases are available (which will include the workarounds for this issue) and if you do not have access to 8.5.11.1, one option is to patch IDLE yourself. To assist in this, I have uploaded a shell script which will attempt to patch the python.org 3.3.0, 3.2.3, and 2.7.3 versions of IDLE if they are installed. While I've tried to make it reasonably foolproof, examine and use at your own risk. Download the attached file from this issue, patch_idle_issue_15853.sh, and run it in a terminal session. It uses sudo so, on most systems, administrator access will be required. See http://www.python.org/download/mac/tcltk/ for more information. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 04:04:03 2012 From: report at bugs.python.org (Ned Deily) Date: Thu, 27 Dec 2012 03:04:03 +0000 Subject: [issue15574] IDLE crashes using clipboard copy command on OS X with ActiveTcl 8.5.12 In-Reply-To: <1344358098.04.0.570334143116.issue15574@psf.upfronthosting.co.za> Message-ID: <1356577443.73.0.578022444687.issue15574@psf.upfronthosting.co.za> Ned Deily added the comment: The problem reported here no longer occurs with Tk 8.5.13. See http://www.python.org/download/mac/tcltk/ for important information about using 8.5.13, including a workaround patch for Issue15853 until Python 3.3.1, 3.2.4, and 2.7.4 are released. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 04:16:16 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 03:16:16 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356578176.77.0.661907268555.issue15302@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is an alternative patch with a cleaner diff (keeping the help-related strings at the top before the import statements). ---------- Added file: http://bugs.python.org/file28449/issue-15302-5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 04:22:29 2012 From: report at bugs.python.org (Ned Deily) Date: Thu, 27 Dec 2012 03:22:29 +0000 Subject: [issue16770] Selection in IDLE often skips first character In-Reply-To: <1356373924.27.0.67520730715.issue16770@psf.upfronthosting.co.za> Message-ID: <1356578549.29.0.714648102156.issue16770@psf.upfronthosting.co.za> Ned Deily added the comment: Thanks for the additional information. I am now able to reproduce the behavior you observe when using ActiveTcl 8.5.11.1 and also when using the Apple-supplied 8.5.9 in OS X 10.8; presumably, it is also an issue with earlier versions of Cocoa Tk 8.5. The good news is that the behavior is no longer observable with ActiveTcl 8.5.12.x and 8.5.13. I haven't tried to track down what Tk change(s) are responsible. If you do upgrade your version of Tcl/Tk, avoid 8.5.12.x as there were some serious regressions with it. One of those regressions (Issue15853) remains in 8.5.13 and has been worked around by a change in IDLE. Until that change is released in Python 3.3.1, 3.2.4, and 2.7.4, you can install a patch for it in 2.7.3. See http://www.python.org/download/mac/tcltk/ for more details. ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 04:44:51 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 27 Dec 2012 03:44:51 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356579891.75.0.0906121583229.issue15302@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I posted some review comments. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 05:59:51 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 04:59:51 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356584391.74.0.244407238544.issue15302@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks. I replied. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 06:33:17 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 05:33:17 +0000 Subject: [issue16790] provide ability to share tests between int and long tests Message-ID: <1356586397.32.0.370409223096.issue16790@psf.upfronthosting.co.za> New submission from Chris Jerdonek: Currently, adding new int() and long() tests that are common to both requires duplicating the tests in both test_int and test_long, which makes the tests harder to review and maintain and keep in synch. Providing a simple way to share tests between test_int and test_long will simplify adding new tests for issues like issue 16784, issue 16761, and issue 16772. This issue isn't applicable to 3.x because in 3.x test_int and test_long both test int(), so it doesn't make sense to repeat tests in both. ---------- components: Interpreter Core keywords: easy messages: 178271 nosy: chris.jerdonek priority: normal severity: normal status: open title: provide ability to share tests between int and long tests versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 06:43:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 05:43:13 +0000 Subject: [issue16790] provide ability to share tests between int and long tests In-Reply-To: <1356586397.32.0.370409223096.issue16790@psf.upfronthosting.co.za> Message-ID: <1356586993.18.0.775888027406.issue16790@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Attaching patch. The tests moved to SharedTestCaseMixin in this patch are tests that were very recently added (as part of issue 16045) and that are planned on being added to test_long as part of issue 16784. ---------- keywords: +patch Added file: http://bugs.python.org/file28450/issue-16790-1-27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 06:48:28 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 05:48:28 +0000 Subject: [issue16784] Int tests enhancement and refactoring In-Reply-To: <1356518001.26.0.44673058371.issue16784@psf.upfronthosting.co.za> Message-ID: <1356587308.68.0.79069768351.issue16784@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I created issue 16790 to allow the sharing of tests between test_int and test_long in 2.7. I don't think issue 16761 and issue 16772 should be prerequisites to this issue though because both issues could benefit from issue 16790 being committed first (since both issues may involve adding tests to test_int and test_long). Also, I don't necessarily think that *all* tests should be shared between test_int and test_long because that refactoring may be too invasive, but certainly the new ones we are considering adding. ---------- dependencies: +provide ability to share tests between int and long tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 07:11:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 06:11:34 +0000 Subject: [issue16790] provide ability to share tests between int and long tests In-Reply-To: <1356586397.32.0.370409223096.issue16790@psf.upfronthosting.co.za> Message-ID: <1356588694.16.0.287168160406.issue16790@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Why not inherit IntTestCases and LongTest from SharedTestCaseMixin? And looks as CommonSomeTest naming is more common than SharedSomeTest. ---------- components: +Tests -Interpreter Core nosy: +serhiy.storchaka stage: -> patch review type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 07:19:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 06:19:43 +0000 Subject: [issue16743] mmap on Windows can mishandle files larger than sys.maxsize In-Reply-To: <1356101011.63.0.640174538358.issue16743@psf.upfronthosting.co.za> Message-ID: <1356589183.48.0.693547201393.issue16743@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As Richard explained, this will not break working code, this will break only broken code. Working limit will not be changed, it's sys.maxsize on all platforms. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 07:29:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 06:29:08 +0000 Subject: [issue16784] Int tests enhancement and refactoring In-Reply-To: <1356518001.26.0.44673058371.issue16784@psf.upfronthosting.co.za> Message-ID: <1356589748.97.0.858167110779.issue16784@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: A large part of IntTestCases.test_basic() and LongTest.test_long() can be shared, as a number of smaller tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 07:32:23 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 06:32:23 +0000 Subject: [issue16784] Int tests enhancement and refactoring In-Reply-To: <1356518001.26.0.44673058371.issue16784@psf.upfronthosting.co.za> Message-ID: <1356589943.77.0.172104092479.issue16784@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Agreed. I just didn't want it to be a requirement of beginning shared tests in case anyone objects to refactoring existing tests in 2.7 -- as opposed to using it for the addition of new tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 07:33:59 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 06:33:59 +0000 Subject: [issue16790] provide ability to share tests between int and long tests In-Reply-To: <1356586397.32.0.370409223096.issue16790@psf.upfronthosting.co.za> Message-ID: <1356590039.66.0.960464565851.issue16790@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Good point. New patch coming shortly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 07:48:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 06:48:50 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356590930.05.0.185251610607.issue16772@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: But you have "if (!PyLong_Check(obase))" check before. Only ints acceptable. The only difference with previous code is that now OverflowError raised for large bases instead of ValueError. int.__round__ doesn't produce OverflowError. In any case the final version of those changes should be applied to 3.2 and 3.3 too (if no one objects). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 07:49:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 06:49:49 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356590989.69.0.517045191495.issue16772@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > In any case the final version of those changes should be applied to 3.2 and 3.3 too (if no one objects). +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 07:54:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 06:54:13 +0000 Subject: [issue16790] provide ability to share tests between int and long tests In-Reply-To: <1356586397.32.0.370409223096.issue16790@psf.upfronthosting.co.za> Message-ID: <1356591253.37.0.373033326562.issue16790@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Note that we need to be more careful about checking for duplicate test names now. ---------- Added file: http://bugs.python.org/file28451/issue-16790-2-27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 08:08:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 07:08:13 +0000 Subject: [issue16790] provide ability to share tests between int and long tests In-Reply-To: <1356586397.32.0.370409223096.issue16790@psf.upfronthosting.co.za> Message-ID: <1356592093.45.0.440971816736.issue16790@psf.upfronthosting.co.za> Chris Jerdonek added the comment: After this issue, the ordering of new test_int test cases in 3.x should preferably match the ordering in 2.7 for easier back-porting when the tests are new in both. For example, test_no_args() and test_keyword_args() could go at the top of 3.x's IntTestCases. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 09:57:34 2012 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 27 Dec 2012 08:57:34 +0000 Subject: [issue7083] locals() behaviour differs when tracing is in effect In-Reply-To: <1255009798.45.0.553728595296.issue7083@psf.upfronthosting.co.za> Message-ID: <1356598654.3.0.0637810654915.issue7083@psf.upfronthosting.co.za> anatoly techtonik added the comment: After a day of meditation I've come to the following definition for locals(): locals() return a dictionary that serves as a cache for current local symbol table. This cache is updated every time locals() is called or when a trace function is active. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 10:25:52 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Dec 2012 09:25:52 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> Message-ID: <3YX5JH1F03zNrD@mail.python.org> Roundup Robot added the comment: New changeset 62f67a52b0c2 by Hynek Schlawack in branch '3.2': #16618: Make glob.glob match consistently across strings and bytes http://hg.python.org/cpython/rev/62f67a52b0c2 New changeset fa8c4f96d990 by Hynek Schlawack in branch '3.3': #16618: Make glob.glob match consistently across strings and bytes http://hg.python.org/cpython/rev/fa8c4f96d990 New changeset eae2a42603ee by Hynek Schlawack in branch 'default': #16618: Make glob.glob match consistently across strings and bytes http://hg.python.org/cpython/rev/eae2a42603ee New changeset 44609ff7e53c by Hynek Schlawack in branch '2.7': #16618: Add more glob regression tests http://hg.python.org/cpython/rev/44609ff7e53c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 10:40:54 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Thu, 27 Dec 2012 09:40:54 +0000 Subject: [issue16618] Different glob() results for strings and bytes In-Reply-To: <1354727342.49.0.756705140261.issue16618@psf.upfronthosting.co.za> Message-ID: <1356601254.57.0.18908854841.issue16618@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Thanks Serhiy! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 10:48:01 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Thu, 27 Dec 2012 09:48:01 +0000 Subject: [issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance In-Reply-To: <1346524424.76.0.407141547435.issue15840@psf.upfronthosting.co.za> Message-ID: <1356601681.62.0.964045973414.issue15840@psf.upfronthosting.co.za> Hynek Schlawack added the comment: I agree that standardize behavior here would be useful. But it sounds like a candidate for 3.4. Unifying/changing it for existing releases appears rather hairy to me? ---------- assignee: docs at python -> type: -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 10:49:43 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Thu, 27 Dec 2012 09:49:43 +0000 Subject: [issue15594] test_copyfile_named_pipe() fails on Mac OS X Snow Leopard: OSError: [Errno 22] Invalid argument In-Reply-To: <1344457655.9.0.373688420399.issue15594@psf.upfronthosting.co.za> Message-ID: <1356601783.14.0.222527421065.issue15594@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Any news? Wouldn?t Apple give us a license for our buildbots like MSFT does? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 10:58:38 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Thu, 27 Dec 2012 09:58:38 +0000 Subject: [issue15594] test_copyfile_named_pipe() fails on Mac OS X Snow Leopard: OSError: [Errno 22] Invalid argument In-Reply-To: <1344457655.9.0.373688420399.issue15594@psf.upfronthosting.co.za> Message-ID: <1356602318.26.0.529719540623.issue15594@psf.upfronthosting.co.za> Ronald Oussoren added the comment: OSX Server should have the same kernel as the client. Also, the license terms for OSX 10.6 client don't allow running in a VM, while the 10.6 server terms do allow that. Is there anything special about this buildbots system configuration? Is the filesystem the default HFS+ filesystem? Is the directory used by buildbot a local filesystem? I've had some filesystem related issues in a virtual OSX system that was running in Parallels, but that was while using the 'shared folders' feature of Parallels (that virtual filesystem doesn't support all filesystem features). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:03:57 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 10:03:57 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356602637.42.0.596922262364.issue15302@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Updating patch after Benjamin's review. In this new patch, in test_regrtest I now use the current, actual getopt code to test and demonstrate backwards compatibility. Note that when I pasted the code, I also fixed the three typos in the current getopt code that are documented in the following three issues: issue15324, issue15325, issue15326. These typos are checked by the following test cases: test_fromfile, test_match, and test_randomize. (I will fix these three issues in versions prior to 3.4 independent of this issue.) ---------- Added file: http://bugs.python.org/file28452/issue-15302-6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:05:03 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Thu, 27 Dec 2012 10:05:03 +0000 Subject: [issue14870] Descriptions of os.utime() and os.utimensat() use wrong notation In-Reply-To: <1337601006.45.0.685713178373.issue14870@psf.upfronthosting.co.za> Message-ID: <1356602703.78.0.299118128065.issue14870@psf.upfronthosting.co.za> Hynek Schlawack added the comment: Turns out, Larry fixed these two while working on #14626. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:26:38 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Thu, 27 Dec 2012 10:26:38 +0000 Subject: [issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified In-Reply-To: <1258226856.45.0.72736645389.issue7325@psf.upfronthosting.co.za> Message-ID: <1356603998.0.0.773550114813.issue7325@psf.upfronthosting.co.za> Hynek Schlawack added the comment: I think we should resolve this one line change. Jessica?s patch looks just fine, so I tend to apply it. However, I?d like to document the current behavior in 2.7, 3.2, 3.3 and 3.4. Am I missing anything? ---------- nosy: +hynek versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:28:14 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Thu, 27 Dec 2012 10:28:14 +0000 Subject: [issue1610654] cgi.py multipart/form-data Message-ID: <1356604094.47.0.649375481488.issue1610654@psf.upfronthosting.co.za> Hynek Schlawack added the comment: It would be great if someone could port this patch to Python 3.4 and verify its effectiveness. ---------- keywords: +easy -patch stage: test needed -> needs patch versions: +Python 3.4 -Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:47:49 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Thu, 27 Dec 2012 10:47:49 +0000 Subject: [issue11063] uuid.py module import has heavy side effects In-Reply-To: <1296321060.32.0.846037411239.issue11063@psf.upfronthosting.co.za> Message-ID: <1356605269.87.0.212013323381.issue11063@psf.upfronthosting.co.za> Hynek Schlawack added the comment: The patch hasn?t incorporated Antoine?s comments AFAICT. Also I don?t see this fit for back porting to bug fix releases. Correct me if I?m wrong. ---------- nosy: +hynek stage: patch review -> needs patch versions: +Python 3.4 -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 11:59:55 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Thu, 27 Dec 2012 10:59:55 +0000 Subject: [issue15450] Allow dircmp.subdirs to behave well under subclassing In-Reply-To: <1343260803.75.0.101432828571.issue15450@psf.upfronthosting.co.za> Message-ID: <1356605995.88.0.845205477528.issue15450@psf.upfronthosting.co.za> Changes by Hynek Schlawack : ---------- nosy: +hynek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 12:38:02 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 27 Dec 2012 11:38:02 +0000 Subject: [issue7083] locals() behaviour differs when tracing is in effect In-Reply-To: <1255009798.45.0.553728595296.issue7083@psf.upfronthosting.co.za> Message-ID: <1356608282.13.0.786374310768.issue7083@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree now that the doc should be clearer (and this issue reopened). For one thing, the exact CPython behavior is an implementation issue rather than a language requirement. Which is to say, its behavior is allowed but not required. I believe an implementation *could* use dicts for function local namespaces. Synchronization would not then be an issue. I will try to work up a concrete suggested replacement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 12:43:35 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 11:43:35 +0000 Subject: [issue15324] --match does not work for regrtest In-Reply-To: <1341996167.29.0.670319499131.issue15324@psf.upfronthosting.co.za> Message-ID: <1356608615.3.0.698751455873.issue15324@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The attached patch will fix this issue as well as issue 15325 and issue 15326. Also, I'm removing issue 15302 as a superseder because that issue is limited to 3.4. The attached patch is for prior versions. (Also, it doesn't hurt to apply this to 3.4 if 15302 hasn't been resolved by then.) ---------- keywords: +patch superseder: Use argparse instead of getopt in test.regrtest -> versions: +Python 2.7, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file28453/issue-15324-1.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 22 03:04:16 2012 From: report at bugs.python.org (Leonardo DaVinci) Date: Sat, 22 Dec 2012 02:04:16 +0000 Subject: [issue16749] Fatal Python Error In-Reply-To: Message-ID: New submission from Leonardo DaVinci: I'm running the Solidoodle 2 printer with Python 2.7.3 (as recommended by Solidoodle). I keep getting the "Fatal Python Error" message. I've tried several Python versions, many installs without success. I'm running Windows 7 x64 Ultimate sp1 on a MacBook pro with an i7, 8gigs of Ram. I've installed all the softwares in x86 (32 bit) mode. I'd like to know where the problem originates from. Regards Ciro ---------- files: Python Error.JPG messages: 177917 nosy: DaVinci priority: normal severity: normal status: open title: Fatal Python Error Added file: http://bugs.python.org/file28393/Python Error.JPG _______________________________________ Python tracker _______________________________________ -------------- next part -------------- A non-text attachment was scrubbed... Name: Python Error.JPG Type: image/jpeg Size: 111746 bytes Desc: not available URL: From prashantkurnawal_j at yahoo.in Thu Dec 27 11:35:20 2012 From: prashantkurnawal_j at yahoo.in (Prashant Kurnawal) Date: Thu, 27 Dec 2012 18:35:20 +0800 (SGT) Subject: Bug in _PyUnicode_ClearStaticStrings() method of unicodeobject.c Message-ID: <1356604520.40653.YahooMailClassic@web192502.mail.sg3.yahoo.com> Hi, ? I have embedded python3.3 in my application. I got a crash when I ran a sample python script using it. ? As per my assumption, On interpreter shutdown, all strings are released (through _PyUnicode_ClearStaticStrings). (Found in one of the comments of object.h file) ? When I tried to debug python source, I found a?defect in _PyUnicode_ClearStaticStrings() method. ? ? void _PyUnicode_ClearStaticStrings() { ???? _Py_Identifier *i; ????? for (i = static_strings; i; i = i->next) { ?????????? Py_DECREF(i->object); ?????????? i->object = NULL; ???????????i->next = NULL; ??????} } ? Here, for loop will not free all the static strings. It will free only the first static string in the list. This loop needs to be corrected. ? I corrected the loop in following way and its working fine for me. ? void _PyUnicode_ClearStaticStrings() { ??? _Py_Identifier *i; ??? while(static_strings->next != NULL) ??? { ??????? i = static_strings; ??????? static_strings = static_strings->next; ??????? Py_DECREF(i->object); ??????? i->object = NULL; ??????? i->next = NULL; ??? } ??? ??? Py_DECREF(static_strings->object); ??? static_strings->object = NULL; ??? static_strings = NULL; } ? Please let me know if this is a defect or it is done so intentionally. Please reply as soon as possible. Thanks and Regards, Prashant. -------------- next part -------------- An HTML attachment was scrubbed... URL: From report at bugs.python.org Thu Dec 27 13:30:02 2012 From: report at bugs.python.org (David Halter) Date: Thu, 27 Dec 2012 12:30:02 +0000 Subject: [issue16791] itertools.chain.from_iterable doesn't stop Message-ID: <1356611402.04.0.240264046705.issue16791@psf.upfronthosting.co.za> New submission from David Halter: The following lines run infinitely: b = [1] import itertools b += itertools.chain.from_iterable([c] for c in b) In my opinion this is a bug. Clearly you could say that this is an implementation detail. But afaik this is not documented and very misleading. BTW: In PyPy b would be [1, 1]. ---------- messages: 178296 nosy: davidhalter priority: normal severity: normal status: open title: itertools.chain.from_iterable doesn't stop type: behavior versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 13:31:04 2012 From: report at bugs.python.org (Christian Heimes) Date: Thu, 27 Dec 2012 12:31:04 +0000 Subject: [issue11063] uuid.py module import has heavy side effects In-Reply-To: <1296321060.32.0.846037411239.issue11063@psf.upfronthosting.co.za> Message-ID: <1356611464.13.0.383246902453.issue11063@psf.upfronthosting.co.za> Christian Heimes added the comment: Hynek, you are right. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 13:32:44 2012 From: report at bugs.python.org (Danilo Bargen) Date: Thu, 27 Dec 2012 12:32:44 +0000 Subject: [issue16791] itertools.chain.from_iterable doesn't stop In-Reply-To: <1356611402.04.0.240264046705.issue16791@psf.upfronthosting.co.za> Message-ID: <1356611564.93.0.0992297561059.issue16791@psf.upfronthosting.co.za> Changes by Danilo Bargen : ---------- nosy: +gwrtheyrn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 14:34:10 2012 From: report at bugs.python.org (pyos) Date: Thu, 27 Dec 2012 13:34:10 +0000 Subject: [issue16791] itertools.chain.from_iterable doesn't stop In-Reply-To: <1356611402.04.0.240264046705.issue16791@psf.upfronthosting.co.za> Message-ID: <1356615250.34.0.27516875498.issue16791@psf.upfronthosting.co.za> pyos added the comment: I don't think this is a bug. `b += iter(b)` and `for c in b: b.append(c)` work the same way. Also, the tutorial makes it clear that you should duplicate the list if you modify it inside a loop; in this case, this can be done either by iterating over `b[:]` instead of just `b` or using a list comprehension instead of a generator. ---------- nosy: +pyos _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 14:48:46 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 27 Dec 2012 13:48:46 +0000 Subject: [issue16791] itertools.chain.from_iterable doesn't stop In-Reply-To: <1356611402.04.0.240264046705.issue16791@psf.upfronthosting.co.za> Message-ID: <1356616126.85.0.298647168065.issue16791@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, the behavior here is "undefined" at the language level. And as pyos says, technically it is documented: if you mutate the object over which you are iterating inside the iteration context (a for loop is just one example of same), the behavior is explicitly undefined. I agree that it is not *obvious* that that applies to chain.from_iterable in this context, but I'm not sure how we'd improve the docs to cover it. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 16:34:19 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 15:34:19 +0000 Subject: [issue16792] Mark small ints test as CPython-only Message-ID: <1356622459.12.0.786366680598.issue16792@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Small ints test should be extracted to a separate method and marked as CPython only. In additional it backported to 2.7. ---------- assignee: serhiy.storchaka components: Tests files: int_test_small_ints-3.3.patch keywords: patch messages: 178300 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Mark small ints test as CPython-only type: enhancement versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28454/int_test_small_ints-3.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 16:34:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 15:34:41 +0000 Subject: [issue16792] Mark small ints test as CPython-only In-Reply-To: <1356622459.12.0.786366680598.issue16792@psf.upfronthosting.co.za> Message-ID: <1356622481.94.0.350175591909.issue16792@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28455/int_test_small_ints-3.2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 16:35:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 15:35:02 +0000 Subject: [issue16792] Mark small ints test as CPython-only In-Reply-To: <1356622459.12.0.786366680598.issue16792@psf.upfronthosting.co.za> Message-ID: <1356622502.35.0.0160467548263.issue16792@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28456/int_test_small_ints-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 16:37:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 15:37:33 +0000 Subject: [issue16784] Int tests enhancement and refactoring In-Reply-To: <1356518001.26.0.44673058371.issue16784@psf.upfronthosting.co.za> Message-ID: <1356622653.37.0.113787248176.issue16784@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Mark small ints test as CPython-only _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 16:59:40 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 27 Dec 2012 15:59:40 +0000 Subject: [issue8713] multiprocessing needs option to eschew fork() under Linux In-Reply-To: <1273853591.12.0.245920632829.issue8713@psf.upfronthosting.co.za> Message-ID: <1356623980.06.0.702267444211.issue8713@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > Richard, apart from performance, what's the advantage of this approach over the > fork+exec version? It is really just performance. For context running the unittests in a 1 cpu linux VM gives me fork: real 0m53.868s user 0m1.496s sys 0m9.757s fork+exec: real 1m30.951s user 0m24.598s sys 0m25.614s forkserver: real 0m54.087s user 0m1.572s # excludes descendant processes sys 0m2.336s # excludes descendant processes So running the unit tests using fork+exec takes about 4 times as much cpu time. Starting then immediately joining a trivial process in a loop gives fork: 0.025 seconds/process fork+exec: 0.245 seconds/process forkserver: 0.016 seconds/process So latency is about 10 times higher with fork+exec. > Because it seems more complicated, and although I didn't have a look a this last > patch, I guess that most of the fork+exec version could be factorized with the > Windows version, no? The different fork methods are now implemented in separate files. The line counts are 117 popen_spawn_win32.py 80 popen_fork.py 184 popen_spawn_posix.py 191 popen_forkserver.py I don't think any more sharing between the win32 and posix cases is possible. (Note that popen_spawn_posix.py implements a cleanup helper process which is also used by the "forkserver" method.) > Since it's only intented to be used as a "debugging"/special-purpose replacement - it > would probably be better if it could be made as simple as possible. Actually, avoiding the whole fork+threads mess is a big motivation. multiprocessing uses threads in a few places (like implementing Queue), and tries to do so as safely as possible. But unless you turn off garbage collection you cannot really control what code might be running in a background thread when the main thread forks. > Also, as you've noted, FD passing isn't supported by all Unices out there > (and we've had some reliability issues on OS-X, too). OSX does not seem to allow passing multiple ancilliary messages at once -- but you can send multiple fds in a single ancilliary message. Also, when you send fds on OSX you have to wait for a response from the other end before doing anything else. Not doing that was the cause of the previous fd passing failures in test_multiprocessing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 17:30:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Dec 2012 16:30:57 +0000 Subject: [issue14420] winreg SetValueEx DWord type incompatible with value argument In-Reply-To: <1332800536.64.0.0868580471921.issue14420@psf.upfronthosting.co.za> Message-ID: <3YXGkm1WfgzQxk@mail.python.org> Roundup Robot added the comment: New changeset b9752b6c40f8 by Brian Curtin in branch '3.2': Fix #14420. Use PyLong_AsUnsignedLong to support the full range of DWORD. http://hg.python.org/cpython/rev/b9752b6c40f8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 17:33:12 2012 From: report at bugs.python.org (Brian Curtin) Date: Thu, 27 Dec 2012 16:33:12 +0000 Subject: [issue14420] winreg SetValueEx DWord type incompatible with value argument In-Reply-To: <1332800536.64.0.0868580471921.issue14420@psf.upfronthosting.co.za> Message-ID: <1356625992.18.0.807398295494.issue14420@psf.upfronthosting.co.za> Brian Curtin added the comment: This is fixed on 3.2 through 3.4. On 2.7 we get a ValueError trying to do the same thing so I'll create a separate issue for that since it involves fixing more than just the change in Py2Reg. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 17:49:21 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 27 Dec 2012 16:49:21 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356626961.89.0.248803093639.issue16772@psf.upfronthosting.co.za> Changes by Gregory P. Smith : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 18:12:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 17:12:37 +0000 Subject: [issue16793] Get rid of deprecated assertEquals etc in tests Message-ID: <1356628356.95.0.286090339077.issue16793@psf.upfronthosting.co.za> New submission from Serhiy Storchaka: Here is a patches that replaces deprecated unittest assert aliases (such as assertEquals) to its nondeprecated counterpart (if such usage is not intended). This eliminates deprecation warnings. ---------- assignee: serhiy.storchaka components: Tests files: tests_deprecated_asserts-2.7.patch keywords: patch messages: 178304 nosy: serhiy.storchaka priority: normal severity: normal stage: patch review status: open title: Get rid of deprecated assertEquals etc in tests type: enhancement versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28457/tests_deprecated_asserts-2.7.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 18:13:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 17:13:14 +0000 Subject: [issue16793] Get rid of deprecated assertEquals etc in tests In-Reply-To: <1356628356.95.0.286090339077.issue16793@psf.upfronthosting.co.za> Message-ID: <1356628394.04.0.350082144126.issue16793@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28458/tests_deprecated_asserts-3.3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 18:13:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 17:13:38 +0000 Subject: [issue16793] Get rid of deprecated assertEquals etc in tests In-Reply-To: <1356628356.95.0.286090339077.issue16793@psf.upfronthosting.co.za> Message-ID: <1356628418.01.0.381507835445.issue16793@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : Added file: http://bugs.python.org/file28459/tests_deprecated_asserts-3.4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 18:16:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 17:16:40 +0000 Subject: [issue16784] Int tests enhancement and refactoring In-Reply-To: <1356518001.26.0.44673058371.issue16784@psf.upfronthosting.co.za> Message-ID: <1356628600.59.0.876698278724.issue16784@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- dependencies: +Get rid of deprecated assertEquals etc in tests _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 18:23:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 17:23:14 +0000 Subject: [issue16790] provide ability to share tests between int and long tests In-Reply-To: <1356586397.32.0.370409223096.issue16790@psf.upfronthosting.co.za> Message-ID: <1356628994.25.0.300942612448.issue16790@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 18:27:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 17:27:27 +0000 Subject: [issue16682] Document that audioop works with bytes, not strings In-Reply-To: <1355506064.79.0.581209145854.issue16682@psf.upfronthosting.co.za> Message-ID: <1356629247.58.0.896431654332.issue16682@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: docs at python -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 19:29:20 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Dec 2012 18:29:20 +0000 Subject: [issue14420] winreg SetValueEx DWord type incompatible with value argument In-Reply-To: <1332800536.64.0.0868580471921.issue14420@psf.upfronthosting.co.za> Message-ID: <3YXKMM18XLzNvK@mail.python.org> Roundup Robot added the comment: New changeset ccbb16719540 by Brian Curtin in branch '2.7': Fix #14420. Check for PyLong as well as PyInt when converting in Py2Reg. http://hg.python.org/cpython/rev/ccbb16719540 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 19:30:35 2012 From: report at bugs.python.org (Brian Curtin) Date: Thu, 27 Dec 2012 18:30:35 +0000 Subject: [issue14420] winreg SetValueEx DWord type incompatible with value argument In-Reply-To: <1332800536.64.0.0868580471921.issue14420@psf.upfronthosting.co.za> Message-ID: <1356633035.47.0.902480344769.issue14420@psf.upfronthosting.co.za> Brian Curtin added the comment: Never mind msg178303. The fix was roughly the same and in the same area, so now we're covered on 2.7 as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 19:43:03 2012 From: report at bugs.python.org (Vinay Sajip) Date: Thu, 27 Dec 2012 18:43:03 +0000 Subject: [issue16778] Logger.findCaller needs to be smarter In-Reply-To: <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za> Message-ID: <1356633783.32.0.565202861107.issue16778@psf.upfronthosting.co.za> Vinay Sajip added the comment: I will give this some thought, but it won't be possible to add it to Python 2.x (which is closed for feature additions). Any enhancement in this area would apply to Python 3.4 and later. ---------- versions: +Python 3.4 -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 19:51:01 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Dec 2012 18:51:01 +0000 Subject: [issue16682] Document that audioop works with bytes, not strings In-Reply-To: <1355506064.79.0.581209145854.issue16682@psf.upfronthosting.co.za> Message-ID: <3YXKrN6GzQzQxk@mail.python.org> Roundup Robot added the comment: New changeset cd2b4074a2d9 by Serhiy Storchaka in branch '3.2': Issue #16682: Replace "Python string" to "bytes object" in audioop documentation. http://hg.python.org/cpython/rev/cd2b4074a2d9 New changeset e8248e597060 by Serhiy Storchaka in branch '3.3': Issue #16682: Replace "Python string" to "bytes object" in audioop documentation. http://hg.python.org/cpython/rev/e8248e597060 New changeset f68aeab64356 by Serhiy Storchaka in branch 'default': Issue #16682: Replace "Python string" to "bytes object" in audioop documentation. http://hg.python.org/cpython/rev/f68aeab64356 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 19:54:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 18:54:15 +0000 Subject: [issue16682] Document that audioop works with bytes, not strings In-Reply-To: <1355506064.79.0.581209145854.issue16682@psf.upfronthosting.co.za> Message-ID: <1356634455.67.0.243643975521.issue16682@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 19:56:46 2012 From: report at bugs.python.org (vertograd phrokhladny) Date: Thu, 27 Dec 2012 18:56:46 +0000 Subject: [issue16794] Can't get a list of modules in Python's help system Message-ID: <1356634606.34.0.441472301894.issue16794@psf.upfronthosting.co.za> New submission from vertograd phrokhladny: Ubuntu 12.4 LTS ---------- assignee: docs at python components: Documentation files: modules_command_crash.log messages: 178310 nosy: docs at python, vertograd.phrokhladny priority: normal severity: normal status: open title: Can't get a list of modules in Python's help system type: crash versions: Python 2.7 Added file: http://bugs.python.org/file28460/modules_command_crash.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 20:07:07 2012 From: report at bugs.python.org (R. David Murray) Date: Thu, 27 Dec 2012 19:07:07 +0000 Subject: [issue16794] Can't get a list of modules in Python's help system In-Reply-To: <1356634606.34.0.441472301894.issue16794@psf.upfronthosting.co.za> Message-ID: <1356635227.67.0.572870359389.issue16794@psf.upfronthosting.co.za> R. David Murray added the comment: This is a duplicate of issue 10060, and as indicated there there really isn't much Python can do about this. You should report the bug to Ubuntu, but I'm pretty sure there is already a bug in their system for it (which I believe has been fixed). ---------- nosy: +r.david.murray resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> python.exe crashes or hangs on help() modules when bad modules found _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 20:16:40 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 27 Dec 2012 19:16:40 +0000 Subject: [issue8713] multiprocessing needs option to eschew fork() under Linux In-Reply-To: <1273853591.12.0.245920632829.issue8713@psf.upfronthosting.co.za> Message-ID: <1356635800.28.0.777934343089.issue8713@psf.upfronthosting.co.za> Richard Oudkerk added the comment: Numbers when running on Linux on a laptop with 2 cores + hyperthreading. RUNNING UNITTESTS: fork: real 0m50.687s user 0m9.213s sys 0m4.012s fork+exec: real 1m9.062s user 0m48.579s sys 0m6.648s forkserver: real 0m50.702s user 0m4.140s # excluding descendants sys 0m0.708s # excluding descendants LATENCY: fork: 0.0071 secs/proc fork+exec: 0.0622 secs/proc forkserver: 0.0035 secs/proc Still 4 times the cpu time and 10 times the latency. But the latency is far lower than in the VM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 20:16:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 19:16:57 +0000 Subject: [issue16504] IDLE - fatal error when opening a file with certain tokenizing errors In-Reply-To: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za> Message-ID: <1356635817.63.0.366515360681.issue16504@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:05:11 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Dec 2012 20:05:11 +0000 Subject: [issue16504] IDLE - fatal error when opening a file with certain tokenizing errors In-Reply-To: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za> Message-ID: <3YXMTz0ZhJzP0X@mail.python.org> Roundup Robot added the comment: New changeset d3c81ef728ae by Serhiy Storchaka in branch '2.7': Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE. http://hg.python.org/cpython/rev/d3c81ef728ae New changeset e1ef04cfb57c by Serhiy Storchaka in branch '3.2': Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE. http://hg.python.org/cpython/rev/e1ef04cfb57c New changeset f111e7078d54 by Serhiy Storchaka in branch '3.3': Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE. http://hg.python.org/cpython/rev/f111e7078d54 New changeset 69a2f6a7c257 by Serhiy Storchaka in branch 'default': Issue #16504: Catch SyntaxErrors raised by tokenizer in IDLE. http://hg.python.org/cpython/rev/69a2f6a7c257 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:08:41 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 27 Dec 2012 20:08:41 +0000 Subject: [issue8713] multiprocessing needs option to eschew fork() under Linux In-Reply-To: <1273853591.12.0.245920632829.issue8713@psf.upfronthosting.co.za> Message-ID: <1356638921.63.0.168473635992.issue8713@psf.upfronthosting.co.za> Gregory P. Smith added the comment: I think the forkserver approach is a good idea. It is what a lot of users will choose. forkserver won't work everywhere though so the fork+exec option is still desirable to have available. Threads can be started by non-python code (extension modules, or the larger C/C++ program that is embedding the Python interpreter within it). In that context, by the time the multiprocessing module is can be too late to start a fork server and there is no easy way for Python code to determine if that is the case. The safest default would be fork+exec though we need to implement the fork+exec code as a C extension module or have it use subprocess (as I noted in the mb_fork_exec.patch review). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:09:13 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 20:09:13 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356638953.35.0.521552864544.issue15302@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Rietveld is erroring out on me again whenever I try to reply to a comment, so I'm posting my comment here. On 2012/12/27 18:29:22, Benjamin Peterson wrote: > > On 2012/12/27 04:44:33, Benjamin Peterson wrote: > > > if val: > > > > Again, we need this to match getopt behavior. Using "if val" would replace > the > > value provided for all options accepting a value with the empty string. In > > particular, the test_fromfile() test case (and two others) would fail with > that > > change. On the flip side, getopt causes provided boolean options to show up > as > > having an empty string value in the return value which is why I'm setting val > to > > ''. > > I suppose this stuff is temporary anyway until regrtest can actualy use a nice > namespace. Right. That part is a temporary bridge. I updated the patch based on your original comments, by the way. The patch is a lot simpler now, including dropping the need to subclass ArgumentParser, taking out the old usage() function, simplifying the tests, and making the need for the tests more explicit (which also can be removed after switching to using a namespace object). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:11:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:11:01 +0000 Subject: [issue16504] IDLE - fatal error when opening a file with certain tokenizing errors In-Reply-To: <1353260229.78.0.447155145539.issue16504@psf.upfronthosting.co.za> Message-ID: <1356639061.22.0.339060568522.issue16504@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Thank you, Roger. Fixed. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:12:59 2012 From: report at bugs.python.org (Ram Rachum) Date: Thu, 27 Dec 2012 20:12:59 +0000 Subject: [issue8713] multiprocessing needs option to eschew fork() under Linux In-Reply-To: <1273853591.12.0.245920632829.issue8713@psf.upfronthosting.co.za> Message-ID: <1356639179.33.0.641756866364.issue8713@psf.upfronthosting.co.za> Changes by Ram Rachum : ---------- nosy: -cool-RR _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:14:57 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Dec 2012 20:14:57 +0000 Subject: [issue16759] winreg.QueryValueEx returns signed 32bit value instead of unsigned In-Reply-To: <1356308211.5.0.474246954205.issue16759@psf.upfronthosting.co.za> Message-ID: <3YXMjF1zJ8zR1x@mail.python.org> Roundup Robot added the comment: New changeset 4b7e60e05027 by Brian Curtin in branch '3.2': Fix #16759. Convert DWORD registry values using PyLong_FromUnsignedLong. http://hg.python.org/cpython/rev/4b7e60e05027 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:15:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:15:49 +0000 Subject: [issue11908] Weird `slice.stop or sys.maxint` In-Reply-To: <1303493846.17.0.214651551769.issue11908@psf.upfronthosting.co.za> Message-ID: <1356639349.97.0.780933601617.issue11908@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: commit review -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:19:12 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:19:12 +0000 Subject: [issue12004] PyZipFile.writepy gives internal error on syntax errors In-Reply-To: <1304562440.9.0.83817194423.issue12004@psf.upfronthosting.co.za> Message-ID: <1356639552.98.0.86876452067.issue12004@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ben Morgan, can you please submit a contributor form? http://python.org/psf/contrib/contrib-form/ http://python.org/psf/contrib/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:22:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:22:31 +0000 Subject: [issue15239] Abandoned Tools/unicode/mkstringprep.py In-Reply-To: <1341164174.42.0.994750295138.issue15239@psf.upfronthosting.co.za> Message-ID: <1356639751.13.0.412510388045.issue15239@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Martin, are you have time to review now? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:26:02 2012 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 27 Dec 2012 20:26:02 +0000 Subject: [issue16792] Mark small ints test as CPython-only In-Reply-To: <1356622459.12.0.786366680598.issue16792@psf.upfronthosting.co.za> Message-ID: <1356639962.97.0.691409953863.issue16792@psf.upfronthosting.co.za> Mark Dickinson added the comment: LGTM. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:36:51 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:36:51 +0000 Subject: [issue14850] The inconsistency of codecs.charmap_decode In-Reply-To: <1337352396.54.0.468921009595.issue14850@psf.upfronthosting.co.za> Message-ID: <1356640611.65.0.514682902204.issue14850@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I?no one objects I?will commit this next year. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:37:46 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Dec 2012 20:37:46 +0000 Subject: [issue16759] winreg.QueryValueEx returns signed 32bit value instead of unsigned In-Reply-To: <1356308211.5.0.474246954205.issue16759@psf.upfronthosting.co.za> Message-ID: <3YXNCY2Z3TzQpf@mail.python.org> Roundup Robot added the comment: New changeset d68563e7ae82 by Brian Curtin in branch '2.7': Fix #16759. Convert DWORD registry values using unsigned long. http://hg.python.org/cpython/rev/d68563e7ae82 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:39:07 2012 From: report at bugs.python.org (Brian Curtin) Date: Thu, 27 Dec 2012 20:39:07 +0000 Subject: [issue16759] winreg.QueryValueEx returns signed 32bit value instead of unsigned In-Reply-To: <1356308211.5.0.474246954205.issue16759@psf.upfronthosting.co.za> Message-ID: <1356640747.76.0.300512724896.issue16759@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:41:49 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:41:49 +0000 Subject: [issue16320] Establish order in bytes/string dependencies In-Reply-To: <1351156037.64.0.017004315605.issue16320@psf.upfronthosting.co.za> Message-ID: <1356640909.24.0.531190635532.issue16320@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please review. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:43:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:43:27 +0000 Subject: [issue13454] crash when deleting one pair from tee() In-Reply-To: <1321978245.14.0.0332901316698.issue13454@psf.upfronthosting.co.za> Message-ID: <1356641007.58.0.731827951355.issue13454@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Ping. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:44:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:44:45 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <1356641085.24.0.906417504608.issue16485@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If no one objects I will commit this next year. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:45:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:45:56 +0000 Subject: [issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16) Message-ID: <1356641156.78.0.124414822214.issue1470548@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If no one objects I will commit this next year. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:47:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:47:30 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <1356641250.92.0.227568246722.issue16485@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:47:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:47:43 +0000 Subject: [issue16486] Add context manager support to aifc module In-Reply-To: <1353073163.72.0.969679362142.issue16486@psf.upfronthosting.co.za> Message-ID: <1356641263.87.0.503692326865.issue16486@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:47:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:47:56 +0000 Subject: [issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16) Message-ID: <1356641276.27.0.155298185826.issue1470548@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:48:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:48:13 +0000 Subject: [issue13454] crash when deleting one pair from tee() In-Reply-To: <1321978245.14.0.0332901316698.issue13454@psf.upfronthosting.co.za> Message-ID: <1356641293.11.0.297061734383.issue13454@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:48:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:48:27 +0000 Subject: [issue14850] The inconsistency of codecs.charmap_decode In-Reply-To: <1337352396.54.0.468921009595.issue14850@psf.upfronthosting.co.za> Message-ID: <1356641307.05.0.753013924264.issue14850@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:49:31 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:49:31 +0000 Subject: [issue9290] IDLE and Command line present different behavior for sys.stdin In-Reply-To: <1279417895.54.0.811089047738.issue9290@psf.upfronthosting.co.za> Message-ID: <1356641371.91.0.680758437056.issue9290@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:51:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:51:38 +0000 Subject: [issue16551] Cleanup the pure Python pickle implementation In-Reply-To: <1353845856.16.0.80578311869.issue16551@psf.upfronthosting.co.za> Message-ID: <1356641498.48.0.549529583889.issue16551@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:52:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:52:37 +0000 Subject: [issue16216] Arithmetic operations with NULL In-Reply-To: <1350081908.35.0.947627906901.issue16216@psf.upfronthosting.co.za> Message-ID: <1356641557.82.0.939292337416.issue16216@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:53:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:53:34 +0000 Subject: [issue16491] IDLE and except: raise from In-Reply-To: <9C3C06E7F0934B209166A3DC454F8D19@HansPc> Message-ID: <1356641614.2.0.00891569309586.issue16491@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If no one objects I will commit this next year. ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:54:38 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Dec 2012 20:54:38 +0000 Subject: [issue16045] add more unit tests for built-in int() In-Reply-To: <1348579722.08.0.96812684384.issue16045@psf.upfronthosting.co.za> Message-ID: <3YXNb16YY1zNvj@mail.python.org> Roundup Robot added the comment: New changeset eb1734e579f7 by Chris Jerdonek in branch '2.7': Issue #16790: add some of the recent issue #16045 int tests to test_long. http://hg.python.org/cpython/rev/eb1734e579f7 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:54:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Dec 2012 20:54:39 +0000 Subject: [issue16790] provide ability to share tests between int and long tests In-Reply-To: <1356586397.32.0.370409223096.issue16790@psf.upfronthosting.co.za> Message-ID: <3YXNb252JLzNvj@mail.python.org> Roundup Robot added the comment: New changeset eb1734e579f7 by Chris Jerdonek in branch '2.7': Issue #16790: add some of the recent issue #16045 int tests to test_long. http://hg.python.org/cpython/rev/eb1734e579f7 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:56:02 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:56:02 +0000 Subject: [issue14099] ZipFile.open() should not reopen the underlying file In-Reply-To: <1329993992.32.0.270050568564.issue14099@psf.upfronthosting.co.za> Message-ID: <1356641762.48.0.109333352529.issue14099@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:56:35 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 20:56:35 +0000 Subject: [issue16790] provide ability to share tests between int and long tests In-Reply-To: <1356586397.32.0.370409223096.issue16790@psf.upfronthosting.co.za> Message-ID: <1356641795.41.0.624675718837.issue16790@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for the reviews, Serhiy. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:57:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:57:03 +0000 Subject: [issue16541] tk_setPalette doesn't accept keyword parameters In-Reply-To: <1353691491.46.0.777146427691.issue16541@psf.upfronthosting.co.za> Message-ID: <1356641823.98.0.690470307977.issue16541@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If no one objects I will commit this next year. ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:57:29 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:57:29 +0000 Subject: [issue15539] Fixing Tools/scripts/pindent.py In-Reply-To: <1343924676.33.0.76595941249.issue15539@psf.upfronthosting.co.za> Message-ID: <1356641849.5.0.586315368302.issue15539@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If no one objects I will commit this next year. ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:58:49 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 20:58:49 +0000 Subject: [issue16792] Mark small ints test as CPython-only In-Reply-To: <1356622459.12.0.786366680598.issue16792@psf.upfronthosting.co.za> Message-ID: <1356641929.36.0.376290454013.issue16792@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 21:59:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 20:59:42 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <1356641982.5.0.198180298676.issue16165@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If no one objects I will commit this next year. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:00:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 21:00:03 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <1356642003.8.0.908656988072.issue16165@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:00:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 21:00:37 +0000 Subject: [issue16640] Less code under lock in sched.scheduler In-Reply-To: <1354959239.11.0.372090079452.issue16640@psf.upfronthosting.co.za> Message-ID: <1356642037.16.0.160596229526.issue16640@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: If no one objects I will commit this next year. ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:01:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 21:01:36 +0000 Subject: [issue16793] Get rid of deprecated assertEquals etc in tests In-Reply-To: <1356628356.95.0.286090339077.issue16793@psf.upfronthosting.co.za> Message-ID: <1356642096.98.0.14720453571.issue16793@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:04:58 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 27 Dec 2012 21:04:58 +0000 Subject: [issue8713] multiprocessing needs option to eschew fork() under Linux In-Reply-To: <1273853591.12.0.245920632829.issue8713@psf.upfronthosting.co.za> Message-ID: <1356642298.52.0.191800243999.issue8713@psf.upfronthosting.co.za> Changes by Richard Oudkerk : Added file: http://bugs.python.org/file28461/8f08d83264a0.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:07:56 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Thu, 27 Dec 2012 21:07:56 +0000 Subject: [issue8713] multiprocessing needs option to eschew fork() under Linux In-Reply-To: <1273853591.12.0.245920632829.issue8713@psf.upfronthosting.co.za> Message-ID: <1356642476.62.0.512734651229.issue8713@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > The safest default would be fork+exec though we need to implement the > fork+exec code as a C extension module or have it use subprocess (as I > noted in the mb_fork_exec.patch review). That was an old version of the patch. In the branch http://hg.python.org/sandbox/sbt#spawn _posixsubprocess is used instead of fork+exec, and all unnecessary fds are closed. See http://hg.python.org/sandbox/sbt/file/8f08d83264a0/Lib/multiprocessing/popen_spawn_posix.py ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:09:37 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 21:09:37 +0000 Subject: [issue16793] Get rid of deprecated assertEquals etc in tests In-Reply-To: <1356628356.95.0.286090339077.issue16793@psf.upfronthosting.co.za> Message-ID: <1356642577.79.0.651401529265.issue16793@psf.upfronthosting.co.za> Chris Jerdonek added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:15:20 2012 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 27 Dec 2012 21:15:20 +0000 Subject: [issue16793] Get rid of deprecated assertEquals etc in tests In-Reply-To: <1356628356.95.0.286090339077.issue16793@psf.upfronthosting.co.za> Message-ID: <1356642920.58.0.415476992758.issue16793@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM. ---------- nosy: +ezio.melotti stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:16:16 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 21:16:16 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356642976.65.0.747827649551.issue16761@psf.upfronthosting.co.za> Chris Jerdonek added the comment: When this patch is updated because of the commit for issue 16790, in 3.x can the edited test cases be moved to the top of the test class per the following comment (as appropriate)? http://bugs.python.org/issue16790#msg178282 As stated there, this will make synching tests between 2.7 and 3.x easier. We can do the others in 3.x whenever more are added to the 2.7 common tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:44:43 2012 From: report at bugs.python.org (Sven Brauch) Date: Thu, 27 Dec 2012 21:44:43 +0000 Subject: [issue16795] Patch: some changes to AST to make it more useful for static language analysis Message-ID: <1356644683.65.0.359499511153.issue16795@psf.upfronthosting.co.za> New submission from Sven Brauch: Here's a patch doing some adjustments to the AST to make it more useful for static language analysis, as discussed in http://mail.python.org/pipermail/python-dev/2012-December/123320.html. Changes done: * the described fix to attribute ranges * add location information for var / kwargs and arguments Interestingly, this even fixes a bug; compare the locations of the error in the following situation: >>> l = [1, 2, 3] >>> l[ ... ... 2 ... ... ].Foo Old error message: Traceback (most recent call last): File "", line 3, in AttributeError: 'int' object has no attribute 'Foo' New error message: Traceback (most recent call last): File "", line 5, in AttributeError: 'int' object has no attribute 'Foo' The new message is obviously more accurate (one could even go as far as saying that the first one does not make any sense at all -- what does the expression in the slice have to do with the error?). The same thing happens in similar situations, e.g. with line continuation characters, function calls, ... anything multi-line with an error related to attribute access. I hope the patch is okay, if not please let me know what to change. I also hope I managed to include all important changes into the patch ;) ---------- components: None files: python.diff keywords: patch messages: 178339 nosy: scummos priority: normal severity: normal status: open title: Patch: some changes to AST to make it more useful for static language analysis versions: Python 3.4 Added file: http://bugs.python.org/file28462/python.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:46:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 21:46:19 +0000 Subject: [issue15324] --fromfile, --match, and --randomize don't work in regrtest In-Reply-To: <1341996167.29.0.670319499131.issue15324@psf.upfronthosting.co.za> Message-ID: <1356644779.96.0.177295524505.issue15324@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- title: --match does not work for regrtest -> --fromfile, --match, and --randomize don't work in regrtest _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:47:53 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 21:47:53 +0000 Subject: [issue15325] --fromfile does not work for regrtest In-Reply-To: <1342001132.43.0.639678860969.issue15325@psf.upfronthosting.co.za> Message-ID: <1356644873.68.0.430669977838.issue15325@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed superseder: Use argparse instead of getopt in test.regrtest -> --fromfile, --match, and --randomize don't work in regrtest _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:49:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 21:49:19 +0000 Subject: [issue15326] --random does not work for regrtest In-Reply-To: <1342001711.01.0.48203802237.issue15326@psf.upfronthosting.co.za> Message-ID: <1356644959.79.0.885712384421.issue15326@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed superseder: Use argparse instead of getopt in test.regrtest -> --fromfile, --match, and --randomize don't work in regrtest versions: +Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:51:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 21:51:30 +0000 Subject: [issue16642] Mention new "kwargs" named tuple parameter in sched module In-Reply-To: <1354963970.59.0.876106484214.issue16642@psf.upfronthosting.co.za> Message-ID: <1356645090.16.0.382952101925.issue16642@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: docs at python -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:54:01 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 21:54:01 +0000 Subject: [issue16645] Wrong test_extract_hardlink() in test_tarfile.py In-Reply-To: <1354989728.58.0.0717635689948.issue16645@psf.upfronthosting.co.za> Message-ID: <1356645241.98.0.454271772956.issue16645@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:54:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 21:54:30 +0000 Subject: [issue16641] sched.scheduler.enter arguments should not be modifiable In-Reply-To: <1354961661.69.0.670095014649.issue16641@psf.upfronthosting.co.za> Message-ID: <1356645270.86.0.891382448653.issue16641@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 22:56:28 2012 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 27 Dec 2012 21:56:28 +0000 Subject: [issue8713] multiprocessing needs option to eschew fork() under Linux In-Reply-To: <1273853591.12.0.245920632829.issue8713@psf.upfronthosting.co.za> Message-ID: <1356645388.61.0.145697745228.issue8713@psf.upfronthosting.co.za> Gregory P. Smith added the comment: ah, i missed that update. cool! +1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:01:57 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 22:01:57 +0000 Subject: [issue16599] unittest: Access test result from tearDown In-Reply-To: <1354527723.36.0.769611290906.issue16599@psf.upfronthosting.co.za> Message-ID: <1356645717.18.0.926401844764.issue16599@psf.upfronthosting.co.za> Chris Jerdonek added the comment: I agree with Serhiy here. This use case seems too specialized, and there are easy ways to achieve the same thing in code. ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:22:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Dec 2012 22:22:47 +0000 Subject: [issue16792] Mark small ints test as CPython-only In-Reply-To: <1356622459.12.0.786366680598.issue16792@psf.upfronthosting.co.za> Message-ID: <3YXQXh6GvHzNwL@mail.python.org> Roundup Robot added the comment: New changeset 8f82e9992ad9 by Serhiy Storchaka in branch '2.7': Issue #16792: Mark small ints test as CPython-only. http://hg.python.org/cpython/rev/8f82e9992ad9 New changeset 31955234b624 by Serhiy Storchaka in branch '3.2': Issue #16792: Mark small ints test as CPython-only. http://hg.python.org/cpython/rev/31955234b624 New changeset dee82e66726d by Serhiy Storchaka in branch '3.3': Issue #16792: Mark small ints test as CPython-only. http://hg.python.org/cpython/rev/dee82e66726d New changeset 9177d8e6e317 by Serhiy Storchaka in branch 'default': Issue #16792: Mark small ints test as CPython-only. http://hg.python.org/cpython/rev/9177d8e6e317 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:32:06 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 27 Dec 2012 22:32:06 +0000 Subject: [issue16792] Mark small ints test as CPython-only In-Reply-To: <1356622459.12.0.786366680598.issue16792@psf.upfronthosting.co.za> Message-ID: <1356647526.02.0.997315228151.issue16792@psf.upfronthosting.co.za> Chris Jerdonek added the comment: You can use assertIs() in 2.7 as well, no? + @test_support.cpython_only + def test_small_ints(self): + self.assertTrue(int('10') is 10) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:40:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 22:40:52 +0000 Subject: [issue16792] Mark small ints test as CPython-only In-Reply-To: <1356622459.12.0.786366680598.issue16792@psf.upfronthosting.co.za> Message-ID: <1356648052.58.0.10797353778.issue16792@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:47:03 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Dec 2012 22:47:03 +0000 Subject: [issue16792] Mark small ints test as CPython-only In-Reply-To: <1356622459.12.0.786366680598.issue16792@psf.upfronthosting.co.za> Message-ID: <3YXR4j0T4CzQjJ@mail.python.org> Roundup Robot added the comment: New changeset 327896bf3152 by Serhiy Storchaka in branch '2.7': Issue #16792: Use assertIs() to test identity. http://hg.python.org/cpython/rev/327896bf3152 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:47:04 2012 From: report at bugs.python.org (Roundup Robot) Date: Thu, 27 Dec 2012 22:47:04 +0000 Subject: [issue16793] Get rid of deprecated assertEquals etc in tests In-Reply-To: <1356628356.95.0.286090339077.issue16793@psf.upfronthosting.co.za> Message-ID: <3YXR4j67HvzQjJ@mail.python.org> Roundup Robot added the comment: New changeset a617a50d2766 by Serhiy Storchaka in branch '2.7': Issue #16793. Replace deprecated unittest asserts with modern counterparts. http://hg.python.org/cpython/rev/a617a50d2766 New changeset 6601818622ea by Serhiy Storchaka in branch '3.3': Issue #16793. Replace deprecated unittest asserts with modern counterparts. http://hg.python.org/cpython/rev/6601818622ea New changeset eb3a4ae095a8 by Serhiy Storchaka in branch 'default': Issue #16793. Replace deprecated unittest asserts with modern counterparts. http://hg.python.org/cpython/rev/eb3a4ae095a8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:50:43 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 22:50:43 +0000 Subject: [issue16793] Get rid of deprecated assertEquals etc in tests In-Reply-To: <1356628356.95.0.286090339077.issue16793@psf.upfronthosting.co.za> Message-ID: <1356648643.8.0.565059369472.issue16793@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I?haven't committed changes to lib2to3 tests as I?don't sure what version they should be compatible. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Dec 27 23:57:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Thu, 27 Dec 2012 22:57:38 +0000 Subject: [issue16792] Mark small ints test as CPython-only In-Reply-To: <1356622459.12.0.786366680598.issue16792@psf.upfronthosting.co.za> Message-ID: <1356649058.37.0.193797638449.issue16792@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 00:57:37 2012 From: report at bugs.python.org (Michael Schurter) Date: Thu, 27 Dec 2012 23:57:37 +0000 Subject: [issue16796] Fix argparse docs typo: "an special action" to "a special action" Message-ID: <1356652657.93.0.879833521932.issue16796@psf.upfronthosting.co.za> New submission from Michael Schurter: Title says it all; patch has the fix. No need for an ACKS entry ---------- files: argparse-docs-typo.patch keywords: patch messages: 178348 nosy: schmichael priority: normal severity: normal status: open title: Fix argparse docs typo: "an special action" to "a special action" Added file: http://bugs.python.org/file28463/argparse-docs-typo.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 00:57:45 2012 From: report at bugs.python.org (Michael Schurter) Date: Thu, 27 Dec 2012 23:57:45 +0000 Subject: [issue16796] Fix argparse docs typo: "an special action" to "a special action" In-Reply-To: <1356652657.93.0.879833521932.issue16796@psf.upfronthosting.co.za> Message-ID: <1356652665.2.0.254666861376.issue16796@psf.upfronthosting.co.za> Changes by Michael Schurter : ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:00:54 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Dec 2012 00:00:54 +0000 Subject: [issue16796] Fix argparse docs typo: "an special action" to "a special action" In-Reply-To: <1356652657.93.0.879833521932.issue16796@psf.upfronthosting.co.za> Message-ID: <3YXSjx57bKzNvj@mail.python.org> Roundup Robot added the comment: New changeset c1623a032adf by Ezio Melotti in branch '2.7': #16796: fix typo. Patch by Michael Schurter. http://hg.python.org/cpython/rev/c1623a032adf New changeset f348a3110a85 by Ezio Melotti in branch '3.2': #16796: fix typo. Patch by Michael Schurter. http://hg.python.org/cpython/rev/f348a3110a85 New changeset 1e35d1f514b3 by Ezio Melotti in branch '3.3': #16796: merge with 3.2. http://hg.python.org/cpython/rev/1e35d1f514b3 New changeset 07421f9fcfb0 by Ezio Melotti in branch 'default': #16796: merge with 3.3. http://hg.python.org/cpython/rev/07421f9fcfb0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:01:26 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 28 Dec 2012 00:01:26 +0000 Subject: [issue16796] Fix argparse docs typo: "an special action" to "a special action" In-Reply-To: <1356652657.93.0.879833521932.issue16796@psf.upfronthosting.co.za> Message-ID: <1356652886.07.0.486939333719.issue16796@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed, thanks for the report and the patch! ---------- assignee: docs at python -> ezio.melotti nosy: +ezio.melotti resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:01:46 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 28 Dec 2012 00:01:46 +0000 Subject: [issue16797] sporadic test_faulthandler failure Message-ID: <1356652906.67.0.440148655963.issue16797@psf.upfronthosting.co.za> New submission from Antoine Pitrou: http://buildbot.python.org/all/builders/AMD64%20Mountain%20Lion%20%5BSB%5D%203.x/builds/631 ====================================================================== FAIL: test_dump_traceback_later_file (test.test_faulthandler.FaultHandlerTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/test_faulthandler.py", line 490, in test_dump_traceback_later_file self.check_dump_traceback_later(file=True) File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/test_faulthandler.py", line 476, in check_dump_traceback_later filename, loops) File "/Volumes/bay2/buildslave/cpython/3.x.snakebite-mountainlion-amd64/build/Lib/test/test_faulthandler.py", line 460, in _check_dump_traceback_later self.assertRegex(trace, regex) AssertionError: Regex didn't match: '^Timeout \\(0:00:00.500000\\)!\\nThread 0x[0-9a-f]+:\\n File "", line 9 in func\n File "", line 20 in $' not found in 'Timeout (0:00:00.500000)!\nThread 0x00007fff7f242180:\n File "", line 10 in func\n File "", line 20 in ' ---------- components: Tests messages: 178351 nosy: haypo, pitrou priority: normal severity: normal stage: needs patch status: open title: sporadic test_faulthandler failure type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 01:17:06 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 28 Dec 2012 00:17:06 +0000 Subject: [issue16797] sporadic test_faulthandler failure In-Reply-To: <1356652906.67.0.440148655963.issue16797@psf.upfronthosting.co.za> Message-ID: <1356653826.54.0.0165383819097.issue16797@psf.upfronthosting.co.za> Ezio Melotti added the comment: Duplicate of #15971. ---------- nosy: +ezio.melotti resolution: -> duplicate stage: needs patch -> committed/rejected status: open -> closed superseder: -> Sporadic failure in test_dump_tracebacks_later_file (test_faulthandler) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 02:37:09 2012 From: report at bugs.python.org (Javier Domingo) Date: Fri, 28 Dec 2012 01:37:09 +0000 Subject: [issue16798] DTD not checked Message-ID: <1356658629.79.0.632401126307.issue16798@psf.upfronthosting.co.za> New submission from Javier Domingo: Hi, I am trying to find any tip on how to use minidom or etree xml implementations to check the xml syntax. I just found that the only way to check xml syntax throught dtds is using lxml. Would it be possible to implement this in the minidom or ElementTree default lib? I have seen bug http://bugs.python.org/issue2124 that speaks about the dtds fetch, but didn't see any place where it speaks about them being checked. ---------- components: XML messages: 178353 nosy: txomon priority: normal severity: normal status: open title: DTD not checked type: behavior versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 03:34:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Dec 2012 02:34:39 +0000 Subject: [issue15324] --fromfile, --match, and --randomize don't work in regrtest In-Reply-To: <1341996167.29.0.670319499131.issue15324@psf.upfronthosting.co.za> Message-ID: <3YXX7L6yv8zQyh@mail.python.org> Roundup Robot added the comment: New changeset b7a0e03bb987 by Chris Jerdonek in branch '2.7': Issue #15324: Fix regrtest parsing of --fromfile and --randomize options. http://hg.python.org/cpython/rev/b7a0e03bb987 New changeset b2cd12690a51 by Chris Jerdonek in branch '3.2': Issue #15324: Fix regrtest parsing of --fromfile, --match, and --randomize. http://hg.python.org/cpython/rev/b2cd12690a51 New changeset e100d34070cb by Chris Jerdonek in branch '3.3': Merge from 3.2: Issue #15324: Fix regrtest --fromfile, --match, --randomize. http://hg.python.org/cpython/rev/e100d34070cb New changeset 2c3399510781 by Chris Jerdonek in branch 'default': Merge from 3.3: Issue #15324: Fix regrtest --fromfile, --match, --randomize. http://hg.python.org/cpython/rev/2c3399510781 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 03:37:16 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Dec 2012 02:37:16 +0000 Subject: [issue15324] --fromfile, --match, and --randomize don't work in regrtest In-Reply-To: <1341996167.29.0.670319499131.issue15324@psf.upfronthosting.co.za> Message-ID: <1356662236.71.0.721672571534.issue15324@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: enhancement -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 03:55:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Dec 2012 02:55:22 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <3YXXbG14RgzNtt@mail.python.org> Roundup Robot added the comment: New changeset 6e2e5adc0400 by Chris Jerdonek in branch 'default': Issue #15302: Switch regrtest from using getopt to using argparse. http://hg.python.org/cpython/rev/6e2e5adc0400 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 04:11:11 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Dec 2012 03:11:11 +0000 Subject: [issue16799] switch regrtest from getopt-style options to argparse Namespace object Message-ID: <1356664271.75.0.0861175623583.issue16799@psf.upfronthosting.co.za> New submission from Chris Jerdonek: Issue 15302 switched regrtest from getopt to argparse for parsing options. However, regrtest.main() still expects and operates on getopt-style options. This issue is to continue the regrtest refactoring and replace the use of getopt-style options with an argparse Namespace object. This issue should probably be a meta-issue with the transition happening over several issues/commits, as there are many command-line options that will probably have varying types and actions (in the sense of argparse). Options can be switched over incrementally in groups (e.g. by having the _parse_args() function return the parsed options in both forms: in both getopt-style format and a Namespace object). This issue will be completed when the namespace-to-getopt "bridge code" is removed -- probably along with the corresponding argparse-to-getopt tests. ---------- components: Tests messages: 178356 nosy: chris.jerdonek priority: normal severity: normal status: open title: switch regrtest from getopt-style options to argparse Namespace object type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 04:13:29 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Dec 2012 03:13:29 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356664408.99.0.226544646473.issue15302@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks again for your reviews, Benjamin (and others). I created issue 16799 for the next phase of this process: changing regrtest.main() from operating on getopt-style parsed options to an argparse Namespace object. ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 04:18:30 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Dec 2012 03:18:30 +0000 Subject: [issue16799] switch regrtest from getopt options to argparse Namespace In-Reply-To: <1356664271.75.0.0861175623583.issue16799@psf.upfronthosting.co.za> Message-ID: <1356664710.06.0.714036325534.issue16799@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- title: switch regrtest from getopt-style options to argparse Namespace object -> switch regrtest from getopt options to argparse Namespace _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 05:10:14 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Dec 2012 04:10:14 +0000 Subject: [issue10848] Move test.regrtest from getopt to argparse In-Reply-To: <1294353259.48.0.852026284896.issue10848@psf.upfronthosting.co.za> Message-ID: <1356667814.39.0.0132692419265.issue10848@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Since regrtest is now using argparse (as of 6e2e5adc0400), is there a reason to keep this issue open? Or should the issue be retitled (current title: "Move test.regrtest from getopt to argparse")? There seem to be some thoughts in the comments that are broader than the current title, but I don't know the right focus. It seems to be more of a brainstorm on how to improve regrtest. ---------- versions: +Python 3.4 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 05:49:04 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 28 Dec 2012 04:49:04 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <1356670144.41.0.0267418123612.issue16165@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Sorry for chiming in so late. The patch looks fine to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 05:51:01 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 28 Dec 2012 04:51:01 +0000 Subject: [issue16640] Less code under lock in sched.scheduler In-Reply-To: <1354959239.11.0.372090079452.issue16640@psf.upfronthosting.co.za> Message-ID: <1356670261.7.0.312842032265.issue16640@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Patch looks fine to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 05:53:49 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 28 Dec 2012 04:53:49 +0000 Subject: [issue16641] sched.scheduler.enter arguments should not be modifiable In-Reply-To: <1354961661.69.0.670095014649.issue16641@psf.upfronthosting.co.za> Message-ID: <1356670429.06.0.0172414748966.issue16641@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Patch looks fine to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 06:31:19 2012 From: report at bugs.python.org (Eric Snow) Date: Fri, 28 Dec 2012 05:31:19 +0000 Subject: [issue16795] Patch: some changes to AST to make it more useful for static language analysis In-Reply-To: <1356644683.65.0.359499511153.issue16795@psf.upfronthosting.co.za> Message-ID: <1356672679.15.0.362717232093.issue16795@psf.upfronthosting.co.za> Changes by Eric Snow : ---------- nosy: +eric.snow _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 06:37:38 2012 From: report at bugs.python.org (Amir Szekely) Date: Fri, 28 Dec 2012 05:37:38 +0000 Subject: [issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full Message-ID: <1356673057.72.0.476993951408.issue16800@psf.upfronthosting.co.za> New submission from Amir Szekely: tempfile._get_default_tempdir() tries to find a good temporary directory by attempting to create a file and write a string into it for all candidate directories. It deletes those files right after closing them. But if writing rather than creating them fails, the files get left behind. This can happen, for example, when the disk is full on Linux. It will let you create the file with open() and even write() to it. But as soon as close() is called, OSError is raised with errno 28 (No space left on device) and unlink() is never called. On our system (Linux 2.6.32, ext3), after filling the disk by mistake, we suddenly found dozens of random empty files scattered across the file system. The candidate list, where they were all found, even includes the root directory so the issue is quite visible. We noticed this problem on Python 2.4.4, but I have been able to reproduce it with today's tip. A possible solution would be wrapping everything between open() and unlink() in a try-finally block. This way, no matter what happens, the file will get deleted. I have attached a patch implementing this solution and a new test case that reproduces the issue. Verified with `make test && make patchcheck`. ---------- components: Extension Modules files: fix_tempfile_leaving_files_behind.patch keywords: patch messages: 178362 nosy: kichik priority: normal severity: normal status: open title: tempfile._get_default_tempdir() leaves files behind when HD is full type: resource usage versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3, Python 3.4, Python 3.5 Added file: http://bugs.python.org/file28464/fix_tempfile_leaving_files_behind.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 06:51:22 2012 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Dec 2012 05:51:22 +0000 Subject: [issue14834] A list of broken links on the python.org website In-Reply-To: <1337200964.75.0.633094398111.issue14834@psf.upfronthosting.co.za> Message-ID: <1356673882.84.0.70934891664.issue14834@psf.upfronthosting.co.za> Ned Deily added the comment: Benjamin, do you have an opinion about the missing .asc files for the 3.1.x releases? If not, this issue should be closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 07:07:39 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 28 Dec 2012 06:07:39 +0000 Subject: [issue14834] A list of broken links on the python.org website In-Reply-To: <1337200964.75.0.633094398111.issue14834@psf.upfronthosting.co.za> Message-ID: <1356674859.59.0.0729467575412.issue14834@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Considering 3.1.4 is outdated even in the 3.1 series, I think we can let it slide. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 07:11:48 2012 From: report at bugs.python.org (Amir Szekely) Date: Fri, 28 Dec 2012 06:11:48 +0000 Subject: [issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full In-Reply-To: <1356673057.72.0.476993951408.issue16800@psf.upfronthosting.co.za> Message-ID: <1356675108.02.0.21138796437.issue16800@psf.upfronthosting.co.za> Amir Szekely added the comment: Reproduction details: [root at meh /]# uname -a Linux meh 2.6.32-131.17.1.el6-0.0.3.smp.pae.gcc4.1.x86.i686 #1 SMP Tue Dec 20 02:40:22 PST 2011 i686 GNU/Linux [root at meh /]# pwd / [root at meh /]# dd if=/dev/zero of=/tmp/BIG bs=4M dd: writing `/tmp/BIG': No space left on device 31+0 records in 30+0 records out 127254528 bytes (127 MB) copied, 3.7028 s, 34.4 MB/s [root at meh /]# ls bin boot dev etc home initrd lib lost+found media mnt opt proc root sbin srv sys tmp usr var [root at meh /]# python -c "import tempfile; tempfile.mktemp()" Traceback (most recent call last): File "", line 1, in ? File "/usr/lib/python2.4/tempfile.py", line 362, in mktemp dir = gettempdir() File "/usr/lib/python2.4/tempfile.py", line 268, in gettempdir tempdir = _get_default_tempdir() File "/usr/lib/python2.4/tempfile.py", line 214, in _get_default_tempdir raise IOError, (_errno.ENOENT, IOError: [Errno 2] No usable temporary directory found in ['/tmp', '/var/tmp', '/usr/tmp', '/'] [root at meh /]# ls bin boot dev etc home initrd lib lost+found media mnt opt proc -qE-nI root sbin srv sys tmp usr var [root at meh /]# ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 07:23:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 06:23:18 +0000 Subject: [issue16800] tempfile._get_default_tempdir() leaves files behind when HD is full In-Reply-To: <1356673057.72.0.476993951408.issue16800@psf.upfronthosting.co.za> Message-ID: <1356675798.81.0.829460950196.issue16800@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- components: +Library (Lib) -Extension Modules stage: -> patch review versions: -Python 2.6, Python 3.1, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 07:59:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 06:59:30 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356677970.1.0.186811456267.issue16761@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 08:15:45 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 28 Dec 2012 07:15:45 +0000 Subject: [issue16791] itertools.chain.from_iterable doesn't stop In-Reply-To: <1356611402.04.0.240264046705.issue16791@psf.upfronthosting.co.za> Message-ID: <1356678945.79.0.0664920864908.issue16791@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 08:20:56 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 28 Dec 2012 07:20:56 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <1356679256.51.0.325249556862.issue16485@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks good to me, except: the patch contains unrelated whitespace changes. Please don't commit them along the fix. If you think they are really necessary, they should go in a separate commit. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 08:22:40 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 28 Dec 2012 07:22:40 +0000 Subject: [issue16791] itertools.chain.from_iterable doesn't stop In-Reply-To: <1356611402.04.0.240264046705.issue16791@psf.upfronthosting.co.za> Message-ID: <1356679360.8.0.788314792731.issue16791@psf.upfronthosting.co.za> Raymond Hettinger added the comment: This isn't a bug. It is an intended feature that chain.from_iterable evaluates lazily (and is documented as such). The pure python equivalent in the docs behaves the same as the C version does. Also, it is a long standing feature of lists that you can loop over them while mutating them (I've seen more than a few pieces of code that take advantage of that feature). ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 08:23:13 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 28 Dec 2012 07:23:13 +0000 Subject: [issue16486] Add context manager support to aifc module In-Reply-To: <1353073163.72.0.969679362142.issue16486@psf.upfronthosting.co.za> Message-ID: <1356679393.96.0.817992447516.issue16486@psf.upfronthosting.co.za> Georg Brandl added the comment: The "self.fout.close()" is not needed here I think. Another thing the test should test is that the file was actually closed on exception. Otherwise, LGTM. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 08:26:14 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 28 Dec 2012 07:26:14 +0000 Subject: [issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16) Message-ID: <1356679574.39.0.303012165844.issue1470548@psf.upfronthosting.co.za> Georg Brandl added the comment: I'd like Antoine to have a look at all that io stuff. It looks quite bloated. In your except clause, you're not calling self._close. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 08:29:22 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 28 Dec 2012 07:29:22 +0000 Subject: [issue13454] crash when deleting one pair from tee() In-Reply-To: <1321978245.14.0.0332901316698.issue13454@psf.upfronthosting.co.za> Message-ID: <1356679762.15.0.923446578239.issue13454@psf.upfronthosting.co.za> Georg Brandl added the comment: The patch replaces a Py_CLEAR(tdo->nextlink) with a construct that does, basically, something like this several times: Py_DECREF(tdo->nextlink) tdo->nextlink which is what leads to the issues that Py_CLEAR is supposed to prevent. Therefore I think this patch is not correct. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 08:29:45 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 28 Dec 2012 07:29:45 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356679785.8.0.309412422696.issue16761@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I don't think a backport is appropriate for this kind of change. ---------- nosy: +rhettinger versions: -Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:14:21 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 28 Dec 2012 08:14:21 +0000 Subject: [issue16793] Get rid of deprecated assertEquals etc in tests In-Reply-To: <1356628356.95.0.286090339077.issue16793@psf.upfronthosting.co.za> Message-ID: <1356682461.83.0.847072599685.issue16793@psf.upfronthosting.co.za> Georg Brandl added the comment: And please don't commit cosmetic/"cleanup" changes to bugfix branches in the future. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:20:59 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Dec 2012 08:20:59 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <3YXgpy5tc7zR0J@mail.python.org> Roundup Robot added the comment: New changeset c0266ba8e4c6 by Serhiy Storchaka in branch '2.7': Issue #16761: Raise TypeError when int() or long() called with base argument only. http://hg.python.org/cpython/rev/c0266ba8e4c6 New changeset e4ea38a92c4d by Serhiy Storchaka in branch '3.2': Issue #16761: Raise TypeError when int() called with base argument only. http://hg.python.org/cpython/rev/e4ea38a92c4d New changeset 157ff02bcc16 by Serhiy Storchaka in branch '3.3': Issue #16761: Raise TypeError when int() called with base argument only. http://hg.python.org/cpython/rev/157ff02bcc16 New changeset 1b2134a78c17 by Serhiy Storchaka in branch 'default': Issue #16761: Raise TypeError when int() called with base argument only. http://hg.python.org/cpython/rev/1b2134a78c17 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 09:28:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 08:28:16 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356683296.74.0.0992621001868.issue16761@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > When this patch is updated because of the commit for issue 16790, in 3.x can the edited test cases be moved to the top of the test class per the following comment (as appropriate)? I?will do this in issue16784. In any case I?am going to move a large part of test_basic/test_long to IntLongCommonTests and then those test will be above test_keyword_args. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 10:08:48 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 28 Dec 2012 09:08:48 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356685728.26.0.835934216016.issue16761@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Why did you backport this change after being advised not to do it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 10:29:02 2012 From: report at bugs.python.org (Ned Deily) Date: Fri, 28 Dec 2012 09:29:02 +0000 Subject: [issue1180] Option to ignore or substitute ~/.pydistutils.cfg In-Reply-To: <1190232008.41.0.541816468426.issue1180@psf.upfronthosting.co.za> Message-ID: <1356686942.5.0.750985713344.issue1180@psf.upfronthosting.co.za> Ned Deily added the comment: Andrew, comments to closed issues are usually ignored. I suggest you open a new issue about this. A quick glance suggests that the code for this feature is not in Python 3. It may be that it was lost when, during the 2.7 development cycle, it was decided to not allow new features to Distutils and a number of changes were reverted. There have been some other cases of Distutils changes that were lost in Python 3.2+ because of this. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 10:33:10 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Dec 2012 09:33:10 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356687190.2.0.981483017803.issue16772@psf.upfronthosting.co.za> Mark Dickinson added the comment: I'd suggest leaving 3.2 and 3.3 as they are: the bug is fairly benign, but fixing it could break existing code unnecessarily. That's something that we should try hard not to do in a bugfix release. As to PyNumber_AsSsize_t() used instead PyLong_AsLongAndOverflow(), I *do* think that in general interfaces for built-in functions and methods that accept an integer should be prepared to accept anything that has an __index__. If we can find a way to do that with sane exception types / messages, so much the better. (One common application of __index__-able types occurs when using NumPy, where it's easy to end up with instances of numpy.int32 or numpy.int64 instead of regular Python ints.) I agree with Serhiy that ValueError is the appropriate exception for out-of-range values. [A side-issue here is that the various PyLong_As* utility functions are a mess: some use __int__, some use __index__, etc. I have some thoughts about how to fix this, but that's another issue.] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 11:11:03 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Dec 2012 10:11:03 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356689463.31.0.226007392897.issue16772@psf.upfronthosting.co.za> Mark Dickinson added the comment: > The only difference with previous code is that now OverflowError raised > for large bases instead of ValueError. Serhiy: can you clarify this remark? Where do you see the OverflowError? The current exception and message look fine to me, so maybe I'm misunderstanding what you're talking about: Python 3.4.0a0 (default:1b2134a78c17, Dec 28 2012, 10:06:47) [GCC 4.2.1 (Apple Inc. build 5664)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> int('34', base=2**100) Traceback (most recent call last): File "", line 1, in ValueError: int() base must be >= 2 and <= 36 [66206 refs, 23451 blocks] I actually think this issue can be closed as fixed: the current code looks fine to me, and I don't think the fix should be backported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 11:27:20 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Dec 2012 10:27:20 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356690440.68.0.262741421672.issue16772@psf.upfronthosting.co.za> Mark Dickinson added the comment: > I actually think this issue can be closed as fixed: Ah, whoops; I failed to understand Serhiy's comment about the still existing "if (!PyLong_Check(obase))", which does indeed mean that the code *still* doesn't work for __index__-able types. Here's a fix for that, with tests. ---------- keywords: +patch Added file: http://bugs.python.org/file28465/issue16772.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 11:27:41 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Dec 2012 10:27:41 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356690461.39.0.866846426104.issue16772@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- assignee: serhiy.storchaka -> mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 11:36:27 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Dec 2012 10:36:27 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356690987.16.0.0803455239378.issue16772@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I actually think this issue can be closed as fixed: the current code looks fine to me, and I don't think the fix should be backported. How about backporting the tests? In addition to adding tests for the fix, Greg added more comprehensive tests for the existing behavior (i.e. test_int_base_limits()). Backporting the latter would help prevent regressions from future fixes in earlier versions. Also, if we don't backport shouldn't there be a version changed in the docs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 11:40:36 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Dec 2012 10:40:36 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356691236.87.0.819325890746.issue16772@psf.upfronthosting.co.za> Mark Dickinson added the comment: Sure, I don't see any issue with backporting test_int_base_limits; that has little to do with this issue, though, so shouldn't prevent closing this one. I'll add a Misc/NEWS entry when I commit; not sure it's meaningful to add doc changes, since I the 3.2 and 3.3 acceptance of floats is undocumented anyway. I can and will add a versionchanged entry for the acceptance of __index__-able types, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 12:04:50 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Dec 2012 11:04:50 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356692690.6.0.933497788161.issue16772@psf.upfronthosting.co.za> Mark Dickinson added the comment: Patch including doc update. ---------- Added file: http://bugs.python.org/file28466/issue16772_v2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 14:04:13 2012 From: report at bugs.python.org (Larry Hastings) Date: Fri, 28 Dec 2012 13:04:13 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings Message-ID: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> New submission from Larry Hastings: The line declaring the function dbm.open looks like this: def open(file, flag='r', mode=0o666): The docstring for dbm.open looks like this: open(file, flag='r', mode=438) Obviously 438==0o666. But the author used the octal representation because it's more readable. Unfortunately Python throws that enhanced readability away when it round-trips the rvalue from a string into an integer and back into a string again for the docstring. It might be an improvement if Python preserved the original source code's representation for integer (and perhaps float) default arguments for parameters. I haven't looked at the code that does the parsing / builds the docstring, but I suspect we could hang the original representation on the AST node and retrieve it when building the docstring. The only problem I can forsee: what about code that uses local variables, or computation including perhaps function calls, to calculate default values? On the one hand, the local variable or the function call may be inscrutable--on the other, perhaps the magic integer value it replaced was no better. Or we could have a heuristic, like if the original representation contains internal spaces or parentheses we use str(rvalue), otherwise we use the original representation. ---------- components: Interpreter Core messages: 178383 nosy: larry priority: normal severity: normal status: open title: Preserve original representation for integers / floats in docstrings type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 14:08:04 2012 From: report at bugs.python.org (Larry Hastings) Date: Fri, 28 Dec 2012 13:08:04 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356700084.21.0.330914222207.issue16801@psf.upfronthosting.co.za> Larry Hastings added the comment: (I was also considering proposing using annotations to tell the parser we want the original representation in the docstring, but I suspect that's a bad idea. That would instantly restrict the untamed frontier that is annotations.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 15:53:22 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Dec 2012 14:53:22 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356706402.78.0.475857869126.issue16801@psf.upfronthosting.co.za> Mark Dickinson added the comment: It's an interesting idea. This sounds like the wrong solution to me, though: it's significant extra machinery to produce a solution that only fixes a small handful of cases; IOW, the benefit / cost ratio seems to small to make this worth it. E.g., apart from the function calls that you mention, what about expressions? "-0x8000" isn't a numeric literal, so the 'original representation' information attached to "0x8000" will have been lost. I'm also sceptical that this can be done as simply as you describe: isn't the AST no longer available at the time that the docstring is built? Perhaps what we need instead is a general mechanism to override the generated signature line? ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 16:05:55 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 28 Dec 2012 15:05:55 +0000 Subject: [issue16640] Less code under lock in sched.scheduler In-Reply-To: <1354959239.11.0.372090079452.issue16640@psf.upfronthosting.co.za> Message-ID: <1356707155.62.0.231948626379.issue16640@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What is the point of having heapq.heappush under a lock if heapq.heappop in another method is not protected? The logic doesn't seem to make sense. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 16:53:46 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Fri, 28 Dec 2012 15:53:46 +0000 Subject: [issue16379] SQLite error code not exposed to python In-Reply-To: <1351764878.68.0.13361347428.issue16379@psf.upfronthosting.co.za> Message-ID: <1356710026.47.0.855104021514.issue16379@psf.upfronthosting.co.za> Changes by Daniel Shahaf : ---------- nosy: +danielsh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:12:31 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Fri, 28 Dec 2012 16:12:31 +0000 Subject: [issue16802] fileno argument to socket.socket() undocumented Message-ID: <1356711151.76.0.423836721045.issue16802@psf.upfronthosting.co.za> New submission from Richard Oudkerk: The actual signature is socket.socket(family=AF_INET, type=SOCK_STREAM, proto=0, fileno=None) but the documented signature is socket.socket([family[, type[, proto]]]) Should the fileno argument be documented or is it considered an implementation detail? ---------- messages: 178387 nosy: sbt priority: normal severity: normal status: open title: fileno argument to socket.socket() undocumented versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:29:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 16:29:14 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <1356712154.37.0.734610454138.issue16485@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Of course. Thanks for point. It's my editor made wrong whitespace changes after block indent/unindent. "hg diff" shows this changes and I?shouldn't miss this. I will review every patch before commit one more time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:35:18 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 28 Dec 2012 16:35:18 +0000 Subject: [issue16787] asyncore.dispatcher_with_send - increase the send buffer size In-Reply-To: <1356530416.7.0.450670671215.issue16787@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > A couple of years ago I conducted similar tests and it turned out that 64k was the best compromise: > http://code.google.com/p/pyftpdlib/issues/detail?id=94 > Twisted uses 128k. > I'd be for using 64k and also change asynchat.async_chat.ac_*_buffer_size in accordance. That sounds reasonable. However, the mere fact that such constants are duplicated tends to make me think that async_chat should actually be a subclass of asyncore.asyncore_with_send (or move c_*_buffer_size to asyncore.asyncore). Sane default buffering constants belong more to asyncore than asynchat, no? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:43:22 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 28 Dec 2012 16:43:22 +0000 Subject: [issue16791] itertools.chain.from_iterable doesn't stop In-Reply-To: <1356611402.04.0.240264046705.issue16791@psf.upfronthosting.co.za> Message-ID: <1356713002.28.0.0481152674827.issue16791@psf.upfronthosting.co.za> R. David Murray added the comment: If it is a feature, then is it documented in the language reference and is this actually a bug in PyPy (it sounds like it is)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:45:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 16:45:37 +0000 Subject: [issue16486] Add context manager support to aifc module In-Reply-To: <1353073163.72.0.969679362142.issue16486@psf.upfronthosting.co.za> Message-ID: <1356713137.91.0.528430979636.issue16486@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: fout.close() here is intentional no-op. This is a check that fout was closed properly (in contrary case close() should raise exception). Unfortunately there is no other way to test that fout was closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:49:53 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 28 Dec 2012 16:49:53 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356713393.85.0.322519512584.issue16801@psf.upfronthosting.co.za> R. David Murray added the comment: I don't think you mean 'docstring'. A docstring is something a human writes in the source code. I presume you are actually talking about introspection of the signature here. Beyond that, I agree with Mark's comments. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:52:10 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Dec 2012 16:52:10 +0000 Subject: [issue16791] itertools.chain.from_iterable doesn't stop In-Reply-To: <1356611402.04.0.240264046705.issue16791@psf.upfronthosting.co.za> Message-ID: <1356713530.66.0.674841641815.issue16791@psf.upfronthosting.co.za> Mark Dickinson added the comment: It looks to me as though this has nothing to do with itertools In CPython 2.7: Python 2.7.3 |EPD 7.3-1 (32-bit)| (default, Apr 12 2012, 11:28:34) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "credits", "demo" or "enthought" for more information. >>> b = [1] >>> b += (x for x in b) # runs until Ctrl-C ^CTraceback (most recent call last): File "", line 1, in File "", line 1, in KeyboardInterrupt In PyPy: Python 2.7.2 (341e1e3821fff77db3bb5cdb7a4851626298c44e, Jun 09 2012, 14:24:15) [PyPy 1.9.0] on darwin Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``the world doesn't want us to know'' >>>> b = [1] >>>> b += (x for x in b) # Returns immediately. >>>> b [1, 1] So it seems that PyPy is building the RHS before appending it to b. That looks like a bug in PyPy to me. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 17:54:38 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Dec 2012 16:54:38 +0000 Subject: [issue16791] itertools.chain.from_iterable doesn't stop In-Reply-To: <1356611402.04.0.240264046705.issue16791@psf.upfronthosting.co.za> Message-ID: <1356713678.32.0.987379268794.issue16791@psf.upfronthosting.co.za> Mark Dickinson added the comment: And here's a non-infinite example where CPython and PyPy differ. Python 2.7.3 |EPD 7.3-1 (32-bit)| (default, Apr 12 2012, 11:28:34) [GCC 4.0.1 (Apple Inc. build 5493)] on darwin Type "credits", "demo" or "enthought" for more information. >>> b = [1] >>> b += (x+1 for x in b if x < 5) >>> b [1, 2, 3, 4, 5] >>> iwasawa:cpython mdickinson$ pypy-c -bash: pypy-c: command not found iwasawa:cpython mdickinson$ /opt/local/bin/pypy-c Python 2.7.2 (341e1e3821fff77db3bb5cdb7a4851626298c44e, Jun 09 2012, 14:24:15) [PyPy 1.9.0] on darwin Type "help", "copyright", "credits" or "license" for more information. And now for something completely different: ``'that's definitely a case of "uh????"''' >>>> b = [1] >>>> b += (x+1 for x in b if x < 5) >>>> b [1, 2] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 18:04:56 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Dec 2012 17:04:56 +0000 Subject: [issue16791] itertools.chain.from_iterable doesn't stop In-Reply-To: <1356611402.04.0.240264046705.issue16791@psf.upfronthosting.co.za> Message-ID: <1356714296.36.0.220270846073.issue16791@psf.upfronthosting.co.za> Mark Dickinson added the comment: Opened https://bugs.pypy.org/issue1355 for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 18:05:36 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 28 Dec 2012 17:05:36 +0000 Subject: [issue16787] asyncore.dispatcher_with_send - increase the send buffer size In-Reply-To: <1356529865.78.0.746318746855.issue16787@psf.upfronthosting.co.za> Message-ID: <1356714336.26.0.219851337521.issue16787@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: IMO no. asyncore.dispatcher_with_send should not exist in the first place as it basically is a castrated version of asynchat.async_chat with less capabilities. I'd say it's there only for an historical reason. Moving ac_*_buffer_size to asyncore.dispatcher makes no sense as it offers no buffer capabilities whatsoever in the first place. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 18:09:38 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Dec 2012 17:09:38 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356714578.03.0.183919039295.issue16801@psf.upfronthosting.co.za> Mark Dickinson added the comment: BTW, in case it saves anyone else some time, the current machinery is in Lib/pydoc.py, in the `TextDoc.docroutine` method. It uses inspect.getfullargspec to retrieve the information to format, though I guess using inspect.Signature would be the modern way to do this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 18:10:26 2012 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 28 Dec 2012 17:10:26 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356714626.88.0.388592226018.issue16801@psf.upfronthosting.co.za> Mark Dickinson added the comment: Bah. s/inspect.Signature/inspect.signature/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 18:10:44 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 28 Dec 2012 17:10:44 +0000 Subject: [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356711151.76.0.423836721045.issue16802@psf.upfronthosting.co.za> Message-ID: <1356714644.95.0.870339924633.issue16802@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 18:26:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 17:26:14 +0000 Subject: [issue13454] crash when deleting one pair from tee() In-Reply-To: <1321978245.14.0.0332901316698.issue13454@psf.upfronthosting.co.za> Message-ID: <1356715574.55.0.195724340882.issue13454@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Good point. Here is updated patch. ---------- Added file: http://bugs.python.org/file28467/itertools_tee_nonrecursive_clear_2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 18:28:53 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 28 Dec 2012 17:28:53 +0000 Subject: [issue16787] asyncore.dispatcher_with_send - increase the send buffer size In-Reply-To: <1356529865.78.0.746318746855.issue16787@psf.upfronthosting.co.za> Message-ID: <1356715733.36.0.749982594979.issue16787@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I agree that 64K seems better here (on Linux). There is another problem with dispatcher_with_send: the buffering algorithm (both when appending and popping) is quadratic. You can easily observe it with your test script, when growing the DATA. async_chat looks much saner in that respect, I wonder why the same algorithm couldn't it be re-used. (regardless, reading the asyncore code really hurts the eyes :-/) ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 18:39:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 17:39:28 +0000 Subject: [issue16793] Get rid of deprecated assertEquals etc in tests In-Reply-To: <1356628356.95.0.286090339077.issue16793@psf.upfronthosting.co.za> Message-ID: <1356716368.09.0.490379115453.issue16793@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry. I were understand that patches were approved by several core devs. This issue was created for fixing regression from issue16045, but then I saw yet some forgotten deprecated asserts. If you want, I will revert this additional changes in 2.7 and 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 18:45:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 17:45:45 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356716745.46.0.933227499432.issue16761@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, I have not noticed your advice before I did commit (it took me a lot of time). Should I now revert my changes to 2.7, 3.2 and 3.3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 18:49:01 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 28 Dec 2012 17:49:01 +0000 Subject: [issue16787] asyncore.dispatcher_with_send - increase the send buffer size In-Reply-To: <1356715733.36.0.749982594979.issue16787@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: Alright, here's a simple patch bumping the buffers to 64K for asyncore and asynchat. > There is another problem with dispatcher_with_send: the buffering algorithm (both when appending and popping) is quadratic. You can easily observe it with your test script, when growing the DATA. async_chat looks much saner in that respect, I wonder why the same algorithm couldn't it be re-used. Yeah, I noticed that. But even in asynchat, there's a lot of copying going on, length computations performed twice in a row, etc. > (regardless, reading the asyncore code really hurts the eyes :-/) Indeed. ---------- Added file: http://bugs.python.org/file28468/asyncore_buffsize.diff _______________________________________ Python tracker _______________________________________ -------------- next part -------------- diff --git a/Lib/asynchat.py b/Lib/asynchat.py --- a/Lib/asynchat.py +++ b/Lib/asynchat.py @@ -56,8 +56,8 @@ # these are overridable defaults - ac_in_buffer_size = 4096 - ac_out_buffer_size = 4096 + ac_in_buffer_size = 65536 + ac_out_buffer_size = 65536 # we don't want to enable the use of encoding by default, because that is a # sign of an application bug that we don't want to pass silently diff --git a/Lib/asyncore.py b/Lib/asyncore.py --- a/Lib/asyncore.py +++ b/Lib/asyncore.py @@ -532,7 +532,7 @@ def initiate_send(self): num_sent = 0 - num_sent = dispatcher.send(self, self.out_buffer[:512]) + num_sent = dispatcher.send(self, self.out_buffer[:65536]) self.out_buffer = self.out_buffer[num_sent:] def handle_write(self): From report at bugs.python.org Fri Dec 28 18:55:32 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 28 Dec 2012 17:55:32 +0000 Subject: [issue16763] test_ssl with connect_ex don't handle unreachable server correctly In-Reply-To: <1356349308.1.0.276929202525.issue16763@psf.upfronthosting.co.za> Message-ID: <1356717332.75.0.961741176545.issue16763@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > support.transient doesn't help here since no exception is raised An exception can still be raised in do_handshake(), which is called when the connection succeeds. But, yes, it's otherwise useless. > Note that I'm not sure that connect_ex returning None is normal in the > first place It is not. The 2.7 implementation currently calls socket.connect() and catches socket errors, while the 3.2 implementation directly calls socket.connect_ex(). This means the 2.7 implementation will unwillingly catch name resolution errors, and other issues: >>> socket.socket().connect_ex(("svnn.python.org", 443)) Traceback (most recent call last): File "", line 1, in File "/home/antoine/cpython/27/Lib/socket.py", line 224, in meth return getattr(self._sock,name)(*args) socket.gaierror: [Errno -5] No address associated with hostname >>> ssl.wrap_socket(socket.socket()).connect_ex(("svnn.python.org", 443)) -5 I will backport the 3.2 implementation of connect_ex() in order to fix this inconsistency. Unfortunately there is no easy way to test for it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 19:00:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 18:00:44 +0000 Subject: [issue16640] Less code under lock in sched.scheduler In-Reply-To: <1354959239.11.0.372090079452.issue16640@psf.upfronthosting.co.za> Message-ID: <1356717644.21.0.160593128941.issue16640@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This heapq.heappop does applied to a copy of self._queue. Copying done under a lock. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 19:02:03 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 18:02:03 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356689463.31.0.226007392897.issue16772@psf.upfronthosting.co.za> Message-ID: <201212282001.48276.storchaka@gmail.com> Serhiy Storchaka added the comment: > Serhiy: can you clarify this remark? Where do you see the OverflowError? > The current exception and message look fine to me, so maybe I'm > misunderstanding what you're talking about: Sorry, I have been confused (and confuse you) by the variety of PyLong_As* and PyNumber_* functions. Now I see PyNumber_AsSsize_t(x, NULL) doesn't raise OverflowError but truncates its argument. The patch LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 19:05:30 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 28 Dec 2012 18:05:30 +0000 Subject: [issue16787] asyncore.dispatcher_with_send - increase the send buffer size In-Reply-To: <1356529865.78.0.746318746855.issue16787@psf.upfronthosting.co.za> Message-ID: <1356717930.56.0.548554978833.issue16787@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > But even in asynchat, there's a lot of copying going on, length > computations performed twice in a row, etc. What/where do you mean exactly? I see little value in focusing efforts towards things such as initiate_with_send which are not supposed to be used but asynchat.async_chat is different. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 19:05:44 2012 From: report at bugs.python.org (Roundup Robot) Date: Fri, 28 Dec 2012 18:05:44 +0000 Subject: [issue12065] test_ssl failure when svn.python.org fails to resolve In-Reply-To: <1305228793.43.0.352880054112.issue12065@psf.upfronthosting.co.za> Message-ID: <3YXwng2hFCzRwD@mail.python.org> Roundup Robot added the comment: New changeset 3436769a7964 by Antoine Pitrou in branch '2.7': Backport Python 3.2 fix for issue #12065, and add another test for SSLSocket.connect_ex(). http://hg.python.org/cpython/rev/3436769a7964 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 19:07:49 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 28 Dec 2012 18:07:49 +0000 Subject: [issue16803] Make time_importlib run tests under both _frozen_importlib and importlib._bootstrap Message-ID: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> New submission from Brett Cannon: Need to do some work on the importlib tests such that they get run using both _frozen_importlib and importlib._bootstrap to prevent any drift between importlib/_bootstrap.py and import.c (and to make it easier to develop). ---------- components: Tests messages: 178409 nosy: brett.cannon priority: normal severity: normal stage: needs patch status: open title: Make time_importlib run tests under both _frozen_importlib and importlib._bootstrap type: behavior versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 19:14:19 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Fri, 28 Dec 2012 18:14:19 +0000 Subject: [issue16799] switch regrtest from getopt options to argparse Namespace In-Reply-To: <1356664271.75.0.0861175623583.issue16799@psf.upfronthosting.co.za> Message-ID: <1356718459.84.0.569194813538.issue16799@psf.upfronthosting.co.za> Changes by Tshepang Lekhonkhobe : ---------- nosy: +tshepang _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 19:14:59 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 28 Dec 2012 18:14:59 +0000 Subject: [issue16640] Less code under lock in sched.scheduler In-Reply-To: <1354959239.11.0.372090079452.issue16640@psf.upfronthosting.co.za> Message-ID: <1356718499.11.0.233812004749.issue16640@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ah, ok. By the way, the queue property says it returns "An ordered list", but it seems to actually return an iterator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 19:22:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 18:22:57 +0000 Subject: [issue16640] Less code under lock in sched.scheduler In-Reply-To: <1354959239.11.0.372090079452.issue16640@psf.upfronthosting.co.za> Message-ID: <1356718977.21.0.212158630605.issue16640@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Perhaps it was inherited from Python 2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 19:42:15 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 28 Dec 2012 18:42:15 +0000 Subject: [issue15302] Use argparse instead of getopt in test.regrtest In-Reply-To: <1341811583.87.0.73741220409.issue15302@psf.upfronthosting.co.za> Message-ID: <1356720135.2.0.229203774305.issue15302@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Good step! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 19:42:24 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Fri, 28 Dec 2012 18:42:24 +0000 Subject: [issue16799] switch regrtest from getopt options to argparse Namespace In-Reply-To: <1356664271.75.0.0861175623583.issue16799@psf.upfronthosting.co.za> Message-ID: <1356720144.83.0.836621927143.issue16799@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 19:45:28 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 28 Dec 2012 18:45:28 +0000 Subject: [issue16787] asyncore.dispatcher_with_send - increase the send buffer size In-Reply-To: <1356717930.56.0.548554978833.issue16787@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > What/where do you mean exactly? """ 187 def push (self, data): 188 sabs = self.ac_out_buffer_size 189 if len(data) > sabs: 190 for i in range(0, len(data), sabs): 191 self.producer_fifo.append(data[i:i+sabs]) """ len(data) is called twice """ 228 # handle classic producer behavior 229 obs = self.ac_out_buffer_size 230 try: 231 data = first[:obs] 232 except TypeError: 233 data = first.more() """ Here, I think that len(first) <= self.ac_out_buffer_size, by definition. So the slicing is actually just a copy (I realize that it has the side effect of checking whether it's a buffer or a producer). memoryview is also great to avoid copies when sending/receiving to a socket. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 19:58:19 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 28 Dec 2012 18:58:19 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356721099.04.0.457789826627.issue16761@psf.upfronthosting.co.za> Antoine Pitrou added the comment: If PyPy gets away with a different behaviour, there's probably nobody relying on it, so I'd say the backports are safe. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:27:04 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 28 Dec 2012 19:27:04 +0000 Subject: [issue16787] asyncore.dispatcher_with_send - increase the send buffer size In-Reply-To: <1356529865.78.0.746318746855.issue16787@psf.upfronthosting.co.za> Message-ID: <1356722824.27.0.586322176027.issue16787@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > memoryview is also great to avoid copies when sending/receiving to a socket. That's interesting. How exactly? Would producer_fifo have to change from a deque() to a memoryview() object? In that case we might have to take backward compatibility into account (producer_fifo already changed in 2.6 and if I'm not mistaken that might have caused some problems). Maybe it makes sense to file a separate issue to address asynchat enhancements. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:44:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 19:44:33 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <1356723873.71.0.237598999755.issue16165@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:46:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 19:46:09 +0000 Subject: [issue16645] Wrong test_extract_hardlink() in test_tarfile.py In-Reply-To: <1354989728.58.0.0717635689948.issue16645@psf.upfronthosting.co.za> Message-ID: <1356723969.88.0.969918041973.issue16645@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, Chris. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:47:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 19:47:44 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <1356724064.91.0.273647890424.issue16165@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Sorry, Chris. I have opened too many browser tabs. ;) ---------- nosy: -chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:49:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Fri, 28 Dec 2012 19:49:46 +0000 Subject: [issue16642] Mention new "kwargs" named tuple parameter in sched module In-Reply-To: <1354963970.59.0.876106484214.issue16642@psf.upfronthosting.co.za> Message-ID: <1356724186.1.0.876178700594.issue16642@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What anyone can say about this doc changes? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:52:04 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 28 Dec 2012 19:52:04 +0000 Subject: [issue16795] Patch: some changes to AST to make it more useful for static language analysis In-Reply-To: <1356644683.65.0.359499511153.issue16795@psf.upfronthosting.co.za> Message-ID: <1356724324.44.0.359512650542.issue16795@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: +brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 20:52:21 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 28 Dec 2012 19:52:21 +0000 Subject: [issue16642] Mention new "kwargs" named tuple parameter in sched module In-Reply-To: <1354963970.59.0.876106484214.issue16642@psf.upfronthosting.co.za> Message-ID: <1356724341.27.0.93465238181.issue16642@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM. ---------- nosy: +ezio.melotti, rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:00:08 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 28 Dec 2012 20:00:08 +0000 Subject: [issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations In-Reply-To: <1356138147.12.0.530314626781.issue16748@psf.upfronthosting.co.za> Message-ID: <1356724808.06.0.10849453002.issue16748@psf.upfronthosting.co.za> Brett Cannon added the comment: Making tests discoverable allows for the future possibility of dropping our custom test runner code and using more of unittest code by having regrtest use unittest's discovery code to find all tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:02:04 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 28 Dec 2012 20:02:04 +0000 Subject: [issue7325] tempfile.mkdtemp() does not return absolute pathname when relative dir is specified In-Reply-To: <1258226856.45.0.72736645389.issue7325@psf.upfronthosting.co.za> Message-ID: <1356724924.64.0.113761759293.issue7325@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- nosy: -brett.cannon _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:04:25 2012 From: report at bugs.python.org (Brett Cannon) Date: Fri, 28 Dec 2012 20:04:25 +0000 Subject: [issue10848] Move test.regrtest from getopt to argparse In-Reply-To: <1294353259.48.0.852026284896.issue10848@psf.upfronthosting.co.za> Message-ID: <1356725065.87.0.343576568818.issue10848@psf.upfronthosting.co.za> Brett Cannon added the comment: Since http://bugs.python.org/issue10967 is the meta issue for updating regrtest this can be closed. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:11:22 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Fri, 28 Dec 2012 20:11:22 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1356725482.65.0.379158192097.issue10527@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: New patch in attachment. It always uses poll() and maintains and internal fd/Connection map. I get one failure due to the returned list being sorted differently than when using select() though. ====================================================================== FAIL: test_wait_integer (__main__.TestWait) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_multiprocessing.py", line 3277, in test_wait_integer self.assertEqual(res, [p.sentinel, b]) AssertionError: Lists differ: [ 7 - [, 7] ? --- + [7, ] ? +++ I don't how important this is. If it's not tests can be adapted accordingly. ---------- Added file: http://bugs.python.org/file28469/issue10527-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:12:05 2012 From: report at bugs.python.org (vertograd phrokhladny) Date: Fri, 28 Dec 2012 20:12:05 +0000 Subject: [issue16794] Can't get a list of modules in Python's help system In-Reply-To: <1356635227.67.0.572870359389.issue16794@psf.upfronthosting.co.za> Message-ID: vertograd phrokhladny added the comment: Re: 2012/12/27 R. David Murray > > R. David Murray added the comment: > > This is a duplicate of issue 10060, and as indicated there there really > isn't much Python can do about this. You should report the bug to Ubuntu, > but I'm pretty sure there is already a bug in their system for it (which I > believe has been fixed). > > Thanks for your comment. I've looked through that very continuous thread (issue 10060) and than went to Ubuntu.You're right , there's bug #896836 (and several duplicates) reported on 2011-11-27 (for Oneiric) with confirmed status. As I understood from recommended reading the segmentation fault occurs because of the conflict between loading dynamic and static bindings in C based modules.Unfortunately there's no fix for it yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:22:43 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 28 Dec 2012 20:22:43 +0000 Subject: [issue16804] python3 -S -m site fails Message-ID: <1356726163.27.0.125833225728.issue16804@psf.upfronthosting.co.za> New submission from Antoine Pitrou: $ python3.4 -S -m site sys.path = [ '', '/home/antoine/opt/lib/python34.zip', '/home/antoine/opt/lib/python3.4/', '/home/antoine/opt/lib/python3.4/plat-linux', '/home/antoine/opt/lib/python3.4/lib-dynload', ] Traceback (most recent call last): File "/home/antoine/opt/lib/python3.4/runpy.py", line 160, in _run_module_as_main "__main__", fname, loader, pkg_name) File "/home/antoine/opt/lib/python3.4/runpy.py", line 73, in _run_code exec(code, run_globals) File "/home/antoine/opt/lib/python3.4/site.py", line 640, in _script() File "/home/antoine/opt/lib/python3.4/site.py", line 612, in _script "exists" if os.path.isdir(USER_BASE) else "doesn't exist")) File "/home/antoine/opt/lib/python3.4/genericpath.py", line 42, in isdir st = os.stat(s) TypeError: stat: can't specify None for path argument ---------- components: Library (Lib) messages: 178424 nosy: ncoghlan, pitrou priority: normal severity: normal status: open title: python3 -S -m site fails type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 21:57:24 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2012 20:57:24 +0000 Subject: [issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations In-Reply-To: <1356138147.12.0.530314626781.issue16748@psf.upfronthosting.co.za> Message-ID: <1356728244.58.0.63456894204.issue16748@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I should think that the first fix should be to the PEP. If I understand msg177908, that would mean removing unittest.TestCase as a base for ExampleTest and adding it as bases for AcceleratedExampleTest and PyExampleTest. Or have I missed something? ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:09:17 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Fri, 28 Dec 2012 21:09:17 +0000 Subject: [issue16379] SQLite error code not exposed to python In-Reply-To: <1351764878.68.0.13361347428.issue16379@psf.upfronthosting.co.za> Message-ID: <1356728957.93.0.277424240888.issue16379@psf.upfronthosting.co.za> Daniel Shahaf added the comment: Attached patch that: - Adds sqlite3.SQLITE_OK constants - Adds sqlite3.errorcode dictionary - Adds "sqlite_errcode" attribute to sqlite.Error instances The patch does not add support for extended result codes (http://www.sqlite.org/c3ref/c_abort_rollback.html). ---------- keywords: +patch Added file: http://bugs.python.org/file28470/i16379-v1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:11:50 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 28 Dec 2012 21:11:50 +0000 Subject: [issue16761] Fix int(base=X) In-Reply-To: <1356344179.57.0.256003858099.issue16761@psf.upfronthosting.co.za> Message-ID: <1356729110.36.0.369318965749.issue16761@psf.upfronthosting.co.za> Raymond Hettinger added the comment: > Should I now revert my changes to 2.7, 3.2 and 3.3? Once committed, I would say leave it in as long as you're confident that no currently working code will break as a result. In general, be very conservative about backporting any behavioral change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:12:49 2012 From: report at bugs.python.org (R. David Murray) Date: Fri, 28 Dec 2012 21:12:49 +0000 Subject: [issue16748] Ensure test discovery doesn't break for modules testing C and Python implementations In-Reply-To: <1356138147.12.0.530314626781.issue16748@psf.upfronthosting.co.za> Message-ID: <1356729169.76.0.994281900399.issue16748@psf.upfronthosting.co.za> R. David Murray added the comment: That sounds right to me. Note that PEP 399 is following older conventions that were laid down in a time when unittest did not *have* test discovery, so this is a new paradigm we'd like to move to (for the reasons Brett mentioned), and it may take a while to get there. It applies to more than just the python/C accelerator distinction; it applies any time a base class plus specialized classes are used to construct test cases. (I do this a bunch in the email tests, for example, and that has no accelerator.) ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:13:11 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Fri, 28 Dec 2012 21:13:11 +0000 Subject: [issue16379] SQLite error code not exposed to python In-Reply-To: <1351764878.68.0.13361347428.issue16379@psf.upfronthosting.co.za> Message-ID: <1356729191.51.0.371841905149.issue16379@psf.upfronthosting.co.za> Daniel Shahaf added the comment: I didn't compile-test the Doc/ part of the patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:20:29 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 28 Dec 2012 21:20:29 +0000 Subject: [issue16793] Get rid of deprecated assertEquals etc in tests In-Reply-To: <1356628356.95.0.286090339077.issue16793@psf.upfronthosting.co.za> Message-ID: <1356729629.12.0.177719617781.issue16793@psf.upfronthosting.co.za> Georg Brandl added the comment: Like Raymond said in the other issue: it's not going to be a problem once committed, but please be mindful of what you commit to bugfix branches in the future. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:25:35 2012 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 28 Dec 2012 21:25:35 +0000 Subject: [issue16793] Get rid of deprecated assertEquals etc in tests In-Reply-To: <1356628356.95.0.286090339077.issue16793@psf.upfronthosting.co.za> Message-ID: <1356729935.93.0.890016101191.issue16793@psf.upfronthosting.co.za> Ezio Melotti added the comment: > And please don't commit cosmetic/"cleanup" changes to bugfix branches in the future. Note that those methods are deprecated and thus raise deprecation warnings when the tests are run. It's not just a simple cosmetic/cleanup change IMHO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:25:55 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 28 Dec 2012 21:25:55 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1356729955.63.0.103457964326.issue10527@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The order of the results is probably unimportant. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:35:52 2012 From: report at bugs.python.org (Jason Huntley) Date: Fri, 28 Dec 2012 21:35:52 +0000 Subject: [issue3871] cross and native build of python for mingw* hosts In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1356730552.8.0.372246920746.issue3871@psf.upfronthosting.co.za> Jason Huntley added the comment: Finally! I was able to get all building on mingw64, gcc 4.7.2, and python 3.3. I had to take everybody's work here a little further, and I have produced a new patch which will build python33 using the latest minw64 compiler in an msys environment. I cloned the 3.3 branch and applied the latest patch available here, py3k-20121004-MINGW.patch. I had to make quite a few more updates to get all the modules compiling with 4.7.2 and python find all the modules in the correct paths in an msys/mingw64 environment. I've compiled another patch, which addresses all the latest issues. For all interested, run my setup script from the following location: https://github.com/onepremise/MinGW-AD64S/ Just open dos in admin mode and run setup.bat. This will build all the required dependencies and finally python 3.3. ---------- Added file: http://bugs.python.org/file28471/py3k-20121227-MINGW.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:45:28 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Fri, 28 Dec 2012 21:45:28 +0000 Subject: [issue16787] asyncore.dispatcher_with_send - increase the send buffer size In-Reply-To: <1356722824.27.0.586322176027.issue16787@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: >> memoryview is also great to avoid copies when sending/receiving to a socket. > > That's interesting. How exactly? Would producer_fifo have to change from a deque() to a memoryview() object? In that case we might have to take backward compatibility into account (producer_fifo already changed in 2.6 and if I'm not mistaken that might have caused some problems). > Maybe it makes sense to file a separate issue to address asynchat enhancements. Probably. For an example of how it might be used, you can have a look here: http://stackoverflow.com/questions/6736771/buffers-and-memoryview-objects-explained-for-the-non-c-programmer and here: http://eli.thegreenplace.net/2011/11/28/less-copies-in-python-with-the-buffer-protocol-and-memoryviews/ Also, IIRC, Antoine used memoryviews when rewriting parts of multiprocessing in pure Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:48:20 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Dec 2012 21:48:20 +0000 Subject: [issue16784] Int tests enhancement and refactoring In-Reply-To: <1356518001.26.0.44673058371.issue16784@psf.upfronthosting.co.za> Message-ID: <1356731300.48.0.246393242444.issue16784@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Another task: backport the tests for current behavior added under issue 16772 (e.g. test_int_base_limits() tests). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:49:16 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 28 Dec 2012 21:49:16 +0000 Subject: [issue16787] asyncore.dispatcher_with_send - increase the send buffer size In-Reply-To: <1356529865.78.0.746318746855.issue16787@psf.upfronthosting.co.za> Message-ID: <1356731356.3.0.0578210685119.issue16787@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Would producer_fifo have to change from a deque() to a memoryview() > object? A memoryview is not a container, it's a view over an existing container. > In that case we might have to take backward compatibility into account > (producer_fifo already changed in 2.6 and if I'm not mistaken that > might have caused some problems). Does asyncore expose its implementation details? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 22:57:06 2012 From: report at bugs.python.org (Georg Brandl) Date: Fri, 28 Dec 2012 21:57:06 +0000 Subject: [issue16793] Get rid of deprecated assertEquals etc in tests In-Reply-To: <1356628356.95.0.286090339077.issue16793@psf.upfronthosting.co.za> Message-ID: <1356731826.3.0.644805973553.issue16793@psf.upfronthosting.co.za> Georg Brandl added the comment: That makes it more of a fix, true. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 23:07:58 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Fri, 28 Dec 2012 22:07:58 +0000 Subject: [issue16749] Fatal Python error: PyEval_RestoreThread: NULL tstate In-Reply-To: Message-ID: <1356732478.3.0.715486411018.issue16749@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Antoine: do you know anything about this message? Fatal Python error: PyEval_RestoreThread: NULL tstate Is there a serious possibility that it could indicate a CPython error, as opposed to an extension author error? Could running Windows on Mac hardware make a difference? Leonardo: You should have quoted the full error message instead of making each person search the image. Also, Please don't quote entire messages in your replies (which means deleting them if replying with a mail program). They are already visible above your reply and constitute noise that makes scrolling in the web interface more tedious. We will likely close this, at least for now, because there is currently no basis for action on our part. 1. From years of experience with such reports, we can be fairly certain that the problem is with the third party extension code. It is known that such code can crash CPython if it misuses the C API. We cannot prevent that without adding unacceptible overhead. 2. If there is a bug in CPython, then to do anything, we would need either Python code or proper C code that causes the crash. The latter would likely require cooperation of the Solidoodle extension authors. For us to do anything, we need evidence in the form of (minimal) code we can run that there is a CPython bug. Retrying under OS X is a good idea. You could try testing the windows python installation with the test suite (python -m test.regrtest in a command window) but there are two problems when doing this with a user installation, as opposed to the test buildbots: there will be (expected) error boxes that you have to dismiss by hitting ; and there will be a few reported errors that are not really errors in python itself. ---------- nosy: +pitrou, terry.reedy title: Fatal Python Error -> Fatal Python error: PyEval_RestoreThread: NULL tstate versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Dec 28 23:16:16 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 28 Dec 2012 22:16:16 +0000 Subject: [issue16749] Fatal Python error: PyEval_RestoreThread: NULL tstate In-Reply-To: Message-ID: <1356732976.55.0.236514017111.issue16749@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, the error message comes from a misuse of the PyEval_RestoreThread() (by passing it a NULL argument), either directly or by using another API such as Py_END_ALLOW_THREADS which calls that function. The problem is likely to be in the Solidoodle extension. Whatever the source of the problem, though, only a low-level C traceback would allow to tell. I agree with closing, stock Python is very unlikely to produce such tracebacks. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 00:02:49 2012 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 28 Dec 2012 23:02:49 +0000 Subject: [issue16778] Logger.findCaller needs to be smarter In-Reply-To: <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za> Message-ID: <1356735769.25.0.784605342852.issue16778@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- hgrepos: +166 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 00:03:16 2012 From: report at bugs.python.org (Vinay Sajip) Date: Fri, 28 Dec 2012 23:03:16 +0000 Subject: [issue16778] Logger.findCaller needs to be smarter In-Reply-To: <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za> Message-ID: <1356735796.28.0.121996329259.issue16778@psf.upfronthosting.co.za> Changes by Vinay Sajip : ---------- keywords: +patch Added file: http://bugs.python.org/file28472/8756372f0f5f.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 00:49:19 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 28 Dec 2012 23:49:19 +0000 Subject: [issue16784] Int tests enhancement and refactoring In-Reply-To: <1356518001.26.0.44673058371.issue16784@psf.upfronthosting.co.za> Message-ID: <1356738559.36.0.937304735064.issue16784@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Improvement of int/long tests should also be reflected in the Tests section of Misc/NEWS. An entry wasn't added in issue 16045. For linking purposes, this issue number would probably be the best to use for such an entry. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:00:20 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2012 00:00:20 +0000 Subject: [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356739220.85.0.384771041255.issue16781@psf.upfronthosting.co.za> Terry J. Reedy added the comment: This is at most a further doc clarification issue as the code is working as documented. In a previous issue, I added the following sentence to all current versions to try to clarify this type of behavior: " If exec gets two separate objects as globals and locals, the code will be executed as if it were embedded in a class definition." (This follows " Remember that at module level, globals and locals are the same dictionary") Let's try it: class Dummy: from ctypes import wintypes print(wintypes.LONG) class LOGFONT(object): field = wintypes.LONG >>> Traceback (most recent call last): ... File "F:\Python\mypy\tem.py", line 6, in LOGFONT field = wintypes.LONG NameError: name 'wintypes' is not defined Bingo! Anatoly's result is just as documented. The doc later says "modifications to the default locals dictionary should not be attempted." Anatoly's result is an example of why not. Lets distill the situation: 1. The globals dict and locals mapping passed to exec are either the same object or different objects. This relation determines the execution behavior. 2. If they are the same object, the code is executed as if at module scope. They are the same if exec is called with both defaults at module scope, where globals() is locals(), or if they are explicitly made the same ("globals = locals()", "locals = globals()", or "globals=dic, locals=dic"). 3. If they are different objects, the code is executed as if embedded in a (dummy) class definition. They are different if exec is called with both defaults within a class or function scope*, where globals() is not locals(), or if explicit settings leave them different ("globals = dic" where dic is not locals(), "locals=map", where map is not globals, or "globals=dic, locals=map", where dic is not map). I believe this nails the situation#. * In 2.x, comprehensions do not create a function scope, but in 3.x, they do. Lambda expressions always do. This is why I did not write 'within a class or function definition', as some might not see that as including comprehensions. # The new last sentence of the second paragraph, quoted above, contradicts the older first sentence: "In all cases, if the optional parts are omitted, the code is executed in the current scope." Before 2.2, when the 'current scope' of a function was limited to global and local namespaces, that sentence was true. Indeed, it summarized points 1,2,3 above. I believe that it is not true now, and should be revised, as nonlocal namespaces cannot be seen by exec'ed code. I believe I checked that before adding the new sentence, but I would recheck before revising. I am thinking about how to perhaps rewrite the paragraph. ---------- assignee: -> docs at python components: +Documentation -Interpreter Core nosy: +docs at python, terry.reedy stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:03:55 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 00:03:55 +0000 Subject: [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive Message-ID: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> New submission from Tshepang Lekhonkhobe: I am running Debian 7, which has sphinx is1.1.3+dfsg-4. When I run $ python tools/sphinx-build.py -bhtml . build/ I get a whole bunch of errors: Making output directory... Running Sphinx v1.1.3 loading pickled environment... not yet created building [html]: targets for 435 source files that are out of date updating environment: 435 added, 0 changed, 0 removed reading sources... [100%] whatsnew/index /home/wena/src/python/cpython/Doc/c-api/arg.rst:47: ERROR: Error in "note" directive: invalid option block. .. note:: For all ``#`` variants of formats (``s#``, ``y#``, etc.), the type of the length argument (int or :c:type:`Py_ssize_t`) is controlled by defining the macro :c:macro:`PY_SSIZE_T_CLEAN` before including :file:`Python.h`. If the macro was defined, length is a :c:type:`Py_ssize_t` rather than an :c:type:`int`. This behavior will change in a future Python version to only support :c:type:`Py_ssize_t` and drop :c:type:`int` support. It is best to always define :c:macro:`PY_SSIZE_T_CLEAN`. /home/wena/src/python/cpython/Doc/c-api/init.rst:547: ERROR: Error in "note" directive: invalid option block. .. note:: When only the main thread exists, no GIL operations are needed. This is a common situation (most Python programs do not use threads), and the lock operations slow the interpreter down a bit. Therefore, the lock is not created initially. This situation is equivalent to having acquired the lock: when there is only a single thread, all object accesses are safe. Therefore, when this function initializes the global interpreter lock, it also acquires it. Before the Python :mod:`_thread` module creates a new thread, knowing that either it has the lock or the lock hasn't been created yet, it calls :c:func:`PyEval_InitThreads`. When this call returns, it is guaranteed that the lock has been created and that the calling thread has acquired it. It is **not** safe to call this function when it is unknown which thread (if any) currently has the global interpreter lock. This function is not available when thread support is disabled at compile time. /home/wena/src/python/cpython/Doc/faq/library.rst:513: ERROR: Error in "note" directive: invalid option block. .. note:: To read and write binary data, it is mandatory to open the file in binary mode (here, passing ``"rb"`` to :func:`open`). If you use ``"r"`` instead (the default), the file will be open in text mode and ``f.read()`` will return :class:`str` objects rather than :class:`bytes` objects. /home/wena/src/python/cpython/Doc/library/fractions.rst:93: ERROR: Error in "note" directive: invalid option block. .. note:: From Python 3.2 onwards, you can also construct a :class:`Fraction` instance directly from a :class:`float`. /home/wena/src/python/cpython/Doc/library/fractions.rst:102: ERROR: Error in "note" directive: invalid option block. .. note:: From Python 3.2 onwards, you can also construct a :class:`Fraction` instance directly from a :class:`decimal.Decimal` instance. /home/wena/src/python/cpython/Doc/library/getopt.rst:12: ERROR: Error in "note" directive: invalid option block. .. note:: The :mod:`getopt` module is a parser for command line options whose API is designed to be familiar to users of the C :c:func:`getopt` function. Users who are unfamiliar with the C :c:func:`getopt` function or who would like to write less code and get better help and error messages should consider using the :mod:`argparse` module instead. /home/wena/src/python/cpython/Doc/library/io.rst:678: ERROR: Error in "warning" directive: invalid option block. .. warning:: :class:`BufferedRWPair` does not attempt to synchronize accesses to its underlying raw streams. You should not pass it the same object as reader and writer; use :class:`BufferedRandom` instead. /home/wena/src/python/cpython/Doc/library/logging.config.rst:144: ERROR: Error in "note" directive: invalid option block. .. note:: Because portions of the configuration are passed through :func:`eval`, use of this function may open its users to a security risk. While the function only binds to a socket on ``localhost``, and so does not accept connections from remote machines, there are scenarios where untrusted code could be run under the account of the process which calls :func:`listen`. Specifically, if the process calling :func:`listen` runs on a multi-user machine where users cannot trust each other, then a malicious user could arrange to run essentially arbitrary code in a victim user's process, simply by connecting to the victim's :func:`listen` socket and sending a configuration which runs whatever code the attacker wants to have executed in the victim's process. This is especially easy to do if the default port is used, but not hard even if a different port is used). To avoid the risk of this happening, use the ``verify`` argument to :func:`listen` to prevent unrecognised configurations from being applied. /home/wena/src/python/cpython/Doc/library/logging.config.rst:747: ERROR: Error in "note" directive: invalid option block. .. note:: Due to the use of :func:`eval` as described above, there are potential security risks which result from using the :func:`listen` to send and receive configurations via sockets. The risks are limited to where multiple users with no mutual trust run code on the same machine; see the :func:`listen` documentation for more information. /home/wena/src/python/cpython/Doc/library/os.rst:263: ERROR: Error in "note" directive: invalid option block. .. note:: On Mac OS X, :func:`getgroups` behavior differs somewhat from other Unix platforms. If the Python interpreter was built with a deployment target of :const:`10.5` or earlier, :func:`getgroups` returns the list of effective group ids associated with the current user process; this list is limited to a system-defined number of entries, typically 16, and may be modified by calls to :func:`setgroups` if suitably privileged. If built with a deployment target greater than :const:`10.5`, :func:`getgroups` returns the current group access list for the user associated with the effective user id of the process; the group access list may change over the lifetime of the process, it is not affected by calls to :func:`setgroups`, and its length is not limited to 16. The deployment target value, :const:`MACOSX_DEPLOYMENT_TARGET`, can be obtained with :func:`sysconfig.get_config_var`. /home/wena/src/python/cpython/Doc/library/pkgutil.rst:148: ERROR: Error in "note" directive: invalid option block. .. note:: Only works for a :term:`finder` which defines an ``iter_modules()`` method. This interface is non-standard, so the module also provides implementations for :class:`importlib.machinery.FileFinder` and :class:`zipimport.zipimporter`. /home/wena/src/python/cpython/Doc/library/pkgutil.rst:186: ERROR: Error in "note" directive: invalid option block. .. note:: Only works for a :term:`finder` which defines an ``iter_modules()`` method. This interface is non-standard, so the module also provides implementations for :class:`importlib.machinery.FileFinder` and :class:`zipimport.zipimporter`. /home/wena/src/python/cpython/Doc/library/socket.rst:728: ERROR: Error in "note" directive: invalid option block. .. note:: :meth:`close()` releases the resource associated with a connection but does not necessarily close the connection immediately. If you want to close the connection in a timely fashion, call :meth:`shutdown()` before :meth:`close()`. /home/wena/src/python/cpython/Doc/library/ssl.rst:609: ERROR: Error in "note" directive: invalid option block. .. note:: To validate a certificate for a particular service, you can use the :func:`match_hostname` function. /home/wena/src/python/cpython/Doc/library/sys.rst:245: ERROR: Error in "note" directive: invalid option block. .. note:: If a :ref:`virtual environment ` is in effect, this value will be changed in ``site.py`` to point to the virtual environment. The value for the Python installation will still be available, via :data:`base_exec_prefix`. /home/wena/src/python/cpython/Doc/library/test.rst:201: ERROR: Error in "note" directive: invalid option block. .. note:: :mod:`test.support` is not a public module. It is documented here to help Python developers write tests. The API of this module is subject to change without backwards compatibility concerns between releases. looking for now-outdated files... none found pickling environment... done checking consistency... done preparing documents... done writing output... [100%] whatsnew/index writing additional files... genindex py-modindex search download index opensearch copying images... [100%] library/turtle-star.png copying static files... done dumping search index... done dumping object inventory... done build succeeded, 16 warnings. ---------- assignee: docs at python components: Documentation messages: 178443 nosy: docs at python, tshepang priority: normal severity: normal status: open title: when building docs on Debian 7 --> ERROR: Error in "note" directive versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:08:22 2012 From: report at bugs.python.org (Carsten Klein) Date: Sat, 29 Dec 2012 00:08:22 +0000 Subject: [issue16806] col_offset is -1 for multiline string expressions resembling docstrings Message-ID: <1356739702.66.0.625233113719.issue16806@psf.upfronthosting.co.za> New submission from Carsten Klein: Given an input module such as class klass(object): """multi line comment continued on this line """ """single line comment""" """ Another multi line comment""" and implementing a custom ast.NodeVisitor such as import as class CustomVisitor(ast.NodeVisitor): def visit_ClassDef(self, node): for childNode in node.body: self.visit(childNode) def visit_Expr(self, node): print(node.col_offset) print(node.value.col_offset) and feeding it the compiled ast from the module above f = open('./module.py') source = f.read() node = ast.parse(source, mode = 'exec') visitor = CustomVisitor() visitor.visit(node) should yield -1/-1 for the docstring that is the first child node expression of the classdef body. it will, however, yield the correct col_offset of 4/4 for the single line docstring following the first one. the multi line docstring following that will again yield a -1/-1 col_offset. It believe that this behaviour is not correct and instead the col_offset should be 4 for both the expression node and its str value. ---------- components: Interpreter Core messages: 178444 nosy: carsten.klein at axn-software.de priority: normal severity: normal status: open title: col_offset is -1 for multiline string expressions resembling docstrings type: enhancement versions: Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:10:11 2012 From: report at bugs.python.org (Carsten Klein) Date: Sat, 29 Dec 2012 00:10:11 +0000 Subject: [issue16806] col_offset is -1 for multiline string expressions resembling docstrings In-Reply-To: <1356739702.66.0.625233113719.issue16806@psf.upfronthosting.co.za> Message-ID: <1356739811.81.0.162123711726.issue16806@psf.upfronthosting.co.za> Carsten Klein added the comment: Please note that, regardless of the indent level, the col_offset for multi line str expressions will always be -1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:13:42 2012 From: report at bugs.python.org (Leonardo DaVinci) Date: Sat, 29 Dec 2012 00:13:42 +0000 Subject: [issue16749] Fatal Python error: PyEval_RestoreThread: NULL tstate In-Reply-To: <1356732478.3.0.715486411018.issue16749@psf.upfronthosting.co.za> Message-ID: Leonardo DaVinci added the comment: Terry, I've tried installing on Mac at least 6 times and I still get error messages. I'm dealing with Solidoodle with no success. I have an appointment with a 3d Print Lab on Jan 3rd (50 miles away) to help me resolve my issues. Regards Ciro On Fri, Dec 28, 2012 at 5:07 PM, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > Antoine: do you know anything about this message? > Fatal Python error: PyEval_RestoreThread: NULL tstate > Is there a serious possibility that it could indicate a CPython error, as > opposed to an extension author error? Could running Windows on Mac hardware > make a difference? > > Leonardo: You should have quoted the full error message instead of making > each person search the image. > > Also, Please don't quote entire messages in your replies (which means > deleting them if replying with a mail program). They are already visible > above your reply and constitute noise that makes scrolling in the web > interface more tedious. > > We will likely close this, at least for now, because there is currently no > basis for action on our part. > > 1. From years of experience with such reports, we can be fairly certain > that the problem is with the third party extension code. It is known that > such code can crash CPython if it misuses the C API. We cannot prevent that > without adding unacceptible overhead. > > 2. If there is a bug in CPython, then to do anything, we would need either > Python code or proper C code that causes the crash. The latter would likely > require cooperation of the Solidoodle extension authors. > > For us to do anything, we need evidence in the form of (minimal) code we > can run that there is a CPython bug. > > Retrying under OS X is a good idea. > > You could try testing the windows python installation with the test suite > (python -m test.regrtest in a command window) but there are two problems > when doing this with a user installation, as opposed to the test buildbots: > there will be (expected) error boxes that you have to dismiss by hitting > ; and there will be a few reported errors that are not really errors > in python itself. > > ---------- > nosy: +pitrou, terry.reedy > title: Fatal Python Error -> Fatal Python error: PyEval_RestoreThread: > NULL tstate > versions: +Python 2.7 > > _______________________________________ > Python tracker > > _______________________________________ > ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:15:39 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 29 Dec 2012 00:15:39 +0000 Subject: [issue16749] Fatal Python error: PyEval_RestoreThread: NULL tstate In-Reply-To: Message-ID: <1356740025.3290.12.camel@localhost.localdomain> Antoine Pitrou added the comment: > I've tried installing on Mac at least 6 times and I still get error > messages. I'm dealing with Solidoodle with no success. > > I have an appointment with a 3d Print Lab on Jan 3rd (50 miles away) to > help me resolve my issues. Ciro, it seems you should wait a bit for Solidoodle's answer if you asked them a question. I don't know about them, but if they're a volunteer-run project you can't expect them to answer all requests very quickly. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:40:00 2012 From: report at bugs.python.org (Sandro Tosi) Date: Sat, 29 Dec 2012 00:40:00 +0000 Subject: [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> Message-ID: <1356741600.75.0.313132418006.issue16805@psf.upfronthosting.co.za> Sandro Tosi added the comment: Hello Tshepang, the documentation is not compatible with Sphinx versions different than the one the Makefile will download (in this case it's 1.0.7 for all active branches). I'd suggest to build the doc with just $ make -C Doc html and it will fetch the needed modules (at the correct version) and build the html version of the documentation in Doc/build/html/. I'm inclined to close this issue as invalid, but I'd like to hear from your first. Regards, Sandro ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:44:17 2012 From: report at bugs.python.org (Eugene Toder) Date: Sat, 29 Dec 2012 00:44:17 +0000 Subject: [issue1062277] Pickle breakage with reduction of recursive structures Message-ID: <1356741857.38.0.685467881353.issue1062277@psf.upfronthosting.co.za> Eugene Toder added the comment: To recap, the issue is that pickle doesn't handle recursion via reduce arguments (i.e. arguments to the constructor function as returned in 2nd element of the tuple from __reduce__). This leads to 2 kind of effects: class C: def __init__(self, x=None): self.x = x if x is not None else self def __reduce__(self): return C, (self.x,) A. Recursion error: >>> pickle.dumps(C()) Traceback (most recent call last): File "", line 1, in pickle.dumps(C()) RuntimeError: maximum recursion depth exceeded while calling a Python object This cannot be helped with the current reduce protocol. The error may be improved, but that's about it. B. Duplication of object when unpickling: >>> c = C([]) >>> c.x.append(c) >>> c.x[0] is c True >>> c2 = pickle.loads(pickle.dumps(c)) >>> c2.x[0] is c2 False This happens because list (or another recursion-friendly type) inside the problematic object handles recursion, but we still get the outer object, identical to the inner one. This can be solved the same way as for tuple: >>> t=([],1,2) >>> t[0].append(t) >>> t2 = pickle.loads(pickle.dumps(t)) >>> t2[0][0] is t2 True >>> pickletools.dis(pickle.dumps(t)) 0: \x80 PROTO 3 2: ] EMPTY_LIST 3: q BINPUT 0 5: h BINGET 0 7: K BININT1 1 9: K BININT1 2 11: \x87 TUPLE3 12: q BINPUT 1 14: a APPEND 15: K BININT1 1 17: K BININT1 2 19: 0 POP 20: 0 POP 21: 0 POP 22: h BINGET 1 24: . STOP After pickling its elements tuple checks if it got into memo. If it did, this means it was pickled by one of the elements, so it POPs all elements from the stack and fetches itself via GET. This is somewhat inefficient, but probably the best it can do. I suggest we do 3 things: 1. Improve the documentation for __reduce__ function. It should mention that all state that a) can potentially point back to the object and b) not strictly necessary in the constructor function should be passed via the 3rd element of __reduce__ tuple (aka state) instead of the 2nd element, and applied by __setstate__. This handles recursion in robust and optimal way. 2. Check that all built-in/standard types follow this advice. I see that Stefan Mihaila already fixed sets. 3. To fix case B above add the memo check from save_tuple to save_reduce. While at it, we can consider checking after pickling every element instead of after pickling all elements, so we reduce the number of POPs and the wastage they cause. ---------- nosy: +eltoder, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:44:37 2012 From: report at bugs.python.org (Eugene Toder) Date: Sat, 29 Dec 2012 00:44:37 +0000 Subject: [issue1062277] Pickle breakage with reduction of recursive structures Message-ID: <1356741877.53.0.164035867866.issue1062277@psf.upfronthosting.co.za> Changes by Eugene Toder : ---------- versions: +Python 3.3, Python 3.4 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 01:48:53 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 29 Dec 2012 00:48:53 +0000 Subject: [issue16758] SubprocessStartupError In-Reply-To: <1356285530.15.0.755787775309.issue16758@psf.upfronthosting.co.za> Message-ID: <1356742133.07.0.199150875998.issue16758@psf.upfronthosting.co.za> Andrew Svetlov added the comment: I guess it is actually firewall. ---------- nosy: +asvetlov type: performance -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:04:23 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2012 01:04:23 +0000 Subject: [issue16783] sqlite3 accepts strings it cannot (by default) return In-Reply-To: <1356505156.77.0.42259028203.issue16783@psf.upfronthosting.co.za> Message-ID: <1356743063.48.0.446174480546.issue16783@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Opening a duplicate issue to rant against the developers is not responsible behavior. Since you do not seem to understand Martin's 2.x solution, ask for help on python-list or elsewhere (and read below). The proper fix for multiple Unicode and text coding problems was and is to use Unicode for text, as we did and do in 3.x. Note that while we link to sqlite3 with a Python interface, and choose that as the database to link to in the stdlib, we do not control sqlite3 itself. As documented and as Martin wrote, sqlite *assumes*, by default, that byte-encoded text handed to it is error-free utf-8 encoded. However, docs and Martin both say that you can override that assumption by replacing its text_factory. Sqlite should not reject *any* bytes because anything *could* be just what the use intended. The problem of multiple byte encodings for text and of encoding info getting separated from encoded bytes is a general one. We constantly get questions on python-list like "how do I determine the real encoding of a web page if the encoding information is missing or wrong". We are doing our part to solve it by using unicode for text and pushing utf-8 as the one, true encoding that everyone should use whenever possible. If you need more explanation, try python-list, as I said before. ---------- nosy: +terry.reedy resolution: -> duplicate status: open -> closed title: sqlite3 accepts strings it cannot return -> sqlite3 accepts strings it cannot (by default) return _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:08:42 2012 From: report at bugs.python.org (Carsten Klein) Date: Sat, 29 Dec 2012 01:08:42 +0000 Subject: [issue16806] col_offset is -1 for multiline string expressions resembling docstrings In-Reply-To: <1356739702.66.0.625233113719.issue16806@psf.upfronthosting.co.za> Message-ID: <1356743322.8.0.341691460474.issue16806@psf.upfronthosting.co.za> Carsten Klein added the comment: In addition, the reported lineno will be set to the last line of the multi line string instead of the first line where parsing the parse began parsing the string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:13:43 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2012 01:13:43 +0000 Subject: [issue16798] DTD not checked In-Reply-To: <1356658629.79.0.632401126307.issue16798@psf.upfronthosting.co.za> Message-ID: <1356743623.94.0.827806685209.issue16798@psf.upfronthosting.co.za> Terry J. Reedy added the comment: You should ask for usage tips on python-list or other forums. 2.6 and 3.1 only get security fixes. 2.7 and 3.2,3.3 only get bug fixes. This looks like a request for a new feature (assuming that it is not available now). I am not familiar with the modules, but I expect that the request is out of scope for minidom. "xml.dom.minidom is a light-weight implementation of the Document Object Model interface. It is intended to be simpler than the full DOM and also significantly smaller." Eli, is etree open to new features and might the request be a sensible addition, or should this issue be closed? ---------- nosy: +eli.bendersky, terry.reedy type: behavior -> enhancement versions: +Python 3.4 -Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:15:41 2012 From: report at bugs.python.org (William D. Colburn) Date: Sat, 29 Dec 2012 01:15:41 +0000 Subject: [issue16783] sqlite3 accepts strings it cannot (by default) return In-Reply-To: <1356743063.48.0.446174480546.issue16783@psf.upfronthosting.co.za> Message-ID: William D. Colburn added the comment: I'm ranting against an improper bug closure and bad behavior from the python sqlite3. Treating invalid data as sometimes valid and sometime as invalid is a problem. Problems with a Python module are not anuser-error, they are an implementation error. Users should never have to work around bugs in Python. I'm saddened by your poor response to this issue. On Fri, Dec 28, 2012 at 6:04 PM, Terry J. Reedy wrote: > > Terry J. Reedy added the comment: > > Opening a duplicate issue to rant against the developers is not responsible behavior. Since you do not seem to understand Martin's 2.x solution, ask for help on python-list or elsewhere (and read below). The proper fix for multiple Unicode and text coding problems was and is to use Unicode for text, as we did and do in 3.x. > > Note that while we link to sqlite3 with a Python interface, and choose that as the database to link to in the stdlib, we do not control sqlite3 itself. As documented and as Martin wrote, sqlite *assumes*, by default, that byte-encoded text handed to it is error-free utf-8 encoded. However, docs and Martin both say that you can override that assumption by replacing its text_factory. Sqlite should not reject *any* bytes because anything *could* be just what the use intended. > > The problem of multiple byte encodings for text and of encoding info getting separated from encoded bytes is a general one. We constantly get questions on python-list like "how do I determine the real encoding of a web page if the encoding information is missing or wrong". We are doing our part to solve it by using unicode for text and pushing utf-8 as the one, true encoding that everyone should use whenever possible. > > If you need more explanation, try python-list, as I said before. > > ---------- > nosy: +terry.reedy > resolution: -> duplicate > status: open -> closed > title: sqlite3 accepts strings it cannot return -> sqlite3 accepts strings it cannot (by default) return > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:22:06 2012 From: report at bugs.python.org (Javier Domingo) Date: Sat, 29 Dec 2012 01:22:06 +0000 Subject: [issue16798] DTD not checked In-Reply-To: <1356658629.79.0.632401126307.issue16798@psf.upfronthosting.co.za> Message-ID: <1356744126.25.0.15518109792.issue16798@psf.upfronthosting.co.za> Javier Domingo added the comment: I am currently using a subprocess with a call to xmllint to make it create a temporal file that gets created on execution for xmllint use. I have seen about lxml, but I wondered if there is any place in the standard python to put xml validation ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:26:19 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 29 Dec 2012 01:26:19 +0000 Subject: [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356744379.85.0.560416939649.issue16781@psf.upfronthosting.co.za> R. David Murray added the comment: It looks like you are correct Terry. The problem, I think, is that the behavior of name spaces inside a class definition is probably the least intuitive aspect of python scoping, so that sentence, while technically complete, doesn't provide enough guidance. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:26:51 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2012 01:26:51 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356744411.51.0.317795498804.issue16801@psf.upfronthosting.co.za> Terry J. Reedy added the comment: David is correct >>> dbm.open.__doc__ "Open or create database at path given by *file*.\n\n Optional argument *flag* can be 'r' (default) for read-only access, 'w'\n for read-write access of an existing database, 'c' for read-write access\n to a new or existing database, and 'n' for read-write access to a new\n database.\n\n Note: 'r' and 'w' fail if the database doesn't exist; 'c' creates it\n only if it doesn't exist; and 'n' always creates a new database.\n " >>> help(dbm.open) Help on function open in module dbm: open(file, flag='r', mode=438) Open or create database at path given by *file*. ... IDLE tooltip (still using inspect.getfullargspec) also shows open(file, flag='r', mode=438) The int comes from dbm.open.__defaults__[1] 438 ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:33:41 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 01:33:41 +0000 Subject: [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356741600.75.0.313132418006.issue16805@psf.upfronthosting.co.za> Message-ID: Tshepang Lekhonkhobe added the comment: It is my preference to be able to build all of CPython with the already-installed distro packages, instead of pulling in foreign ones. Any reason why not use later versions? Can't the docs be written such that they can run on various versions of these tools anyway? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:39:27 2012 From: report at bugs.python.org (Dougal Sutherland) Date: Sat, 29 Dec 2012 01:39:27 +0000 Subject: [issue16807] argparse group nesting lost on inheritance Message-ID: <1356745167.13.0.671311915058.issue16807@psf.upfronthosting.co.za> New submission from Dougal Sutherland: If you wrap a mutually exclusive group inside an argument group in an argparse.ArgumentParser, and then use parents= to inherit from that parser, the non-exclusive argument group is forgotten in the help output, and the arguments move to the default "optional arguments" section. For example: # construct the parser with a mutually exclusive group >>> import argparse >>> parent = argparse.ArgumentParser(add_help=False) >>> group = parent.add_argument_group('the group') >>> group.add_argument('--foo') and None >>> mutex = group.add_mutually_exclusive_group() >>> mutex.add_argument('-a', action='store_true') and None >>> mutex.add_argument('-b', action='store_true') and None >>> parent.print_help() usage: [--foo FOO] [-a | -b] the group: --foo FOO -a -b # now try to inherit from it; "the group" is forgotten for # mutex arguments, but remains for others >>> argparse.ArgumentParser(add_help=False, parents=[parent]).print_help() usage: [--foo FOO] [-a | -b] optional arguments: -a -b the group: --foo FOO I see the same behavior on 2.7.3 and 3.3.0. The problem is that [`argparse._ActionsContainer._add_container_actions`](http://hg.python.org/releasing/2.7.3/file/7bb96963d067/Lib/argparse.py#l1331) always adds mutex groups to the top level, rather than to the equivalent of their `_container` attribute. The attached patch fixes this, and adds a test based on the formatted output (almost identical to the `test_groups_parents` test). One thing about the patch: it assumes that the `_container` attribute of all the mutex groups will be either the `container` argument to `_add_container_actions` or an argument group that has been processed in `group_map`. If this is not the case, it'll fail with either an `AttributeError` or a `KeyError`. I don't know when this would happen, or if it's common enough that it's worth checking for more explicitly. ---------- components: Library (Lib) files: argparse_mutex_parent.patch keywords: patch messages: 178459 nosy: Dougal.Sutherland, bethard priority: normal severity: normal status: open title: argparse group nesting lost on inheritance type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28473/argparse_mutex_parent.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:44:39 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2012 01:44:39 +0000 Subject: [issue16772] int() accepts float number base In-Reply-To: <1356379816.55.0.394159621293.issue16772@psf.upfronthosting.co.za> Message-ID: <1356745479.65.0.491688158745.issue16772@psf.upfronthosting.co.za> Terry J. Reedy added the comment: To me the doc strongly implies, but does not boldly and baldly say, that base should be an int. "A base-n literal consists of the digits 0 to n-1, with a to z (or A to Z) having values 10 to 35. The default base is 10. The allowed values are 0 and 2-36. Base-2, -8, and -16 literals can be optionally prefixed with 0b/0B, 0o/0O, or 0x/0X, as with integer literals in code. Base 0 means to interpret exactly as a code literal, so that the actual base is 2, 8, 10, or 16, and so that int('010', 0) is not legal, while int('010') is, as well as int('010', 8)." I think it should be revised to say "The allowed values are ints 0 and 2-36." (or 'integers' or 'index values'). If it had been that already, the current behavior would clearly be a bug and eligible to be fixed in 3.2/3. As it is, I will not argue with whatever others do. (I strongly suspect there are other places in the docs where int args are similarly implied but not explicit, but int-ness *is* checked. If someone were to complain about 0.0 being rejected, I expect we would correct the doc, not the code.;-) ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:45:15 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 29 Dec 2012 01:45:15 +0000 Subject: [issue16799] switch regrtest from getopt options to argparse Namespace In-Reply-To: <1356664271.75.0.0861175623583.issue16799@psf.upfronthosting.co.za> Message-ID: <1356745515.92.0.882693454942.issue16799@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Here is a patch to start using a Namespace object. I also noticed that the usage() function I removed in 6e2e5adc0400 is still used elsewhere in regrtest.main(), so this patch also fixes that. ---------- keywords: +patch Added file: http://bugs.python.org/file28474/issue-16799-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:58:19 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 29 Dec 2012 01:58:19 +0000 Subject: [issue16778] Logger.findCaller needs to be smarter In-Reply-To: <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za> Message-ID: <1356746299.31.0.931849820134.issue16778@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Passing a globals() instance looks hackish. importlib uses another approach: http://hg.python.org/cpython/file/5ef49659935f/Lib/importlib/_bootstrap.py#l303 Note that it is a pity that code objects don't have a __module__ attribute. Perhaps it would be a nice feature for 3.4. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 02:59:25 2012 From: report at bugs.python.org (Leonardo DaVinci) Date: Sat, 29 Dec 2012 01:59:25 +0000 Subject: [issue16749] Fatal Python error: PyEval_RestoreThread: NULL tstate In-Reply-To: <1356740025.3290.12.camel@localhost.localdomain> Message-ID: Leonardo DaVinci added the comment: Actually Antoine, Solidoodle has sent 2 email replies, 1 was a video link to some British guy opening his box which wasn't packed like mine and had missing parts. and the second email was just as useless stating that maybe I'm running both platforms at the same time which I ain't... In any case I went ahead and booked my appointment, I just want it to work. Thanks for your time. Happy Holidays! Best Regards Ciro On Fri, Dec 28, 2012 at 7:15 PM, Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > > I've tried installing on Mac at least 6 times and I still get error > > messages. I'm dealing with Solidoodle with no success. > > > > I have an appointment with a 3d Print Lab on Jan 3rd (50 miles away) to > > help me resolve my issues. > > Ciro, it seems you should wait a bit for Solidoodle's answer if you > asked them a question. I don't know about them, but if they're a > volunteer-run project you can't expect them to answer all requests very > quickly. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:24:07 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2012 02:24:07 +0000 Subject: [issue16749] Fatal Python error: PyEval_RestoreThread: NULL tstate In-Reply-To: Message-ID: <1356747847.97.0.197616437376.issue16749@psf.upfronthosting.co.za> Terry J. Reedy added the comment: OK, given Antoine's reply, I am going to close this until there is actionable information. ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:36:29 2012 From: report at bugs.python.org (Meador Inge) Date: Sat, 29 Dec 2012 02:36:29 +0000 Subject: [issue16804] python3 -S -m site fails In-Reply-To: <1356726163.27.0.125833225728.issue16804@psf.upfronthosting.co.za> Message-ID: <1356748589.18.0.492196360512.issue16804@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:36:57 2012 From: report at bugs.python.org (Meador Inge) Date: Sat, 29 Dec 2012 02:36:57 +0000 Subject: [issue16795] Patch: some changes to AST to make it more useful for static language analysis In-Reply-To: <1356644683.65.0.359499511153.issue16795@psf.upfronthosting.co.za> Message-ID: <1356748617.75.0.16727921674.issue16795@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:37:58 2012 From: report at bugs.python.org (Meador Inge) Date: Sat, 29 Dec 2012 02:37:58 +0000 Subject: [issue16803] Make time_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <1356748678.81.0.80666728865.issue16803@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:40:25 2012 From: report at bugs.python.org (Meador Inge) Date: Sat, 29 Dec 2012 02:40:25 +0000 Subject: [issue16320] Establish order in bytes/string dependencies In-Reply-To: <1351156037.64.0.017004315605.issue16320@psf.upfronthosting.co.za> Message-ID: <1356748825.91.0.331332998479.issue16320@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:41:48 2012 From: report at bugs.python.org (Meador Inge) Date: Sat, 29 Dec 2012 02:41:48 +0000 Subject: [issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance In-Reply-To: <1346524424.76.0.407141547435.issue15840@psf.upfronthosting.co.za> Message-ID: <1356748908.39.0.717956616787.issue15840@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:52:34 2012 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 29 Dec 2012 02:52:34 +0000 Subject: [issue16798] DTD not checked In-Reply-To: <1356658629.79.0.632401126307.issue16798@psf.upfronthosting.co.za> Message-ID: <1356749554.24.0.294044915941.issue16798@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Python's standard library does not currently provide a validating XML parser, and none is planned, so I propose to close this as "won't fix". ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 03:55:26 2012 From: report at bugs.python.org (Ned Deily) Date: Sat, 29 Dec 2012 02:55:26 +0000 Subject: [issue14516] test_tools assumes BUILDDIR=SRCDIR In-Reply-To: <1333707730.38.0.628831175594.issue14516@psf.upfronthosting.co.za> Message-ID: <1356749726.07.0.976925278017.issue14516@psf.upfronthosting.co.za> Ned Deily added the comment: Looks like this issue was addressed with 6d0c54b99ca9 (2.7), 5493299df0a0 (3.2) and c23b442b5d5e (default). Close? ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 04:02:29 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sat, 29 Dec 2012 03:02:29 +0000 Subject: [issue16808] inspect.stack() should return list of named tuples Message-ID: <1356750149.18.0.966123919893.issue16808@psf.upfronthosting.co.za> New submission from Daniel Shahaf: Currently inspect.stack() returns a list of 6-tuples. I suggest to make it return a list of named tuples, so code that only needs one tuple element can get it by name. Current behaviour: % ./python -c 'import inspect; print(inspect.stack()[0])' (, '', 1, '', None, None) Suggested behaviour: % ./python -c 'import inspect; print(inspect.stack()[0])' FrameInfo(frame=, filename='', lineno=1, function='', code_context=None, index=None) ---------- components: Library (Lib) files: inspect-v1.diff keywords: patch messages: 178467 nosy: danielsh priority: normal severity: normal status: open title: inspect.stack() should return list of named tuples versions: Python 3.4 Added file: http://bugs.python.org/file28475/inspect-v1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 04:05:01 2012 From: report at bugs.python.org (Meador Inge) Date: Sat, 29 Dec 2012 03:05:01 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1356750301.4.0.724696733191.issue16694@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 04:20:27 2012 From: report at bugs.python.org (Meador Inge) Date: Sat, 29 Dec 2012 03:20:27 +0000 Subject: [issue16047] Tools/freeze no longer works in Python 3 In-Reply-To: <1348590480.55.0.440432620482.issue16047@psf.upfronthosting.co.za> Message-ID: <1356751227.48.0.854789549983.issue16047@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 04:24:23 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2012 03:24:23 +0000 Subject: [issue16798] DTD not checked In-Reply-To: <1356658629.79.0.632401126307.issue16798@psf.upfronthosting.co.za> Message-ID: <1356751463.94.0.82942890613.issue16798@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I agree. The stdlib is not intended to do everything. That is why we maintain an index and optional repository for third party packages. For xml processing, lxml, in particular, is a recommended extension/replacement for advanced users. It includes an etree interface, to make migration from etree as easy as possible. Javier, if you disagree, you could post to the python-ideas list. But I strongly suspect you would get about the same answer, that there is no point to duplicating existing external packages, and no desire to incorporate any more external packages, at least not for xml. ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 04:34:35 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 29 Dec 2012 03:34:35 +0000 Subject: [issue15840] Ambiguity with regard to the effect of accessing a closed IOBase instance In-Reply-To: <1346524424.76.0.407141547435.issue15840@psf.upfronthosting.co.za> Message-ID: <1356752075.98.0.0427100810977.issue15840@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Agree with you, Hynek. It should be fixed in 3.4 only (and change should be well documented). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 04:35:15 2012 From: report at bugs.python.org (Larry Hastings) Date: Sat, 29 Dec 2012 03:35:15 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356752115.32.0.65618043229.issue16801@psf.upfronthosting.co.za> Larry Hastings added the comment: Okay, counter-proposal time. We add a new field to the Parameter object, the preferred string representation of the default. If the parameter has a default, it is always a string, by default repr(parameter_default_value); if the parameter has no default then it is None. You can then override the default: @inspect.use_original_representation('mode') def open(file, flag='r', mode=0o666): And if os.open were supplied in os.py: @inspect.override_string_representation('mode', 'os.O_CREAT | os.O_RDWR') def open(file, flags, mode=0o777, *, dir_fd=None): (p.s. I know the mode argument there is wrong, it has a million things in it and this is just to get the idea across.) Then the docstring generator, IDLE, etc. would be told "Please use this new field of the Parameter object when displaying the default to the user." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 04:40:25 2012 From: report at bugs.python.org (Meador Inge) Date: Sat, 29 Dec 2012 03:40:25 +0000 Subject: [issue14369] make __closure__ writable In-Reply-To: <1332179477.04.0.11685261564.issue14369@psf.upfronthosting.co.za> Message-ID: <1356752425.66.0.491853554236.issue14369@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 04:47:05 2012 From: report at bugs.python.org (Ray Donnelly) Date: Sat, 29 Dec 2012 03:47:05 +0000 Subject: [issue3871] cross and native build of python for mingw* hosts In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1356752825.54.0.196143937365.issue3871@psf.upfronthosting.co.za> Ray Donnelly added the comment: Good work Jason, I think it would be great if everyone could collaborate better with this stuff; I'm as guilty as the next person on that score though. I might have been able to save you some effort by pointing you at either: https://github.com/mingwandroid/crucifixion-freedom/tree/master/patches/python/3.3.0 [Python cross and MinGW compilation] or: https://github.com/niXman/mingw-builds/tree/master/patches/Python-3.3.0 [MinGW toolchains including Python pretty-printing GDB] ..there might be some patches in there that are useful for you. Both these projects use basically the same patches, the 'source' of them is crucifixion-freedom. Our patching strategies are more sane (many patches as opposed to a monolithic patch - in fact, just after Roumen's huge patch we apply some patches to remove large parts of it so we can re-introduce those independent fixes via separate patches). Both crucifixion-freedom and mingw-builds also provide patches for 2.7.3 and support building tkinter and IDLE. The unique feature of crucifixion-freedom is fairly comprehensive cross compilation capability ({Linux,Windows,Mac}*{32bit,64bit}). Given how intrusive these patches are, getting them merged into CPython is a bit of a pipe dream (I'd love to be wrong about that), so making it as easy as possible for the interested parties to maintain (forward port), build, test and package Python releases is probably the best we can hope for. If we can make the patches small and independently reviewable then maybe some parts could be merged. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 04:58:11 2012 From: report at bugs.python.org (Meador Inge) Date: Sat, 29 Dec 2012 03:58:11 +0000 Subject: [issue16376] wrong type for wintypes.BYTE In-Reply-To: <1351702975.6.0.783969996516.issue16376@psf.upfronthosting.co.za> Message-ID: <1356753491.83.0.0311279725089.issue16376@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 05:45:39 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2012 04:45:39 +0000 Subject: [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356756339.72.0.116060261021.issue16781@psf.upfronthosting.co.za> Terry J. Reedy added the comment: I suppose you could say that I kicked that particular can over to the class doc ;-). The fundamental problem with exec is that it is at least as complicated as Python, since it executes any legal python code, and in fact is even more complicated* because there are various possible relationships with the calling context. Moreover, it always returns None, so that *any* effect is a side-effect, which tends to be 'magical'. * For one thing, people can write and run normal python code without knowing that a = b (and other binding statements, like import) at module scope means locals()['a'] rather than globals()['a']. At module scope, there are the same because globals() is locals(). Within exec'ed code, they may not be the same thing even for 'top level' code. This is exactly what tripped up Anatoly in his example with the import. I am thinking that a short How To Exec() might be a good idea, since a real explanation is too much for even a half-page entry in the built-ins chapter. Note: the following doc statement "Be aware that the return and yield statements may not be used outside of function definitions" needs to have nonlocal added. >>> nonlocal a SyntaxError: nonlocal declaration not allowed at module level >>> exec('nonlocal a') Traceback (most recent call last): File "", line 1, in exec('nonlocal a') File "", line None SyntaxError: nonlocal declaration not allowed at module level >>> def f(): exec('nonlocal a') f() ... SyntaxError: nonlocal declaration not allowed at module level This again points to why exec can be confusing. compile() considers the string it compiles to be top-level code without any surrounding context. However, exec() enables one to run 'top level' code with different globals and locals. There is no exact precedent for this in normal operation. The closest is execution of code within a class statement (before the type(name, dic, bases) part). But even that is not absolutely the same for nonlocal (though this could be the only exception ;-). >>> >>> class C: nonlocal a SyntaxError: no binding for nonlocal 'a' found A different error here (arguably not the best) -- the same as >>> def f(): nonlocal a SyntaxError: no binding for nonlocal 'a' found ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 05:51:41 2012 From: report at bugs.python.org (Meador Inge) Date: Sat, 29 Dec 2012 04:51:41 +0000 Subject: [issue16286] Optimize a==b and a!=b for bytes and str In-Reply-To: <1350650166.87.0.27478619259.issue16286@psf.upfronthosting.co.za> Message-ID: <1356756701.87.0.453791801983.issue16286@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 06:06:15 2012 From: report at bugs.python.org (Meador Inge) Date: Sat, 29 Dec 2012 05:06:15 +0000 Subject: [issue16283] ctypes.util.find_library does not find all DLLs anymore In-Reply-To: <1350636778.52.0.107234052838.issue16283@psf.upfronthosting.co.za> Message-ID: <1356757575.46.0.591321374918.issue16283@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 06:23:22 2012 From: report at bugs.python.org (Meador Inge) Date: Sat, 29 Dec 2012 05:23:22 +0000 Subject: [issue12486] tokenize module should have a unicode API In-Reply-To: <1309751897.67.0.332272921906.issue12486@psf.upfronthosting.co.za> Message-ID: <1356758602.28.0.306074849422.issue12486@psf.upfronthosting.co.za> Meador Inge added the comment: See also issue9969. ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 06:25:46 2012 From: report at bugs.python.org (Meador Inge) Date: Sat, 29 Dec 2012 05:25:46 +0000 Subject: [issue12691] tokenize.untokenize is broken In-Reply-To: <1312496489.46.0.0769213514508.issue12691@psf.upfronthosting.co.za> Message-ID: <1356758746.24.0.0591093929034.issue12691@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +meador.inge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 06:30:53 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 29 Dec 2012 05:30:53 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356759053.6.0.263349557867.issue16801@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 06:35:20 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2012 05:35:20 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356759320.21.0.267234701308.issue16801@psf.upfronthosting.co.za> Terry J. Reedy added the comment: If you wish to pursue this, I suggest starting with 'the simplest thing that works' for the text cases at hand. They all involve 'mode' and you have not presented and I cannot think of other cases. So somewhere in the signature generation code: if function name in and parameter_name == 'mode': replace_decimal_with_octal(parameter_default) If more generality is really needed, pick a new reserved attribute for functions and set it at the time of definition. def open(file, flag='r', mode=0o666): open.__param_rep__ = {'mode': 'octal'} #or whatever is chosen I suppose the advantage of adding the syntactic sugar of a decorator, after getting the above to work, is that the doc could be hidden away in the inspect model, where is would be easily ignored.\ Still, this does seem like a lot of 'noise' for a small bit of extra 'signal' increment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 06:58:19 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 29 Dec 2012 05:58:19 +0000 Subject: [issue16781] execfile/exec execution in other than global scope uses locals(), leading to undefined behavior In-Reply-To: <1356480950.95.0.0708133666827.issue16781@psf.upfronthosting.co.za> Message-ID: <1356760699.15.0.814969248936.issue16781@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 07:00:42 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 29 Dec 2012 06:00:42 +0000 Subject: [issue16804] python3 -S -m site fails In-Reply-To: <1356726163.27.0.125833225728.issue16804@psf.upfronthosting.co.za> Message-ID: <1356760842.11.0.282597247821.issue16804@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 07:03:28 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 29 Dec 2012 06:03:28 +0000 Subject: [issue11824] freeze.py broken due to ABI flags In-Reply-To: <1302488520.76.0.698152823885.issue11824@psf.upfronthosting.co.za> Message-ID: <1356761008.53.0.953089315453.issue11824@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 07:04:01 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 29 Dec 2012 06:04:01 +0000 Subject: [issue16047] Tools/freeze no longer works in Python 3 In-Reply-To: <1348590480.55.0.440432620482.issue16047@psf.upfronthosting.co.za> Message-ID: <1356761041.58.0.751738654591.issue16047@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 07:38:27 2012 From: report at bugs.python.org (Roger Serwy) Date: Sat, 29 Dec 2012 06:38:27 +0000 Subject: [issue16809] Tk 8.6.0 introduces TypeError. (Tk 8.5.13 works) Message-ID: <1356763107.47.0.647000150457.issue16809@psf.upfronthosting.co.za> New submission from Roger Serwy: I am running Arch Linux with the latest Tcl/Tk 8.6.0 build with Python 2.7.3 and 3.3.0, and the latest 3.4.0a0 build from the repository. Running the attached script fails when calling pack_info(). Here's is the script's output: 8.6 Traceback (most recent call last): File "tk_86_error.py", line 6, in label.pack_info() File "/usr/lib/python3.3/tkinter/__init__.py", line 1884, in pack_info self.tk.call('pack', 'info', self._w)) TypeError: Can't convert '_tkinter.Tcl_Obj' object to str implicitly This error did not occur when using Tk 8.5.13. ---------- components: Tkinter files: tk_86_error.py messages: 178475 nosy: serwy priority: high severity: normal status: open title: Tk 8.6.0 introduces TypeError. (Tk 8.5.13 works) type: behavior versions: Python 2.7, Python 3.3, Python 3.4 Added file: http://bugs.python.org/file28476/tk_86_error.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 07:51:48 2012 From: report at bugs.python.org (Nick Coghlan) Date: Sat, 29 Dec 2012 06:51:48 +0000 Subject: [issue16804] python3 -S -m site fails In-Reply-To: <1356726163.27.0.125833225728.issue16804@psf.upfronthosting.co.za> Message-ID: <1356763908.33.0.79670394413.issue16804@psf.upfronthosting.co.za> Nick Coghlan added the comment: Hmm, it works in 3.2, so I suspect that's a symptom of the code change that skipped the side effects on explicit import when "-S" was specified. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 07:54:21 2012 From: report at bugs.python.org (Glenn Linderman) Date: Sat, 29 Dec 2012 06:54:21 +0000 Subject: [issue16810] inconsistency in weekday Message-ID: <1356764061.7.0.32287825168.issue16810@psf.upfronthosting.co.za> New submission from Glenn Linderman: Docs say: date.timetuple() Return a time.struct_time such as returned by time.localtime(). The hours, minutes and seconds are 0, and the DST flag is -1. d.timetuple() is equivalent to time.struct_time((d.year, d.month, d.day, 0, 0, 0, d.weekday(), yday, -1)), where yday = d.toordinal() - date(d.year, 1, 1).toordinal() + 1 is the day number within the current year starting with 1 for January 1st. However, timetuple's 7th element has a range of 0-6 where 0 is Sunday, and d.weekday has a range of 0-6 where 0 is Monday. So the claim of equivalence is false. "d.weekday()" in the above could be replaced by "( d.weekday() + 1 ) % 7" I guess datetime consistently uses 0==Monday, and weeks starting on Monday, except for the timetuple (which probably has compatibility constraints which force it to return a different value, which I consider to be more correct). ---------- assignee: docs at python components: Documentation messages: 178477 nosy: docs at python, v+python priority: normal severity: normal status: open title: inconsistency in weekday versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 08:01:36 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 29 Dec 2012 07:01:36 +0000 Subject: [issue16808] inspect.stack() should return list of named tuples In-Reply-To: <1356750149.18.0.966123919893.issue16808@psf.upfronthosting.co.za> Message-ID: <1356764496.86.0.797695972244.issue16808@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 ---------- keywords: +easy -patch nosy: +rhettinger stage: -> needs patch type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 08:52:42 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 29 Dec 2012 07:52:42 +0000 Subject: [issue16809] Tk 8.6.0 introduces TypeError. (Tk 8.5.13 works) In-Reply-To: <1356763107.47.0.647000150457.issue16809@psf.upfronthosting.co.za> Message-ID: <1356767562.11.0.191396769964.issue16809@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 08:56:41 2012 From: report at bugs.python.org (Bradley Froehle) Date: Sat, 29 Dec 2012 07:56:41 +0000 Subject: [issue16612] Integrate "Argument Clinic" specialized preprocessor into CPython trunk In-Reply-To: <1354659537.54.0.587753848221.issue16612@psf.upfronthosting.co.za> Message-ID: <1356767801.3.0.907627611181.issue16612@psf.upfronthosting.co.za> Bradley Froehle added the comment: First off, thanks for all the work so far. This has proven incredibly useful to me in a personal project. However, I think there needs to be some additional discussion of how to handle situations where the arguments passed to PyArg_ParseTuple require additional cleanup. As a prototypical example, I'll consider filename arguments. The Python docs recommend that filename arguments be handled with `O&` and PyUnicode_FSConverter. How can we handle this in clinic? 1. No special handling in clinic: /*[clinic] foo -> None PyObject *filename [clinic]*/ ... foo_impl(PyObject *self, PyObject *filename) /*[clinic end:...*/ { char *c_filename; PyObject *b_filename; if (!PyUnicode_FSConverter(filename, &b_filename)) return NULL; c_filename = PyBytes_AsString(b_filename); // ... Py_DECREF(b_filename); } This offloads all of the processing to the impl function and leaves us no better off. Unacceptable. 2. Use PyObject* and a converter option: /*[clinic] foo -> None PyBytesObject *filename converter=PyUnicode_FSConverter [clinic]*/ ... foo_impl(PyObject *self, PyBytesObject *filename) /*[clinic end:...]*/ { char *c_filename = PyBytes_AsString(filename); ... Py_DECREF(filename); } This is much more convenient, but the `_impl` function now steals the filename reference, which is unexpected (and confusing). 3. "The dream" Ideally `foo_impl` would have a signature like: static PyObject * foo_impl(PyObject *self, char *filename); And `foo` would be automatically generated as: static PyObject * foo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *_ret; PyObject *filename; static char *_keywords[] = {"filename", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:foo", _keywords, PyUnicode_FSConverter, &filename)) return NULL; _ret = foo_impl(self, PyBytes_AsString(filename)); Py_DECREF(filename); return _ret; } It's not clear to me how one would extend the clinic syntax to support this. In particular, clinic would need to know: - The type of the intermediate object (i.e., PyObject * or PyBytesObject *). - The converter to use in PyArg_ParseTupleAndKeywords (i.e., PyUnicode_FSConverter) - The impl type (i.e, char *) - How to convert the intermediate object to the impl type (i.e., PyBytes_AsString(filename)). - How to cleanup in the end (i.e., Py_DECREF(filename)). This seems like too much data to encode in the clinic syntax. 4. Extend clinic to add a cleanup flag which would produce code like: /*[clinic] foo PyBytesObject *filename converter=PyUnicode_FSConverter cleanup=Py_DECREF [clinic]*/ ... static PyObject * foo(PyObject *self, PyObject *args, PyObject *kwargs) { PyObject *_ret; PyBytesObject *filename; static char *_keywords[] = {"filename", NULL}; if (!PyArg_ParseTupleAndKeywords(args, kwargs, "O&:foo", _keywords, PyUnicode_FSConverter, &filename)) return NULL; _ret = foo_impl(self, filename); Py_DECREF(filename); return _ret; } static PyObject * foo_impl(PyObject *self, PyBytesObject *filename) /*[clinic end:...]*/ { char *c_filename = PyBytes_AsString(filename); // ... } This seems like a relatively modest addition, which might also work for other cleanup functions like PyBuffer_Release. ---- Additionally, there are a few other bugs I've noticed: - The s* and z* codes should be of type Py_buffer (and not Py_buffer *) - Since Py_buffer is a relatively large struct, zlib_decompress_impl should probably take a pointer to a Py_buffer. This, however, would likely require extending the clinic syntax. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 09:10:08 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 29 Dec 2012 08:10:08 +0000 Subject: [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> Message-ID: <1356768608.74.0.768872922572.issue16805@psf.upfronthosting.co.za> Georg Brandl added the comment: In this case it's more of a docutils version problem, I would guess. Tshepang, can you find out your docutils version? But "proper" use of the note directive is with an empty line, so we should fix these instances anyway. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 09:50:41 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 29 Dec 2012 08:50:41 +0000 Subject: [issue15112] argparse: nargs='*' positional argument doesn't accept any items if preceded by an option and another positional In-Reply-To: <1340165747.87.0.563099760163.issue15112@psf.upfronthosting.co.za> Message-ID: <1356771041.26.0.720974725499.issue15112@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Was argparse ever supposed to support inputs of the form given in the example (i.e. different positional arguments straddling optional arguments): 'yy -x zz'? The usage string shows up as: "usage: test.py [-h] [-x] y [z [z ...]]" The original example seems to work with the current code if given as: '-x yy zz'. Also, substituting argparse.REMAINDER for '*' in the original example gives the following both with and without the patch: Namespace(x=False, y='yy', z=['-x', 'zz']) That doesn't seem consistent with straddling being supported. Lastly, passing just '-x' gives the following error with and without the patch (z should be optional): error: the following arguments are required: y, z ---------- nosy: +chris.jerdonek _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 11:23:14 2012 From: report at bugs.python.org (Helmut Jarausch) Date: Sat, 29 Dec 2012 10:23:14 +0000 Subject: [issue16811] email.message.Message flatten dies of list index out of range Message-ID: <1356776594.55.0.534961583044.issue16811@psf.upfronthosting.co.za> New submission from Helmut Jarausch: The following code triggers the bug: #!/usr/bin/python3.3 #-*- coding: latin1 -*- from email.message import Message from email import policy from email.parser import FeedParser Parser= FeedParser(policy=policy.SMTP) Parser.feed('From jarausch at igpm.rwth-aachen.de Tue Apr 24 15:09:24 2012\n') Parser.feed('X-Status: \n') # this triggers the bug Parser.feed('From: Helmut Jarausch \n') Msg= Parser.close() Msg_as_str= Msg.as_string(unixfrom=True) This triggers File "Email_Parse_Bug.py", line 13, in Msg_as_str= Msg.as_string(unixfrom=True) File "/usr/lib64/python3.3/email/message.py", line 151, in as_string g.flatten(self, unixfrom=unixfrom) File "/usr/lib64/python3.3/email/generator.py", line 112, in flatten self._write(msg) File "/usr/lib64/python3.3/email/generator.py", line 171, in _write self._write_headers(msg) File "/usr/lib64/python3.3/email/generator.py", line 198, in _write_headers self.write(self.policy.fold(h, v)) File "/usr/lib64/python3.3/email/policy.py", line 153, in fold return self._fold(name, value, refold_binary=True) File "/usr/lib64/python3.3/email/policy.py", line 176, in _fold (len(lines[0])+len(name)+2 > maxlen or IndexError: list index out of range If I strip the '\n' from the lines feeded to the Parser, the bug does not occur. Thanks for looking into it, Helmut. This is with Python 3.3.0+ 3.3:ccc372b37fbb+ ---------- components: Library (Lib) messages: 178482 nosy: HJarausch priority: normal severity: normal status: open title: email.message.Message flatten dies of list index out of range type: crash versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 11:50:56 2012 From: report at bugs.python.org (Carsten Klein) Date: Sat, 29 Dec 2012 10:50:56 +0000 Subject: [issue16806] col_offset is -1 for multiline string expressions resembling docstrings In-Reply-To: <1356739702.66.0.625233113719.issue16806@psf.upfronthosting.co.za> Message-ID: <1356778256.96.0.831280645084.issue16806@psf.upfronthosting.co.za> Carsten Klein added the comment: Please see the attached patch that will resolve the issue. It also includes a test case in test_ast.py. What the patch does is as follows: - tok_state is extended by two fields, namely first_lineno and multi_line_start - first_lineno will be set by tok_get as soon as the beginning of a STRING is detected and it will be set to the current line tok->lineno. - multi_line_start is the beginning of the first line of a string - in parsetok we now distinguish between STRING nodes and other nodes. in case of STRING nodes, we will use the values of the above fields for determining the actual lineno and the col_offset, otherwise tok->col_offset and tok->lineno will be used when creating the token. The included test case ensures that the col_offset and lineno of multi line strings is calculated correctly. ---------- keywords: +patch Added file: http://bugs.python.org/file28477/issue1680.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 11:56:30 2012 From: report at bugs.python.org (Carsten Klein) Date: Sat, 29 Dec 2012 10:56:30 +0000 Subject: [issue16806] col_offset is -1 and lineno is wrong for multiline string expressions In-Reply-To: <1356739702.66.0.625233113719.issue16806@psf.upfronthosting.co.za> Message-ID: <1356778590.22.0.861252629569.issue16806@psf.upfronthosting.co.za> Changes by Carsten Klein : ---------- title: col_offset is -1 for multiline string expressions resembling docstrings -> col_offset is -1 and lineno is wrong for multiline string expressions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 11:59:17 2012 From: report at bugs.python.org (Carsten Klein) Date: Sat, 29 Dec 2012 10:59:17 +0000 Subject: [issue16806] col_offset is -1 and lineno is wrong for multiline string expressions In-Reply-To: <1356739702.66.0.625233113719.issue16806@psf.upfronthosting.co.za> Message-ID: <1356778757.84.0.468666360069.issue16806@psf.upfronthosting.co.za> Changes by Carsten Klein : Removed file: http://bugs.python.org/file28477/issue1680.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 11:59:55 2012 From: report at bugs.python.org (Carsten Klein) Date: Sat, 29 Dec 2012 10:59:55 +0000 Subject: [issue16806] col_offset is -1 and lineno is wrong for multiline string expressions In-Reply-To: <1356739702.66.0.625233113719.issue16806@psf.upfronthosting.co.za> Message-ID: <1356778795.31.0.770959818433.issue16806@psf.upfronthosting.co.za> Changes by Carsten Klein : Added file: http://bugs.python.org/file28478/issue16806.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 13:42:16 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 12:42:16 +0000 Subject: [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356768608.74.0.768872922572.issue16805@psf.upfronthosting.co.za> Message-ID: Tshepang Lekhonkhobe added the comment: docutils 0.8.1-8 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 13:44:41 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sat, 29 Dec 2012 12:44:41 +0000 Subject: [issue16808] inspect.stack() should return list of named tuples In-Reply-To: <1356750149.18.0.966123919893.issue16808@psf.upfronthosting.co.za> Message-ID: <1356785081.13.0.0296545644884.issue16808@psf.upfronthosting.co.za> Daniel Shahaf added the comment: Why did you set stage to 'needs patch'? One is already attached. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 13:57:52 2012 From: report at bugs.python.org (Sandro Tosi) Date: Sat, 29 Dec 2012 12:57:52 +0000 Subject: [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: Message-ID: Sandro Tosi added the comment: On Sat, Dec 29, 2012 at 4:33 AM, Tshepang Lekhonkhobe wrote: > It is my preference to be able to build all of CPython with the > already-installed distro packages, instead of pulling in foreign ones. IMO, I think with a project as bit as CPython, you should leave you personal preferences apart and use (as much as possible) the tools the project has decided to use: having a consistent set of tools to build doc across everyone/everything (like auto-build doc machines) trying to generate the doc is the proper way to handle it. > Any reason why not use later versions? no-one has done the work of testing, preparation and migration: do you volunteer? :) > Can't the docs be written such > that they can run on various versions of these tools anyway? Not always, but of course, as Georg said, if for note directive we can have a syntax working with current and higher versions of sphinx/docutils, that's ok to do it. I only think that using a non-standard set of doc-build-tools is to be discouraged, and sticking to what Makefile will fetch is the proper way to build the doc and contribute to it. Regards, -- 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 Sat Dec 29 13:59:04 2012 From: report at bugs.python.org (Carsten Klein) Date: Sat, 29 Dec 2012 12:59:04 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356785944.9.0.710024866138.issue16801@psf.upfronthosting.co.za> Carsten Klein added the comment: The problem with this is that at the time that pydoc gets the information via inspect, the numbers have already been parsed as long or double and the original notation is no longer available. This is due to the fact that during build of the AST node for the NUMBER type, the value will already be deserialized into its machine representation, which is either long or double. The only way to preserve that information would be to extend the NUM_type with an additional 's' field which then would preserve its original notation and which can be retrieved from the AST. pydoc, however, would still fail as it does not use the AST. In order to restore the original information, pydoc must then source the original file or source of the function or class method and parse it using the AST. A much simpler approach would be to simply get the function or method source and extract its formal parameter list using for example a regular expression. However, preserving the original notation in the runtime is not required and shouldn't be done. ---------- nosy: +carsten.klein at axn-software.de _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:03:20 2012 From: report at bugs.python.org (Carsten Klein) Date: Sat, 29 Dec 2012 13:03:20 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356786200.5.0.792994530878.issue16801@psf.upfronthosting.co.za> Carsten Klein added the comment: Here are some links into the sources: Python/ast.c, ast_for_atom(), line 1872ff. Python/ast.c, parsenumber(), line 3632ff. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:07:06 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 13:07:06 +0000 Subject: [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: Message-ID: Tshepang Lekhonkhobe added the comment: > no-one has done the work of testing, preparation and migration: do you > volunteer? :) What needs doing exactly? I would volunteer if guided. I normally build with the Debian-provided tools, and the docs look good, all but those note directive errors. Also, can I submit a patch that adds the missing newlines, or will some committer take care of it, or does this need further discussion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:12:41 2012 From: report at bugs.python.org (Carsten Klein) Date: Sat, 29 Dec 2012 13:12:41 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356786761.42.0.773267960398.issue16801@psf.upfronthosting.co.za> Carsten Klein added the comment: However, hinting inspect to use a different format when serializing the default values for existing keyword parameters of methods or functions seems to be a good idea and +1 by me for that. Personally, I'd rather have the decorator based solution than having to manually add additional fields to a given method or function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:18:23 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 29 Dec 2012 13:18:23 +0000 Subject: [issue16798] DTD not checked In-Reply-To: <1356658629.79.0.632401126307.issue16798@psf.upfronthosting.co.za> Message-ID: <1356787103.83.0.952304162428.issue16798@psf.upfronthosting.co.za> Eli Bendersky added the comment: I have no plans adding this feature to etree. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:23:01 2012 From: report at bugs.python.org (Sandro Tosi) Date: Sat, 29 Dec 2012 13:23:01 +0000 Subject: [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: Message-ID: Sandro Tosi added the comment: On Sat, Dec 29, 2012 at 4:07 PM, Tshepang Lekhonkhobe wrote: >> no-one has done the work of testing, preparation and migration: do you >> volunteer? :) > > What needs doing exactly? I would volunteer if guided. I normally (you always can't expect to be guided) it's not much more than - update sphinx (and the other tools it depends on, if needed). - fix what's broken or what needs updating - verify the doc is ok for any supported branches. > Also, can I submit a patch that adds the missing newlines, or will > some committer take care of it, or does this need further discussion? it won't hurt to have a patch. But please build the doc it with the CPython selected tools before submitting the patch, and verifying the doc sections you've changed are still ok. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:24:26 2012 From: report at bugs.python.org (Christian Heimes) Date: Sat, 29 Dec 2012 13:24:26 +0000 Subject: [issue16804] python3 -S -m site fails In-Reply-To: <1356726163.27.0.125833225728.issue16804@psf.upfronthosting.co.za> Message-ID: <1356787466.25.0.697351183049.issue16804@psf.upfronthosting.co.za> Changes by Christian Heimes : ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 14:43:54 2012 From: report at bugs.python.org (Andrew) Date: Sat, 29 Dec 2012 13:43:54 +0000 Subject: [issue16812] os.symlink can return wrong FileExistsError/WindowsError information Message-ID: <1356788634.61.0.928223501343.issue16812@psf.upfronthosting.co.za> New submission from Andrew: When attempting to make a symlink using a name that already exists, a FileExistsError is raised (and rightfully so), but it lists the source name rather than the destination name. However, the existing destination name is what causes the exception to be raised, not the existing source. Since the FileExistsError is WinError 183 and I haven't attempted this on another OS, I'm marking this as Windows-specific. Issue 13775 seems to be related. ---------- components: Windows messages: 178493 nosy: IAmTheClaw priority: normal severity: normal status: open title: os.symlink can return wrong FileExistsError/WindowsError information type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 15:05:58 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 14:05:58 +0000 Subject: [issue16813] use paths relative to CPython root Message-ID: <1356789958.56.0.310078512917.issue16813@psf.upfronthosting.co.za> New submission from Tshepang Lekhonkhobe: I think it's a good idea to simply list the 'full' path. ---------- assignee: docs at python components: Devguide, Documentation files: use-paths-relative-to-root.diff keywords: patch messages: 178494 nosy: docs at python, ezio.melotti, tshepang priority: normal severity: normal status: open title: use paths relative to CPython root Added file: http://bugs.python.org/file28479/use-paths-relative-to-root.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 15:11:51 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 14:11:51 +0000 Subject: [issue16814] use --directory option of make Message-ID: <1356790311.86.0.00498941541992.issue16814@psf.upfronthosting.co.za> New submission from Tshepang Lekhonkhobe: This avoids having to run 2 separate commands. ---------- components: Devguide files: make-can-specify-build-directory.diff keywords: patch messages: 178495 nosy: ezio.melotti, tshepang priority: normal severity: normal status: open title: use --directory option of make Added file: http://bugs.python.org/file28480/make-can-specify-build-directory.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 15:28:31 2012 From: report at bugs.python.org (Sandro Tosi) Date: Sat, 29 Dec 2012 14:28:31 +0000 Subject: [issue16814] use --directory option of make In-Reply-To: <1356790311.86.0.00498941541992.issue16814@psf.upfronthosting.co.za> Message-ID: <1356791311.86.0.953645448132.issue16814@psf.upfronthosting.co.za> Sandro Tosi added the comment: i'd use make -C Doc html much more compact and what you would usually find on the internet for "cd into the dir and run the html target in it" ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 15:51:01 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 14:51:01 +0000 Subject: [issue16814] use --directory option of make In-Reply-To: <1356791311.86.0.953645448132.issue16814@psf.upfronthosting.co.za> Message-ID: Tshepang Lekhonkhobe added the comment: I like long-form options for documentation purposes since it's clearer what the option is for. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 15:51:35 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 29 Dec 2012 14:51:35 +0000 Subject: [issue16219] segfault when using xml.etree.ElementTree.XMLTreeBuilder In-Reply-To: <1350148941.07.0.23902695609.issue16219@psf.upfronthosting.co.za> Message-ID: <1356792695.39.0.582838292429.issue16219@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:00:01 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 29 Dec 2012 15:00:01 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1356793201.27.0.927316644284.issue16076@psf.upfronthosting.co.za> Eli Bendersky added the comment: Daniel, is your patch made vs. the 3.3 branch? I'll need to apply there first, and then merge up to default (3.4). [Also, removing the 3.2 tag here. 3.2 won't be fixed to make _elementtree pickleable - it never was]. ---------- versions: -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:04:46 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sat, 29 Dec 2012 15:04:46 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1356793486.6.0.329315017493.issue16076@psf.upfronthosting.co.za> Daniel Shahaf added the comment: I wrote the patch against default (3.4), but it applies cleanly to 3.3. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:10:33 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 29 Dec 2012 15:10:33 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1356793833.67.0.0772240592312.issue16076@psf.upfronthosting.co.za> Eli Bendersky added the comment: Also, could you explain what makes test___all__ start failing with this patch? What are you adding that makes that happen? P.S. I suspect the root reason is the bad way etree tests are structured in general. See issue 15083 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:12:05 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sat, 29 Dec 2012 15:12:05 +0000 Subject: [issue15651] PEP 3121, 384 refactoring applied to elementtree module In-Reply-To: <1344968721.44.0.689766020196.issue15651@psf.upfronthosting.co.za> Message-ID: <1356793925.64.0.674062968428.issue15651@psf.upfronthosting.co.za> Eli Bendersky added the comment: Thanks for the patch. I'll take a look. ---------- assignee: -> eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:13:58 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 29 Dec 2012 15:13:58 +0000 Subject: [issue16811] email.message.Message flatten dies of list index out of range In-Reply-To: <1356776594.55.0.534961583044.issue16811@psf.upfronthosting.co.za> Message-ID: <1356794038.36.0.722776549517.issue16811@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- components: +email nosy: +barry, r.david.murray stage: -> needs patch type: crash -> behavior versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:25:10 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 29 Dec 2012 15:25:10 +0000 Subject: [issue16811] email.message.Message flatten dies of list index out of range In-Reply-To: <1356776594.55.0.534961583044.issue16811@psf.upfronthosting.co.za> Message-ID: <1356794710.73.0.882082958896.issue16811@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the report. We thought we fixed this once already (in issue 11401). It looks like that only fixed the "old" folding algorithm, and that the new one has the same bug. I thought the test ran against both algorithms, but I must have made a mistake. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:27:23 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 15:27:23 +0000 Subject: [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> Message-ID: <1356794843.26.0.553083533701.issue16805@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: I have tested the attached patch using official tools (make -C Doc html) and the only differences, between before and after, are: * The genindex files, where some of the keywords that are duplicated in the documentation would end up getting randomly swapped around. An example is "DEDENT token", which appears twice in the documentation (see http://docs.python.org/3/genindex-D.html). In its case, the 1st url points to where the 2nd url used to point and vice versa. * objects.inv: related to genindex changes? * searchindex.js: also related to genindex changes? I suspect these differences do not matter though, since these are just indexes. ---------- keywords: +patch Added file: http://bugs.python.org/file28481/remove-directives-warnings.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:43:05 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 29 Dec 2012 15:43:05 +0000 Subject: [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356789958.56.0.310078512917.issue16813@psf.upfronthosting.co.za> Message-ID: <1356795785.22.0.0602457151982.issue16813@psf.upfronthosting.co.za> R. David Murray added the comment: Thanks for the suggestion, but the context is that you are in the Doc directory in order to run make, so I think the existing documentation is preferable. I'd let George decide, though. ---------- nosy: +georg.brandl, r.david.murray title: use paths relative to CPython root -> use paths relative to CPython root in documentation building instructions _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:47:00 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 29 Dec 2012 15:47:00 +0000 Subject: [issue16814] use --directory option of make In-Reply-To: <1356790311.86.0.00498941541992.issue16814@psf.upfronthosting.co.za> Message-ID: <1356796020.34.0.799668343721.issue16814@psf.upfronthosting.co.za> R. David Murray added the comment: I think the fact that the cd paradigm is more commonly encountered is a fairly strong argument in favor of keeping it, but I'm only -0 on this change. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:47:43 2012 From: report at bugs.python.org (R. David Murray) Date: Sat, 29 Dec 2012 15:47:43 +0000 Subject: [issue16814] use --directory option of make in describing how to build the docs In-Reply-To: <1356790311.86.0.00498941541992.issue16814@psf.upfronthosting.co.za> Message-ID: <1356796063.52.0.628453569255.issue16814@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: use --directory option of make -> use --directory option of make in describing how to build the docs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:52:07 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 15:52:07 +0000 Subject: [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> Message-ID: <1356796327.54.0.484754818829.issue16805@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: The previous patch applies cleanly to 3.3 and 3.4. I am now attaching one that applies cleanly to 3.2. ---------- versions: +Python 3.3 Added file: http://bugs.python.org/file28482/remove-directives-warnings-3.2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 16:59:07 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 15:59:07 +0000 Subject: [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> Message-ID: <1356796747.11.0.649329107828.issue16805@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: And this one patch applies to 2.7. ---------- versions: +Python 2.7, Python 3.2 Added file: http://bugs.python.org/file28483/remove-directives-warnings-2.7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:09:14 2012 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 29 Dec 2012 16:09:14 +0000 Subject: [issue16778] Logger.findCaller needs to be smarter In-Reply-To: <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za> Message-ID: <1356797354.32.0.959775942358.issue16778@psf.upfronthosting.co.za> Vinay Sajip added the comment: > Passing a globals() instance looks hackish. Agreed it's not ideal, but we're constrained by what's available to compare against via the frame. Apart from globals() there's only really the filename, which isn't ideal either. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:18:13 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sat, 29 Dec 2012 16:18:13 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1356797893.54.0.894043200885.issue16076@psf.upfronthosting.co.za> Daniel Shahaf added the comment: Any attempt to pickle an Element object in test_xml_etree.py causes that test to fail if test___all__ had been run before it; see attached transcript. It's against 3.4, with no changes other than the testsuite changes shown within. I don't know what the root cause is. As noted before, adding 'xml.etree' to test___all__.AllTest.test_all.blacklist is a workaround, so I assume the root cause lies within the test framework --- a bad interaction between the import magics in test___all__ and test_xml_etree. ---------- Added file: http://bugs.python.org/file28484/transcript-test___all__.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:20:13 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sat, 29 Dec 2012 16:20:13 +0000 Subject: [issue15083] Rewrite ElementTree tests in a cleaner and safer way In-Reply-To: <1339818759.87.0.747348787779.issue15083@psf.upfronthosting.co.za> Message-ID: <1356798013.85.0.134515468464.issue15083@psf.upfronthosting.co.za> Changes by Daniel Shahaf : ---------- nosy: +danielsh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:38:54 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 16:38:54 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356799134.12.0.828672643745.issue16801@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > And if os.open were supplied in os.py: > > @inspect.override_string_representation('mode', > 'os.O_CREAT | os.O_RDWR') > def open(file, flags, mode=0o777, *, dir_fd=None): Other use case is a sentinel default. "foo(arg={})" looks better than "foo(arg=)" for function which use a sentinel idiom: _sentinel = object() def foo(arg=_sentinel): if arg is _sentinel: arg = {} ... Sometimes full signature overwriting is needed (see for example Python implementation of operator.methodcaller() in issue16694). ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:39:28 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 16:39:28 +0000 Subject: [issue16809] Tk 8.6.0 introduces TypeError. (Tk 8.5.13 works) In-Reply-To: <1356763107.47.0.647000150457.issue16809@psf.upfronthosting.co.za> Message-ID: <1356799168.27.0.148505601759.issue16809@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:46:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 16:46:42 +0000 Subject: [issue16812] os.symlink can return wrong FileExistsError/WindowsError information In-Reply-To: <1356788634.61.0.928223501343.issue16812@psf.upfronthosting.co.za> Message-ID: <1356799602.19.0.574533983656.issue16812@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue16074. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:48:08 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 16:48:08 +0000 Subject: [issue13810] refer people to Doc/Makefile when not using 'make' to build main documentation In-Reply-To: <1326844922.3.0.806900590875.issue13810@psf.upfronthosting.co.za> Message-ID: <1356799688.24.0.1911555985.issue13810@psf.upfronthosting.co.za> Tshepang Lekhonkhobe added the comment: > Additionally, the whole way we're fetching those tools will be revisited soon. What are/were your plans ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:57:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 16:57:06 +0000 Subject: [issue16074] bad error message in os.rename In-Reply-To: <1348820000.8.0.496903200143.issue16074@psf.upfronthosting.co.za> Message-ID: <1356800226.68.0.884683381706.issue16074@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: As I see, now 3.4 behavior differs from 3.3 behavior. >>> os.link('non-existent-name', 'new-name') Traceback (most recent call last): File "", line 1, in FileNotFoundError: [Errno 2] No such file or directory: 'non-existent-name' >>> os.symlink('long-name'*1000, 'new-name') Traceback (most recent call last): File "", line 1, in OSError: [Errno 36] File name too long: 'long-namelong-namelong-namelong-namelong-namelong-name... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 17:57:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 16:57:36 +0000 Subject: [issue13775] Access Denied message on symlink creation misleading for an existing file/directory target. In-Reply-To: <1326330408.97.0.484457419227.issue13775@psf.upfronthosting.co.za> Message-ID: <1356800256.03.0.113959797287.issue13775@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: See also issue16074. ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 18:18:01 2012 From: report at bugs.python.org (Bernie Keimel) Date: Sat, 29 Dec 2012 17:18:01 +0000 Subject: [issue16815] Is all OK!! Message-ID: <1356801481.74.0.612301045866.issue16815@psf.upfronthosting.co.za> Changes by Bernie Keimel : ---------- nosy: Bernie.Keimel priority: normal severity: normal status: open title: Is all OK!! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 18:20:48 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Sat, 29 Dec 2012 17:20:48 +0000 Subject: [issue16815] Is all OK!! Message-ID: <1356801648.45.0.30497086833.issue16815@psf.upfronthosting.co.za> New submission from Hynek Schlawack: Glad to hear. ---------- nosy: +hynek resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 18:50:14 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 29 Dec 2012 17:50:14 +0000 Subject: [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356789958.56.0.310078512917.issue16813@psf.upfronthosting.co.za> Message-ID: <1356803414.83.0.455091860576.issue16813@psf.upfronthosting.co.za> Georg Brandl added the comment: Fine with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 18:50:50 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 29 Dec 2012 17:50:50 +0000 Subject: [issue16814] use --directory option of make in describing how to build the docs In-Reply-To: <1356790311.86.0.00498941541992.issue16814@psf.upfronthosting.co.za> Message-ID: <1356803450.88.0.111568253587.issue16814@psf.upfronthosting.co.za> Georg Brandl added the comment: Agree with David. ---------- nosy: +georg.brandl status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 18:52:08 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 29 Dec 2012 17:52:08 +0000 Subject: [issue16805] when building docs on Debian 7 --> ERROR: Error in "note" directive In-Reply-To: <1356739435.76.0.304211925624.issue16805@psf.upfronthosting.co.za> Message-ID: <1356803528.83.0.35607756781.issue16805@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 19:22:57 2012 From: report at bugs.python.org (Georg Brandl) Date: Sat, 29 Dec 2012 18:22:57 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356805377.82.0.709570669629.issue16801@psf.upfronthosting.co.za> Georg Brandl added the comment: A simple, minimal-invasive solution would be to allow a signature for documentation purposes as the first line of the docstrings. pydoc could recognize this (if docstring.startswith(func.__name__ + '(') or something like that), and display the given signature instead of the introspected one. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 19:33:33 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 18:33:33 +0000 Subject: [issue16810] inconsistency in weekday In-Reply-To: <1356764061.7.0.32287825168.issue16810@psf.upfronthosting.co.za> Message-ID: <1356806013.39.0.507323491041.issue16810@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I?don't see a difference. $ ./python -c 'import time; print(time.localtime())' time.struct_time(tm_year=2012, tm_mon=12, tm_mday=29, tm_hour=19, tm_min=36, tm_sec=35, tm_wday=5, tm_yday=364, tm_isdst=0) $ ./python -c 'import datetime; print(datetime.date.today().timetuple())' time.struct_time(tm_year=2012, tm_mon=12, tm_mday=29, tm_hour=0, tm_min=0, tm_sec=0, tm_wday=5, tm_yday=364, tm_isdst=-1) Can you please provide a full code which demonstrate a problem? ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 19:41:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 18:41:08 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356806468.96.0.270935735231.issue16801@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > pydoc could recognize this (if docstring.startswith(func.__name__ + '(') or something like that), and display the given signature instead of the introspected one. Looks good for me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 19:53:21 2012 From: report at bugs.python.org (Glenn Linderman) Date: Sat, 29 Dec 2012 18:53:21 +0000 Subject: [issue16810] inconsistency in weekday In-Reply-To: <1356764061.7.0.32287825168.issue16810@psf.upfronthosting.co.za> Message-ID: <1356807201.52.0.743549146686.issue16810@psf.upfronthosting.co.za> Glenn Linderman added the comment: Thanks for the response, Serhiy. I misreported, but there is still a bug in this area, it seems. Attached is some code. I was printing out (too) many values from datetime to learn how it worked. I got confused on which ones were printed in which order. The attached code reduces the number of values printed to just those that should be consistent, but according to the docs, aren't. However, now that I figured out which ones were printed by which code, I no longer find a discrepancy between code and documentation, just a confusing interface whereby weekday can be obtained in three different forms. ---------- Added file: http://bugs.python.org/file28485/t38.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 19:54:37 2012 From: report at bugs.python.org (Glenn Linderman) Date: Sat, 29 Dec 2012 18:54:37 +0000 Subject: [issue16810] inconsistency in weekday In-Reply-To: <1356764061.7.0.32287825168.issue16810@psf.upfronthosting.co.za> Message-ID: <1356807277.67.0.621974663777.issue16810@psf.upfronthosting.co.za> Changes by Glenn Linderman : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 20:00:47 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Dec 2012 19:00:47 +0000 Subject: [issue16642] Mention new "kwargs" named tuple parameter in sched module In-Reply-To: <1354963970.59.0.876106484214.issue16642@psf.upfronthosting.co.za> Message-ID: <3YYYyk43kgzRrs@mail.python.org> Roundup Robot added the comment: New changeset 5db0833f135b by Serhiy Storchaka in branch '3.3': Issue #16642: Document kwargs field in sched.Event named tuple. http://hg.python.org/cpython/rev/5db0833f135b New changeset cf6425df1cb8 by Serhiy Storchaka in branch 'default': Issue #16642: Document kwargs field in sched.Event named tuple. http://hg.python.org/cpython/rev/cf6425df1cb8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 20:17:06 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Dec 2012 19:17:06 +0000 Subject: [issue16641] sched.scheduler.enter arguments should not be modifiable In-Reply-To: <1354961661.69.0.670095014649.issue16641@psf.upfronthosting.co.za> Message-ID: <3YYZKY4vYkzRnh@mail.python.org> Roundup Robot added the comment: New changeset 1c9c0f92df65 by Serhiy Storchaka in branch '3.3': Issue #16641: Fix default values of sched.scheduler.enter arguments were modifiable. http://hg.python.org/cpython/rev/1c9c0f92df65 New changeset e22ebc34a8eb by Serhiy Storchaka in branch 'default': Issue #16641: Fix default values of sched.scheduler.enter arguments were modifiable. http://hg.python.org/cpython/rev/e22ebc34a8eb ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 20:36:37 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Dec 2012 19:36:37 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <3YYZm4655NzQxq@mail.python.org> Roundup Robot added the comment: New changeset 467c46e312eb by Serhiy Storchaka in branch '3.3': Issue #16165: Fix sched.scheduler.run() method was block a scheduler for http://hg.python.org/cpython/rev/467c46e312eb New changeset ac919a281643 by Serhiy Storchaka in branch 'default': Issue #16165: Fix sched.scheduler.run() method was block a scheduler for http://hg.python.org/cpython/rev/ac919a281643 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 20:48:56 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Dec 2012 19:48:56 +0000 Subject: [issue16640] Less code under lock in sched.scheduler In-Reply-To: <1354959239.11.0.372090079452.issue16640@psf.upfronthosting.co.za> Message-ID: <3YYb2H2hHzzRhJ@mail.python.org> Roundup Robot added the comment: New changeset 1bed43c0a5af by Serhiy Storchaka in branch 'default': Issue #16640: Run less code under a lock in sched module. http://hg.python.org/cpython/rev/1bed43c0a5af ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 20:51:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 19:51:07 +0000 Subject: [issue16642] Mention new "kwargs" named tuple parameter in sched module In-Reply-To: <1354963970.59.0.876106484214.issue16642@psf.upfronthosting.co.za> Message-ID: <1356810667.21.0.461610855893.issue16642@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 20:54:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 19:54:11 +0000 Subject: [issue16641] sched.scheduler.enter arguments should not be modifiable In-Reply-To: <1354961661.69.0.670095014649.issue16641@psf.upfronthosting.co.za> Message-ID: <1356810851.54.0.985378017166.issue16641@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 20:54:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 19:54:23 +0000 Subject: [issue16165] sched.scheduler.run() blocks scheduler In-Reply-To: <1349697924.22.0.927523590696.issue16165@psf.upfronthosting.co.za> Message-ID: <1356810863.81.0.982350708352.issue16165@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 20:57:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 19:57:18 +0000 Subject: [issue16640] Less code under lock in sched.scheduler In-Reply-To: <1354959239.11.0.372090079452.issue16640@psf.upfronthosting.co.za> Message-ID: <1356811038.76.0.137459399829.issue16640@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:01:38 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Dec 2012 20:01:38 +0000 Subject: [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356789958.56.0.310078512917.issue16813@psf.upfronthosting.co.za> Message-ID: <3YYbJy0Wf6zRwT@mail.python.org> Roundup Robot added the comment: New changeset 20333d160f4e by Chris Jerdonek in branch 'default': Issue #16813: Use the full relative path in the documentation-building instructions. http://hg.python.org/devguide/rev/20333d160f4e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:07:32 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 29 Dec 2012 20:07:32 +0000 Subject: [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356789958.56.0.310078512917.issue16813@psf.upfronthosting.co.za> Message-ID: <1356811652.1.0.918241725051.issue16813@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for the patch. Out of curiosity, does anyone know if the following works on all or most systems? $ open _build/html/index.html That could also be added to save time for people that don't already know. ---------- nosy: +chris.jerdonek resolution: -> fixed stage: -> patch review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:12:31 2012 From: report at bugs.python.org (Sandro Tosi) Date: Sat, 29 Dec 2012 20:12:31 +0000 Subject: [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356811652.1.0.918241725051.issue16813@psf.upfronthosting.co.za> Message-ID: Sandro Tosi added the comment: > Out of curiosity, does anyone know if the following works on all or most systems? > > $ open _build/html/index.html it doesn't work on my Debian system: $ open _build/html/index.html Couldn't get a file descriptor referring to the console as open is a link to "openvt - start a program on a new virtual terminal (VT)." ---------- nosy: +sandro.tosi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:23:58 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 29 Dec 2012 20:23:58 +0000 Subject: [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356789958.56.0.310078512917.issue16813@psf.upfronthosting.co.za> Message-ID: <1356812638.66.0.51201728407.issue16813@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks. Btw, it works for me on Mac OS X I believe out of the box: Help: Open opens files from a shell. By default, opens each file using the default application for that file. If the file is in the form of a URL, the file will be opened as a URL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:26:31 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 20:26:31 +0000 Subject: [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356812638.66.0.51201728407.issue16813@psf.upfronthosting.co.za> Message-ID: Tshepang Lekhonkhobe added the comment: The Linux (and Unix?) equivalent is xdg-open. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:30:22 2012 From: report at bugs.python.org (Vinay Sajip) Date: Sat, 29 Dec 2012 20:30:22 +0000 Subject: [issue16778] Logger.findCaller needs to be smarter In-Reply-To: <1356452428.01.0.563947098769.issue16778@psf.upfronthosting.co.za> Message-ID: <1356813022.4.0.0725709402189.issue16778@psf.upfronthosting.co.za> Changes by Vinay Sajip : Added file: http://bugs.python.org/file28486/aecafebb7880.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:41:06 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 29 Dec 2012 20:41:06 +0000 Subject: [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356789958.56.0.310078512917.issue16813@psf.upfronthosting.co.za> Message-ID: <1356813666.49.0.856565603524.issue16813@psf.upfronthosting.co.za> Ezio Melotti added the comment: FTR there's also "make htmlview" that already opens a browser to the index of the locally built docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:46:32 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Dec 2012 20:46:32 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <3YYcJl6F80zRwZ@mail.python.org> Roundup Robot added the comment: New changeset cf8d692cc847 by Serhiy Storchaka in branch '2.7': Issue #16485: Fix file descriptor not being closed if file header patching fails on closing of aifc file. http://hg.python.org/cpython/rev/cf8d692cc847 New changeset e3c4e9f4ea0f by Serhiy Storchaka in branch '3.2': Issue #16485: Fix file descriptor not being closed if file header patching fails on closing of aifc file. http://hg.python.org/cpython/rev/e3c4e9f4ea0f New changeset 9a571c4a16d1 by Serhiy Storchaka in branch '3.3': Issue #16485: Fix file descriptor not being closed if file header patching fails on closing of aifc file. http://hg.python.org/cpython/rev/9a571c4a16d1 New changeset 79a8f6e1dfb0 by Serhiy Storchaka in branch 'default': Issue #16485: Fix file descriptor not being closed if file header patching fails on closing of aifc file. http://hg.python.org/cpython/rev/79a8f6e1dfb0 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:47:52 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sat, 29 Dec 2012 20:47:52 +0000 Subject: [issue16813] use paths relative to CPython root in documentation building instructions In-Reply-To: <1356813666.49.0.856565603524.issue16813@psf.upfronthosting.co.za> Message-ID: Tshepang Lekhonkhobe added the comment: Nice. Didn't know about that one. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:55:59 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Dec 2012 20:55:59 +0000 Subject: [issue16486] Add context manager support to aifc module In-Reply-To: <1353073163.72.0.969679362142.issue16486@psf.upfronthosting.co.za> Message-ID: <3YYcWf67LkzRyG@mail.python.org> Roundup Robot added the comment: New changeset 9beb11071dd1 by Serhiy Storchaka in branch 'default': Issue #16486: Make aifc files work with 'with' as context managers. http://hg.python.org/cpython/rev/9beb11071dd1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 21:57:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 20:57:42 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <1356814662.15.0.301793166057.issue16485@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> works for me stage: patch review -> committed/rejected status: open -> closed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:00:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 21:00:45 +0000 Subject: [issue16486] Add context manager support to aifc module In-Reply-To: <1353073163.72.0.969679362142.issue16486@psf.upfronthosting.co.za> Message-ID: <1356814845.35.0.328534678359.issue16486@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I have added the test that the file was actually closed using external file (as in test_close()). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:00:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 21:00:53 +0000 Subject: [issue16485] FD leaks in aifc module In-Reply-To: <1353070173.54.0.899587497228.issue16485@psf.upfronthosting.co.za> Message-ID: <1356814853.48.0.798488792666.issue16485@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: works for me -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:06:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 21:06:41 +0000 Subject: [issue16694] Add pure Python operator module In-Reply-To: <1355642681.84.0.519392654153.issue16694@psf.upfronthosting.co.za> Message-ID: <1356815201.2.0.369270351056.issue16694@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:07:36 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 21:07:36 +0000 Subject: [issue16320] Establish order in bytes/string dependencies In-Reply-To: <1351156037.64.0.017004315605.issue16320@psf.upfronthosting.co.za> Message-ID: <1356815256.9.0.249264204812.issue16320@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:08:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 21:08:55 +0000 Subject: [issue12004] PyZipFile.writepy gives internal error on syntax errors In-Reply-To: <1304562440.9.0.83817194423.issue12004@psf.upfronthosting.co.za> Message-ID: <1356815335.97.0.373156307608.issue12004@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:11:31 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Dec 2012 21:11:31 +0000 Subject: [issue16782] No curses.initwin: Incorrect package docstring for curses In-Reply-To: <1356490142.44.0.537785717498.issue16782@psf.upfronthosting.co.za> Message-ID: <3YYcsZ4VF4zP0M@mail.python.org> Roundup Robot added the comment: New changeset cbee422ca727 by Andrew Svetlov in branch '3.2': Fix docstring in curses (#16782) http://hg.python.org/cpython/rev/cbee422ca727 New changeset e9cbe583156f by Andrew Svetlov in branch '3.3': Fix docstring in curses (#16782) http://hg.python.org/cpython/rev/e9cbe583156f New changeset 2cae7bde45ef by Andrew Svetlov in branch 'default': Fix docstring in curses (#16782) http://hg.python.org/cpython/rev/2cae7bde45ef New changeset 52900f205e6e by Andrew Svetlov in branch '2.7': Fix docstring in curses (#16782) http://hg.python.org/cpython/rev/52900f205e6e ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:11:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 21:11:41 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1356815501.89.0.347579562975.issue16688@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:13:10 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 29 Dec 2012 21:13:10 +0000 Subject: [issue16782] No curses.initwin: Incorrect package docstring for curses In-Reply-To: <1356490142.44.0.537785717498.issue16782@psf.upfronthosting.co.za> Message-ID: <1356815590.14.0.89099833157.issue16782@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Fixed in active development branches. Thanks. ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:13:43 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sat, 29 Dec 2012 21:13:43 +0000 Subject: [issue16782] No curses.initwin: Incorrect package docstring for curses In-Reply-To: <1356490142.44.0.537785717498.issue16782@psf.upfronthosting.co.za> Message-ID: <1356815623.29.0.725074644274.issue16782@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed versions: +Python 2.7, Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:37:29 2012 From: report at bugs.python.org (=?utf-8?q?Domen_Ko=C5=BEar?=) Date: Sat, 29 Dec 2012 21:37:29 +0000 Subject: [issue16816] Bug in hash randomization Message-ID: <1356817049.81.0.823751474505.issue16816@psf.upfronthosting.co.za> New submission from Domen Ko?ar: Script to reproduce the issue https://gist.github.com/4409304 ---------- components: Interpreter Core messages: 178539 nosy: iElectric priority: normal severity: normal status: open title: Bug in hash randomization type: behavior versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:45:31 2012 From: report at bugs.python.org (Roundup Robot) Date: Sat, 29 Dec 2012 21:45:31 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <3YYdcp4bkBzRwd@mail.python.org> Roundup Robot added the comment: New changeset 44a4f9289faa by Serhiy Storchaka in branch '3.3': Issue #16688: Fix backreferences did make case-insensitive regex fail on non-ASCII strings. http://hg.python.org/cpython/rev/44a4f9289faa New changeset c59ee1ff6f27 by Serhiy Storchaka in branch 'default': Issue #16688: Fix backreferences did make case-insensitive regex fail on non-ASCII strings. http://hg.python.org/cpython/rev/c59ee1ff6f27 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:50:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 21:50:41 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1356817841.68.0.810853692655.issue16688@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fixed. Thank you for a patch, Matthew. I hope to see more your patches. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:53:16 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 21:53:16 +0000 Subject: [issue15861] ttk.Treeview "unmatched open brace in list" In-Reply-To: <1346794903.35.0.326071924778.issue15861@psf.upfronthosting.co.za> Message-ID: <1356817996.32.0.580468761993.issue15861@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:53:35 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 21:53:35 +0000 Subject: [issue16686] audioop overflow issues In-Reply-To: <1355508907.39.0.527029919241.issue16686@psf.upfronthosting.co.za> Message-ID: <1356818015.97.0.670521679998.issue16686@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:56:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 21:56:22 +0000 Subject: [issue16550] pickletools.py treats 32bit lengths as signed, but pickle.py as unsigned In-Reply-To: <1353845836.76.0.0245039537422.issue16550@psf.upfronthosting.co.za> Message-ID: <1356818182.73.0.411801158399.issue16550@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:57:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 21:57:46 +0000 Subject: [issue16601] Restarting iteration over tarfile continues from where it left off. In-Reply-To: <1354564872.87.0.0661195327337.issue16601@psf.upfronthosting.co.za> Message-ID: <1356818266.6.0.180469093182.issue16601@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:59:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 21:59:34 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1356818374.62.0.396364198427.issue16659@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 22:59:50 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 21:59:50 +0000 Subject: [issue16674] Faster getrandbits() for small integers In-Reply-To: <1355432076.17.0.54183868892.issue16674@psf.upfronthosting.co.za> Message-ID: <1356818390.75.0.337630874633.issue16674@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:00:15 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:00:15 +0000 Subject: [issue11159] Sax parser crashes if given unicode file name In-Reply-To: <1297261203.08.0.513476017898.issue11159@psf.upfronthosting.co.za> Message-ID: <1356818415.45.0.456663023384.issue11159@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:00:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:00:42 +0000 Subject: [issue16638] support multi-line docstring signatures in IDLE calltips In-Reply-To: <1354909776.12.0.96265352257.issue16638@psf.upfronthosting.co.za> Message-ID: <1356818442.13.0.139366914901.issue16638@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:01:23 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:01:23 +0000 Subject: [issue16624] subprocess.check_output should allow specifying stdin as a string In-Reply-To: <1354748057.02.0.623269532787.issue16624@psf.upfronthosting.co.za> Message-ID: <1356818483.77.0.388558586765.issue16624@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:03:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:03:18 +0000 Subject: [issue16630] IDLE: Calltip fails if __getattr__ raises exception In-Reply-To: <1354844775.58.0.855877358898.issue16630@psf.upfronthosting.co.za> Message-ID: <1356818598.83.0.206682887246.issue16630@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:04:11 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:04:11 +0000 Subject: [issue16569] Preventing errors of simultaneous access in zipfile In-Reply-To: <1354112511.94.0.436567820333.issue16569@psf.upfronthosting.co.za> Message-ID: <1356818651.75.0.511877131419.issue16569@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:06:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:06:06 +0000 Subject: [issue11344] Add os.path.splitpath(path) function In-Reply-To: <1298795208.87.0.771920756626.issue11344@psf.upfronthosting.co.za> Message-ID: <1356818766.28.0.966629286166.issue11344@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:07:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:07:20 +0000 Subject: [issue15989] Possible integer overflow of PyLong_AsLong() results In-Reply-To: <1348167705.87.0.588220983695.issue15989@psf.upfronthosting.co.za> Message-ID: <1356818840.87.0.618026626618.issue15989@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:08:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:08:10 +0000 Subject: [issue9720] zipfile writes incorrect local file header for large files in zip64 In-Reply-To: <1283216540.17.0.624049939978.issue9720@psf.upfronthosting.co.za> Message-ID: <1356818890.59.0.0871431211768.issue9720@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:10:45 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:10:45 +0000 Subject: [issue8745] zipimport is a bit slow In-Reply-To: <1274162892.24.0.612432614461.issue8745@psf.upfronthosting.co.za> Message-ID: <1356819045.68.0.246227477944.issue8745@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:12:25 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:12:25 +0000 Subject: [issue10395] new os.path function to extract common prefix based on path components In-Reply-To: <1289574847.69.0.366708031395.issue10395@psf.upfronthosting.co.za> Message-ID: <1356819145.28.0.810079477515.issue10395@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:16:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:16:40 +0000 Subject: [issue15490] Correct __sizeof__ support for StringIO In-Reply-To: <1343591617.54.0.289047671129.issue15490@psf.upfronthosting.co.za> Message-ID: <1356819400.0.0.857721571773.issue15490@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:16:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:16:52 +0000 Subject: [issue6975] symlinks incorrectly resolved on Linux In-Reply-To: <1253685313.69.0.648289112505.issue6975@psf.upfronthosting.co.za> Message-ID: <1356819412.79.0.588708209179.issue6975@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:17:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:17:44 +0000 Subject: [issue15999] Using new 'bool' format character In-Reply-To: <1348242429.94.0.662282558141.issue15999@psf.upfronthosting.co.za> Message-ID: <1356819464.9.0.587004203244.issue15999@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:19:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:19:42 +0000 Subject: [issue6083] Reference counting bug in PyArg_ParseTuple and PyArg_ParseTupleAndKeywords In-Reply-To: <1242980336.93.0.332167282409.issue6083@psf.upfronthosting.co.za> Message-ID: <1356819582.17.0.00464226767756.issue6083@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:20:06 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:20:06 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1356819606.24.0.154991379829.issue16061@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:23:37 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:23:37 +0000 Subject: [issue15475] Correct __sizeof__ support for itertools In-Reply-To: <1343418242.58.0.256146467281.issue15475@psf.upfronthosting.co.za> Message-ID: <1356819817.96.0.0518584027467.issue15475@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:24:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:24:20 +0000 Subject: [issue13968] Support recursive globs In-Reply-To: <1328700146.65.0.884103301197.issue13968@psf.upfronthosting.co.za> Message-ID: <1356819860.45.0.966625198957.issue13968@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:24:42 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sat, 29 Dec 2012 22:24:42 +0000 Subject: [issue15696] Correct __sizeof__ support for mmap In-Reply-To: <1345145499.47.0.489635799937.issue15696@psf.upfronthosting.co.za> Message-ID: <1356819882.08.0.817646434586.issue15696@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:43:17 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sat, 29 Dec 2012 22:43:17 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356820997.14.0.388161654392.issue16801@psf.upfronthosting.co.za> Terry J. Reedy added the comment: It seems to me that the real issue is not to preserve the original representation. What if the original author specified mode as 438 or calculated it as 0o600|0o60|0o6 ? He might and we should still like to see it as 0o666. So the real issue is to specify the representation on retrieval. We already have a mechanism for that: subclasses that override __str__ and __repr__! Moreover, that mechanism works for all accesses that do not use an explicit format, not just those functions that are re-written to use some redundant new machinery. It also allows display representations that would *not* be legal input syntax and thus could *not* be the original representation. Two examples: class octint(int): 'int that displays as octal' def __str__(self): return oct(self) __repr__ = __str__ mode = octint(0o644) print(mode) class flags4(int): 'int that displays as 4 binary flags' def __str__(self): return '|{:04b}|'.format(self) __repr__ = __str__ a = flags4(8) b = flags4(3) print(a, b, flags4(a|b)) def f(mode=octint(0o666), flags = flags4(0b1011)): pass print(f.__defaults__) import inspect print(inspect.formatargspec(*inspect.getfullargspec(f))) # prints 0o644 |1000| |0011| |1011| (0o666, |1011|) (mode=0o666, flags=|1011|) So I think this issue should be changed to 'Add octint int subclass to stdlib and use it for default file modes'. The inspect module could be a place to put it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Dec 29 23:46:45 2012 From: report at bugs.python.org (Andrew) Date: Sat, 29 Dec 2012 22:46:45 +0000 Subject: [issue16812] os.symlink can return wrong FileExistsError/WindowsError information In-Reply-To: <1356788634.61.0.928223501343.issue16812@psf.upfronthosting.co.za> Message-ID: <1356821205.34.0.717043129686.issue16812@psf.upfronthosting.co.za> Andrew added the comment: I tested this on FreeBSD 9.1, and the error message is correct there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 01:08:34 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 30 Dec 2012 00:08:34 +0000 Subject: [issue16434] SocketServer call shutdown in the wrong way In-Reply-To: <1352377990.43.0.148428023395.issue16434@psf.upfronthosting.co.za> Message-ID: <1356826114.63.0.137969284621.issue16434@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Move to pending until additional info will be provided. Required short test to reproduce the problem. ---------- status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 01:10:22 2012 From: report at bugs.python.org (Terry J. Reedy) Date: Sun, 30 Dec 2012 00:10:22 +0000 Subject: [issue994421] logging module prints unexpected message when no handler set Message-ID: <1356826222.57.0.352633425265.issue994421@psf.upfronthosting.co.za> Terry J. Reedy added the comment: Update: It appears that in at least 3.2+ (but not 2.7), loggers have a default handler, making the no-handler behavior moot. In any case, the example code prints 'one' and 'two' instead of the message. ---------- nosy: +terry.reedy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 01:12:11 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 30 Dec 2012 00:12:11 +0000 Subject: [issue16731] xxlimited/xxmodule docstrings ambiguous In-Reply-To: <1355946646.69.0.259699636535.issue16731@psf.upfronthosting.co.za> Message-ID: <1356826331.56.0.353516940538.issue16731@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 01:18:33 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 30 Dec 2012 00:18:33 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1356826713.47.0.494732068948.issue16076@psf.upfronthosting.co.za> Eli Bendersky added the comment: I think I understand what's going on there. Pickle, to make sure an object can be picked, looks at the module it comes from and tries to import its class, to make sure they're the same. What happens since 3.3 is that for the Python Element class, it imports ElementTree. The harness in test_xml_etree carefully sets up to ignore _elementtree so the correct class is pulled. However, if test___all__ runs before it it just does a brute "from ElementTree import *" which places the C version in sys.modules, and this is what pickle finds. So in the meantime, until issue 15083 is resolved I think it's safe to put ET in the ignore list of test___all__. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 01:22:24 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 30 Dec 2012 00:22:24 +0000 Subject: [issue15083] Rewrite ElementTree tests in a cleaner and safer way In-Reply-To: <1339818759.87.0.747348787779.issue15083@psf.upfronthosting.co.za> Message-ID: <1356826944.4.0.774972844701.issue15083@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 01:30:55 2012 From: report at bugs.python.org (Florent Xicluna) Date: Sun, 30 Dec 2012 00:30:55 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1356827455.96.0.323097772755.issue16076@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 01:56:10 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 30 Dec 2012 00:56:10 +0000 Subject: [issue16817] test___all__ has to save and restore sys.modules while it does all the importing Message-ID: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> New submission from Eli Bendersky: http://mail.python.org/pipermail/python-dev/2012-December/123368.html This came up while investigating some test-order-dependency failures in issue 16076. test___all__ goes over modules that have `__all__` in them and does 'from import *' on them. This leaves a lot of modules in sys.modules, which may interfere with some tests that do fancy things with sys,modules. In particular, the ElementTree tests have trouble with it because they carefully set up the imports to get the C or the Python version of etree (see issues 15083 and 15075). Would it make sense to save the sys.modules state and restore it in test___all__ so that sys.modules isn't affected by this test? ---------- assignee: eli.bendersky components: Tests messages: 178547 nosy: eli.bendersky priority: normal severity: normal stage: needs patch status: open title: test___all__ has to save and restore sys.modules while it does all the importing type: behavior versions: Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 01:58:41 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sun, 30 Dec 2012 00:58:41 +0000 Subject: [issue16817] test___all__ has to save and restore sys.modules while it does all the importing In-Reply-To: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> Message-ID: <1356829121.05.0.0485219489844.issue16817@psf.upfronthosting.co.za> Changes by Daniel Shahaf : ---------- nosy: +danielsh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 02:05:20 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 30 Dec 2012 01:05:20 +0000 Subject: [issue16817] test___all__ has to save and restore sys.modules while it does all the importing In-Reply-To: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> Message-ID: <1356829520.42.0.224099603194.issue16817@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 03:52:19 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 30 Dec 2012 02:52:19 +0000 Subject: [issue16741] `int()`, `float()`, etc think python strings are null-terminated In-Reply-To: <1356046641.74.0.314140910069.issue16741@psf.upfronthosting.co.za> Message-ID: <1356835939.81.0.381329802374.issue16741@psf.upfronthosting.co.za> Matthew Barnett added the comment: I've attached a patch. It now reports an invalid literal as-is: >>> int("#\N{ARABIC-INDIC DIGIT ONE}") Traceback (most recent call last): File "", line 1, in int("#\N{ARABIC-INDIC DIGIT ONE}") ValueError: invalid literal for int() with base 10: '#?' >>> int("foo\x00bar") Traceback (most recent call last): File "", line 1, in int("foo\x00bar") ValueError: invalid literal for int() with base 10: 'foo\x00bar' There's a slight difference in that it truncates to 200 codepoints, not 200 UTF-8 bytes. ---------- keywords: +patch Added file: http://bugs.python.org/file28487/issue16741.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 04:04:15 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sun, 30 Dec 2012 03:04:15 +0000 Subject: [issue16808] inspect.stack() should return list of named tuples In-Reply-To: <1356750149.18.0.966123919893.issue16808@psf.upfronthosting.co.za> Message-ID: <1356836655.91.0.374395388784.issue16808@psf.upfronthosting.co.za> Daniel Shahaf added the comment: Add versionchanged per review. ---------- keywords: +patch Added file: http://bugs.python.org/file28488/inspect-v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 06:10:36 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 30 Dec 2012 05:10:36 +0000 Subject: [issue16814] use --directory option of make in describing how to build the docs In-Reply-To: <1356790311.86.0.00498941541992.issue16814@psf.upfronthosting.co.za> Message-ID: <1356844236.49.0.981327573931.issue16814@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Another option is to give the shorter option as an alternative. I for one didn't know about that option but would have liked to. Patch attached. Also, this way we can give the shorter option and the reader can still see pretty easily what it is for. ---------- nosy: +chris.jerdonek Added file: http://bugs.python.org/file28489/issue-16814-2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 06:11:24 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 30 Dec 2012 05:11:24 +0000 Subject: [issue16817] test___all__ has to save and restore sys.modules while it does all the importing In-Reply-To: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> Message-ID: <1356844284.82.0.461613021212.issue16817@psf.upfronthosting.co.za> R. David Murray added the comment: As Nick pointed out in the thread, getting the correct module imports for C and python versions is what import_fresh_module in test.support is for. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 06:12:56 2012 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 30 Dec 2012 05:12:56 +0000 Subject: [issue16814] use --directory option of make in describing how to build the docs In-Reply-To: <1356790311.86.0.00498941541992.issue16814@psf.upfronthosting.co.za> Message-ID: <1356844376.89.0.0500366310277.issue16814@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > Another option is to give the shorter option as an alternative. s/shorter option/one-liner/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 06:32:02 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 30 Dec 2012 05:32:02 +0000 Subject: [issue16741] `int()`, `float()`, etc think python strings are null-terminated In-Reply-To: <1356046641.74.0.314140910069.issue16741@psf.upfronthosting.co.za> Message-ID: <1356845522.13.0.799376311657.issue16741@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti, haypo stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 06:42:53 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 30 Dec 2012 05:42:53 +0000 Subject: [issue16817] test___all__ has to save and restore sys.modules while it does all the importing In-Reply-To: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> Message-ID: <1356846173.5.0.96566122051.issue16817@psf.upfronthosting.co.za> Eli Bendersky added the comment: Yes, but pickle doesn't use this helper function. And the problem is because *pickle* tries to __import__ this module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 07:03:10 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 30 Dec 2012 06:03:10 +0000 Subject: [issue16816] Bug in hash randomization In-Reply-To: <1356817049.81.0.823751474505.issue16816@psf.upfronthosting.co.za> Message-ID: <1356847390.0.0.204885452242.issue16816@psf.upfronthosting.co.za> Benjamin Peterson added the comment: You're relying on the iteration order of dictionaries being consistent. That's a bug in your program. ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 08:53:10 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 30 Dec 2012 07:53:10 +0000 Subject: [issue16818] Couple of mistakes in PEP 431 Message-ID: <1356853990.44.0.712764184905.issue16818@psf.upfronthosting.co.za> New submission from Ramchandra Apte: in PEP 431, Time zone support improvements "NonExistentTimeError This exception is raised when giving a datetime specification that are ambigious while setting is_dst to None:" it should be "that is non-existent" or similar. The same description is used for NonExistentTimeError. The NonExistentTimeError description should be "... datetime specification that is ambigious ..." ---------- components: None messages: 178555 nosy: ramchandra.apte priority: normal severity: normal status: open title: Couple of mistakes in PEP 431 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 08:55:41 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 30 Dec 2012 07:55:41 +0000 Subject: [issue16814] use --directory option of make in describing how to build the docs In-Reply-To: <1356790311.86.0.00498941541992.issue16814@psf.upfronthosting.co.za> Message-ID: <1356854141.65.0.484429395299.issue16814@psf.upfronthosting.co.za> Georg Brandl added the comment: This is not a `make' tutorial... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 08:57:12 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 30 Dec 2012 07:57:12 +0000 Subject: [issue13657] IDLE doesn't support sys.ps1 and sys.ps2. In-Reply-To: <1324640742.58.0.860347532783.issue13657@psf.upfronthosting.co.za> Message-ID: <1356854232.52.0.14246610583.issue13657@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Buump... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 09:02:18 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 30 Dec 2012 08:02:18 +0000 Subject: [issue16819] IDLE b"" method completion incorrect Message-ID: <1356854538.64.0.0309588990052.issue16819@psf.upfronthosting.co.za> New submission from Ramchandra Apte: To reproduce, type b"". and then press TAB. The encode method is listed, that means that IDLE is listing the methods of "" (it should list the methods of b""). ---------- components: IDLE messages: 178558 nosy: ramchandra.apte priority: normal severity: normal status: open title: IDLE b"" method completion incorrect type: behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 09:24:03 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 30 Dec 2012 08:24:03 +0000 Subject: [issue13555] cPickle MemoryError when loading large file (while pickle works) In-Reply-To: <1323348723.51.0.524535293585.issue13555@psf.upfronthosting.co.za> Message-ID: <1356855843.43.0.300419003773.issue13555@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Bump. @neologix I have a 64-bit laptop with 2 GB memory so I don't think I can do so. (though one could use swap) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 09:27:52 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 30 Dec 2012 08:27:52 +0000 Subject: [issue14597] Cannot unload dll in ctypes until script exits In-Reply-To: <1334581773.77.0.209505875468.issue14597@psf.upfronthosting.co.za> Message-ID: <1356856072.95.0.0556758379272.issue14597@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 09:28:53 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 30 Dec 2012 08:28:53 +0000 Subject: [issue13951] Seg Fault in .so called by ctypes causes the interpreter to Seg Fault In-Reply-To: <1328535030.63.0.73417525944.issue13951@psf.upfronthosting.co.za> Message-ID: <1356856133.97.0.875772158403.issue13951@psf.upfronthosting.co.za> Ramchandra Apte added the comment: Bump. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 09:29:12 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Sun, 30 Dec 2012 08:29:12 +0000 Subject: [issue13951] Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault In-Reply-To: <1328535030.63.0.73417525944.issue13951@psf.upfronthosting.co.za> Message-ID: <1356856152.08.0.503576931865.issue13951@psf.upfronthosting.co.za> Changes by Ramchandra Apte : ---------- title: Seg Fault in .so called by ctypes causes the interpreter to Seg Fault -> Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 10:20:05 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 30 Dec 2012 09:20:05 +0000 Subject: [issue13951] Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault In-Reply-To: <1328535030.63.0.73417525944.issue13951@psf.upfronthosting.co.za> Message-ID: <1356859205.84.0.78484807004.issue13951@psf.upfronthosting.co.za> Georg Brandl added the comment: The reference to faulthandler is a good addition. The other added sentence reads repetitive and can be left out. Proposal: There are, however, enough ways to crash Python with :mod:`ctypes`, so you should be careful anyway. The :mod:`faulthandler` module can be helpful in debugging crashes, e.g. from segmentation faults produced by erroneous C library calls. ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 10:22:27 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 30 Dec 2012 09:22:27 +0000 Subject: [issue16688] Backreferences make case-insensitive regex fail on non-ASCII strings. In-Reply-To: <1355523574.0.0.662120788659.issue16688@psf.upfronthosting.co.za> Message-ID: <1356859347.11.0.85813361106.issue16688@psf.upfronthosting.co.za> Georg Brandl added the comment: I think you will, Matthew being MRAB on the mailing lists :) ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 10:25:18 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 30 Dec 2012 09:25:18 +0000 Subject: [issue16818] Couple of mistakes in PEP 431 In-Reply-To: <1356853990.44.0.712764184905.issue16818@psf.upfronthosting.co.za> Message-ID: <1356859518.52.0.245712707199.issue16818@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +lregebro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 10:31:44 2012 From: report at bugs.python.org (Tshepang Lekhonkhobe) Date: Sun, 30 Dec 2012 09:31:44 +0000 Subject: [issue16814] use --directory option of make in describing how to build the docs In-Reply-To: <1356854141.65.0.484429395299.issue16814@psf.upfronthosting.co.za> Message-ID: Tshepang Lekhonkhobe added the comment: > This is not a `make' tutorial... I find the latest patch to be a great compromise though. Many people would be grateful to learn about the -C option. I am one of them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 11:42:37 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 30 Dec 2012 10:42:37 +0000 Subject: [issue13555] cPickle MemoryError when loading large file (while pickle works) In-Reply-To: <1323348723.51.0.524535293585.issue13555@psf.upfronthosting.co.za> Message-ID: <1356864157.01.0.0700194747824.issue13555@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I may tackle this but rare 2.7-only bugs are pretty low on my priorities list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 11:45:09 2012 From: report at bugs.python.org (Georg Brandl) Date: Sun, 30 Dec 2012 10:45:09 +0000 Subject: [issue16814] use --directory option of make in describing how to build the docs In-Reply-To: <1356790311.86.0.00498941541992.issue16814@psf.upfronthosting.co.za> Message-ID: <1356864309.73.0.546312971772.issue16814@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, I'm not -1 about the patch. But there is something to be said for conciseness, and sprinkling the docs with endless alternate routes will not make it easier to read quickly and get the information you need. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:29:16 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 30 Dec 2012 11:29:16 +0000 Subject: [issue13555] cPickle MemoryError when loading large file (while pickle works) In-Reply-To: <1356855843.43.0.300419003773.issue13555@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: > I have a 64-bit laptop with 2 GB memory so I don't think I can do so. (though one could use swap) AFAICT, a binary string a little longer than 1GB should be enough to reproduce the bug. Just make sure Python isn't built with '-fwrapv'. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:33:51 2012 From: report at bugs.python.org (=?utf-8?q?Domen_Ko=C5=BEar?=) Date: Sun, 30 Dec 2012 11:33:51 +0000 Subject: [issue16816] Bug in hash randomization In-Reply-To: <1356817049.81.0.823751474505.issue16816@psf.upfronthosting.co.za> Message-ID: <1356867231.94.0.459247453974.issue16816@psf.upfronthosting.co.za> Domen Ko?ar added the comment: I believe this is not the case, I have updated example to use ordereddict, same effect: https://gist.github.com/4409304 ---------- resolution: invalid -> status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 12:42:11 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 30 Dec 2012 11:42:11 +0000 Subject: [issue16816] Bug in hash randomization In-Reply-To: <1356817049.81.0.823751474505.issue16816@psf.upfronthosting.co.za> Message-ID: <1356867731.73.0.0979202164107.issue16816@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: What exactly are you trying to demonstrate? As explained by Benjamin, the output can differ from one invokation to another because the iteration order depends on the hash value (position in the buckets). Running your script on Python 2.7 or curent outputs "good" and "bad" randomly, which is expected when randomization is enabled. With randomization off, the output is consistent. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 13:01:33 2012 From: report at bugs.python.org (=?utf-8?q?Domen_Ko=C5=BEar?=) Date: Sun, 30 Dec 2012 12:01:33 +0000 Subject: [issue16816] Bug in hash randomization In-Reply-To: <1356817049.81.0.823751474505.issue16816@psf.upfronthosting.co.za> Message-ID: <1356868893.4.0.250881939329.issue16816@psf.upfronthosting.co.za> Domen Ko?ar added the comment: That would mean there is a bug in OrderedDict, since iterator of item in OrderedDict should keep the order? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 13:15:31 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 30 Dec 2012 12:15:31 +0000 Subject: [issue16816] Bug in hash randomization In-Reply-To: <1356817049.81.0.823751474505.issue16816@psf.upfronthosting.co.za> Message-ID: <1356869731.61.0.592128149817.issue16816@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: No, there's a bug in your code: """ nest_variables(collections.OrderedDict({'foo.bar': '1', 'foo': '2'})) """ You pass the OrderedDict *and already constructed dict*, so entries are inserted in a random order. Just use this and it'll work properly: """ nest_variables(collections.OrderedDict(('foo.bar', '1'), ('foo', '2'))) """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 13:17:52 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Sun, 30 Dec 2012 12:17:52 +0000 Subject: [issue16816] Bug in hash randomization In-Reply-To: <1356817049.81.0.823751474505.issue16816@psf.upfronthosting.co.za> Message-ID: <1356869872.77.0.911731017453.issue16816@psf.upfronthosting.co.za> Charles-Fran?ois Natali added the comment: There's actually a parenthesis missing: """ nest_variables(collections.OrderedDict((('foo.bar', '1'), ('foo', '2')))) """ ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 13:20:25 2012 From: report at bugs.python.org (=?utf-8?q?Domen_Ko=C5=BEar?=) Date: Sun, 30 Dec 2012 12:20:25 +0000 Subject: [issue16816] Bug in hash randomization In-Reply-To: <1356817049.81.0.823751474505.issue16816@psf.upfronthosting.co.za> Message-ID: <1356870025.9.0.428137799857.issue16816@psf.upfronthosting.co.za> Domen Ko?ar added the comment: Ah, works much better if you pass tuple to ordereddict. Seems like a bug in my program indeed (I was using ordereddict, but not correctly). Sorry for the noise! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 14:44:02 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Sun, 30 Dec 2012 13:44:02 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1356875042.59.0.0815694327804.issue14373@psf.upfronthosting.co.za> Alexey Kachayev added the comment: Thread-safe implementation for cache cleanup. ---------- Added file: http://bugs.python.org/file28490/14373.v7.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 14:56:59 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 30 Dec 2012 13:56:59 +0000 Subject: [issue16817] test___all__ has to save and restore sys.modules while it does all the importing In-Reply-To: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> Message-ID: <1356875819.26.0.825139010599.issue16817@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. What if we made import_fresh_module a context manager, so that the restore of the original module in sys.modules only happened at the end of the context? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 15:02:21 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 30 Dec 2012 14:02:21 +0000 Subject: [issue16817] test___all__ has to save and restore sys.modules while it does all the importing In-Reply-To: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> Message-ID: <1356876141.94.0.202438141179.issue16817@psf.upfronthosting.co.za> Eli Bendersky added the comment: David, how would this help pickle not find _elementtree though? It's already in sys.modules *before* fresh_import is used, because test___all__ put it there. I'm experimenting with just deleting _elementtree from sys.modules before running the tests, so far with little success. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 15:02:23 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 30 Dec 2012 14:02:23 +0000 Subject: [issue16817] test___all__ has to save and restore sys.modules while it does all the importing In-Reply-To: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> Message-ID: <1356876143.19.0.706969329574.issue16817@psf.upfronthosting.co.za> Eli Bendersky added the comment: David, how would this help pickle not find _elementtree though? It's already in sys.modules *before* fresh_import is used, because test___all__ put it there. I'm experimenting with just deleting _elementtree from sys.modules before running the tests, so far with little success. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 15:02:43 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 30 Dec 2012 14:02:43 +0000 Subject: [issue16817] test___all__ has to save and restore sys.modules while it does all the importing In-Reply-To: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> Message-ID: <1356876163.95.0.465812778992.issue16817@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- Removed message: http://bugs.python.org/msg178576 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 15:11:11 2012 From: report at bugs.python.org (=?utf-8?q?Marek_=C5=A0uppa?=) Date: Sun, 30 Dec 2012 14:11:11 +0000 Subject: [issue15948] Unchecked return value of I/O functions In-Reply-To: <1347722947.26.0.499070360065.issue15948@psf.upfronthosting.co.za> Message-ID: <1356876671.08.0.264634862418.issue15948@psf.upfronthosting.co.za> Marek ?uppa added the comment: Any update on this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 15:18:33 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Dec 2012 14:18:33 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <3YZ3fc3DNczS2J@mail.python.org> Roundup Robot added the comment: New changeset 71508fc738bb by Eli Bendersky in branch '3.3': For Issue #16076: make sure that pickling of Element objects is tested, and do http://hg.python.org/cpython/rev/71508fc738bb New changeset 5a38f4d7833c by Eli Bendersky in branch 'default': For issue #16076: merge 3.3 http://hg.python.org/cpython/rev/5a38f4d7833c ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 15:24:17 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 30 Dec 2012 14:24:17 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1356877457.55.0.978552795172.issue16076@psf.upfronthosting.co.za> Eli Bendersky added the comment: I've added some (currently pyET specific) pickling tests. Daniel, could you re-generate the patch? Note that for the C version of pickling you can now enable the pickle test. Point to consider - can elements pickled in C be unpickled in Python and vice versa? It should probably work (see test_decimal's pickling tests). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 15:36:02 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Sun, 30 Dec 2012 14:36:02 +0000 Subject: [issue16672] improve tracing performances when f_trace is NULL In-Reply-To: <1355348258.81.0.121484844419.issue16672@psf.upfronthosting.co.za> Message-ID: <1356878162.64.0.568944493821.issue16672@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 15:40:07 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 30 Dec 2012 14:40:07 +0000 Subject: [issue16817] test___all__ has to save and restore sys.modules while it does all the importing In-Reply-To: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> Message-ID: <1356878407.71.0.771159808294.issue16817@psf.upfronthosting.co.za> R. David Murray added the comment: It would help because import_fresh_module would have updated sys.modules to be the module under test, and would not restore the previously existing entry in sys.modules until after your test had completed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 15:52:53 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 14:52:53 +0000 Subject: [issue16819] IDLE b"" method completion incorrect In-Reply-To: <1356854538.64.0.0309588990052.issue16819@psf.upfronthosting.co.za> Message-ID: <1356879173.0.0.664664591779.issue16819@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Same for u'' on 2.7. Completion list doesn't contain "isdecimal" and "isnumeric". ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 16:14:44 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 30 Dec 2012 15:14:44 +0000 Subject: [issue16814] use --directory option of make in describing how to build the docs In-Reply-To: <1356790311.86.0.00498941541992.issue16814@psf.upfronthosting.co.za> Message-ID: <1356880484.32.0.862226241435.issue16814@psf.upfronthosting.co.za> Ezio Melotti added the comment: FWIW even if I heard about the one-liner a few times already I can't really seem to remember it, and prefer to do "cd Doc" anyway. Using "cd Doc" also makes all the subsequent commands shorter (e.g. opening files, running other make targets). The patch proposed by Chris looks OK to me though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 16:23:47 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 30 Dec 2012 15:23:47 +0000 Subject: [issue15948] Unchecked return value of I/O functions In-Reply-To: <1347722947.26.0.499070360065.issue15948@psf.upfronthosting.co.za> Message-ID: <1356881027.02.0.321856089283.issue15948@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 17:14:20 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 16:14:20 +0000 Subject: [issue16819] IDLE b"" method completion incorrect In-Reply-To: <1356854538.64.0.0309588990052.issue16819@psf.upfronthosting.co.za> Message-ID: <1356884060.14.0.324421956137.issue16819@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Here is a patch which fixes this issue. It is applicable for all version, except "uU" can be removed from string of string prefix characters in 3.2. ---------- nosy: +kbk stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 17:18:55 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 16:18:55 +0000 Subject: [issue16819] IDLE b"" method completion incorrect In-Reply-To: <1356854538.64.0.0309588990052.issue16819@psf.upfronthosting.co.za> Message-ID: <1356884335.05.0.41649793492.issue16819@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- keywords: +patch Added file: http://bugs.python.org/file28491/idle_bytes_completion.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 17:23:25 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 30 Dec 2012 16:23:25 +0000 Subject: [issue6010] unable to retrieve latin-1 encoded data from sqlite3 In-Reply-To: <1242210908.7.0.745434418713.issue6010@psf.upfronthosting.co.za> Message-ID: <1356884605.82.0.688741242754.issue6010@psf.upfronthosting.co.za> Ezio Melotti added the comment: While trying to reproduce the issue I noticed this while inserting values: import sqlite3 db = sqlite3.connect(':memory:') cur = db.cursor() cur.execute("create table foo (x)") # this works fine cur.execute(u"insert into foo values ('caf?')".encode('latin1')) # this fails cur.execute(u"insert into foo values (?)", (u'caf?'.encode('latin1'),)) # this fails too cur.execute("insert into foo values (?)", (u'caf?'.encode('latin1'),)) The error is: sqlite3.ProgrammingError: You must not use 8-bit bytestrings unless you use a text_factory that can interpret 8-bit bytestrings (like text_factory = str). It is highly recommended that you instead just switch your application to Unicode strings. Should this be reported in the first case too? (This would be backward-incompatible, but, unless it's expected to work, we can always add a warning.) ---------- components: +Library (Lib) -None nosy: +ezio.melotti versions: +Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 17:24:37 2012 From: report at bugs.python.org (Meador Inge) Date: Sun, 30 Dec 2012 16:24:37 +0000 Subject: [issue16804] python3 -S -m site fails In-Reply-To: <1356726163.27.0.125833225728.issue16804@psf.upfronthosting.co.za> Message-ID: <1356884677.93.0.0199799487677.issue16804@psf.upfronthosting.co.za> Meador Inge added the comment: Yeah, it is a result of the fix for issue11591 (changeset a364719e400a). Incidentally, the decision was made to forgo writing a testcase in favor of proof by inspection :-) There are also other consequences of that change: ./python.exe -S Python 3.4.0a0 (default:08c215115842, Dec 30 2012, 09:54:54) [GCC 4.2.1 Compatible Apple Clang 4.1 ((tags/Apple/clang-421.11.65))] on darwin >>> import site >>> quit() Traceback (most recent call last): File "", line 1, in NameError: name 'quit' is not defined >>> ^D 'quit' not being defined in this case is a regression. ISTM the original change was meant to only prevent sys.path from being altered, but it is preventing a bunch of other things (USER_BASE, USER_SITE, quit, ...) from being initialized as well. ---------- nosy: +eric.araujo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 17:32:42 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 30 Dec 2012 16:32:42 +0000 Subject: [issue16783] sqlite3 accepts strings it cannot (by default) return In-Reply-To: <1356505156.77.0.42259028203.issue16783@psf.upfronthosting.co.za> Message-ID: <1356885162.46.0.928429558313.issue16783@psf.upfronthosting.co.za> Ezio Melotti added the comment: > Treating invalid data as sometimes valid and sometime as invalid is a problem. What is valid is defined by your application. AFAIU sqlite3 defaults to utf-8, but it's able to work with latin1 data as well. The fact that you are mixing utf-8 and latin1 is an error in your application, and while it might be nice if sqlite3 warned you about it, it's not necessarily its responsibility. Even thought it's a really bad idea, you might want to store data with different encodings and still being able to retrieve them using the right text_factory. However while trying to reproduce the issue I noticed a possible inconsistency and reported it on #6010. ---------- stage: -> committed/rejected superseder: -> unable to retrieve latin-1 encoded data from sqlite3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:05:38 2012 From: report at bugs.python.org (Andrew Svetlov) Date: Sun, 30 Dec 2012 17:05:38 +0000 Subject: [issue15083] Rewrite ElementTree tests in a cleaner and safer way In-Reply-To: <1339818759.87.0.747348787779.issue15083@psf.upfronthosting.co.za> Message-ID: <1356887138.93.0.137303680084.issue15083@psf.upfronthosting.co.za> Changes by Andrew Svetlov : ---------- nosy: +asvetlov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:12:39 2012 From: report at bugs.python.org (Matthew Barnett) Date: Sun, 30 Dec 2012 17:12:39 +0000 Subject: [issue16741] `int()`, `float()`, etc think python strings are null-terminated In-Reply-To: <1356046641.74.0.314140910069.issue16741@psf.upfronthosting.co.za> Message-ID: <1356887559.51.0.00178043042708.issue16741@psf.upfronthosting.co.za> Matthew Barnett added the comment: I've attached a small additional patch for truncating the UTF-8. I don't know whether it's strictly necessary, but I don't know that it's unnecessary either! (Better safe than sorry.) ---------- Added file: http://bugs.python.org/file28492/issue16741#2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:12:53 2012 From: report at bugs.python.org (Wolfgang Scherer) Date: Sun, 30 Dec 2012 17:12:53 +0000 Subject: [issue16820] configparser.ConfigParser.clean and .update bugs Message-ID: <1356887573.11.0.450967441519.issue16820@psf.upfronthosting.co.za> New submission from Wolfgang Scherer: configparser.ConfigParser.clean() always fails: >>> cfg = configparser.ConfigParser() >>> if not hasattr(configparser.ConfigParser, 'clear'): ... configparser.ConfigParser.clear = configparser_clear_compat >>> cfg.clear() #doctest: +ELLIPSIS Traceback (most recent call last): ... ValueError: Cannot remove the default section. configparser.ConfigParser.update() overwrites all sections except DEFAULT instead of updating them. See attached test file- ---------- components: Library (Lib) files: bug_configparser.py messages: 178588 nosy: wolfmanx priority: normal severity: normal status: open title: configparser.ConfigParser.clean and .update bugs type: behavior versions: Python 3.2 Added file: http://bugs.python.org/file28493/bug_configparser.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:16:04 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 17:16:04 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1356887764.16.0.866215943124.issue14373@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Alexey, as I see, you have missed some Antoine's comments (and my comments about whitespaces). Please, be more careful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:18:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 17:18:22 +0000 Subject: [issue16741] `int()`, `float()`, etc think python strings are null-terminated In-Reply-To: <1356046641.74.0.314140910069.issue16741@psf.upfronthosting.co.za> Message-ID: <1356887902.57.0.895447038662.issue16741@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- nosy: +serhiy.storchaka versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:24:51 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 30 Dec 2012 17:24:51 +0000 Subject: [issue2350] 'exceptions' import fixer In-Reply-To: <1205781728.94.0.172904523331.issue2350@psf.upfronthosting.co.za> Message-ID: <1356888291.68.0.689837668808.issue2350@psf.upfronthosting.co.za> Berker Peksag added the comment: I've converted Benjamin's patch to extended diff format, fixed some PEP 8 violations and typos, removed the {get, set}_prefix usage, added more tests and updated the documentation. ---------- nosy: +berker.peksag Added file: http://bugs.python.org/file28494/issue2350.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:30:59 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 30 Dec 2012 17:30:59 +0000 Subject: [issue2350] 'exceptions' import fixer In-Reply-To: <1205781728.94.0.172904523331.issue2350@psf.upfronthosting.co.za> Message-ID: <1356888659.28.0.21132222921.issue2350@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is something people can easily convert in there 2.x code, so I don't think the need for it is great. ---------- assignee: collinwinter -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:33:24 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 30 Dec 2012 17:33:24 +0000 Subject: [issue16645] Wrong test_extract_hardlink() in test_tarfile.py In-Reply-To: <1354989728.58.0.0717635689948.issue16645@psf.upfronthosting.co.za> Message-ID: <1356888804.18.0.200253220036.issue16645@psf.upfronthosting.co.za> Ezio Melotti added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:41:47 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 17:41:47 +0000 Subject: [issue16645] Wrong test_extract_hardlink() in test_tarfile.py In-Reply-To: <1354989728.58.0.0717635689948.issue16645@psf.upfronthosting.co.za> Message-ID: <1356889307.52.0.932936410821.issue16645@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- Removed message: http://bugs.python.org/msg178416 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:49:51 2012 From: report at bugs.python.org (R. David Murray) Date: Sun, 30 Dec 2012 17:49:51 +0000 Subject: [issue16820] configparser.ConfigParser.clean and .update bugs In-Reply-To: <1356887573.11.0.450967441519.issue16820@psf.upfronthosting.co.za> Message-ID: <1356889791.58.0.234799009616.issue16820@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 18:51:48 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 30 Dec 2012 17:51:48 +0000 Subject: [issue16773] int() half-accepts UserString In-Reply-To: <1356380115.98.0.739133485355.issue16773@psf.upfronthosting.co.za> Message-ID: <1356889908.92.0.978712907701.issue16773@psf.upfronthosting.co.za> Ezio Melotti added the comment: Not sure this is worth fixing, unless the fix is trivial. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:02:24 2012 From: report at bugs.python.org (Meador Inge) Date: Sun, 30 Dec 2012 18:02:24 +0000 Subject: [issue16804] python3 -S -m site fails In-Reply-To: <1356726163.27.0.125833225728.issue16804@psf.upfronthosting.co.za> Message-ID: <1356890544.62.0.757238131623.issue16804@psf.upfronthosting.co.za> Meador Inge added the comment: Whoops, the 'quit' case is actually intended and is documented (http://docs.python.org/3.4/library/site.html): """ or additions to the builtins. To explicitly trigger the usual site-specific additions, call the site.main() function. """ I think the right way to fix this is to use the accessor functions for the USER_* variables. Does the attached look OK? ---------- assignee: -> meador.inge keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file28495/issue16804-0.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:22:22 2012 From: report at bugs.python.org (Roundup Robot) Date: Sun, 30 Dec 2012 18:22:22 +0000 Subject: [issue16645] Wrong test_extract_hardlink() in test_tarfile.py In-Reply-To: <1354989728.58.0.0717635689948.issue16645@psf.upfronthosting.co.za> Message-ID: <3YZ93y25V0zRwW@mail.python.org> Roundup Robot added the comment: New changeset 503b889668fc by Serhiy Storchaka in branch '2.7': Issue #16645: Fix hardlink extracting test for tarfile. http://hg.python.org/cpython/rev/503b889668fc New changeset d42bf4faf3d1 by Serhiy Storchaka in branch '3.2': Issue #16645: Fix hardlink extracting test for tarfile. http://hg.python.org/cpython/rev/d42bf4faf3d1 New changeset e1a0901e4ef7 by Serhiy Storchaka in branch '3.3': Issue #16645: Fix hardlink extracting test for tarfile. http://hg.python.org/cpython/rev/e1a0901e4ef7 New changeset f173c2e92b64 by Serhiy Storchaka in branch 'default': Issue #16645: Fix hardlink extracting test for tarfile. http://hg.python.org/cpython/rev/f173c2e92b64 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:24:08 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 18:24:08 +0000 Subject: [issue16645] Wrong test_extract_hardlink() in test_tarfile.py In-Reply-To: <1354989728.58.0.0717635689948.issue16645@psf.upfronthosting.co.za> Message-ID: <1356891848.59.0.400514741106.issue16645@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:35:48 2012 From: report at bugs.python.org (Pedro Algarvio) Date: Sun, 30 Dec 2012 18:35:48 +0000 Subject: [issue7300] Unicode arguments in str.format() In-Reply-To: <1257861455.06.0.0846130484851.issue7300@psf.upfronthosting.co.za> Message-ID: <1356892548.73.0.919774282017.issue7300@psf.upfronthosting.co.za> Pedro Algarvio added the comment: This is not a 2.7 issue only: >>> import sys >>> sys.version_info (2, 6, 5, 'final', 0 >>> 'Foo {0}'.format(u'b?r') Traceback (most recent call last): File "", line 1, in UnicodeEncodeError: 'ascii' codec can't encode character u'\xe1' in position 1: ordinal not in range(128) >>> ---------- nosy: +Pedro.Algarvio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:36:54 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sun, 30 Dec 2012 18:36:54 +0000 Subject: [issue16379] SQLite error code not exposed to python In-Reply-To: <1351764878.68.0.13361347428.issue16379@psf.upfronthosting.co.za> Message-ID: <1356892614.88.0.441840873205.issue16379@psf.upfronthosting.co.za> Daniel Shahaf added the comment: New patch, with better docs and less error leaks, per Ezio's review. ---------- Added file: http://bugs.python.org/file28496/i16379-v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:40:28 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sun, 30 Dec 2012 18:40:28 +0000 Subject: [issue16379] SQLite error code not exposed to python In-Reply-To: <1351764878.68.0.13361347428.issue16379@psf.upfronthosting.co.za> Message-ID: <1356892828.58.0.328330391161.issue16379@psf.upfronthosting.co.za> Daniel Shahaf added the comment: A couple of random eyebrow-raisers I noticed while working on v2: - sqlite3.Warning is a subclass of Exception, rather than sqlite3.Error or builtins.Warning. (Also, the docs say "will raise a Warning", intending to refer to sqlite3.Warning, but the lack of markup makes this ambiguous --- it would be interpreted as a reference to builtins.Warning). - If _PyUnicode_AsStringAndSize() returns NULL, the code sets a sqlite3.Warning exception without first checking what exception is already set. (grep for PYSQLITE_SQL_WRONG_TYPE) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:40:40 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 18:40:40 +0000 Subject: [issue1470548] Bugfix for #1470540 (XMLGenerator cannot output UTF-16) Message-ID: <1356892840.85.0.848941957369.issue1470548@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:45:16 2012 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 30 Dec 2012 18:45:16 +0000 Subject: [issue7300] Unicode arguments in str.format() In-Reply-To: <1257861455.06.0.0846130484851.issue7300@psf.upfronthosting.co.za> Message-ID: <1356893116.37.0.0619403390004.issue7300@psf.upfronthosting.co.za> Ezio Melotti added the comment: 2.6 only gets security fixes. > My patch converts the format string to unicode using the default > encoding. It's inconsistent with str%args: str%args converts str to > unicode using the ASCII charset (if a least one argument is an unicode > string), not the default encoding. I think it's better to be consistent and use ASCII. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:46:10 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 18:46:10 +0000 Subject: [issue15861] ttk.Treeview "unmatched open brace in list" In-Reply-To: <1346794903.35.0.326071924778.issue15861@psf.upfronthosting.co.za> Message-ID: <1356893170.23.0.569506766813.issue15861@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Have you reviewed the patch? Is it good? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 19:56:04 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sun, 30 Dec 2012 18:56:04 +0000 Subject: [issue16379] SQLite error code not exposed to python In-Reply-To: <1351764878.68.0.13361347428.issue16379@psf.upfronthosting.co.za> Message-ID: <1356893764.01.0.859076461406.issue16379@psf.upfronthosting.co.za> Daniel Shahaf added the comment: New patch fixing indentation of versionadded markup. ---------- Added file: http://bugs.python.org/file28497/i16379-v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:10:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 19:10:09 +0000 Subject: [issue8745] zipimport is a bit slow In-Reply-To: <1274162892.24.0.612432614461.issue8745@psf.upfronthosting.co.za> Message-ID: <1356894609.94.0.620467191963.issue8745@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Catalin, are you going to continue? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:11:38 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 19:11:38 +0000 Subject: [issue9720] zipfile writes incorrect local file header for large files in zip64 In-Reply-To: <1283216540.17.0.624049939978.issue9720@psf.upfronthosting.co.za> Message-ID: <1356894698.3.0.480219866973.issue9720@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: What variant of patches should I commit? Or prepare other? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:23:56 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 19:23:56 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1356895436.87.0.164999969984.issue16061@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I going speed up other cases for replace(), but for now I?have only this patch. Is it good? Should I?apply it to 3.3 as there is a 3.3 regression? ---------- keywords: +3.3regression _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:36:27 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 19:36:27 +0000 Subject: [issue16773] int() half-accepts UserString In-Reply-To: <1356380115.98.0.739133485355.issue16773@psf.upfronthosting.co.za> Message-ID: <1356896187.52.0.969813815554.issue16773@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This is definitely non-trivial. 1-argument int() works with UserString because __int__() method is defined for UserString (as __float__(), as __complex__()). I.e. UserString looks as number-like for it. Unfortunately there is no way to make a class be string-like without inheriting it from str class. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:38:46 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 30 Dec 2012 19:38:46 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1356896326.18.0.102835952311.issue16061@psf.upfronthosting.co.za> Benjamin Peterson added the comment: As __ap__ says, it would be nice to have a comment. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:43:24 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 30 Dec 2012 19:43:24 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1356896604.21.0.0527928736853.issue16061@psf.upfronthosting.co.za> Antoine Pitrou added the comment: 64-bit linux results: 3.2 3.3 patch 133 (-28%) 1343 (-93%) 96 1 'a' 'b' 'c' 414 (-9%) 704 (-47%) 375 2 'a' 'b' 'c' 319 (-8%) 491 (-40%) 293 3 'a' 'b' 'c' 253 (-7%) 384 (-39%) 235 4 'a' 'b' 'c' 216 (-8%) 320 (-38%) 199 5 'a' 'b' 'c' 192 (-9%) 278 (-37%) 175 6 'a' 'b' 'c' 175 (-10%) 247 (-36%) 157 7 'a' 'b' 'c' 162 (-11%) 223 (-35%) 144 8 'a' 'b' 'c' 153 (-14%) 204 (-35%) 132 9 'a' 'b' 'c' 145 (-15%) 188 (-35%) 123 10 'a' 'b' 'c' 108 (-36%) 112 (-38%) 69 20 'a' 'b' 'c' 86 (-59%) 53 (-34%) 35 50 'a' 'b' 'c' 78 (-71%) 31 (-26%) 23 100 'a' 'b' 'c' 73 (-84%) 12 (+0%) 12 1000 'a' 'b' 'c' 81 (-88%) 10 (+0%) 10 10000 'a' 'b' 'c' 133 (-23%) 1470 (-93%) 103 1 '\u010a' '\u010b' '\u010c' 414 (-10%) 799 (-54%) 371 2 '\u010a' '\u010b' '\u010c' 319 (-5%) 576 (-47%) 303 3 '\u010a' '\u010b' '\u010c' 254 (-1%) 461 (-46%) 251 4 '\u010a' '\u010b' '\u010c' 216 (+2%) 391 (-44%) 220 5 '\u010a' '\u010b' '\u010c' 193 (+4%) 341 (-41%) 200 6 '\u010a' '\u010b' '\u010c' 175 (+5%) 303 (-39%) 184 7 '\u010a' '\u010b' '\u010c' 163 (+6%) 275 (-37%) 172 8 '\u010a' '\u010b' '\u010c' 153 (+6%) 252 (-36%) 162 9 '\u010a' '\u010b' '\u010c' 145 (+7%) 235 (-34%) 155 10 '\u010a' '\u010b' '\u010c' 108 (-1%) 133 (-20%) 107 20 '\u010a' '\u010b' '\u010c' 86 (-27%) 66 (-5%) 63 50 '\u010a' '\u010b' '\u010c' 79 (-44%) 44 (+0%) 44 100 '\u010a' '\u010b' '\u010c' 74 (-66%) 24 (+4%) 25 1000 '\u010a' '\u010b' '\u010c' 75 (-71%) 22 (+0%) 22 10000 '\u010a' '\u010b' '\u010c' 1687 (-91%) 1362 (-89%) 150 1 '\U0001000a' '\U0001000b' '\U0001000c' 1146 (-58%) 817 (-41%) 479 2 '\U0001000a' '\U0001000b' '\U0001000c' 919 (-61%) 627 (-43%) 358 3 '\U0001000a' '\U0001000b' '\U0001000c' 802 (-63%) 521 (-44%) 294 4 '\U0001000a' '\U0001000b' '\U0001000c' 729 (-64%) 446 (-42%) 259 5 '\U0001000a' '\U0001000b' '\U0001000c' 678 (-65%) 394 (-40%) 237 6 '\U0001000a' '\U0001000b' '\U0001000c' 643 (-66%) 350 (-37%) 220 7 '\U0001000a' '\U0001000b' '\U0001000c' 617 (-66%) 313 (-34%) 207 8 '\U0001000a' '\U0001000b' '\U0001000c' 598 (-67%) 283 (-30%) 198 9 '\U0001000a' '\U0001000b' '\U0001000c' 581 (-67%) 258 (-27%) 189 10 '\U0001000a' '\U0001000b' '\U0001000c' 511 (-71%) 152 (-3%) 148 20 '\U0001000a' '\U0001000b' '\U0001000c' 472 (-76%) 89 (+28%) 114 50 '\U0001000a' '\U0001000b' '\U0001000c' 461 (-78%) 68 (+47%) 100 100 '\U0001000a' '\U0001000b' '\U0001000c' 452 (-81%) 48 (+81%) 87 1000 '\U0001000a' '\U0001000b' '\U0001000c' 452 (-81%) 46 (+85%) 85 10000 '\U0001000a' '\U0001000b' '\U0001000c' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:44:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 19:44:52 +0000 Subject: [issue11344] Add os.path.splitpath(path) function In-Reply-To: <1298795208.87.0.771920756626.issue11344@psf.upfronthosting.co.za> Message-ID: <1356896692.28.0.823674827445.issue11344@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please review. This function is very important for many applications (and it hard to get right). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:48:07 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 30 Dec 2012 19:48:07 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1356896887.36.0.0211335982843.issue16061@psf.upfronthosting.co.za> Antoine Pitrou added the comment: 64-bit windows results: 3.3 patched 925 (-90%) 97 1 'a' 'b' 'c' 881 (-54%) 405 2 'a' 'b' 'c' 623 (-51%) 308 3 'a' 'b' 'c' 482 (-48%) 252 4 'a' 'b' 'c' 396 (-44%) 223 5 'a' 'b' 'c' 344 (-40%) 208 6 'a' 'b' 'c' 306 (-38%) 190 7 'a' 'b' 'c' 276 (-37%) 173 8 'a' 'b' 'c' 254 (-36%) 162 9 'a' 'b' 'c' 241 (-35%) 156 10 'a' 'b' 'c' 158 (-24%) 120 20 'a' 'b' 'c' 107 (-12%) 94 50 'a' 'b' 'c' 87 (+7%) 93 100 'a' 'b' 'c' 70 (+3%) 72 1000 'a' 'b' 'c' 63 (+8%) 68 10000 'a' 'b' 'c' 1332 (-92%) 106 1 '\u010a' '\u010b' '\u010c' 1137 (-60%) 459 2 '\u010a' '\u010b' '\u010c' 836 (-58%) 347 3 '\u010a' '\u010b' '\u010c' 660 (-56%) 288 4 '\u010a' '\u010b' '\u010c' 567 (-55%) 256 5 '\u010a' '\u010b' '\u010c' 503 (-51%) 245 6 '\u010a' '\u010b' '\u010c' 455 (-47%) 242 7 '\u010a' '\u010b' '\u010c' 414 (-44%) 231 8 '\u010a' '\u010b' '\u010c' 387 (-41%) 227 9 '\u010a' '\u010b' '\u010c' 365 (-35%) 237 10 '\u010a' '\u010b' '\u010c' 256 (-21%) 201 20 '\u010a' '\u010b' '\u010c' 185 (-9%) 168 50 '\u010a' '\u010b' '\u010c' 186 (-19%) 150 100 '\u010a' '\u010b' '\u010c' 137 (-1%) 136 1000 '\u010a' '\u010b' '\u010c' 131 (+3%) 135 10000 '\u010a' '\u010b' '\u010c' 1346 (-88%) 160 1 '\U0001000a' '\U0001000b' '\U0001000c' 1247 (-62%) 469 2 '\U0001000a' '\U0001000b' '\U0001000c' 965 (-64%) 352 3 '\U0001000a' '\U0001000b' '\U0001000c' 845 (-64%) 303 4 '\U0001000a' '\U0001000b' '\U0001000c' 720 (-65%) 251 5 '\U0001000a' '\U0001000b' '\U0001000c' 655 (-65%) 230 6 '\U0001000a' '\U0001000b' '\U0001000c' 604 (-58%) 256 7 '\U0001000a' '\U0001000b' '\U0001000c' 570 (-62%) 214 8 '\U0001000a' '\U0001000b' '\U0001000c' 546 (-63%) 203 9 '\U0001000a' '\U0001000b' '\U0001000c' 515 (-63%) 190 10 '\U0001000a' '\U0001000b' '\U0001000c' 404 (-61%) 157 20 '\U0001000a' '\U0001000b' '\U0001000c' 339 (-62%) 130 50 '\U0001000a' '\U0001000b' '\U0001000c' 308 (-60%) 122 100 '\U0001000a' '\U0001000b' '\U0001000c' 284 (-54%) 130 1000 '\U0001000a' '\U0001000b' '\U0001000c' 281 (-60%) 113 10000 '\U0001000a' '\U0001000b' '\U0001000c' ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 20:51:19 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 30 Dec 2012 19:51:19 +0000 Subject: [issue11344] Add os.path.splitpath(path) function In-Reply-To: <1356896692.28.0.823674827445.issue11344@psf.upfronthosting.co.za> Message-ID: <1356896960.3334.3.camel@localhost.localdomain> Antoine Pitrou added the comment: > Please review. This function is very important for many applications > (and it hard to get right). The pathlib module (PEP 428) has such functionality built-in. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:04:12 2012 From: report at bugs.python.org (Alexey Kachayev) Date: Sun, 30 Dec 2012 20:04:12 +0000 Subject: [issue14373] C implementation of functools.lru_cache In-Reply-To: <1332250846.11.0.753199667334.issue14373@psf.upfronthosting.co.za> Message-ID: <1356897852.45.0.587685967759.issue14373@psf.upfronthosting.co.za> Alexey Kachayev added the comment: Updated diff with: * fix object leaks * tp_clear * additional test for maxsize < 0 I also reimplemented multithreading test (fixed error and added skip rule). But actually, I'm not sure that it's enough for ensuring thread-safety of clear operation. I'm working on other variant now. I will be appreciated for any advice about where to find example of the same (or close enough) test cases from other modules. Regarding to previous comments from review. 1. "guard against negative numbers" I added special test case for negative maxsize in order to show, that now C version works the same as Python one. So, should we change both implementation? What behavior is most logical here? Reimplementation will change public API, so it's not only about acceleration. 2. Use regular PyObject instead of lru_list_elem. What the problems are with current implementation? ---------- Added file: http://bugs.python.org/file28498/14373.v9.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:04:34 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 20:04:34 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1356897874.8.0.185251380893.issue16061@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > As __ap__ says, it would be nice to have a comment. Oh, I thought I had already done this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 21:11:14 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Sun, 30 Dec 2012 20:11:14 +0000 Subject: [issue6975] symlinks incorrectly resolved on Linux In-Reply-To: <1253685313.69.0.648289112505.issue6975@psf.upfronthosting.co.za> Message-ID: <1356898274.12.0.458853208741.issue6975@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Antoine, how about this mosquito? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 22:25:46 2012 From: report at bugs.python.org (Carsten Klein) Date: Sun, 30 Dec 2012 21:25:46 +0000 Subject: [issue16806] col_offset is -1 and lineno is wrong for multiline string expressions In-Reply-To: <1356739702.66.0.625233113719.issue16806@psf.upfronthosting.co.za> Message-ID: <1356902746.77.0.518520146443.issue16806@psf.upfronthosting.co.za> Carsten Klein added the comment: I have created a patch for Python 2.7.3 that fixes the issue for that release, too. ---------- Added file: http://bugs.python.org/file28499/python2.7.3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 22:36:50 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 30 Dec 2012 21:36:50 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1348761787.62.0.977797373088.issue16061@psf.upfronthosting.co.za> Message-ID: <1356903410.95.0.414339144986.issue16061@psf.upfronthosting.co.za> STINNER Victor added the comment: str_replace_1char.patch: why not implementing replace_1char_inplace() in stringlib, with one version per character type (UCS1, UCS2, UCS4)? I prefer unicode_2.patch algorithm because it's simpler: only one loop (vs two loops for str_replace_1char.patch, with a threshold of 10 different characters). Why do you changed your algorithm? Is str_replace_1char.patch algorithm more efficient than unicode_2.patch algorithm? Is the speedup really interesting? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 22:39:39 2012 From: report at bugs.python.org (Barry Alan Scott) Date: Sun, 30 Dec 2012 21:39:39 +0000 Subject: [issue16821] bundlebuilder broken in 2.7 Message-ID: <1356903579.79.0.644714985612.issue16821@psf.upfronthosting.co.za> New submission from Barry Alan Scott: bundlebuild in pytthon 2.7 fails to create usable applications. After examining the code there are a number of coding errors: 1. optimize will puts the -O in the wrong place in the argv 2. Modules.zip is never added to the path The bunderbuilder in 2.6 can be made to work with 2.7 by applying the following patch to the 2.6 code. --- bundlebuilder.py~ 2012-12-30 21:32:40.000000000 +0000 +++ bundlebuilder.py 2012-12-30 21:32:40.000000000 +0000 @@ -337,7 +337,6 @@ "Python", # the Python core library "Resources/English.lproj", "Resources/Info.plist", - "Resources/version.plist", ] def isFramework(): ---------- messages: 178616 nosy: barry-scott priority: normal severity: normal status: open title: bundlebuilder broken in 2.7 type: performance versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 22:49:10 2012 From: report at bugs.python.org (STINNER Victor) Date: Sun, 30 Dec 2012 21:49:10 +0000 Subject: [issue7300] Unicode arguments in str.format() In-Reply-To: <1257861455.06.0.0846130484851.issue7300@psf.upfronthosting.co.za> Message-ID: <1356904150.66.0.113743342362.issue7300@psf.upfronthosting.co.za> STINNER Victor added the comment: Another option is to decide that this issue will *not* be fixed in Python 2, and Python 3 *is* the good solution if you have this issue. Doing the work twice can cause new problems, formatting an argument twice may return two different values :-( It may have an impact on performances and may introduce regressions. Oh by the way, it's trivial to workaround this issue in Python 2: just use a Unicode format string. For example, replace '{0}'.format(u'\u3042') with u'{0}'.format(u'\u3042'). I hate implicit conversion from bytes to Unicode in Python 2, it's maybe better to not add a new special case? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 22:52:06 2012 From: report at bugs.python.org (Eric V. Smith) Date: Sun, 30 Dec 2012 21:52:06 +0000 Subject: [issue7300] Unicode arguments in str.format() In-Reply-To: <1257861455.06.0.0846130484851.issue7300@psf.upfronthosting.co.za> Message-ID: <1356904326.39.0.128922031416.issue7300@psf.upfronthosting.co.za> Eric V. Smith added the comment: I agree that we should close this as "won't fix" in 2.7. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 22:56:08 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sun, 30 Dec 2012 21:56:08 +0000 Subject: [issue16817] test___all__ has to save and restore sys.modules while it does all the importing In-Reply-To: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> Message-ID: <1356904568.2.0.310049435793.issue16817@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 22:59:06 2012 From: report at bugs.python.org (Samuel John) Date: Sun, 30 Dec 2012 21:59:06 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1356904746.4.0.803255202623.issue15663@psf.upfronthosting.co.za> Samuel John added the comment: Sounds reasonable, but please put the libs not in a place that might conflict with a Tk installed by other means (e.g. homebrew's Tk is a `/usr/local`). ---------- nosy: +samueljohn _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:03:12 2012 From: report at bugs.python.org (Ed Campbell) Date: Sun, 30 Dec 2012 22:03:12 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1356904992.92.0.420850175117.issue15663@psf.upfronthosting.co.za> Changes by Ed Campbell : ---------- nosy: +esc24 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:09:22 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 30 Dec 2012 22:09:22 +0000 Subject: [issue16817] test___all__ has to save and restore sys.modules while it does all the importing In-Reply-To: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> Message-ID: <1356905362.58.0.0246536666503.issue16817@psf.upfronthosting.co.za> Eli Bendersky added the comment: I'm renaming the issue to just mention the problem, not the initially proposed solution (following the python-dev discussion). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:09:45 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 30 Dec 2012 22:09:45 +0000 Subject: [issue16817] test___all__ affects other tests by doing too much importing In-Reply-To: <1356828969.86.0.130125185831.issue16817@psf.upfronthosting.co.za> Message-ID: <1356905385.28.0.47358308084.issue16817@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- title: test___all__ has to save and restore sys.modules while it does all the importing -> test___all__ affects other tests by doing too much importing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:23:03 2012 From: report at bugs.python.org (Ned Deily) Date: Sun, 30 Dec 2012 22:23:03 +0000 Subject: [issue16821] bundlebuilder broken in 2.7 In-Reply-To: <1356903579.79.0.644714985612.issue16821@psf.upfronthosting.co.za> Message-ID: <1356906183.42.0.655456586403.issue16821@psf.upfronthosting.co.za> Ned Deily added the comment: Barry, can you provide a simple test case that demonstrates the failures you see? ---------- assignee: -> ronaldoussoren components: +Macintosh nosy: +ned.deily, ronaldoussoren stage: -> test needed type: performance -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:33:46 2012 From: report at bugs.python.org (Barry Alan Scott) Date: Sun, 30 Dec 2012 22:33:46 +0000 Subject: [issue16821] bundlebuilder broken in 2.7 In-Reply-To: <1356903579.79.0.644714985612.issue16821@psf.upfronthosting.co.za> Message-ID: <1356906826.14.0.167181911014.issue16821@psf.upfronthosting.co.za> Barry Alan Scott added the comment: I'm using the pysvn workbench sources to find the problem. Test cases for Mac Apps are not that simple. You need a GUI framework for starters. But I'm happy to test any candidate fix using workbench. As I said a code inspection of the changes since 2.6 will show that this code cannot work. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:38:28 2012 From: report at bugs.python.org (Ned Batchelder) Date: Sun, 30 Dec 2012 22:38:28 +0000 Subject: [issue16822] execv (et al.) should invoke atexit handlers before executing new code Message-ID: <1356907108.89.0.568486797575.issue16822@psf.upfronthosting.co.za> New submission from Ned Batchelder: If I register an atexit handler, and then call os.execv, the handler is not invoked before my process changes over to the new program. Shouldn't it be? My program is ending, so my atexit handlers should be invoked. This is based on this coverage.py bug: https://bitbucket.org/ned/coveragepy/issue/43/coverage-measurement-fails-on-code If the atexit handlers were invoked as part of os.execv, it would work properly. ---------- messages: 178623 nosy: nedbat priority: normal severity: normal status: open title: execv (et al.) should invoke atexit handlers before executing new code versions: Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Dec 30 23:43:33 2012 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 30 Dec 2012 22:43:33 +0000 Subject: [issue14516] test_tools assumes BUILDDIR=SRCDIR In-Reply-To: <1333707730.38.0.628831175594.issue14516@psf.upfronthosting.co.za> Message-ID: <1356907413.93.0.445510117428.issue14516@psf.upfronthosting.co.za> Roumen Petrov added the comment: No - it is broken. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 00:05:28 2012 From: report at bugs.python.org (Berker Peksag) Date: Sun, 30 Dec 2012 23:05:28 +0000 Subject: [issue12915] Add inspect.locate and inspect.resolve In-Reply-To: <1315326633.9.0.910127000285.issue12915@psf.upfronthosting.co.za> Message-ID: <1356908728.42.0.886880413508.issue12915@psf.upfronthosting.co.za> Berker Peksag added the comment: Attaching new patch to address Vinay Sajip's suggestions on Rietveld. Thank you, Vinay. ---------- Added file: http://bugs.python.org/file28500/issue12915_v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 00:22:13 2012 From: report at bugs.python.org (Ned Deily) Date: Sun, 30 Dec 2012 23:22:13 +0000 Subject: [issue9586] "warning: comparison between pointer and integer" in multiprocessing build on Tiger In-Reply-To: <1281703428.64.0.285019462814.issue9586@psf.upfronthosting.co.za> Message-ID: <1356909733.31.0.435838852975.issue9586@psf.upfronthosting.co.za> Changes by Ned Deily : ---------- nosy: +sbt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 00:31:55 2012 From: report at bugs.python.org (Eli Bendersky) Date: Sun, 30 Dec 2012 23:31:55 +0000 Subject: [issue1674555] sys.path in tests contains system directories Message-ID: <1356910315.05.0.241795043094.issue1674555@psf.upfronthosting.co.za> Changes by Eli Bendersky : ---------- nosy: +eli.bendersky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 00:54:42 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 30 Dec 2012 23:54:42 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1356911682.65.0.749450168549.issue10527@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Updated patch including test fixes is in attachment. ---------- Added file: http://bugs.python.org/file28501/issue10527-3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 00:57:34 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Sun, 30 Dec 2012 23:57:34 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1356911854.19.0.245980289625.issue16076@psf.upfronthosting.co.za> Daniel Shahaf added the comment: Attached. Differences to previous version: - Avoid the test___all__ issue (#16817) by manipulating sys.modules directly - Support pickling interoperability between the C and Python implementations ---------- Added file: http://bugs.python.org/file28502/i16076-v6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 00:59:35 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Sun, 30 Dec 2012 23:59:35 +0000 Subject: [issue16689] stdout stderr redirection mess In-Reply-To: <1355533013.89.0.974705743737.issue16689@psf.upfronthosting.co.za> Message-ID: <1356911975.14.0.807337655593.issue16689@psf.upfronthosting.co.za> Ralf Schmitt added the comment: flushing stdout may help before writing to stderr (or at least when writing a traceback). see http://utcc.utoronto.ca/~cks/space/blog/programming/HowToWriteToStderr for a discussion. I don't think it's unreasonable to implement that in python core. ---------- nosy: +schmir _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 01:00:11 2012 From: report at bugs.python.org (William D. Colburn) Date: Mon, 31 Dec 2012 00:00:11 +0000 Subject: [issue16783] sqlite3 accepts strings it cannot (by default) return In-Reply-To: <1356885162.46.0.928429558313.issue16783@psf.upfronthosting.co.za> Message-ID: William D. Colburn added the comment: What it should do is be consistent (predictable) in it's handling of input and output. If it accepts unicode and outputs unicode, then it should accept unicode and output unicode, not accept garbage and then barf. Valid data should be consistantly valid, and invalid data should be consistently invalid. It is bad behavior for a system to allow invalid data in that can't be recovered or handled. On Sun, Dec 30, 2012 at 9:32 AM, Ezio Melotti wrote: > > Ezio Melotti added the comment: > >> Treating invalid data as sometimes valid and sometime as invalid is a problem. > > What is valid is defined by your application. AFAIU sqlite3 defaults to utf-8, but it's able to work with latin1 data as well. The fact that you are mixing utf-8 and latin1 is an error in your application, and while it might be nice if sqlite3 warned you about it, it's not necessarily its responsibility. Even thought it's a really bad idea, you might want to store data with different encodings and still being able to retrieve them using the right text_factory. > > However while trying to reproduce the issue I noticed a possible inconsistency and reported it on #6010. > > ---------- > stage: -> committed/rejected > superseder: -> unable to retrieve latin-1 encoded data from sqlite3 > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 01:05:44 2012 From: report at bugs.python.org (Ned Deily) Date: Mon, 31 Dec 2012 00:05:44 +0000 Subject: [issue1653416] OS X print >> f, "Hello" produces no error on read-only f: normal? Message-ID: <1356912344.07.0.315536085531.issue1653416@psf.upfronthosting.co.za> Ned Deily added the comment: An update: the problem with OS X behavior appears to have been fixed between OS X 10.6 and 10.7. As of 10.7, print to a read-only file also fails as on linux: >>> print >> f, "Hi" Traceback (most recent call last): File "", line 1, in IOError: [Errno 9] Bad file descriptor Also, f.write() as of 2.7.3 produces a more meaningful message. >>> f.write("bha") Traceback (most recent call last): File "", line 1, in IOError: File not open for writing Since the original example now produces an exception, plus, as noted, this is not an issue for 3.x and it's not likely that further work will be done on 2.x in this area, I'm closing this as out-of-date. ---------- nosy: -BreamoreBoy resolution: -> out of date stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 01:15:43 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 31 Dec 2012 00:15:43 +0000 Subject: [issue13657] IDLE doesn't support sys.ps1 and sys.ps2. In-Reply-To: <1324640742.58.0.860347532783.issue13657@psf.upfronthosting.co.za> Message-ID: <1356912943.13.0.0820223781063.issue13657@psf.upfronthosting.co.za> Changes by Roger Serwy : ---------- nosy: -serwy _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 01:16:38 2012 From: report at bugs.python.org (Roumen Petrov) Date: Mon, 31 Dec 2012 00:16:38 +0000 Subject: [issue3871] cross and native build of python for mingw* hosts In-Reply-To: <1356730552.8.0.372246920746.issue3871@psf.upfronthosting.co.za> Message-ID: <50E0D964.4090900@roumenpetrov.info> Roumen Petrov added the comment: Jason Huntley wrote: > Jason Huntley added the comment: > > Finally! I was able to get all building on mingw64, gcc 4.7.2, and python 3.3. I had to take everybody's work here a little further, and I have produced a new patch which will build python33 using the latest minw64 compiler in an msys environment. > > I cloned the 3.3 branch and applied the latest patch available here, py3k-20121004-MINGW.patch. I had to make quite a few more updates to get all the modules compiling with 4.7.2 and python find all the modules in the correct paths in an msys/mingw64 environment. I've compiled another patch, which addresses all the latest issues. Until now I did not change Mingw compiler class, just because is reported in a number of separate issues. I would like to disagree with 'hard codded' compiler flags into python code. For instance -mms-bitfields is default for GCC 4.7+ . Also -pthread has to be detected by configure if is required for host platform. Another point is mno-cygwin - reported in issue 12641. Unfortunately one of PSF project directors misread error message and issue remain unresolved. Please provide more details for change in Lib/ntpath.py . What is reasons to add more build-in modules (time, math, ...) ? Why is updated PC/pyconfig.h ? This is so called by python community "posix-build" and pyconfig.h is generated by configure script. Did I miss something ? File configure.ac contain so many unrelated changes - replace tabs with spaces. Please post as separate diff you changes. Why is updated Lib/plat-generic/regen ? Currently my private repository reintroduce support _sysconfigdata.py but this require some changes in PC/getpathp.c . I left current installation from makefile as is and after this with an extra script i move file for location same as primary build. This is reason do not include more search paths in this file. Issue for unification of python installation across platforms may be will be resolved with 14302 and 9654. Roumen ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 01:42:42 2012 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 31 Dec 2012 00:42:42 +0000 Subject: [issue16820] configparser.ConfigParser.clean and .update bugs In-Reply-To: <1356887573.11.0.450967441519.issue16820@psf.upfronthosting.co.za> Message-ID: <1356914562.22.0.273559823075.issue16820@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- assignee: -> lukasz.langa _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 01:54:58 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Mon, 31 Dec 2012 00:54:58 +0000 Subject: [issue16076] xml.etree.ElementTree.Element and xml.etree.ElementTree.TreeBuilder are no longer pickleable In-Reply-To: <1348822499.83.0.756048401766.issue16076@psf.upfronthosting.co.za> Message-ID: <1356915298.07.0.65011760774.issue16076@psf.upfronthosting.co.za> Daniel Shahaf added the comment: BTW, maybe I'm just confused, but I'm a little surprised that C pickling -> Python unpickling works: the C __reduce__ returns a 3-element tuple, which according to pickle docs[1] must either be a dictionary or be passed to __setstate__; it's not a dictionary and the Python implementation doesn't have a __setstate__. http://docs.python.org/3/library/pickle#pickle.object.__reduce__ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 01:57:11 2012 From: report at bugs.python.org (Meador Inge) Date: Mon, 31 Dec 2012 00:57:11 +0000 Subject: [issue13951] Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault In-Reply-To: <1328535030.63.0.73417525944.issue13951@psf.upfronthosting.co.za> Message-ID: <1356915431.57.0.480995878657.issue13951@psf.upfronthosting.co.za> Meador Inge added the comment: Georg's proposal seems reasonable to me sans one very minor nit. I think the e.g. bit is better off parenthesized: There are, however, enough ways to crash Python with :mod:`ctypes`, so you -should be careful anyway. +should be careful anyway. The :mod:`faulthandler` module can be helpful in +debugging crashes (e.g. from segmentation faults produced by erroneous C +library calls). If there are no objections, then I will go ahead and commit this version. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 01:58:59 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 31 Dec 2012 00:58:59 +0000 Subject: [issue16747] Remove 'file' type reference from 'iterable' glossary entry In-Reply-To: <1356134813.58.0.26000957124.issue16747@psf.upfronthosting.co.za> Message-ID: <1356915539.58.0.984917528278.issue16747@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 02:10:54 2012 From: report at bugs.python.org (STINNER Victor) Date: Mon, 31 Dec 2012 01:10:54 +0000 Subject: [issue7735] python creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1356916254.31.0.826522030956.issue7735@psf.upfronthosting.co.za> STINNER Victor added the comment: I spoke with schmir on IRC about this issue because he considers the request as valid, and he doesn't understand why the issue was closed with "wont fix". -- schmir use case: - a network where IPv6 doesn't work (for an unknown reason) - a Linux system with IPv6 support and a network interface with a local link address (fe80:...), maybe also with a IPv6 public address (it doesn't really matter for the use case) - Python configured with --disable-ipv6 "to ensure that Python will not send any IPv6 request" (according to schmir) (./configure --disable-ipv6) - the DNS client is configured to return IPv4 addresses and then IPv6 addresses - call socket.create_connection((hostname, 80)) - the computer cannot connect to this host in IPv4 nor IPv6 Current behaviour: - Python calls getaddrinfo() with ai_family=0 (AF_UNSPEC) - the DNS client (of the glibc) asks for A (IPv4) and AAAA (IPv6) DNS records - Python tries to connect to the IPv4 address and fails (connection error for example) - Python tries to connect to the IPv6 address and fails with a TypeError because AF_INET6 is not supported - the final exception is misleading: TypeError instead of a connection error schmir expects that --disable-ipv6 would "really" disable IPv6 *everywhere* in Python, which is wrong. Python may still get IPv6 adddresses from getaddrinfo() if the system does somehow support IPv6. schmir proposes the change create_connection() to really disable IPv6 there: force AF_INET if socket.has_ipv6 is False. https://github.com/SiteSupport/gevent/commit/9b1bccffc11455112076189f35023291cf97a2a2 I agree that something is wrong here, but I also disagree with schmir. In my opinion, --disable-ipv6 is the wrong answer to the initial problem (ensure that the computer will not use IPv6 because IPv6 doesn't work somewhere in the network). The correct solution is to disable IPv6 system wide. See for example https://wiki.archlinux.org/index.php/IPv6#Disable_IPv6 to disable IPv6 system wide on Linux. It's simpler and safer to disable IPv6 system wide instead of fixing all applications. Other applications will have the same issue (ask AAAA DNS records) in the same use case. "wont fix" is the correct status for this issue: we agree that there is a bug, but it will not be fixed, because --disable-ipv6 is the wrong solution. -- Note: ai_flags=AI_ADDRCONFIG would not change anything because the network interface has an IPv6 local link address. See http://sourceware.org/bugzilla/show_bug.cgi?id=12377 for a discussion about this in the glibc. Note: schmir uses Gentoo and disabled the ipv6 use flag of its python package (USE=-ipv6). ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 02:11:54 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 31 Dec 2012 01:11:54 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356916314.78.0.379585917661.issue16801@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 02:13:38 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 31 Dec 2012 01:13:38 +0000 Subject: [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356711151.76.0.423836721045.issue16802@psf.upfronthosting.co.za> Message-ID: <1356916418.79.0.994742919478.issue16802@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 02:23:14 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Mon, 31 Dec 2012 01:23:14 +0000 Subject: [issue7735] socket.create_connection() creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1356916994.76.0.512466887597.issue7735@psf.upfronthosting.co.za> Changes by Daniel Shahaf : ---------- title: python creates IPv6 DNS requests even when built with --disable-ipv6 -> socket.create_connection() creates IPv6 DNS requests even when built with --disable-ipv6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 02:29:42 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Dec 2012 01:29:42 +0000 Subject: [issue15803] Incorrect docstring on ConfigParser.items() In-Reply-To: <1346202745.06.0.103510250689.issue15803@psf.upfronthosting.co.za> Message-ID: <3YZLY057YKzS5m@mail.python.org> Roundup Robot added the comment: New changeset 850503a117a9 by ?ukasz Langa in branch '3.2': Fixes issue #15803: incorrect `ConfigParser.items()` docstring http://hg.python.org/cpython/rev/850503a117a9 New changeset cc277b25eae7 by ?ukasz Langa in branch '3.3': Merged fix for #15803 from 3.2 http://hg.python.org/cpython/rev/cc277b25eae7 New changeset b4975cb4be95 by ?ukasz Langa in branch 'default': Merged fix for #15803 from 3.2 through 3.3 http://hg.python.org/cpython/rev/b4975cb4be95 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 02:31:48 2012 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 31 Dec 2012 01:31:48 +0000 Subject: [issue15803] Incorrect docstring on ConfigParser.items() In-Reply-To: <1346202745.06.0.103510250689.issue15803@psf.upfronthosting.co.za> Message-ID: <1356917508.98.0.860346919389.issue15803@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Patch committed. Thanks for your report, Nathan. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 02:32:10 2012 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 31 Dec 2012 01:32:10 +0000 Subject: [issue15803] Incorrect docstring on ConfigParser.items() In-Reply-To: <1346202745.06.0.103510250689.issue15803@psf.upfronthosting.co.za> Message-ID: <1356917530.37.0.612646188584.issue15803@psf.upfronthosting.co.za> Changes by ?ukasz Langa : ---------- resolution: -> fixed stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 02:42:12 2012 From: report at bugs.python.org (Meador Inge) Date: Mon, 31 Dec 2012 01:42:12 +0000 Subject: [issue16320] Establish order in bytes/string dependencies In-Reply-To: <1351156037.64.0.017004315605.issue16320@psf.upfronthosting.co.za> Message-ID: <1356918132.8.0.402143231641.issue16320@psf.upfronthosting.co.za> Meador Inge added the comment: The cleanup of BYTESTR_DEPS and UNICODE_DEPS seems reasonable, but can you explain the rationale behind removing the additional dependencies on formatter_unicode.c? Why were those dependencies ever needed (I can't see the dependencies from reading formatter_unicode.c and its included headers)? Martin explicitly added the BYTESTR_DEPS dependencies in 8beaa9a37387. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 02:48:09 2012 From: report at bugs.python.org (Meador Inge) Date: Mon, 31 Dec 2012 01:48:09 +0000 Subject: [issue16320] Establish order in bytes/string dependencies In-Reply-To: <1351156037.64.0.017004315605.issue16320@psf.upfronthosting.co.za> Message-ID: <1356918489.51.0.78595592634.issue16320@psf.upfronthosting.co.za> Meador Inge added the comment: Sorry, the BYTESTR_DEPS dependencies were already there pre-8beaa9a37387. I am still curious why they are needed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 03:44:04 2012 From: report at bugs.python.org (Ben Morgan) Date: Mon, 31 Dec 2012 02:44:04 +0000 Subject: [issue12004] PyZipFile.writepy gives internal error on syntax errors In-Reply-To: <1304562440.9.0.83817194423.issue12004@psf.upfronthosting.co.za> Message-ID: <1356921844.89.0.826320584139.issue12004@psf.upfronthosting.co.za> Ben Morgan added the comment: Okay, I've emailed a contributor agreement. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 03:44:10 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Dec 2012 02:44:10 +0000 Subject: [issue16820] configparser.ConfigParser.clean and .update bugs In-Reply-To: <1356887573.11.0.450967441519.issue16820@psf.upfronthosting.co.za> Message-ID: <3YZNBx2C2gzS6C@mail.python.org> Roundup Robot added the comment: New changeset dc5adc08f1a8 by ?ukasz Langa in branch '3.2': Fixes `parser.clean()` reported in issue #16820. http://hg.python.org/cpython/rev/dc5adc08f1a8 New changeset 4fc2fea807e6 by ?ukasz Langa in branch '3.3': Merged `parser.clean()` fix (issue #16820) from 3.2. http://hg.python.org/cpython/rev/4fc2fea807e6 New changeset c6f9bc5a0cf1 by ?ukasz Langa in branch 'default': Merged `parser.clean()` fix (issue #16820) from 3.2 through 3.3. http://hg.python.org/cpython/rev/c6f9bc5a0cf1 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 04:10:00 2012 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 31 Dec 2012 03:10:00 +0000 Subject: [issue16820] configparser.ConfigParser.clean and .update bugs In-Reply-To: <1356887573.11.0.450967441519.issue16820@psf.upfronthosting.co.za> Message-ID: <1356923400.26.0.313282958192.issue16820@psf.upfronthosting.co.za> ?ukasz Langa added the comment: Thanks for your report, Wolfgang. The `clean()` method is now fixed. The `update()` situation is more complicated, however. The mapping protocol defines that mapping.update({'a': 'b', 'c': 'd'}) and mapping.update(a='b', c='d') are equivalent to mapping['a'] = 'b' mapping['c'] = 'd' For `configparser` we decided that setting a section on a parser is a destructive operation (e.g. it overwrites previous options). If the user finds this undesirable, she can either use `parser['section'].update()` or `parser.read_dict()` like you suggested. The bug here is that __setitem__ for the DEFAULTSECT should also clear options previously set on this section. ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 04:23:10 2012 From: report at bugs.python.org (Sarbjit singh) Date: Mon, 31 Dec 2012 03:23:10 +0000 Subject: [issue16823] Python crashes on running tkinter code with threads Message-ID: <1356924189.65.0.303016065786.issue16823@psf.upfronthosting.co.za> New submission from Sarbjit singh: I have written a python tkinter code using threads so as the tkinter wizard updates automatically by tkinter mainloop running in the main thread and background process running in separate thread. But I noticed, that python crashes after some time when running the code. Moreover its random in nature but python crashes most of the time. I have written a small test code which can show this problem (My original code is similar to this but having some real processes and many other features, so I am sharing the test code). ###################################################################### # Test Code for Tkinter with threads import Tkinter import threading import Queue import time # Data Generator which will generate Data def GenerateData(q): for i in range(1000000): #print "Generating Some Data, Iteration %s" %(i) time.sleep(0.01) q.put("Some Data from iteration %s. Putting this data in the queue for testing" %(i)) # Queue which will be used for storing Data q = Queue.Queue() def QueueHandler(widinst, q): linecount = 0 while True: print "Running" if not q.empty(): str = q.get() linecount = linecount + 1 widinst.configure(state="normal") str = str + "\n" widinst.insert("end", str) if linecount > 100: widinst.delete('1.0', '2.0') linecount = linecount - 1 widinst.see('end') widinst.configure(state="disabled") # Create a thread and run GUI & QueueHadnler in it tk = Tkinter.Tk() scrollbar = Tkinter.Scrollbar(tk) scrollbar.pack(side='right', fill='y' ) text_wid = Tkinter.Text(tk,yscrollcommand=scrollbar.set) text_wid.pack() t1 = threading.Thread(target=GenerateData, args=(q,)) t2 = threading.Thread(target=QueueHandler, args=(text_wid,q)) t2.start() t1.start() tk.mainloop() ###################################################################### TO REPRODUCE: If you open this code in IDLE and run it, it will sometimes appeared to be in hang state. So to reproduce, modify the sleep time to 0.1 from 0.01 and run it. After this stop the application, and modify it back to 0.01, do save and run it. This time it will run and after some time, python will stop working. I am using windows 7 (64 bit). NOTE: I am getting different stack trace's when it crashes on console: Please refer to the attached file for the stack traces. ---------- components: Tkinter files: debugstack.txt messages: 178642 nosy: Sarbjit.singh priority: normal severity: normal status: open title: Python crashes on running tkinter code with threads type: crash versions: Python 2.7 Added file: http://bugs.python.org/file28503/debugstack.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 05:51:36 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Mon, 31 Dec 2012 04:51:36 +0000 Subject: [issue7735] socket.create_connection() creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1356929496.71.0.884978005104.issue7735@psf.upfronthosting.co.za> Daniel Shahaf added the comment: Victor, thanks for the summary. I view things a little differently, so I'll offer my POV: 1. The OPs (Evan and Ralf) build with --disable-ipv6. 2. --disable-ipv6 disables support for IPv6 sockets. (as per Martin, and AFAIK as per the common meaning of that flag in other configure scripts.) It does not disable AAAA DNS queries in stdlib DNS client modules. It does not disable IPv6 support in the 'ipaddress' module. It does not signify that IPv6 is/isn't supported by libc. It is orthogonal to whether any interface has IPv6 addresses configured. 3. socket.create_connection() requests IPv6 addresses when Python was built with --disable-ipv6. 4. The OPs claim that (3) is a bug, reasoning that, as create_connection() should not try to connect(2) to IPv6 addresses (per (2)), it's pointless, wasteful, or wrong for it to request them in the first place. 5. Ralf provided a one-line patch for (4): https://github.com/SiteSupport/gevent/commit/9b1bccffc11455112076189f35023291cf97a2a2 In other words, the issue revolves around configuring Python not to create IPv6 sockets on IPv6-capable systems. HTH ---------- nosy: +danielsh _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 07:45:57 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 31 Dec 2012 06:45:57 +0000 Subject: [issue2405] Drop w9xpopen and all dependencies In-Reply-To: <1205870969.55.0.774025556957.issue2405@psf.upfronthosting.co.za> Message-ID: <1356936357.17.0.276244749439.issue2405@psf.upfronthosting.co.za> Brian Curtin added the comment: This was fixed in #14470. ---------- nosy: +brian.curtin resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Remove using of w9xopen in subprocess module _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 08:02:01 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 31 Dec 2012 07:02:01 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1356937321.69.0.311926006286.issue16659@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Brett, if all the other Python implementations already have a working implementation of random, what purpose is served by adding a pure python version of the Mersenne Twister than won't be run by anyone? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 08:29:05 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 31 Dec 2012 07:29:05 +0000 Subject: [issue15663] Investigate providing Tcl/Tk 8.5 with OS X installers In-Reply-To: <1345022434.53.0.691858342769.issue15663@psf.upfronthosting.co.za> Message-ID: <1356938945.74.0.240054198961.issue15663@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The logical location for installing and embedded Tcl/Tk is either in {sys.prefix}/lib (for a unix install of Tk) or in Python.framework/Versions/X.Y/Frameworks (for a Tcl/Tk framework install). In either case Tcl/Tk would be installed *inside* Python.framework and hence couldn't conflict with other installations of Tcl/Tk (system, activate-state, homebrew, ...). Note that this would also make it harder for end users to upgrade Tcl/Tk, currently they can use the ActiveState installer to install a better Tk release and that would no longer be necessary. That would be a small cost relative to the large gain of having a working Tk release. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 08:30:22 2012 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 31 Dec 2012 07:30:22 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356939022.2.0.896133347637.issue16801@psf.upfronthosting.co.za> Raymond Hettinger added the comment: 20+ years of Python success suggest this isn't a problem that needs solving. AFAICT, other languages haven't found a need to preserve number representation either. Likewise, Linux itself doesn't preserve the original form of a chmod call. I recommend closing this one. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 08:36:18 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 31 Dec 2012 07:36:18 +0000 Subject: [issue16821] bundlebuilder broken in 2.7 In-Reply-To: <1356903579.79.0.644714985612.issue16821@psf.upfronthosting.co.za> Message-ID: <1356939378.78.0.818767174903.issue16821@psf.upfronthosting.co.za> Ronald Oussoren added the comment: It would be nice to have a simple self-contained example, especially one that could be converted to a testcase later on. Using the pysvn workbench should be good enough to find the problem though (assuming it is open source). Is there a download URL for this project? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 08:38:00 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 31 Dec 2012 07:38:00 +0000 Subject: [issue16821] bundlebuilder broken in 2.7 In-Reply-To: <1356903579.79.0.644714985612.issue16821@psf.upfronthosting.co.za> Message-ID: <1356939480.44.0.394447658275.issue16821@psf.upfronthosting.co.za> Ronald Oussoren added the comment: BTW. bundlebuilder is deprecated and is no longer present in py3k. Also: IDLE.app for python 2.7 is build using bundlebuilder, and that app works just fine. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 08:40:31 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 31 Dec 2012 07:40:31 +0000 Subject: [issue7320] Unable to load external modules on build slave with debug python In-Reply-To: <1258173028.92.0.517735390444.issue7320@psf.upfronthosting.co.za> Message-ID: <1356939631.99.0.993575222472.issue7320@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- resolution: -> out of date stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 08:59:51 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 31 Dec 2012 07:59:51 +0000 Subject: [issue14516] test_tools assumes BUILDDIR=SRCDIR In-Reply-To: <1333707730.38.0.628831175594.issue14516@psf.upfronthosting.co.za> Message-ID: <1356940791.29.0.990880321685.issue14516@psf.upfronthosting.co.za> Ronald Oussoren added the comment: Test_tools passes for me with the tip of the default branch and BUILDDIR!=SRCDIR. I'm currently running a 2.7 test run, but AFAIK this issue is fixed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 09:16:30 2012 From: report at bugs.python.org (Georg Brandl) Date: Mon, 31 Dec 2012 08:16:30 +0000 Subject: [issue13951] Document that Seg Fault in .so called by ctypes causes the interpreter to Seg Fault In-Reply-To: <1328535030.63.0.73417525944.issue13951@psf.upfronthosting.co.za> Message-ID: <1356941790.23.0.431220051514.issue13951@psf.upfronthosting.co.za> Georg Brandl added the comment: LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 09:21:26 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 31 Dec 2012 08:21:26 +0000 Subject: [issue14516] test_tools assumes BUILDDIR=SRCDIR In-Reply-To: <1333707730.38.0.628831175594.issue14516@psf.upfronthosting.co.za> Message-ID: <1356942086.45.0.194257348442.issue14516@psf.upfronthosting.co.za> Ronald Oussoren added the comment: 2.7 works as well. Roumen: what doesn't work and how can we reproduce that? ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 09:26:55 2012 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 31 Dec 2012 08:26:55 +0000 Subject: [issue16824] typo in test Message-ID: <1356942415.38.0.154383781049.issue16824@psf.upfronthosting.co.za> New submission from Stefan Behnel: Line 522 in test file Lib/test/test_pep380.py says: trace.append("Should not have yielded:", y) However, 'trace' is a list and list.append() only takes one parameter, so this should read: trace.append("Should not have yielded: %r" % y) I noticed it because Cython's type analysis refuses to compile this. This line is just a failure guard and is never reached in the normal test execution, that's why it doesn't show in CPython's test runs. ---------- components: Tests messages: 178653 nosy: scoder priority: normal severity: normal status: open title: typo in test type: compile error versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 09:34:58 2012 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 31 Dec 2012 08:34:58 +0000 Subject: [issue15075] XincludeTest failure in test_xml_etree In-Reply-To: <1339748285.77.0.903136291102.issue15075@psf.upfronthosting.co.za> Message-ID: <1356942898.93.0.120892781107.issue15075@psf.upfronthosting.co.za> Stefan Behnel added the comment: If runtime checks are needed to prevent mixing arbitrary objects into the tree, then I don't think they should be considered too costly. I agree with Florent that this is worth reopening. It doesn't look like a "Tests" bug to me rather a "Lib"/"XML" bug. ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 09:53:52 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 31 Dec 2012 08:53:52 +0000 Subject: [issue1674555] sys.path in tests contains system directories Message-ID: <1356944032.77.0.31164741393.issue1674555@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Added file: http://bugs.python.org/file28504/python-2.7-issue1674555.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 09:54:14 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 31 Dec 2012 08:54:14 +0000 Subject: [issue1674555] sys.path in tests contains system directories Message-ID: <1356944054.69.0.226605283482.issue1674555@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Added file: http://bugs.python.org/file28505/python-3.2-issue1674555.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 09:54:26 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 31 Dec 2012 08:54:26 +0000 Subject: [issue1674555] sys.path in tests contains system directories Message-ID: <1356944066.54.0.328041341822.issue1674555@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Added file: http://bugs.python.org/file28506/python-3.3-issue1674555.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 09:54:39 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 31 Dec 2012 08:54:39 +0000 Subject: [issue1674555] sys.path in tests contains system directories Message-ID: <1356944079.13.0.942658975375.issue1674555@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Added file: http://bugs.python.org/file28507/python-3.4-issue1674555.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 09:54:50 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 31 Dec 2012 08:54:50 +0000 Subject: [issue1674555] sys.path in tests contains system directories Message-ID: <1356944090.47.0.351299297633.issue1674555@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Removed file: http://bugs.python.org/file20583/python-3.2-issue1674555.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 09:54:59 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 31 Dec 2012 08:54:59 +0000 Subject: [issue1674555] sys.path in tests contains system directories Message-ID: <1356944099.47.0.785914079316.issue1674555@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Removed file: http://bugs.python.org/file20584/python-2.7-issue1674555.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:13:08 2012 From: report at bugs.python.org (Stefan Behnel) Date: Mon, 31 Dec 2012 09:13:08 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1356945188.25.0.513991297948.issue16659@psf.upfronthosting.co.za> Stefan Behnel added the comment: FWIW, PyPy has an (R)Python implementation already: https://bitbucket.org/pypy/pypy/src/default/pypy/rlib/rrandom.py ---------- nosy: +scoder _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:17:44 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 09:17:44 +0000 Subject: [issue16824] typo in test In-Reply-To: <1356942415.38.0.154383781049.issue16824@psf.upfronthosting.co.za> Message-ID: <1356945464.66.0.523580673426.issue16824@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- assignee: -> serhiy.storchaka nosy: +serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:36:39 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 31 Dec 2012 09:36:39 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1356729955.63.0.103457964326.issue10527@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: The patch looks good, however there's something really bothering me: in issue #14635, the same type of patch was applied to telnetlib, here, it's multiprocessing and AFAICT, any single use of select() in the standard library is subject to this FD_SETSIZE limitation. That why I think it could probably be a good idea to expose a high-level "selector" object in the select module, which would use the "right" syscall transparently (e.g. select, poll or /dev/poll), with a unified API. This would make writing portable and efficient I/O multiplexing code much easier, not only in the stdlib, but also for end-users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:38:32 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Dec 2012 09:38:32 +0000 Subject: [issue16824] typo in test In-Reply-To: <1356942415.38.0.154383781049.issue16824@psf.upfronthosting.co.za> Message-ID: <3YZYP33qb4zS7x@mail.python.org> Roundup Robot added the comment: New changeset 9472928af085 by Serhiy Storchaka in branch '3.3': Issue #16824: Fix a failure guard in the never reached in the normal test execution code in test_pep380. http://hg.python.org/cpython/rev/9472928af085 New changeset 66665ef7d9d6 by Serhiy Storchaka in branch 'default': Issue #16824: Fix a failure guard in the never reached in the normal test execution code in test_pep380. http://hg.python.org/cpython/rev/66665ef7d9d6 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:41:41 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 09:41:41 +0000 Subject: [issue16824] typo in test In-Reply-To: <1356942415.38.0.154383781049.issue16824@psf.upfronthosting.co.za> Message-ID: <1356946901.43.0.986548382894.issue16824@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Fixed. Thank you, Stefan. I will be glad to see new bugs which you will found with Cython. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed type: compile error -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 10:58:52 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 09:58:52 +0000 Subject: [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356711151.76.0.423836721045.issue16802@psf.upfronthosting.co.za> Message-ID: <1356947932.84.0.177295547636.issue16802@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: The fileno parameter was added in the changeset 8e062e572ea4. It was mentioned in comments at the top of Modules/socketmodule.c, but not in the documentation or docstrings (nor for _socket.socket, nor for socket.socket). ---------- assignee: -> docs at python components: +Documentation nosy: +docs at python, pitrou, serhiy.storchaka type: -> enhancement _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 11:08:44 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 31 Dec 2012 10:08:44 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1356948524.11.0.502529253699.issue1222585@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Removed file: http://bugs.python.org/file16630/python-LDCXXSHARED.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 11:10:32 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 31 Dec 2012 10:10:32 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1356948632.66.0.489212089569.issue1222585@psf.upfronthosting.co.za> Arfrever Frehtes Taifersar Arahesis added the comment: I attach updated patches for distutils in case somebody wants to use them. (I privately update them once per week.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 11:11:09 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 31 Dec 2012 10:11:09 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1356948669.62.0.398364992652.issue1222585@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- keywords: +patch Added file: http://bugs.python.org/file28508/python-2.7-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 11:11:26 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 31 Dec 2012 10:11:26 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1356948686.23.0.183028680412.issue1222585@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Added file: http://bugs.python.org/file28509/python-3.2-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 11:11:36 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 31 Dec 2012 10:11:36 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1356948696.44.0.690267859169.issue1222585@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Added file: http://bugs.python.org/file28510/python-3.3-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 11:11:47 2012 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Mon, 31 Dec 2012 10:11:47 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1356948707.41.0.528885645486.issue1222585@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Added file: http://bugs.python.org/file28511/python-3.4-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 11:50:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 10:50:18 +0000 Subject: [issue16320] Establish order in bytes/string dependencies In-Reply-To: <1351156037.64.0.017004315605.issue16320@psf.upfronthosting.co.za> Message-ID: <1356951018.67.0.89665670127.issue16320@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: > The cleanup of BYTESTR_DEPS and UNICODE_DEPS seems reasonable, but can you > explain the rationale behind removing the additional dependencies on > formatter_unicode.c? This question already was asked by Antoine on IRC. Because now Python/formatter_unicode.c depends only on headers included in PYTHON_HEADERS. A special rule doesn't needed. > Why were those dependencies ever needed (I can't see > the dependencies from reading formatter_unicode.c and its included > headers)? Perhaps this is an artifact. This dependency was added in r61057 and fce5af5ce16a by Christian Heimes. ---------- nosy: +christian.heimes _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 11:58:29 2012 From: report at bugs.python.org (Barry Alan Scott) Date: Mon, 31 Dec 2012 10:58:29 +0000 Subject: [issue16821] bundlebuilder broken in 2.7 In-Reply-To: <1356903579.79.0.644714985612.issue16821@psf.upfronthosting.co.za> Message-ID: <1356951509.35.0.595897362403.issue16821@psf.upfronthosting.co.za> Barry Alan Scott added the comment: Why not use IDLE? Workbench is a lot of code and dependencies. I expect that it works because idle.app was created using the --no-zipimport option that is new in 2.7. However with zip import the code is badly broken. Build IDLE.app with zip import and you should reproduce the bug. Have you code inspected the module as I suggested to review the new code? _getSiteCode is clearly wrong. The if is backwards and no else. The following inserts are in the wrong order: if %(optimize)s: sys.argv.insert(1, '-O') sys.argv.insert(1, mainprogram) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 12:02:49 2012 From: report at bugs.python.org (Georg Brandl) Date: Mon, 31 Dec 2012 11:02:49 +0000 Subject: [issue16801] Preserve original representation for integers / floats in docstrings In-Reply-To: <1356699853.91.0.313275944642.issue16801@psf.upfronthosting.co.za> Message-ID: <1356951769.66.0.156287608492.issue16801@psf.upfronthosting.co.za> Georg Brandl added the comment: > 20+ years of Python success suggest this isn't a problem that needs solving. That reasoning could be applied to almost all open tracker issues. > Likewise, Linux itself doesn't preserve the original form of a chmod call. Where would/could it do so? C has no introspection facility equivalent to pydoc, which is discussed here. In the Linux manual pages, octal literals are used. Introspective tools like "strace" also display octal literals when tracing *chmod calls. That said, I agree that this is not an issue worth solving just because of octal literals. But there are more cases in which the actual signature doesn't represent the best way to document the function API, and if a simple solution can be found it would not be different from fixing a minor annoyance elsewhere in Python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 12:09:12 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 31 Dec 2012 11:09:12 +0000 Subject: [issue16821] bundlebuilder broken in 2.7 In-Reply-To: <1356903579.79.0.644714985612.issue16821@psf.upfronthosting.co.za> Message-ID: <1356952152.02.0.181577336127.issue16821@psf.upfronthosting.co.za> Ronald Oussoren added the comment: It probably works because IDLE.app only uses the stdlib (that is, anything imported from the main script is in the stdlib) The bundlebuilder call for IDLE.app: $(RUNSHARED) @ARCH_RUN_32BIT@ $(BUILDPYTHON) $(BUNDLEBULDER) \ --builddir=. \ --name=IDLE \ --link-exec \ --plist=Info.plist \ --mainprogram=$(srcdir)/idlemain.py \ --iconfile=$(srcdir)/../Icons/IDLE.icns \ --resource=$(srcdir)/../Icons/PythonSource.icns \ --resource=$(srcdir)/../Icons/PythonCompiled.icns \ --python=$(prefix)/Resources/Python.app/Contents/MacOS/Python \ build I don't have time to look into this right now, maybe in a couple of weeks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 12:16:42 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 31 Dec 2012 11:16:42 +0000 Subject: [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356711151.76.0.423836721045.issue16802@psf.upfronthosting.co.za> Message-ID: <1356952602.17.0.856090016623.issue16802@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The "fileno" argument looks like an implementation detail to me. ---------- nosy: +gvanrossum _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 12:21:26 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 11:21:26 +0000 Subject: [issue16061] performance regression in string replace for 3.3 In-Reply-To: <1356903410.95.0.414339144986.issue16061@psf.upfronthosting.co.za> Message-ID: <201212311321.04822.storchaka@gmail.com> Serhiy Storchaka added the comment: > str_replace_1char.patch: why not implementing replace_1char_inplace() in > stringlib, with one version per character type (UCS1, UCS2, UCS4)? Because there are no benefits to do it. All three versions (UCS1, UCS2, and UCS4) have no any common code. The best implementation used for every kind of strings. For UCS1 it uses fast memchr() (findchar() has some overhead here), for UCS2 it uses findchar(), and for UCS4 it uses a dumb loop, because findchar() will be too ineffective here. > I prefer unicode_2.patch algorithm because it's simpler: only one loop (vs > two loops for str_replace_1char.patch, with a threshold of 10 different > characters). Yes, UCS1-implementation in str_replace_1char.patch is more complicated, but it is faster for more input strings. memchr() is more effective than a simple loop when the replaceable characters are rare. But when they meet often, a simple cycle is more efficient. The "attempts" counter determines how many characters will be checked before using memchr(). This speeds up the replacement in strings with frequent replacements, but a little slow down the replacement in strings with rare replacements. 10 is a compromise. str_replace_1char.patch speed up not only case when *each* character replaced, but when 1/2, 1/3, 1/5,... characters replaced. > Why do you changed your algorithm? Is str_replace_1char.patch algorithm > more efficient than unicode_2.patch algorithm? Is the speedup really > interesting? You can run benchmarks and compare results. str_replace_1char.patch provides not the best performance, but most stable results for wide sort of strings, and has no regressions comparing with 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 12:40:52 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 31 Dec 2012 11:40:52 +0000 Subject: [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356711151.76.0.423836721045.issue16802@psf.upfronthosting.co.za> Message-ID: <1356954052.43.0.633061110097.issue16802@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > The "fileno" argument looks like an implementation detail to me. It has at least one potential use. On Windows socket.detach() returns a socket handle but there is no documented way to close it -- os.close() will not work. The only way to close it that I can see (without resorting to ctypes) is with something like socket.socket(fileno=handle).close() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 12:44:15 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 31 Dec 2012 11:44:15 +0000 Subject: [issue16822] execv (et al.) should invoke atexit handlers before executing new code In-Reply-To: <1356907108.89.0.568486797575.issue16822@psf.upfronthosting.co.za> Message-ID: <1356954255.1.0.769553858844.issue16822@psf.upfronthosting.co.za> Antoine Pitrou added the comment: That's a good question. Conceptually it makes sense, but I wonder if programs currently rely on os.execv not cleaning up anything: not only it doesn't call atexit handlers, but it also doesn't try to shutdown the interpreter. Which can be handy if you are using exec() in a fork() + exec() context (I think it is generally recommended to use os._exit(), not sys.exit() in a forked child). ---------- nosy: +neologix, pitrou type: -> enhancement versions: +Python 3.4 -Python 2.7, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 12:46:15 2012 From: report at bugs.python.org (Georg Brandl) Date: Mon, 31 Dec 2012 11:46:15 +0000 Subject: [issue16822] execv (et al.) should invoke atexit handlers before executing new code In-Reply-To: <1356907108.89.0.568486797575.issue16822@psf.upfronthosting.co.za> Message-ID: <1356954375.38.0.0942756878609.issue16822@psf.upfronthosting.co.za> Georg Brandl added the comment: FTR, with C's atexit(3), the handlers are not called either on exec(). ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 13:01:03 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 31 Dec 2012 12:01:03 +0000 Subject: [issue16822] execv (et al.) should invoke atexit handlers before executing new code In-Reply-To: <1356954375.38.0.0942756878609.issue16822@psf.upfronthosting.co.za> Message-ID: Charles-Fran?ois Natali added the comment: The first reason for not calling atexit handlers upon exec() is that it wouldn't be async-safe anymore, and could result in deadlocks. Also, since atexit handlers are inherited upon fork(), running atexit handlers upon exec() could result in such handlers being called several times - something which should definitely be avoided. Note that the atexit documentation states that handlers will only be called in case of "normal interpreter termination". So I'm -1 on the change, the chance of breaking existing applications is way too high. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 13:57:41 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Dec 2012 12:57:41 +0000 Subject: [issue16820] configparser.ConfigParser.clean and .update bugs In-Reply-To: <1356887573.11.0.450967441519.issue16820@psf.upfronthosting.co.za> Message-ID: <3YZdpr35KFzMwg@mail.python.org> Roundup Robot added the comment: New changeset 459a23083b66 by ?ukasz Langa in branch '3.3': Fixes `__setitem__` on parser['DEFAULT'] reported in issue #16820. http://hg.python.org/cpython/rev/459a23083b66 New changeset f6fb5a5748f0 by ?ukasz Langa in branch 'default': Merged `parser['DEFAULT'].__setitem__` fix (issue #16820) from 3.3. http://hg.python.org/cpython/rev/f6fb5a5748f0 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 14:04:12 2012 From: report at bugs.python.org (=?utf-8?q?=C5=81ukasz_Langa?=) Date: Mon, 31 Dec 2012 13:04:12 +0000 Subject: [issue16820] configparser.ConfigParser.clean and .update bugs In-Reply-To: <1356887573.11.0.450967441519.issue16820@psf.upfronthosting.co.za> Message-ID: <1356959052.28.0.252129520959.issue16820@psf.upfronthosting.co.za> ?ukasz Langa added the comment: For the record, the bug that caused the following to be equivalent: parser['DEFAULT'] = {'option': 'value'} parser['DEFAULT'].update({'option': 'value'}) has been fixed for 3.3.1+ only. This way it's going to be easier for users to reason about the fix ("it was broken in 3.2.0 - 3.3.0"). Note that the bug only affected __setitem__ on the default section. ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 14:09:35 2012 From: report at bugs.python.org (Bernie Keimel) Date: Mon, 31 Dec 2012 13:09:35 +0000 Subject: [issue16825] all OK!!! Message-ID: <1356959375.36.0.223811420015.issue16825@psf.upfronthosting.co.za> Changes by Bernie Keimel : ---------- nosy: Bernie.Keimel priority: normal severity: normal status: open title: all OK!!! _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 14:16:43 2012 From: report at bugs.python.org (=?utf-8?q?Charles-Fran=C3=A7ois_Natali?=) Date: Mon, 31 Dec 2012 13:16:43 +0000 Subject: [issue16825] all OK!!! Message-ID: <1356959803.78.0.464687949564.issue16825@psf.upfronthosting.co.za> Changes by Charles-Fran?ois Natali : ---------- resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 14:35:28 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 31 Dec 2012 13:35:28 +0000 Subject: [issue16591] RUNSHARED wrong for OSX no framework In-Reply-To: <1354390993.26.0.328076404417.issue16591@psf.upfronthosting.co.za> Message-ID: <1356960928.02.0.251776017945.issue16591@psf.upfronthosting.co.za> Ronald Oussoren added the comment: The patch can cause problems when either DYLD_LIBRARY_PATH or the current working directory contains whitepace, a better fix is: RUNSHARED=DYLD_LIBRARY_PATH="`pwd`:${DYLD_LIBRARY_PATH}" (That is, replace the single quotes by double quotes) ---------- nosy: +hynek, ned.deily, ronaldoussoren _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 14:45:40 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 31 Dec 2012 13:45:40 +0000 Subject: [issue16803] Make test_importlib run tests under both _frozen_importlib and importlib._bootstrap In-Reply-To: <1356718069.62.0.143946538677.issue16803@psf.upfronthosting.co.za> Message-ID: <1356961540.68.0.631369429737.issue16803@psf.upfronthosting.co.za> Changes by Brett Cannon : ---------- title: Make time_importlib run tests under both _frozen_importlib and importlib._bootstrap -> Make test_importlib run tests under both _frozen_importlib and importlib._bootstrap _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 14:55:28 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 31 Dec 2012 13:55:28 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1356962128.43.0.0784555869138.issue16651@psf.upfronthosting.co.za> Brett Cannon added the comment: One thing I should say about this list of modules is please don't go nuts porting every single module blindly. There is always a possibility that another VM has already ported the code and has simply not contributed it back and so there is no need to write it from scratch and more just political wrangling to get contributions pushed upstream from other VMs. There might also be reasons to not worry about porting something. Always start a conversation first before starting a port; last thing I want is someone putting in the time to port some code that no one will necessarily use for a while. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:11:18 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 14:11:18 +0000 Subject: [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356954052.43.0.633061110097.issue16802@psf.upfronthosting.co.za> Message-ID: <201212311610.52216.storchaka@gmail.com> Serhiy Storchaka added the comment: > It has at least one potential use. On Windows socket.detach() returns a > socket handle but there is no documented way to close it -- os.close() > will not work. The only way to close it that I can see (without resorting > to ctypes) is with something like > > socket.socket(fileno=handle).close() There is an alternative (documented) interface: socket.fromfd(handle, socket.AF_INET, socket.SOCK_STREAM).close() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:11:45 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 31 Dec 2012 14:11:45 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1356963105.69.0.221905040355.issue16659@psf.upfronthosting.co.za> Brett Cannon added the comment: In response to Raymond: First, Serhiy is a core developer now, so if he wants to commit this code and maintain it I have no objections as it doesn't detract from anything and the maintenance burden is his if he wants it. Whether any of us view it as the best use of his time or not is not our call and we can't stop him. =) Second, while PyPy may have an RPython implementation, it's originally from 2006, has already been patched by them twice in 2011 for bugs, and may not be needed by them anymore based on current performance characteristics of PyPy today in lieu of this code (and that's assuming they wrote the code in RPython originally for a specific reason compared to just needing something that worked, but this is all a guess w/o actually benchmarking). Third, I can't predict future VMs and their needs. It might not be used by a VM today (unless PyPy starts using it for their py3k work), but who knows what the future holds? As I said, Serhiy already wrote the code and is the core dev who will maintain it if it goes in so I don't see a maintenance burden here that is being hoisted upon python-dev. Fourth, I added a comment to issue #16651 to state that people should see what the other VMs already have and to start a conversation first before moving forward with a Python port to make sure no one views it as a waste of time. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:13:46 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 31 Dec 2012 14:13:46 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1356963226.54.0.0115797691739.issue10527@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I know. I proposed something like that here: http://mail.python.org/pipermail/python-ideas/2012-May/015223.html. In theory all the necessary pieces are already there. What's missing is an agreement on what the API should look like, and that's the hard part 'cause it should be the most generic as possible. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:26:34 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 31 Dec 2012 14:26:34 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1356963226.54.0.0115797691739.issue10527@psf.upfronthosting.co.za> Message-ID: <1356963873.3341.4.camel@localhost.localdomain> Antoine Pitrou added the comment: > I know. I proposed something like that here: > http://mail.python.org/pipermail/python-ideas/2012-May/015223.html. > In theory all the necessary pieces are already there. What's missing > is an agreement on what the API should look like, and that's the hard > part 'cause it should be the most generic as possible. Well, there was a lot of bikeshedding and pie-in-the-sky arguments in that thread, but I think the original idea of a small wrapper is good enough. Let Guido do the grand async shakeup separately. Also, I've changed my mind: I think select would be an ok module for this :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:34:51 2012 From: report at bugs.python.org (Brett Cannon) Date: Mon, 31 Dec 2012 14:34:51 +0000 Subject: [issue16826] Don't check for PYTHONCASEOK if interpreter started with -E Message-ID: <1356964491.55.0.198222992625.issue16826@psf.upfronthosting.co.za> New submission from Brett Cannon: Importlib, when checking for PYTHONCASEOK, does not respect -E as it did in Python 3.2 and earlier (http://hg.python.org/cpython/file/0786dfc3b2b4/Python/import.c#l1933). ---------- components: Interpreter Core keywords: 3.2regression messages: 178679 nosy: brett.cannon priority: normal severity: normal stage: test needed status: open title: Don't check for PYTHONCASEOK if interpreter started with -E type: behavior versions: Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:41:36 2012 From: report at bugs.python.org (Ramchandra Apte) Date: Mon, 31 Dec 2012 14:41:36 +0000 Subject: [issue16827] Remove the relatively advanced content from section 2 in tutorial Message-ID: <1356964896.19.0.673901752517.issue16827@psf.upfronthosting.co.za> New submission from Ramchandra Apte: Most of the content in section 2 in the tutorial, http://docs.python.org/3/tutorial/interpreter.html , is relatively advanced and doesn't belong in, at least, the beginning of the tutorial. Only 2.1. Invoking the Interpreter, and 2.2.3. Source Code Encoding should be in section 2. The rest can be moved outside the tutorial, or in later portions. Thanks to Ezio Melotti for helping me overcome my laziness in filing this bug. ---------- assignee: docs at python components: Documentation messages: 178680 nosy: docs at python, ramchandra.apte priority: normal severity: normal status: open title: Remove the relatively advanced content from section 2 in tutorial _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:45:51 2012 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 31 Dec 2012 14:45:51 +0000 Subject: [issue16827] Remove the relatively advanced content from section 2 in tutorial In-Reply-To: <1356964896.19.0.673901752517.issue16827@psf.upfronthosting.co.za> Message-ID: <1356965151.7.0.115661636962.issue16827@psf.upfronthosting.co.za> Ezio Melotti added the comment: +1 ---------- keywords: +easy nosy: +chris.jerdonek, ezio.melotti stage: -> needs patch type: -> enhancement versions: +Python 2.7, Python 3.2, Python 3.3, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:50:30 2012 From: report at bugs.python.org (Richard Oudkerk) Date: Mon, 31 Dec 2012 14:50:30 +0000 Subject: [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356711151.76.0.423836721045.issue16802@psf.upfronthosting.co.za> Message-ID: <1356965430.1.0.329003300148.issue16802@psf.upfronthosting.co.za> Richard Oudkerk added the comment: > There is an alternative (documented) interface: > > socket.fromfd(handle, socket.AF_INET, socket.SOCK_STREAM).close() socket.fromfd() duplicates the handle, so that does not close the original handle. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:50:36 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 31 Dec 2012 14:50:36 +0000 Subject: [issue16591] RUNSHARED wrong for OSX no framework In-Reply-To: <1354390993.26.0.328076404417.issue16591@psf.upfronthosting.co.za> Message-ID: <1356965436.1.0.51482929299.issue16591@psf.upfronthosting.co.za> Hynek Schlawack added the comment: $(pwd) ---------- stage: -> patch review versions: +Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:53:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 14:53:22 +0000 Subject: [issue16659] Pure Python implementation of random In-Reply-To: <1355178066.71.0.0702719631559.issue16659@psf.upfronthosting.co.za> Message-ID: <1356965602.86.0.939936699317.issue16659@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: I don't want to make a decision on the inclusion of this code. However, I will undertake to maintain it. I'm going to fix one algorithmic bug in current implementation and add C implementations for some methods which significantly slowed in Python implementation. This can be done without the committing of this patch, but the dual test the two implementations will make the code more reliable. Even if Python implementation is not to be used, it will help in maintaining C implementation. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:54:58 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 31 Dec 2012 14:54:58 +0000 Subject: [issue16591] RUNSHARED wrong for OSX no framework In-Reply-To: <1356965436.1.0.51482929299.issue16591@psf.upfronthosting.co.za> Message-ID: <1ECFCD13-DE73-44ED-AEEE-962BE60A65E5@mac.com> Ronald Oussoren added the comment: > Hynek Schlawack added the comment: > > $(pwd) I'd usually agree, but this is a configure script and those shouldn't contain shell features invented after 1970 :-) More seriously, a large subset of command interpolations in configure.ac use backticks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:56:02 2012 From: report at bugs.python.org (Hynek Schlawack) Date: Mon, 31 Dec 2012 14:56:02 +0000 Subject: [issue16591] RUNSHARED wrong for OSX no framework In-Reply-To: <1354390993.26.0.328076404417.issue16591@psf.upfronthosting.co.za> Message-ID: <1356965762.11.0.302363443821.issue16591@psf.upfronthosting.co.za> Hynek Schlawack added the comment: I?m fine with that. My focus was fixing the ticket metadata. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 15:59:12 2012 From: report at bugs.python.org (Fabian Groffen) Date: Mon, 31 Dec 2012 14:59:12 +0000 Subject: [issue16591] RUNSHARED wrong for OSX no framework In-Reply-To: <1354390993.26.0.328076404417.issue16591@psf.upfronthosting.co.za> Message-ID: <1356965952.0.0.147621278372.issue16591@psf.upfronthosting.co.za> Fabian Groffen added the comment: re: single quotes -> double quotes I made RUNSHARED consistent (although, as you point out, less broken) with the other RUNSHARED assignments right above. If suggest to tackle the issue of whitespace support for all RUNSHARED assignments, not just Darwin case. re: `pwd` vs. $(pwd) $ /bin/sh $ echo $(pwd) syntax error: `(' unexpected Here again, even though Darwin/OSX may be shipped with /bin/sh being bash (hence above problem not existing), for consistency, using `pwd` in all RUNSHARED assignments is nice, IMO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:01:30 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 15:01:30 +0000 Subject: [issue16651] Find out what stdlib modules lack a pure Python implementation In-Reply-To: <1355078393.91.0.564166411172.issue16651@psf.upfronthosting.co.za> Message-ID: <1356966090.69.0.758532261992.issue16651@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: There is one additional benefit. I have already implemented audioop module in Python, and due to this it has found many bugs in the current C implementation (issue16686). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:06:16 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 31 Dec 2012 15:06:16 +0000 Subject: [issue16783] sqlite3 accepts strings it cannot (by default) return In-Reply-To: <1356505156.77.0.42259028203.issue16783@psf.upfronthosting.co.za> Message-ID: <1356966376.42.0.478451527591.issue16783@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:06:28 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 31 Dec 2012 15:06:28 +0000 Subject: [issue6010] unable to retrieve latin-1 encoded data from sqlite3 In-Reply-To: <1242210908.7.0.745434418713.issue6010@psf.upfronthosting.co.za> Message-ID: <1356966388.37.0.0845210065085.issue6010@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:15:03 2012 From: report at bugs.python.org (Ronald Oussoren) Date: Mon, 31 Dec 2012 15:15:03 +0000 Subject: [issue16591] RUNSHARED wrong for OSX no framework In-Reply-To: <1356965952.0.0.147621278372.issue16591@psf.upfronthosting.co.za> Message-ID: Ronald Oussoren added the comment: On 31 Dec, 2012, at 15:59, Fabian Groffen wrote: > > Fabian Groffen added the comment: > > re: single quotes -> double quotes > > I made RUNSHARED consistent (although, as you point out, less broken) with the other RUNSHARED assignments right above. If suggest to tackle the issue of whitespace support for all RUNSHARED assignments, not just Darwin case. Maybe, but whitespace supporrt on OSX is more pressing than on regular Unix systems because users are more likely to create directory names with whitespace in them. > > re: `pwd` vs. $(pwd) > > $ /bin/sh > $ echo $(pwd) > syntax error: `(' unexpected > > Here again, even though Darwin/OSX may be shipped with /bin/sh being bash (hence above problem not existing), for consistency, using `pwd` in all RUNSHARED assignments is nice, IMO. Which shell doesn't have $(command) support? It is not a bash-ism, but is part of the POSIX shell definition (but wasn't present in older sh implementations). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:15:51 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 31 Dec 2012 15:15:51 +0000 Subject: [issue16826] Don't check for PYTHONCASEOK if interpreter started with -E In-Reply-To: <1356964491.55.0.198222992625.issue16826@psf.upfronthosting.co.za> Message-ID: <1356966951.57.0.12481085174.issue16826@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:19:13 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 15:19:13 +0000 Subject: [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356711151.76.0.423836721045.issue16802@psf.upfronthosting.co.za> Message-ID: <1356967153.3.0.453339320289.issue16802@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Indeed. In any case, if this idiom is widely used, we can't hide this parameter and should document it (and perhaps document this idiom). If BDFL not want this parameter was made public, he would not have added it as an keyword argument. However, may be to ask him? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:24:12 2012 From: report at bugs.python.org (Ralf Schmitt) Date: Mon, 31 Dec 2012 15:24:12 +0000 Subject: [issue7735] socket.create_connection() creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1356967452.49.0.38906045261.issue7735@psf.upfronthosting.co.za> Ralf Schmitt added the comment: Daniel is pretty much spot on, thanks for that! Regarding the use case: I disabled IPv6 system wide when building packages via gentoo's USE flag. I didn't do anything in order to configure IPv6 or remove it. My local network interface having a local link address is a result of that. I've been told multiple times to fix my setup. And I said multiple times that the setup is not at fault here. > schmir expects that --disable-ipv6 would "really" disable IPv6 > *everywhere* in Python, which is wrong. Python may still get IPv6 > adddresses from getaddrinfo() if the system does somehow support > IPv6. I did not say that. In fact I wrote in msg172729: """I didn't request that the switch disables any code that somehow deals with IPv6. I'm just talking about that one function!""" > Python may still get IPv6 adddresses from getaddrinfo() if the > system does somehow support IPv6. That would be nice. But that's currently not the case. see http://bugs.python.org/issue16208 haypo, you also keep talking of an initial problem, which you assume must be there somewhere in my network - which I try to workaround with --disable-ipv6. There is no problem on my side that I'm trying to fix. It's just that I have disabled IPv6 via gentoo's USE flags, since I don't use it. I've also been telling this multiple times, I don't know why I'm being completely ignored here. > "wont fix" is the correct status for this issue: we agree that there > is a bug, but it will not be fixed, because --disable-ipv6 is the > wrong solution. again. it can't be a solution since there is no problem unless this option is being used and then there's a problem in python. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:27:09 2012 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 31 Dec 2012 15:27:09 +0000 Subject: [issue7735] socket.create_connection() creates IPv6 DNS requests even when built with --disable-ipv6 In-Reply-To: <1263855099.58.0.477702556639.issue7735@psf.upfronthosting.co.za> Message-ID: <1356967629.13.0.642432876705.issue7735@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: -pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:29:48 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 31 Dec 2012 15:29:48 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1356967788.11.0.45887616935.issue10527@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Well, for now I'd say let's just check in this patch as-is. I would be keen on considering this a bug and hence address the patch for Python 2.7, 3.2, 3.3 and 3.4. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:32:12 2012 From: report at bugs.python.org (Nick Coghlan) Date: Mon, 31 Dec 2012 15:32:12 +0000 Subject: [issue1674555] sys.path in tests contains system directories Message-ID: <1356967932.21.0.116156771884.issue1674555@psf.upfronthosting.co.za> Changes by Nick Coghlan : ---------- nosy: +ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:37:03 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 31 Dec 2012 15:37:03 +0000 Subject: [issue16787] asyncore.dispatcher_with_send - increase the send buffer size In-Reply-To: <1356529865.78.0.746318746855.issue16787@psf.upfronthosting.co.za> Message-ID: <1356968223.59.0.797082310809.issue16787@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > Does asyncore expose its implementation details? I was talking about asynchat. What is supposed to change is asynchat.async_chat.producer_fifo attribute which is currently a collections.deque object. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:37:45 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 31 Dec 2012 15:37:45 +0000 Subject: [issue16787] asyncore.dispatcher_with_send - increase the send buffer size In-Reply-To: <1356529865.78.0.746318746855.issue16787@psf.upfronthosting.co.za> Message-ID: <1356968265.49.0.972045251241.issue16787@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: BTW, the patch looks ok to me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:52:46 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 15:52:46 +0000 Subject: [issue9645] PEP 383: os.pathconf() does not accept surrogateescape arguments In-Reply-To: <1282243293.83.0.904461489597.issue9645@psf.upfronthosting.co.za> Message-ID: <1356969166.08.0.975844523344.issue9645@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This was fixed in 3.3 (the complex solution is not backportable), therefore this is 3.2 only issue. ---------- nosy: +haypo, serhiy.storchaka stage: -> patch review versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 16:53:09 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 15:53:09 +0000 Subject: [issue9644] PEP 383: os.statvfs() does not accept surrogateescape arguments In-Reply-To: <1282243237.49.0.435221885834.issue9644@psf.upfronthosting.co.za> Message-ID: <1356969189.46.0.707298717008.issue9644@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This was fixed in 3.3 (the complex solution is not backportable), therefore this is 3.2 only issue. ---------- nosy: +haypo, serhiy.storchaka stage: -> patch review versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:08:07 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 16:08:07 +0000 Subject: [issue9644] PEP 383: os.statvfs() does not accept surrogateescape arguments In-Reply-To: <1282243237.49.0.435221885834.issue9644@psf.upfronthosting.co.za> Message-ID: <1356970087.87.0.184462554768.issue9644@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: At first sight the patch looks good, but test needed. ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:12:57 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 16:12:57 +0000 Subject: [issue9645] PEP 383: os.pathconf() does not accept surrogateescape arguments In-Reply-To: <1282243293.83.0.904461489597.issue9645@psf.upfronthosting.co.za> Message-ID: <1356970377.59.0.114394569031.issue9645@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: Please provide a full patch, doesn't split it on parts which should be applied one over other. Test needed. ---------- stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:13:15 2012 From: report at bugs.python.org (Meador Inge) Date: Mon, 31 Dec 2012 16:13:15 +0000 Subject: [issue16320] Establish order in bytes/string dependencies In-Reply-To: <1356951018.67.0.89665670127.issue16320@psf.upfronthosting.co.za> Message-ID: Meador Inge added the comment: On Mon, Dec 31, 2012 at 4:50 AM, Serhiy Storchaka wrote: >> The cleanup of BYTESTR_DEPS and UNICODE_DEPS seems reasonable, but can you >> explain the rationale behind removing the additional dependencies on >> formatter_unicode.c? > > This question already was asked by Antoine on IRC. OK, but not everyone is on IRC all the time. Thus the fact that it was discussed there isn't very helpful. It is better to have this type of information in the tracker so that everyone interested in the issue can have access. (preferable when opening the bug and describing what the initial patch is doing). Thanks for the extended explanation. This patch LGTM. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:20:32 2012 From: report at bugs.python.org (Xavier de Gaye) Date: Mon, 31 Dec 2012 16:20:32 +0000 Subject: [issue16653] reference kept in f_locals prevents the tracing/profiling of a destructor In-Reply-To: <1355090518.29.0.154365424175.issue16653@psf.upfronthosting.co.za> Message-ID: <1356970832.06.0.691950117967.issue16653@psf.upfronthosting.co.za> Xavier de Gaye added the comment: This patch breaks extension modules (for example Ned Batchelder's coverage.py) that use PyEval_SetTrace to set the trace function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:22:29 2012 From: report at bugs.python.org (Guido van Rossum) Date: Mon, 31 Dec 2012 16:22:29 +0000 Subject: [issue16802] fileno argument to socket.socket() undocumented In-Reply-To: <1356967153.3.0.453339320289.issue16802@psf.upfronthosting.co.za> Message-ID: Guido van Rossum added the comment: I recommend documenting it. On Monday, December 31, 2012, Serhiy Storchaka wrote: > > Serhiy Storchaka added the comment: > > Indeed. In any case, if this idiom is widely used, we can't hide this > parameter and should document it (and perhaps document this idiom). > > If BDFL not want this parameter was made public, he would not have added > it as an keyword argument. However, may be to ask him? > > ---------- > > _______________________________________ > Python tracker > > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:26:56 2012 From: report at bugs.python.org (Ned Batchelder) Date: Mon, 31 Dec 2012 16:26:56 +0000 Subject: [issue16653] reference kept in f_locals prevents the tracing/profiling of a destructor In-Reply-To: <1355090518.29.0.154365424175.issue16653@psf.upfronthosting.co.za> Message-ID: <1356971216.34.0.567832473209.issue16653@psf.upfronthosting.co.za> Changes by Ned Batchelder : ---------- nosy: +nedbat _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:28:24 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 16:28:24 +0000 Subject: [issue10657] os.lstat/os.stat/os.fstat don't set st_dev (st_rdev) on Windows In-Reply-To: <1291883314.59.0.723924565761.issue10657@psf.upfronthosting.co.za> Message-ID: <1356971304.89.0.428435643499.issue10657@psf.upfronthosting.co.za> Serhiy Storchaka added the comment: This was implemented in issue11939 for Python 3.4 only. ---------- nosy: +brian.curtin, serhiy.storchaka _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:40:02 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Dec 2012 16:40:02 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <3YZklP263FzSBx@mail.python.org> Roundup Robot added the comment: New changeset 5530251d9cac by Giampaolo Rodola' in branch '3.2': Fix issue 10527: make multiprocessing use poll() instead of select() if available. http://hg.python.org/cpython/rev/5530251d9cac New changeset d89891f3f769 by Giampaolo Rodola' in branch '3.3': Fix issue 10527: make multiprocessing use poll() instead of select() if available. http://hg.python.org/cpython/rev/d89891f3f769 New changeset e971a70984b8 by Giampaolo Rodola' in branch 'default': Fix issue 10527: make multiprocessing use poll() instead of select() if available. http://hg.python.org/cpython/rev/e971a70984b8 ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:44:39 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Dec 2012 16:44:39 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <3YZkrk3HybzSC3@mail.python.org> Roundup Robot added the comment: New changeset c5c27b84d7af by Giampaolo Rodola' in branch '2.7': Fix issue 10527: make multiprocessing use poll() instead of select() if available. http://hg.python.org/cpython/rev/c5c27b84d7af ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:45:32 2012 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 31 Dec 2012 16:45:32 +0000 Subject: [issue10527] multiprocessing.Pipe problem: "handle out of range in select()" In-Reply-To: <1290683713.67.0.950545103714.issue10527@psf.upfronthosting.co.za> Message-ID: <1356972332.67.0.414031232239.issue10527@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- assignee: -> giampaolo.rodola resolution: -> fixed stage: patch review -> commit review status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 17:58:04 2012 From: report at bugs.python.org (Martin) Date: Mon, 31 Dec 2012 16:58:04 +0000 Subject: [issue16828] bz2 error on compression of empty string Message-ID: <1356973084.81.0.547571826956.issue16828@psf.upfronthosting.co.za> New submission from Martin: The fix from issue 14398 for >4GB inputs regressed the behaviour when compressing an empty string. Going by issue 853061 the expectation is this should work. The problem was noticed when using the updated Python 2.7 package in Ubuntu Raring caused test failures in the Bazaar suite: ---------- components: Extension Modules messages: 178705 nosy: gz, nadeem.vawda priority: normal severity: normal status: open title: bz2 error on compression of empty string type: behavior versions: Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 18:03:25 2012 From: report at bugs.python.org (Martin) Date: Mon, 31 Dec 2012 17:03:25 +0000 Subject: [issue16828] bz2 error on compression of empty string In-Reply-To: <1356973084.81.0.547571826956.issue16828@psf.upfronthosting.co.za> Message-ID: <1356973405.95.0.0458549249179.issue16828@psf.upfronthosting.co.za> Martin added the comment: On trunk, both the compressor and the standalone function (which uses the compressor) are affected. The easiest fix is rearranging the logic in function shared between BZ2Compressor.compress and BZ2Compressor.flush so the exit on no remaining input for the former case happens before the library call. ---------- keywords: +patch Added file: http://bugs.python.org/file28512/bz2_compress_empty_string_trunk.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 18:06:54 2012 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 31 Dec 2012 17:06:54 +0000 Subject: [issue16828] bz2 error on compression of empty string In-Reply-To: <1356973084.81.0.547571826956.issue16828@psf.upfronthosting.co.za> Message-ID: <1356973614.73.0.0500932950741.issue16828@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 18:12:07 2012 From: report at bugs.python.org (Martin) Date: Mon, 31 Dec 2012 17:12:07 +0000 Subject: [issue16828] bz2 error on compression of empty string In-Reply-To: <1356973084.81.0.547571826956.issue16828@psf.upfronthosting.co.za> Message-ID: <1356973927.62.0.491768437461.issue16828@psf.upfronthosting.co.za> Martin added the comment: On 2.7 only the compress() function is affected, and the fix is much simpler. Just using BZ_FINISH when the input is less then 4GB is sufficient. ---------- Added file: http://bugs.python.org/file28513/bz2_compress_empty_string_27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 18:12:49 2012 From: report at bugs.python.org (Fabian Groffen) Date: Mon, 31 Dec 2012 17:12:49 +0000 Subject: [issue16591] RUNSHARED wrong for OSX no framework In-Reply-To: <1354390993.26.0.328076404417.issue16591@psf.upfronthosting.co.za> Message-ID: <1356973969.34.0.0869580817609.issue16591@psf.upfronthosting.co.za> Fabian Groffen added the comment: > Which shell doesn't have $(command) support? It is not a bash-ism, but > is part of the POSIX shell definition (but wasn't present in older sh > implementations). Solaris' /bin/sh. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 18:14:07 2012 From: report at bugs.python.org (Meador Inge) Date: Mon, 31 Dec 2012 17:14:07 +0000 Subject: [issue16808] inspect.stack() should return list of named tuples In-Reply-To: <1356750149.18.0.966123919893.issue16808@psf.upfronthosting.co.za> Message-ID: <1356974047.59.0.442107024142.issue16808@psf.upfronthosting.co.za> Meador Inge added the comment: This patch looks good to me with the exception that "versionchanged" should be 3.4. ---------- assignee: -> meador.inge nosy: +meador.inge stage: needs patch -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 18:23:22 2012 From: report at bugs.python.org (Serhiy Storchaka) Date: Mon, 31 Dec 2012 17:23:22 +0000 Subject: [issue16828] bz2 error on compression of empty string In-Reply-To: <1356973084.81.0.547571826956.issue16828@psf.upfronthosting.co.za> Message-ID: <1356974602.88.0.911226550515.issue16828@psf.upfronthosting.co.za> Changes by Serhiy Storchaka : ---------- stage: -> patch review versions: -Python 3.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 18:42:49 2012 From: report at bugs.python.org (Wolfgang Scherer) Date: Mon, 31 Dec 2012 17:42:49 +0000 Subject: [issue16820] configparser.ConfigParser.clean and .update bugs In-Reply-To: <1356887573.11.0.450967441519.issue16820@psf.upfronthosting.co.za> Message-ID: <1356975769.4.0.862090452.issue16820@psf.upfronthosting.co.za> Wolfgang Scherer added the comment: Thanks, works for me. I only noted the discrepancy and did not give it much thought. I will just implement a merge method on top of read_dict. That gives me all options that could be desired :). However, after implementing the entire compatibility layer, I found one more issue: Using self.remove_section() changes the section order during an update. I would prefer that the section be cleared instead of removed in order to preserve the section order. Since OrderedDict does indeed preserve the key order during update, I think that this does not violate the Mapping Protocol. If this is not desired, just go ahead and close the issue. See also attached example bug_configparser_update_order.py: OrderedDict does not change the order of keys upon .update(): >>> od = OrderedDict((('section1', {}), ('section2', {}))) >>> list(od.keys()) ['section1', 'section2'] >>> od.update((('section1', {}), ('section3', {}))) >>> list(od.keys()) ['section1', 'section2', 'section3'] But ConfigParser changes the order of sections upon .update(): >>> cfg = configparser.ConfigParser() >>> cfg.update((('section1', {}), ('section2', {}))) >>> cfg.sections() ['section1', 'section2'] >>> cfg.update((('section1', {}), ('section3', {}))) >>> cfg.sections() ['section2', 'section1', 'section3'] ---------- resolution: fixed -> rejected status: closed -> open Added file: http://bugs.python.org/file28514/bug_configparser_update_order.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 18:52:19 2012 From: report at bugs.python.org (Brian Curtin) Date: Mon, 31 Dec 2012 17:52:19 +0000 Subject: [issue10657] os.lstat/os.stat/os.fstat don't set st_dev (st_rdev) on Windows In-Reply-To: <1291883314.59.0.723924565761.issue10657@psf.upfronthosting.co.za> Message-ID: <1356976339.75.0.42589218754.issue10657@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Implement stat.st_dev and os.path.samefile on windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 19:00:04 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Dec 2012 18:00:04 +0000 Subject: [issue10657] os.lstat/os.stat/os.fstat don't set st_dev (st_rdev) on Windows In-Reply-To: <1291883314.59.0.723924565761.issue10657@psf.upfronthosting.co.za> Message-ID: <3YZmWl5HcJzSBy@mail.python.org> Roundup Robot added the comment: New changeset 3738d270c54a by Brian Curtin in branch 'default': st_dev/st_rdev should be unsigned long as dwVolumeSerialNumber, which it is set to, is a DWORD. This was fixed in #11939 and the overflow was mentioned in #10657 and seen by me on some machines. http://hg.python.org/cpython/rev/3738d270c54a ---------- nosy: +python-dev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 19:00:05 2012 From: report at bugs.python.org (Roundup Robot) Date: Mon, 31 Dec 2012 18:00:05 +0000 Subject: [issue11939] Implement stat.st_dev and os.path.samefile on windows In-Reply-To: <1303923583.07.0.177662562381.issue11939@psf.upfronthosting.co.za> Message-ID: <3YZmWm3jrLzSBy@mail.python.org> Roundup Robot added the comment: New changeset 3738d270c54a by Brian Curtin in branch 'default': st_dev/st_rdev should be unsigned long as dwVolumeSerialNumber, which it is set to, is a DWORD. This was fixed in #11939 and the overflow was mentioned in #10657 and seen by me on some machines. http://hg.python.org/cpython/rev/3738d270c54a ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 19:29:22 2012 From: report at bugs.python.org (Daniel Shahaf) Date: Mon, 31 Dec 2012 18:29:22 +0000 Subject: [issue16808] inspect.stack() should return list of named tuples In-Reply-To: <1356750149.18.0.966123919893.issue16808@psf.upfronthosting.co.za> Message-ID: <1356978562.76.0.269995760844.issue16808@psf.upfronthosting.co.za> Daniel Shahaf added the comment: Fixed that in v3. ---------- Added file: http://bugs.python.org/file28515/inspect-v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 21:25:16 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 31 Dec 2012 20:25:16 +0000 Subject: [issue1674555] sys.path in tests contains system directories Message-ID: <1356985516.31.0.794892051407.issue1674555@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 21:59:05 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 31 Dec 2012 20:59:05 +0000 Subject: [issue16827] Remove the relatively advanced content from section 2 in tutorial In-Reply-To: <1356964896.19.0.673901752517.issue16827@psf.upfronthosting.co.za> Message-ID: <1356987545.14.0.00521261969477.issue16827@psf.upfronthosting.co.za> Senthil Kumaran added the comment: +1 from me as well. I am also adding Eric who might have views on the customization part which added by him. ---------- nosy: +eric.araujo, orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 22:15:26 2012 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 31 Dec 2012 21:15:26 +0000 Subject: [issue16806] col_offset is -1 and lineno is wrong for multiline string expressions In-Reply-To: <1356739702.66.0.625233113719.issue16806@psf.upfronthosting.co.za> Message-ID: <1356988526.83.0.867175304845.issue16806@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 23:18:47 2012 From: report at bugs.python.org (Rod Nayfield) Date: Mon, 31 Dec 2012 22:18:47 +0000 Subject: [issue16829] IDLE on Mac OSX can't print filenames with spaces Message-ID: <1356992327.38.0.897045396627.issue16829@psf.upfronthosting.co.za> New submission from Rod Nayfield: Likely has the same issue on any platform which uses the same functionality (lpr filename to print). ---------- components: IDLE messages: 178715 nosy: Rod.Nayfield priority: normal severity: normal status: open title: IDLE on Mac OSX can't print filenames with spaces versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 23:29:40 2012 From: report at bugs.python.org (Roger Serwy) Date: Mon, 31 Dec 2012 22:29:40 +0000 Subject: [issue16829] IDLE on POSIX can't print filenames with spaces In-Reply-To: <1356992327.38.0.897045396627.issue16829@psf.upfronthosting.co.za> Message-ID: <1356992980.37.0.544163752836.issue16829@psf.upfronthosting.co.za> Roger Serwy added the comment: I can confirm this bug for POSIX platforms. Changing the lpr command in config-main.def to quote the filename seems to fix the problem. print-command-posix=lpr "%%s" It might also be a problem on Windows, but I haven't tried it. ---------- keywords: +easy nosy: +serhiy.storchaka, serwy title: IDLE on Mac OSX can't print filenames with spaces -> IDLE on POSIX can't print filenames with spaces type: -> behavior versions: +Python 2.7, Python 3.2, Python 3.4 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Dec 31 23:38:12 2012 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 31 Dec 2012 22:38:12 +0000 Subject: [issue16434] SocketServer call shutdown in the wrong way In-Reply-To: <1352377990.43.0.148428023395.issue16434@psf.upfronthosting.co.za> Message-ID: <1356993492.84.0.886039425735.issue16434@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Looks an invalid bug to me as well. request is a socket.socket object and has shutdown method taking a single argument. The error pasted in the report leads me to believe if the shutdown_request call is not thread-safe and it is ending up called shutdown method in the module instead of the proper shutdown method of the request object. ---------- nosy: +orsenthil status: pending -> open _______________________________________ Python tracker _______________________________________