From report at bugs.python.org Thu Apr 1 00:06:53 2010 From: report at bugs.python.org (Maciek Fijalkowski) Date: Wed, 31 Mar 2010 22:06:53 +0000 Subject: [issue8276] useless PyEval_CallObject function In-Reply-To: <1270073212.98.0.119754246418.issue8276@psf.upfronthosting.co.za> Message-ID: <1270073212.98.0.119754246418.issue8276@psf.upfronthosting.co.za> New submission from Maciek Fijalkowski : In ceval.c there is such code: PyObject * PyEval_CallObject(PyObject *func, PyObject *arg) { return PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL); } #define PyEval_CallObject(func,arg) \ PyEval_CallObjectWithKeywords(func, arg, (PyObject *)NULL) Is this needed any longer? (both #define and function have the same name) ---------- components: Interpreter Core messages: 102038 nosy: fijal severity: normal status: open title: useless PyEval_CallObject function versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 00:09:20 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Mar 2010 22:09:20 +0000 Subject: [issue8276] useless PyEval_CallObject function In-Reply-To: <1270073212.98.0.119754246418.issue8276@psf.upfronthosting.co.za> Message-ID: <1270073360.31.0.445477346581.issue8276@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Well, #defines are not exported in shared libraries. I suppose PyEval_CallObject() was part of an old definition of the Python C-API and it was kept for compatibility. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 00:10:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 31 Mar 2010 22:10:41 +0000 Subject: [issue8276] useless PyEval_CallObject function In-Reply-To: <1270073212.98.0.119754246418.issue8276@psf.upfronthosting.co.za> Message-ID: <1270073441.11.0.879036608341.issue8276@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The #define dates back from 2007, this changeset: branch: trunk user: guido date: Sat Aug 30 17:02:50 1997 +0200 files: Include/ceval.h Python/ceval.c description: [svn r8683] Inline PyObject_CallObject (Marc-Andre Lemburg). ---------- nosy: +lemburg _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 00:20:50 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 31 Mar 2010 22:20:50 +0000 Subject: [issue8276] useless PyEval_CallObject function In-Reply-To: <1270073441.11.0.879036608341.issue8276@psf.upfronthosting.co.za> Message-ID: <4BB3CABE.5030907@egenix.com> Marc-Andre Lemburg added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > The #define dates back from 2007, this changeset: > > branch: trunk > user: guido > date: Sat Aug 30 17:02:50 1997 +0200 > files: Include/ceval.h Python/ceval.c > description: > [svn r8683] Inline PyObject_CallObject (Marc-Andre Lemburg). That's not useless: it's a typical backwards compatibility macro to auto-upgrade existing software via recompile. It's also still used a lot in the Python source code and elsewhere: http://www.google.de/search?q=PyEval_CallObject The function PyEval_CallObject() can probably be removed by now, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 00:26:04 2010 From: report at bugs.python.org (Matthew Barnett) Date: Wed, 31 Mar 2010 22:26:04 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1270074364.41.0.38284458052.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-20100331.zip is a new version of the regex module. It includes speed-ups and a minor bugfix. ---------- Added file: http://bugs.python.org/file16709/issue2636-20100331.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 00:57:24 2010 From: report at bugs.python.org (Nir Aides) Date: Wed, 31 Mar 2010 22:57:24 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1266353325.38.0.278549753357.issue7946@psf.upfronthosting.co.za> Message-ID: <1270076244.85.0.137248340704.issue7946@psf.upfronthosting.co.za> Changes by Nir Aides : Removed file: http://bugs.python.org/file16680/bfs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 00:58:12 2010 From: report at bugs.python.org (Nir Aides) Date: Wed, 31 Mar 2010 22:58:12 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1266353325.38.0.278549753357.issue7946@psf.upfronthosting.co.za> Message-ID: <1270076292.16.0.732492393699.issue7946@psf.upfronthosting.co.za> Nir Aides added the comment: I upload a new update to bfs.patch which improves scheduling and reduces overhead. ---------- Added file: http://bugs.python.org/file16710/bfs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 01:03:57 2010 From: report at bugs.python.org (Valerio) Date: Wed, 31 Mar 2010 23:03:57 +0000 Subject: [issue8193] test_zlib fails with zlib 1.2.4 In-Reply-To: <1269198769.55.0.843831175079.issue8193@psf.upfronthosting.co.za> Message-ID: <1270076637.79.0.720153189641.issue8193@psf.upfronthosting.co.za> Changes by Valerio : Removed file: http://bugs.python.org/file16707/8193.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 01:21:45 2010 From: report at bugs.python.org (Valerio) Date: Wed, 31 Mar 2010 23:21:45 +0000 Subject: [issue8193] test_zlib fails with zlib 1.2.4 In-Reply-To: <1269198769.55.0.843831175079.issue8193@psf.upfronthosting.co.za> Message-ID: <1270077705.54.0.888353962467.issue8193@psf.upfronthosting.co.za> Valerio added the comment: While i wait for what i have to do, i corrected the patch. But there is a problem: the version of zlib '1.2.3.3' raise an error on "distutils.version" module. The problem is caused by the regex expression in the "distutils.version" module: version_re = re.compile(r'^(\d+) \. (\d+) (\. (\d+))? ([ab](\d+))?$', re.VERBOSE) this expression don't match with the type of version that zlib.ZLIB_VERSION return. ---------- Added file: http://bugs.python.org/file16711/8193.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 01:26:56 2010 From: report at bugs.python.org (Florent Xicluna) Date: Wed, 31 Mar 2010 23:26:56 +0000 Subject: [issue7092] Test suite emits many DeprecationWarnings when -3 is enabled In-Reply-To: <1255098633.29.0.866346989212.issue7092@psf.upfronthosting.co.za> Message-ID: <1270078016.96.0.727539830224.issue7092@psf.upfronthosting.co.za> Florent Xicluna added the comment: Now the "-Wd" and "-3" flags are active on some buildbots. And the first failures ... Need to backport fixes from py3k branch for: - cgitb "SyntaxWarning: tuple parameter unpacking has been removed in 3.x" - idlelib "reduce() not supported in 3.x; use functools.reduce()" And test_multiprocessing is failing on: "sys.exc_clear() not supported in 3.x; use except clauses" ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 01:32:10 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 31 Mar 2010 23:32:10 +0000 Subject: [issue7583] doctest should normalize tabs when comparing output In-Reply-To: <1261932632.12.0.972907709846.issue7583@psf.upfronthosting.co.za> Message-ID: <1270078330.65.0.907887787378.issue7583@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- keywords: +patch Added file: http://bugs.python.org/file16712/issue7583.doctest.tabs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 01:36:49 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 31 Mar 2010 23:36:49 +0000 Subject: [issue7583] [patch] doctest should normalize tabs when comparing output In-Reply-To: <1261932632.12.0.972907709846.issue7583@psf.upfronthosting.co.za> Message-ID: <1270078609.53.0.517101266075.issue7583@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- title: doctest should normalize tabs when comparing output -> [patch] doctest should normalize tabs when comparing output _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 01:38:05 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 31 Mar 2010 23:38:05 +0000 Subject: [issue7585] [patch] difflib should separate filename from timestamp with tab In-Reply-To: <1261947458.0.0.959368598145.issue7585@psf.upfronthosting.co.za> Message-ID: <1270078685.04.0.329413703063.issue7585@psf.upfronthosting.co.za> anatoly techtonik added the comment: depends on issue #7583 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 01:44:15 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Wed, 31 Mar 2010 23:44:15 +0000 Subject: [issue2521] ABC caches should use weak refs In-Reply-To: <1206976350.45.0.982533625998.issue2521@psf.upfronthosting.co.za> Message-ID: <1270079055.47.0.845755400993.issue2521@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : Added file: http://bugs.python.org/file16713/abc_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 01:45:06 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Wed, 31 Mar 2010 23:45:06 +0000 Subject: [issue2521] ABC caches should use weak refs In-Reply-To: <1206976350.45.0.982533625998.issue2521@psf.upfronthosting.co.za> Message-ID: <1270079106.44.0.189066394519.issue2521@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: New patches uploaded. I separated out the patch to add the test case, to make it easier to test before and after applying the fix. ---------- Added file: http://bugs.python.org/file16714/leak_test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 01:45:12 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Wed, 31 Mar 2010 23:45:12 +0000 Subject: [issue2521] ABC caches should use weak refs In-Reply-To: <1206976350.45.0.982533625998.issue2521@psf.upfronthosting.co.za> Message-ID: <1270079112.7.0.153900082501.issue2521@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : Removed file: http://bugs.python.org/file16690/abc_leak.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 02:02:40 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 00:02:40 +0000 Subject: [issue7583] [patch] doctest should normalize tabs when comparing output In-Reply-To: <1261932632.12.0.972907709846.issue7583@psf.upfronthosting.co.za> Message-ID: <1270080160.52.0.481262012797.issue7583@psf.upfronthosting.co.za> anatoly techtonik added the comment: http://codereview.appspot.com/848043/show ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 02:28:08 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 00:28:08 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <1260026404.41.0.635406889881.issue7443@psf.upfronthosting.co.za> Message-ID: <1270081688.09.0.243162217005.issue7443@psf.upfronthosting.co.za> anatoly techtonik added the comment: It would be nice to see standalone test case that illustrates the problem. ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 03:33:41 2010 From: report at bugs.python.org (Maciek Fijalkowski) Date: Thu, 01 Apr 2010 01:33:41 +0000 Subject: [issue8276] useless PyEval_CallObject function In-Reply-To: <1270073212.98.0.119754246418.issue8276@psf.upfronthosting.co.za> Message-ID: <1270085621.07.0.680378827427.issue8276@psf.upfronthosting.co.za> Maciek Fijalkowski added the comment: Yeah, I meant the function. Sorry for not being specific enough. I suppose the function is there to preserve ABI, but definitely code needed recompilation since 2007. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 03:37:47 2010 From: report at bugs.python.org (Patrick W.) Date: Thu, 01 Apr 2010 01:37:47 +0000 Subject: [issue8277] ElementTree won't parse comments In-Reply-To: <1270085866.99.0.0885322891054.issue8277@psf.upfronthosting.co.za> Message-ID: <1270085866.99.0.0885322891054.issue8277@psf.upfronthosting.co.za> New submission from Patrick W. : When using xml.etree.ElementTree to parse external XML files, all XML comments within that file are being stripped out. I guess that happens because there is no comment handler in the expat parser. Example: test.xml -------- test.py ------- from xml.etree import ElementTree with open( 'test.xml', 'r' ) as f: xml = ElementTree.parse( f ) ElementTree.dump( xml ) Result ------ ---------- components: XML messages: 102051 nosy: poke severity: normal status: open title: ElementTree won't parse comments type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 03:41:36 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 01 Apr 2010 01:41:36 +0000 Subject: [issue8218] Fix typos and phrasing in the Web servers howto In-Reply-To: <1269394991.51.0.861768873468.issue8218@psf.upfronthosting.co.za> Message-ID: <1270086096.54.0.545030394526.issue8218@psf.upfronthosting.co.za> Ezio Melotti added the comment: There's also an invalid link to an image just after the title "The low-level view": -.. .. image:: http.png +.. image:: http.png The image is not there though, and in r66294 only the document has been added. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 03:44:11 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 01 Apr 2010 01:44:11 +0000 Subject: [issue8218] Fix typos and phrasing in the Web servers howto In-Reply-To: <1269394991.51.0.861768873468.issue8218@psf.upfronthosting.co.za> Message-ID: <1270086251.75.0.807144098508.issue8218@psf.upfronthosting.co.za> ?ric Araujo added the comment: This is a reST comment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 03:47:17 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 01 Apr 2010 01:47:17 +0000 Subject: [issue8218] Fix typos and phrasing in the Web servers howto In-Reply-To: <1269394991.51.0.861768873468.issue8218@psf.upfronthosting.co.za> Message-ID: <1270086437.56.0.502392063855.issue8218@psf.upfronthosting.co.za> Ezio Melotti added the comment: If the image is missing, then the whole line can be removed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 03:49:24 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 01 Apr 2010 01:49:24 +0000 Subject: [issue8218] Fix typos and phrasing in the Web servers howto In-Reply-To: <1269394991.51.0.861768873468.issue8218@psf.upfronthosting.co.za> Message-ID: <1270086564.58.0.27881211841.issue8218@psf.upfronthosting.co.za> ?ric Araujo added the comment: Is there a main author for this fileN? If so, they can say whether they left the link as a reminder to put the image back later, or if they were just afraid of real version control <0.4 wink> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 03:52:11 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 01 Apr 2010 01:52:11 +0000 Subject: [issue8218] Fix typos and phrasing in the Web servers howto In-Reply-To: <1269394991.51.0.861768873468.issue8218@psf.upfronthosting.co.za> Message-ID: <1270086731.42.0.0972664572716.issue8218@psf.upfronthosting.co.za> Ezio Melotti added the comment: The author is Marek Kubica, but he doesn't seem to be registered to this tracker. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 04:03:15 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 01 Apr 2010 02:03:15 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270087395.87.0.959687345951.issue1578269@psf.upfronthosting.co.za> Brian Curtin added the comment: One last issue to solve before this goes in and I start the backport...test_tarfile.test_extract_hardlink is intermittently failing for me, which was an issue for Eric and I on an earlier version of Jason's patch. Sometimes it fails when run as a part of the whole test suite, and then it'll pass when run by itself. Thoughts, anyone? I've spent some time on it and I'm not sure what I'm missing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 04:35:04 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 01 Apr 2010 02:35:04 +0000 Subject: [issue8032] Add gdb7 hooks to make it easier to debug Python In-Reply-To: <1267400432.35.0.113003499435.issue8032@psf.upfronthosting.co.za> Message-ID: <1270089304.84.0.082734892182.issue8032@psf.upfronthosting.co.za> Dave Malcolm added the comment: I'm attaching a new version of the patch (v5), against svn trunk (r79517) I've been testing these hooks by using "gdb attach" to attach to real-world python programs. When doing this with earlier versions of the hooks, gdb would pause for many seconds when printing some values (e.g. during a backtrace). The issue was that "proxyval" scrapes the entire graph of python objects from the inferior process into gdb, and then prints it. As well as being slow, this can be many pages of textual output. To counter this, I've rewritten the pretty-printers to use a stream-based approach. The various PyObjectPtr subclasses have a "write_repr" method that writes the represenation to a file-like object whilst they recurse. I supply a file-like object "TruncatedStringIO", which raises an exception after a limit is reached: by default 1K of string data. (some simple subclasses simply reuse repr(self.proxyval()) for this, but objects that can follow cross-references have their own write_repr implementation). I've also rewritten frame handling: I eliminated the FrameInfo class, moving its functionality to the PyFrameObjectPtr class, and introduced a new "Frame" class to wrap gdb.Frame. This allowed a big simplification of the extension commands, and fixed various bugs (involving inlining and optimization) Within the py-up/py-down and py-bt commands, the code now prefixes Python frame printing with C-level frame indexes, to better tie together the C-level and Python-level views of the stack. I've added a couple of new commands: * "py-print" - takes a string argument. It attempts to look up the Python variable with that name, and print its value (it searches first in the locals of the current frame, then globals, then builtins). * "py-locals" - prints Python local variables; an analog of gdb's "info locals" Other changes since v4: * Add a ">" marker to the output of "py-list", indicating the current location * Add pretty-printer for PyCFunctionObject ("built-in function" and "built-in method") * Add selftests for the above * Make frame printing fetch information on locals on demand, rather than within FrameInfo's __init__ method (the latter is completely gone) * Introduce PyObjectPtr.pyop_field method, simplifying the code * Change the set/frozenset selftests to remove a reliance on ordering within the representation of the members * Try to be more robust for the case where PyEval_EvalFrameEx's "f" parameter is optimized out (see https://bugzilla.redhat.com/show_bug.cgi?id=556975 ) * Remove the FIXME in PyLongObjectPtr: I've tested the code on builds with both sizeof(digit) == 2 and == 4 * More selftests for unicode printing All tests pass on my box (Fedora 12 x86_64 with gdb-7.0.1-33.fc12.x86_64): "Ran 45 tests in 17.439s" ---------- Added file: http://bugs.python.org/file16715/add-gdb7-python-hooks-to-trunk-v5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 04:37:27 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 01 Apr 2010 02:37:27 +0000 Subject: [issue8032] Add gdb7 hooks to make it easier to debug Python In-Reply-To: <1267400432.35.0.113003499435.issue8032@psf.upfronthosting.co.za> Message-ID: <1270089447.6.0.536492642352.issue8032@psf.upfronthosting.co.za> Dave Malcolm added the comment: Adding diff from v4 to v5, for ease of review. For my reference, md5sum of v5's hooks: d3e039bb1279e71e847cc7ade10d3272 python-gdb.py ---------- Added file: http://bugs.python.org/file16716/diff-of-gdb7-hooks-v5-relative-to-v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 04:55:28 2010 From: report at bugs.python.org (Dan Dever) Date: Thu, 01 Apr 2010 02:55:28 +0000 Subject: [issue7885] test_distutils fails if Python built in separate directory In-Reply-To: <1265647953.87.0.513905112062.issue7885@psf.upfronthosting.co.za> Message-ID: <1270090528.57.0.609480680286.issue7885@psf.upfronthosting.co.za> Dan Dever added the comment: Adding version 2.6 This fails for me with 2.6.5 in the same way. ---------- nosy: +dedded versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 05:19:33 2010 From: report at bugs.python.org (John Machin) Date: Thu, 01 Apr 2010 03:19:33 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270091973.22.0.435495612508.issue8271@psf.upfronthosting.co.za> John Machin added the comment: @lemburg: "failing byte" seems rather obvious: first byte that you meet that is not valid in the current state. I don't understand your explanation, especially "does not have the high bit set". I think you mean "is a valid starter byte". See example 3 below. Example 1: F1 80 41 42 43. F1 implies a 4-byte character. 80 is OK. 41 is not in 80-BF. It is the "failing byte"; high bit not set. Required action is to emit FFFD then resync on the 41, causing 0041 0042 0043 to be emitted. Total output: FFFD 0041 0042 0043. Current code emits FFFD 0043. Example 2: F1 80 FF 42 43. F1 implies a 4-byte character. 80 is OK. FF is not in 80-BF. It is the "failing byte". Required action is to emit FFFD then resync on the FF. FF is not a valid starter byte, so emit FFFD, and resync on the 42, causing 0042 0043 to be emitted. Total output: FFFD FFFD 0042 0043. Current code emits FFFD 0043. Example 3: F1 80 C2 81 43. F1 implies a 4-byte character. 80 is OK. C2 is not in 80-BF. It is the "failing byte". Required action is to emit FFFD then resync on the C2. C2 and 81 have the high bit set, but C2 is a valid starter byte, and remaining bytes are OK, causing 0081 0043 to be emitted. Total output: FFFD 0081 0043. Current code emits FFFD 0043. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 05:28:29 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 01 Apr 2010 03:28:29 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270092509.14.0.769375033438.issue8271@psf.upfronthosting.co.za> Ezio Melotti added the comment: Having the 'high bit set' means that the first bit is set to 1. All the continuation bytes (i.e. the 2nd, 3rd or 4th byte in a sequence) have the first two bits set to 1 and 0 respectively, so if the first bit is not set to 1 then the byte shouldn't be considered part of the sequence. I'm trying to work on a patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 06:43:51 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 01 Apr 2010 04:43:51 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270097031.65.0.0391134815921.issue8271@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: -> ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 08:09:01 2010 From: report at bugs.python.org (John Machin) Date: Thu, 01 Apr 2010 06:09:01 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270102141.43.0.916956714929.issue8271@psf.upfronthosting.co.za> John Machin added the comment: @ezio.melotti: Your second sentence is true, but it is not the whole truth. Bytes in the range C0-FF (whose high bit *is* set) ALSO shouldn't be considered part of the sequence because they (like 00-7F) are invalid as continuation bytes; they are either starter bytes (C2-F4) or invalid for any purpose (C0-C2 and F5-FF). Further, some bytes in the range 80-BF are NOT always valid as the first continuation byte, it depends on what starter byte they follow. The simple way of summarising the above is to say that a byte that is not a valid continuation byte in the current state ("failing byte") is not a part of the current (now known to be invalid) sequence, and the decoder must try again ("resync") with the failing byte. Do you agree with my example 3? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 08:14:56 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 01 Apr 2010 06:14:56 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270102496.1.0.827137476515.issue8271@psf.upfronthosting.co.za> Ezio Melotti added the comment: Yes, right now I'm considering valid all the bytes that start with '10...'. C2 starts with '11...' so it's a "failing byte". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 09:29:47 2010 From: report at bugs.python.org (John Machin) Date: Thu, 01 Apr 2010 07:29:47 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270106987.33.0.884133439023.issue8271@psf.upfronthosting.co.za> John Machin added the comment: #ezio.melotti: """I'm considering valid all the bytes that start with '10...'""" Sorry, WRONG. Read what I wrote: """Further, some bytes in the range 80-BF are NOT always valid as the first continuation byte, it depends on what starter byte they follow.""" Consider these sequences: (1) E0 80 80 (2) E0 9F 80. Both are invalid sequences (over-long). Specifically the first continuation byte may not be in 80-9F. Those bytes start with '10...' but they are invalid after an E0 starter byte. Please read "Table 3-7. Well-Formed UTF-8 Byte Sequences" and surrounding text in Unicode 5.2.0 chapter 3 (bearing in mind that CPython (for good reasons) doesn't implement the surrogates restriction, so that the special case for starter byte ED is not used in CPython). Note the other 3 special cases for the first continuation byte. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 09:33:51 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 01 Apr 2010 07:33:51 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270107231.55.0.498319675442.issue8271@psf.upfronthosting.co.za> Ezio Melotti added the comment: That's why I'm writing tests that cover all the cases, including overlong sequences. If the test will fail I'll change the patch :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 09:44:15 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 01 Apr 2010 07:44:15 +0000 Subject: [issue8032] Add gdb7 hooks to make it easier to debug Python In-Reply-To: <1267400432.35.0.113003499435.issue8032@psf.upfronthosting.co.za> Message-ID: <1270107855.48.0.452383245639.issue8032@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the patch. I have committed it as r79548, with two modifications: - I added a future import for with_statement, as many installations will still use Python 2.5 - I commented out many of the tests, as they were failing for me. I'll report those as several issues. Please understand that this commit went to the trunk, which will be 2.7. After 2.7b1, no new features are acceptable, so you can only perform bug fixes on the code that is now committed. Please create new issues for any such bug fixes. Once the tests all pass, I'll merge this into 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 09:44:23 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 01 Apr 2010 07:44:23 +0000 Subject: [issue8032] Add gdb7 hooks to make it easier to debug Python In-Reply-To: <1267400432.35.0.113003499435.issue8032@psf.upfronthosting.co.za> Message-ID: <1270107863.0.0.571651648372.issue8032@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 09:44:50 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 01 Apr 2010 07:44:50 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270091973.22.0.435495612508.issue8271@psf.upfronthosting.co.za> Message-ID: <4BB44EED.2010300@egenix.com> Marc-Andre Lemburg added the comment: John Machin wrote: > > John Machin added the comment: > > @lemburg: "failing byte" seems rather obvious: first byte that you meet that is not valid in the current state. I don't understand your explanation, especially "does not have the high bit set". I think you mean "is a valid starter byte". See example 3 below. I just had a quick look at the code and saw that it's testing for the high bit on the subsequent bytes. Looking closer, you're right and the situation is a bit more complex, but the solution still looks simple: only the endinpos has to be adjusted more carefully depending on what the various checks find. That said, I find the Unicode consortium solution a bit awkward. In UTF-8 the first byte in a multi-byte sequence defines the number of bytes that make up a sequence. If some of those bytes are invalid, the whole sequence is invalid and the fact that some of those bytes may be interpretable as regular code points does not necessarily result in better results - the reason is that loss of bytes in a stream is far more unlikely than flipping a few bits in the data. ---------- title: str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 -> str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 09:46:06 2010 From: report at bugs.python.org (Ramin Sabet) Date: Thu, 01 Apr 2010 07:46:06 +0000 Subject: [issue8278] os.utime doesn't allow a atime (Last Access) which is 27 years in the future. In-Reply-To: <1270107966.42.0.283455861085.issue8278@psf.upfronthosting.co.za> Message-ID: <1270107966.42.0.283455861085.issue8278@psf.upfronthosting.co.za> New submission from Ramin Sabet : Error Message is: OverflowError: long int too large to convert to int --- Python Version: Python 2.6.4 (r264:75708, Oct 26 2009, 08:23:19) [MSC v.1500 32 bit (Intel)] on win32 --- Sample Code attached. ---------- components: IO files: utime_test.py messages: 102069 nosy: Ramin.Sabet severity: normal status: open title: os.utime doesn't allow a atime (Last Access) which is 27 years in the future. versions: Python 2.6 Added file: http://bugs.python.org/file16717/utime_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 09:47:41 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 01 Apr 2010 07:47:41 +0000 Subject: [issue8279] python-gdb PyListTests fail In-Reply-To: <1270108061.33.0.213932386799.issue8279@psf.upfronthosting.co.za> Message-ID: <1270108061.33.0.213932386799.issue8279@psf.upfronthosting.co.za> New submission from Martin v. L?wis : regrtest reports ====================================================================== FAIL: test_basic_command (test.test_gdb.PyListTests) Verify that the "py-list" command works ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/martin/work/27/Lib/test/test_gdb.py", line 518, in test_basic_command cmds_after_breakpoint=['py-list']) File "/home/martin/work/27/Lib/test/test_gdb.py", line 111, in get_stack_trace self.assertEquals(err, '') AssertionError: "/home/martin/work/27/python: can't open file 'Lib/test/test_gdb_sample.py': [Errno 2] No such file or directory\nError occurred in Python command: No frame is currently selected.\n" != '' ====================================================================== FAIL: test_one_abs_arg (test.test_gdb.PyListTests) Verify the "py-list" command with one absolute argument ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/martin/work/27/Lib/test/test_gdb.py", line 535, in test_one_abs_arg cmds_after_breakpoint=['py-list 9']) File "/home/martin/work/27/Lib/test/test_gdb.py", line 111, in get_stack_trace self.assertEquals(err, '') AssertionError: "/home/martin/work/27/python: can't open file 'Lib/test/test_gdb_sample.py': [Errno 2] No such file or directory\nError occurred in Python command: No frame is currently selected.\n" != '' ====================================================================== FAIL: test_two_abs_args (test.test_gdb.PyListTests) Verify the "py-list" command with two absolute arguments ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/martin/work/27/Lib/test/test_gdb.py", line 548, in test_two_abs_args cmds_after_breakpoint=['py-list 1,3']) File "/home/martin/work/27/Lib/test/test_gdb.py", line 111, in get_stack_trace self.assertEquals(err, '') AssertionError: "/home/martin/work/27/python: can't open file 'Lib/test/test_gdb_sample.py': [Errno 2] No such file or directory\nError occurred in Python command: No frame is currently selected.\n" != '' ---------------------------------------------------------------------- ---------- assignee: dmalcolm messages: 102070 nosy: dmalcolm, loewis severity: normal status: open title: python-gdb PyListTests fail _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 09:49:28 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 01 Apr 2010 07:49:28 +0000 Subject: [issue8279] python-gdb PyListTests fail In-Reply-To: <1270108061.33.0.213932386799.issue8279@psf.upfronthosting.co.za> Message-ID: <1270108168.3.0.935977082988.issue8279@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The other failures look similar, so I'm not reporting them separately for now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 09:58:27 2010 From: report at bugs.python.org (Nick Coghlan) Date: Thu, 01 Apr 2010 07:58:27 +0000 Subject: [issue8193] test_zlib fails with zlib 1.2.4 In-Reply-To: <1269198769.55.0.843831175079.issue8193@psf.upfronthosting.co.za> Message-ID: <1270108707.92.0.327934296449.issue8193@psf.upfronthosting.co.za> Nick Coghlan added the comment: The "I'm not sure" in my comment really was a question, rather than a definite direction to conditionally retain the old test. I've actually looked at the relevant C code in the zlib module now, and I agree with Antoine that the original suggestion of changing the 0 in the test to a -1 is fine (the test is just checking the handling of a Z_STREAM_ERROR return from the API call rather than anything more sophisticated). Adding to my to-do list. ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 10:08:25 2010 From: report at bugs.python.org (Valerio) Date: Thu, 01 Apr 2010 08:08:25 +0000 Subject: [issue8193] test_zlib fails with zlib 1.2.4 In-Reply-To: <1269198769.55.0.843831175079.issue8193@psf.upfronthosting.co.za> Message-ID: <1270109305.17.0.0629087206828.issue8193@psf.upfronthosting.co.za> Changes by Valerio : Removed file: http://bugs.python.org/file16711/8193.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 10:08:59 2010 From: report at bugs.python.org (Valerio) Date: Thu, 01 Apr 2010 08:08:59 +0000 Subject: [issue8193] test_zlib fails with zlib 1.2.4 In-Reply-To: <1269198769.55.0.843831175079.issue8193@psf.upfronthosting.co.za> Message-ID: <1270109339.6.0.230151754902.issue8193@psf.upfronthosting.co.za> Valerio added the comment: Ok, so here the patch. ---------- Added file: http://bugs.python.org/file16718/8193.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 10:18:20 2010 From: report at bugs.python.org (Florent Xicluna) Date: Thu, 01 Apr 2010 08:18:20 +0000 Subject: [issue7092] Test suite emits many DeprecationWarnings when -3 is enabled In-Reply-To: <1255098633.29.0.866346989212.issue7092@psf.upfronthosting.co.za> Message-ID: <1270109900.82.0.755057923107.issue7092@psf.upfronthosting.co.za> Florent Xicluna added the comment: Other py3k warnings: lib\distutils\util.py:209: DeprecationWarning: apply() not supported in 3.x; use func(*args, **kwargs) return apply(os.path.join, paths) lib\distutils\command\build_ext.py:679: DeprecationWarning: apply() not supported in 3.x; use func(*args, **kwargs) return apply(os.path.join, ext_path) + '_d' + so_ext lib\platform.py:1035: DeprecationWarning: dict.has_key() not supported in 3.x; use the in operator if _default_architecture.has_key(sys.platform): ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 10:31:09 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 01 Apr 2010 08:31:09 +0000 Subject: [issue8228] pprint, single/multiple items per line parameter In-Reply-To: <1269497760.71.0.432450737837.issue8228@psf.upfronthosting.co.za> Message-ID: <1270110669.07.0.365820462437.issue8228@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Please generate patches with "context diff", or better "unified diff", with the "diff -u" command. I've done it, before the source code changes and the patch becomes impossible to apply. Note that the new version does not respect the width: len(pprint.pformat([1]*100).splitlines()[0]) == 81 ---------- nosy: +amaury.forgeotdarc Added file: http://bugs.python.org/file16719/issue_8228.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 10:33:47 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 01 Apr 2010 08:33:47 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270110827.02.0.3072878206.issue8271@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here is an incomplete patch. It seems to solve the problem but I still have to add more tests and check it better. I also wonder if the sequences with the first byte in range F5-FD (start of 4/5/6-byte sequences, restricted by RFC 3629) should behave in the same way. Right now they just "eat" the following 4/5/6 chars without checking. ---------- keywords: +patch Added file: http://bugs.python.org/file16720/issue8271.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 10:46:34 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 01 Apr 2010 08:46:34 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270110827.02.0.3072878206.issue8271@psf.upfronthosting.co.za> Message-ID: <4BB45D66.5080404@egenix.com> Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > Here is an incomplete patch. It seems to solve the problem but I still have to add more tests and check it better. Thanks. Please also check whether it's worthwhile unrolling those loops by hand. > I also wonder if the sequences with the first byte in range F5-FD (start of 4/5/6-byte sequences, restricted by RFC 3629) should behave in the same way. Right now they just "eat" the following 4/5/6 chars without checking. I think we need to do this all the way, even though 5 and 6 byte sequences are not used at the moment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 11:01:51 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 01 Apr 2010 09:01:51 +0000 Subject: [issue8277] ElementTree won't parse comments In-Reply-To: <1270085866.99.0.0885322891054.issue8277@psf.upfronthosting.co.za> Message-ID: <1270112511.48.0.571492825321.issue8277@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: ElementTree does parse comments, it just omit them in the tree. A quick search lead me to this page: http://effbot.org/zone/element-pi.htm which can be further simplified: from xml.etree import ElementTree class MyTreeBuilder(ElementTree.TreeBuilder): def comment(self, data): self.start(ElementTree.Comment, {}) self.data(data) self.end(ElementTree.Comment) with open('c:/temp/t.xml', 'r') as f: xml = ElementTree.parse( f, parser=ElementTree.XMLParser(target=MyTreeBuilder())) ElementTree.dump(xml) Now, should ElementTree do this by default? It's not certain, see how effbot's sample needs to wrap the entire file into another 'document' element. ---------- nosy: +amaury.forgeotdarc, effbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 11:29:00 2010 From: report at bugs.python.org (Dmitry Chichkov) Date: Thu, 01 Apr 2010 09:29:00 +0000 Subject: [issue8228] pprint, single/multiple items per line parameter In-Reply-To: <1269497760.71.0.432450737837.issue8228@psf.upfronthosting.co.za> Message-ID: <1270114140.58.0.617386057817.issue8228@psf.upfronthosting.co.za> Dmitry Chichkov added the comment: Yes. This patch is nowhere near the production level. Unfortunately it works for me. And in the moment I don't have time to improve it further. Current version doesn't check the item's width upfront, there is definitely room for improvement. There is also an issue with the included issue_5131.patch - pretty-printed code can not be executed, unless 'defaultdict(' ')' type-specs are removed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 12:29:27 2010 From: report at bugs.python.org (Eric Smith) Date: Thu, 01 Apr 2010 10:29:27 +0000 Subject: [issue8278] os.utime doesn't allow a atime (Last Access) which is 27 years in the future. In-Reply-To: <1270107966.42.0.283455861085.issue8278@psf.upfronthosting.co.za> Message-ID: <1270117767.38.0.780185197164.issue8278@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 12:55:14 2010 From: report at bugs.python.org (David Chambers) Date: Thu, 01 Apr 2010 10:55:14 +0000 Subject: [issue7132] Regexp: capturing groups in repetitions In-Reply-To: <1255550896.44.0.457470031322.issue7132@psf.upfronthosting.co.za> Message-ID: <1270119314.66.0.353276479542.issue7132@psf.upfronthosting.co.za> David Chambers added the comment: I would find this functionality very useful. While I agree that it's often simpler to extract the relevant information in several steps, there are situations in which I'd prefer to do it all in one go. The application I'm writing at the moment needs to extract metadata from text files. This metadata actually appears as text at the top of each file. For example: title: Example title tags: Django, Python, regular expressions Example title ============= Here is the first paragraph. I had expected something like this to get the job done: meta = re.match(r'(?ms)(?:^(\S+):\s*(.*?)$\n)+^\s*$', contents_of_file) Ideally in this case, meta.groups() would return: ('title', 'Example title', 'tags', 'Django, Python, regular expressions') ---------- nosy: +davidchambers _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 13:05:53 2010 From: report at bugs.python.org (Matthias Klose) Date: Thu, 01 Apr 2010 11:05:53 +0000 Subject: [issue1044] tarfile insecure pathname extraction In-Reply-To: <1188295764.62.0.164889561412.issue1044@psf.upfronthosting.co.za> Message-ID: <1270119953.14.0.295922434339.issue1044@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 13:16:54 2010 From: report at bugs.python.org (Florent Xicluna) Date: Thu, 01 Apr 2010 11:16:54 +0000 Subject: [issue4577] distutils: -3 warnings (apply) In-Reply-To: <1228670407.71.0.141400636121.issue4577@psf.upfronthosting.co.za> Message-ID: <1270120614.66.0.421784791807.issue4577@psf.upfronthosting.co.za> Florent Xicluna added the comment: Superseded by #7092 ---------- nosy: +flox resolution: -> out of date status: open -> closed superseder: -> Test suite emits many DeprecationWarnings when -3 is enabled type: compile error -> behavior versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 13:26:16 2010 From: report at bugs.python.org (Florent Xicluna) Date: Thu, 01 Apr 2010 11:26:16 +0000 Subject: [issue1613130] str.split creates new string even if pattern not found Message-ID: <1270121176.39.0.68832081284.issue1613130@psf.upfronthosting.co.za> Florent Xicluna added the comment: Fixed with #7622, and USE_FAST flag removed. ---------- nosy: +flox resolution: -> out of date stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 13:26:43 2010 From: report at bugs.python.org (Florent Xicluna) Date: Thu, 01 Apr 2010 11:26:43 +0000 Subject: [issue1613130] str.split creates new string even if pattern not found Message-ID: <1270121203.16.0.332453775635.issue1613130@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- superseder: -> [patch] improve unicode methods: split() rsplit() and replace() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 13:35:54 2010 From: report at bugs.python.org (Florent Xicluna) Date: Thu, 01 Apr 2010 11:35:54 +0000 Subject: [issue5290] subprocess.Popen.communicate does not encode unicode strings In-Reply-To: <1234859144.87.0.49854960463.issue5290@psf.upfronthosting.co.za> Message-ID: <1270121754.15.0.888682759826.issue5290@psf.upfronthosting.co.za> Florent Xicluna added the comment: AFAICT 2.6 and 2.7 behave correctly. ---------- nosy: +flox resolution: -> out of date stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 13:44:22 2010 From: report at bugs.python.org (Florent Xicluna) Date: Thu, 01 Apr 2010 11:44:22 +0000 Subject: [issue5447] future unicode literals and r'\u' In-Reply-To: <1236543092.99.0.796172268474.issue5447@psf.upfronthosting.co.za> Message-ID: <1270122262.99.0.536692931383.issue5447@psf.upfronthosting.co.za> Florent Xicluna added the comment: Duplicate of #2570. ---------- nosy: +flox resolution: -> duplicate status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 13:45:37 2010 From: report at bugs.python.org (Florent Xicluna) Date: Thu, 01 Apr 2010 11:45:37 +0000 Subject: [issue5447] future unicode literals and r'\u' In-Reply-To: <1236543092.99.0.796172268474.issue5447@psf.upfronthosting.co.za> Message-ID: <1270122337.83.0.21359262901.issue5447@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- superseder: -> backport 3.0-style \u/\U processing in raw strings when unicode_literals is imported from __future__ _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 13:46:27 2010 From: report at bugs.python.org (Florent Xicluna) Date: Thu, 01 Apr 2010 11:46:27 +0000 Subject: [issue2570] backport 3.0-style \u/\U processing in raw strings when unicode_literals is imported from __future__ In-Reply-To: <1207592942.81.0.864010115323.issue2570@psf.upfronthosting.co.za> Message-ID: <1270122387.47.0.972814375626.issue2570@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- keywords: -26backport nosy: +benjamin.peterson, flox, pooryorick, zhirsch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 13:57:02 2010 From: report at bugs.python.org (John Machin) Date: Thu, 01 Apr 2010 11:57:02 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270123022.09.0.351284182872.issue8271@psf.upfronthosting.co.za> John Machin added the comment: Unicode has been frozen at 0x10FFFF. That's it. There is no such thing as a valid 5-byte or 6-byte UTF-8 string. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 13:58:26 2010 From: report at bugs.python.org (Florent Xicluna) Date: Thu, 01 Apr 2010 11:58:26 +0000 Subject: [issue1498930] Generate from Unicode database instead of manualy coding. Message-ID: <1270123106.82.0.641869175364.issue1498930@psf.upfronthosting.co.za> Florent Xicluna added the comment: Fixed with #1571184. ---------- nosy: +flox resolution: -> duplicate stage: patch review -> committed/rejected status: open -> closed superseder: -> Generate numeric/space/linebreak from Unicode database. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 14:02:35 2010 From: report at bugs.python.org (Fredrik Lundh) Date: Thu, 01 Apr 2010 12:02:35 +0000 Subject: [issue6488] ElementTree documentation refers to "path" with no explanation, and inconsistently In-Reply-To: <1247619329.11.0.425030564778.issue6488@psf.upfronthosting.co.za> Message-ID: <1270123355.34.0.146210893617.issue6488@psf.upfronthosting.co.za> Fredrik Lundh added the comment: > As per PEP 257, ?Returns? should become ?Return? (it?s a command, not a description). Upstream ET uses JavaDoc conventions, where the conventions are designed by technical writers, not hackers. In JavaDoc, descriptions are 3rd person declarative (after all, the documentation describes what the function does, not what you want it to do). http://java.sun.com/j2se/javadoc/writingdoccomments/ The incompatibilities with Python's NIH-standards are unfortunate, but that's the way it is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 14:20:53 2010 From: report at bugs.python.org (Fredrik Lundh) Date: Thu, 01 Apr 2010 12:20:53 +0000 Subject: [issue6488] ElementTree documentation refers to "path" with no explanation, and inconsistently In-Reply-To: <1247619329.11.0.425030564778.issue6488@psf.upfronthosting.co.za> Message-ID: <1270124453.57.0.0246734029783.issue6488@psf.upfronthosting.co.za> Fredrik Lundh added the comment: The missing/extra words in the findtext description is just a case of sloppy copy-editing, most likely after a quick reformatting. Not sure why you're spending all this energy arguing about commas, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 14:59:56 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 12:59:56 +0000 Subject: [issue7583] [patch] doctest should normalize tabs when comparing output In-Reply-To: <1261932632.12.0.972907709846.issue7583@psf.upfronthosting.co.za> Message-ID: <1270126796.97.0.122074050142.issue7583@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file16721/issue7583.doctest.tabs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 15:00:20 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 13:00:20 +0000 Subject: [issue7583] [patch] doctest should normalize tabs when comparing output In-Reply-To: <1261932632.12.0.972907709846.issue7583@psf.upfronthosting.co.za> Message-ID: <1270126820.5.0.283577085424.issue7583@psf.upfronthosting.co.za> Changes by anatoly techtonik : Removed file: http://bugs.python.org/file16712/issue7583.doctest.tabs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 15:05:18 2010 From: report at bugs.python.org (Josip Djolonga) Date: Thu, 01 Apr 2010 13:05:18 +0000 Subject: [issue8254] write a configure command In-Reply-To: <1269787284.51.0.353047597946.issue8254@psf.upfronthosting.co.za> Message-ID: <1270127118.38.0.826457615698.issue8254@psf.upfronthosting.co.za> Changes by Josip Djolonga : ---------- nosy: +josip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 15:19:05 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 01 Apr 2010 13:19:05 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270123022.09.0.351284182872.issue8271@psf.upfronthosting.co.za> Message-ID: <4BB49D46.7010209@egenix.com> Marc-Andre Lemburg added the comment: John Machin wrote: > > John Machin added the comment: > > Unicode has been frozen at 0x10FFFF. That's it. There is no such thing as a valid 5-byte or 6-byte UTF-8 string. The UTF-8 codec was written at a time when UTF-8 still included the possibility to have 5 or 6 bytes: http://www.rfc-editor.org/rfc/rfc2279.txt Use of those encodings has always raised an error, though. For error handling purposes it still has to support those possibilities. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 15:35:26 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 01 Apr 2010 13:35:26 +0000 Subject: [issue8277] ElementTree won't parse comments In-Reply-To: <1270085866.99.0.0885322891054.issue8277@psf.upfronthosting.co.za> Message-ID: <1270128926.31.0.790037361381.issue8277@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 15:47:38 2010 From: report at bugs.python.org (John Machin) Date: Thu, 01 Apr 2010 13:47:38 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270129658.49.0.127634285615.issue8271@psf.upfronthosting.co.za> John Machin added the comment: @lemburg: RFC 2279 was obsoleted by RFC 3629 over 6 years ago. The standard now says 21 bits is it. F5-FF are declared to be invalid. I don't understand what you mean by "supporting those possibilities". The code is correctly issuing an error message. The goal of supporting the new resyncing and FFFD-emitting rules might be better met however by throwing away the code in the default clause and instead merely setting the entries for F5-FF in the utf8_code_length array to zero. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 16:10:04 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 14:10:04 +0000 Subject: [issue6703] cross platform failure and silly test in doctest In-Reply-To: <1250266697.36.0.481264395332.issue6703@psf.upfronthosting.co.za> Message-ID: <1270131004.82.0.785558548324.issue6703@psf.upfronthosting.co.za> anatoly techtonik added the comment: Sure doctests should be crossplatform by default when possible. The patch should fix the behavior for windows. It also cleans the doc and code a bit. Can you provide some testcases? ---------- keywords: +patch nosy: +techtonik Added file: http://bugs.python.org/file16722/6703.silly.abspath.test.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 16:12:51 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 14:12:51 +0000 Subject: [issue6703] cross platform failure and silly test in doctest In-Reply-To: <1250266697.36.0.481264395332.issue6703@psf.upfronthosting.co.za> Message-ID: <1270131171.33.0.839791363274.issue6703@psf.upfronthosting.co.za> anatoly techtonik added the comment: http://codereview.appspot.com/815042/show ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 16:13:01 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 01 Apr 2010 14:13:01 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270129658.49.0.127634285615.issue8271@psf.upfronthosting.co.za> Message-ID: <4BB4A9EA.7010005@egenix.com> Marc-Andre Lemburg added the comment: John Machin wrote: > > John Machin added the comment: > > @lemburg: RFC 2279 was obsoleted by RFC 3629 over 6 years ago. I know. > The standard now says 21 bits is it. It says that the current Unicode codespace only uses 21 bits. In the early days 16 bits were considered enough, so it wouldn't surprise me, if they extend that range again at some point in the future - after all, leaving 11 bits unused in UCS-4 is a huge waste of space. If you have a reference that the Unicode consortium has decided to stay with that limit forever, please quote it. > F5-FF are declared to be invalid. I don't understand what you mean by "supporting those possibilities". The code is correctly issuing an error message. The goal of supporting the new resyncing and FFFD-emitting rules might be better met however by throwing away the code in the default clause and instead merely setting the entries for F5-FF in the utf8_code_length array to zero. Fair enough. Let's do that. The reference in the table should then be updated to RFC 3629. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 16:43:24 2010 From: report at bugs.python.org (John Machin) Date: Thu, 01 Apr 2010 14:43:24 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270133004.19.0.674258327128.issue8271@psf.upfronthosting.co.za> John Machin added the comment: Patch review: Preamble: pardon my ignorance of how the codebase works, but trunk unicodeobject.c is r79494 (and allows encoding of surrogate codepoints), py3k unicodeobject.c is r79506 (and bans the surrogate caper) and I can't find the r79542 that the patch mentions ... help, please! length 2 case: 1. the loop can be hand-unrolled into oblivion. It can be entered only when s[1] & 0xC0 != 0x80 (previous if test). 2. the over-long check (if (ch < 0x80)) hasn't been touched. It could be removed and the entries for C0 and C1 in the utf8_code_length array set to 0. length 3 case: 1. the tests involving s[0] being 0xE0 or 0xED are misplaced. 2. the test s[0] == 0xE0 && s[1] < 0xA0 if not misplaced would be shadowing the over-long test (ch < 0x800). It seems better to use the over-long test (with endinpos set to 1). 3. The test s[0] == 0xED relates to the surrogates caper which in the py3k version is handled in the same place as the over-long test. 4. unrolling loop: needs no loop, only 1 test ... if s[1] is good, then we know s[2] must be bad without testing it, because we start the for loop only when s[1] is bad || s[2] is bad. length 4 case: as for the len 3 case generally ... misplaced tests, F1 test shadows over-long test, F4 test shadows max value test, too many loop iterations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 16:50:13 2010 From: report at bugs.python.org (Ezio Melotti) Date: Thu, 01 Apr 2010 14:50:13 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270133413.07.0.728583781422.issue8271@psf.upfronthosting.co.za> Ezio Melotti added the comment: Even if they are not valid they still "eat" all the 4/5/6 bytes, so they should be fixed too. I haven't see anything about these bytes in chapter 3 so far, but there are at least two possibilities: 1) consider all the bytes in range F5-FD as invalid without looking for the other bytes; 2) try to read the next 4/5/6 bytes and fail if they are no continuation bytes. We can also look at what others do (e.g. browsers and other languages). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 16:51:53 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 01 Apr 2010 14:51:53 +0000 Subject: [issue7583] doctest should normalize tabs when comparing output In-Reply-To: <1261932632.12.0.972907709846.issue7583@psf.upfronthosting.co.za> Message-ID: <1270133513.28.0.648687373761.issue7583@psf.upfronthosting.co.za> R. David Murray added the comment: Removed [patch] from title as patch is set on the keywords. Removed 2.5 from versions because it is in security fix only mode (we use versions for where things will be fixed, not where they are broken). Changed component to Library as this is not a bug in the tests themselves but in a library package, doctest. I didn't set stage to patch review only because I'd like other opinions on the root issue. Normalizing tabs to 8 spaces sounds wrong to me (including in the source). ---------- components: +Library (Lib) -Tests nosy: +r.david.murray priority: -> normal title: [patch] doctest should normalize tabs when comparing output -> doctest should normalize tabs when comparing output type: -> behavior versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 16:55:34 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 14:55:34 +0000 Subject: [issue7583] doctest should normalize tabs when comparing output In-Reply-To: <1261932632.12.0.972907709846.issue7583@psf.upfronthosting.co.za> Message-ID: <1270133734.79.0.875953482484.issue7583@psf.upfronthosting.co.za> anatoly techtonik added the comment: http://docs.python.org/library/doctest.html#how-are-docstring-examples-recognized "Changed in version 2.4: Expanding tabs to spaces is new; previous versions tried to preserve hard tabs, with confusing results" Unfortunately, no confusing results survived to see what was wrong. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 16:57:16 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 01 Apr 2010 14:57:16 +0000 Subject: [issue7585] difflib should separate filename from timestamp with tab In-Reply-To: <1261947458.0.0.959368598145.issue7585@psf.upfronthosting.co.za> Message-ID: <1270133836.52.0.370835411403.issue7585@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- dependencies: +doctest should normalize tabs when comparing output title: [patch] difflib should separate filename from timestamp with tab -> difflib should separate filename from timestamp with tab _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 17:01:39 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Thu, 01 Apr 2010 15:01:39 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270133413.07.0.728583781422.issue8271@psf.upfronthosting.co.za> Message-ID: <4BB4B54E.6060408@egenix.com> Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > Even if they are not valid they still "eat" all the 4/5/6 bytes, so they should be fixed too. I haven't see anything about these bytes in chapter 3 so far, but there are at least two possibilities: > 1) consider all the bytes in range F5-FD as invalid without looking for the other bytes; > 2) try to read the next 4/5/6 bytes and fail if they are no continuation bytes. > We can also look at what others do (e.g. browsers and other languages). By marking those entries as 0 in the length table, they would only use one byte, however, compared to the current state, that would produce more replacement code points in the output, so perhaps applying the same logic as for the other sequences is a better strategy. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 17:07:08 2010 From: report at bugs.python.org (John Machin) Date: Thu, 01 Apr 2010 15:07:08 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270134428.79.0.365637719195.issue8271@psf.upfronthosting.co.za> John Machin added the comment: Chapter 3, page 94: """As a consequence of the well-formedness conditions specified in Table 3-7, the following byte values are disallowed in UTF-8: C0?C1, F5?FF""" Of course they should be handled by the simple expedient of setting their length entry to zero. Why write code when there is an existing mechanism?? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 17:09:59 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Apr 2010 15:09:59 +0000 Subject: [issue8276] useless PyEval_CallObject function In-Reply-To: <1270073212.98.0.119754246418.issue8276@psf.upfronthosting.co.za> Message-ID: <1270134599.02.0.286171822833.issue8276@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Right, we can certainly suppress the function definition now and just keep the macro. (especially given it's 1997, not 2007, there was a typo in my message) ---------- assignee: -> pitrou priority: -> normal stage: -> needs patch type: -> feature request versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 17:23:23 2010 From: report at bugs.python.org (John Machin) Date: Thu, 01 Apr 2010 15:23:23 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270135403.73.0.139390730316.issue8271@psf.upfronthosting.co.za> John Machin added the comment: @lemburg: """perhaps applying the same logic as for the other sequences is a better strategy""" What other sequences??? F5-FF are invalid bytes; they don't start valid sequences. What same logic?? At the start of a character, they should get the same short sharp treatment as any other non-starter byte e.g. 80 or C0. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 17:53:09 2010 From: report at bugs.python.org (Josip Djolonga) Date: Thu, 01 Apr 2010 15:53:09 +0000 Subject: [issue8255] step-by-step tutorial In-Reply-To: <1269787637.04.0.463586986817.issue8255@psf.upfronthosting.co.za> Message-ID: <1270137189.1.0.991603710815.issue8255@psf.upfronthosting.co.za> Changes by Josip Djolonga : ---------- nosy: +josip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 18:05:29 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 01 Apr 2010 16:05:29 +0000 Subject: [issue8279] python-gdb PyListTests fail In-Reply-To: <1270108061.33.0.213932386799.issue8279@psf.upfronthosting.co.za> Message-ID: <1270137929.78.0.467755915831.issue8279@psf.upfronthosting.co.za> Dave Malcolm added the comment: Thanks for reviewing the gdb work. I was mistakenly testing using: make ; ./python Lib/test/test_gdb.py which led to path assumptions in the code. I'm now testing with: make ; ./python Lib/test/regrtest.py -v test_gdb I'm attaching a patch which uses test_support.findfile to locate the test script; the code now works when invoked using either of the above: $ ./python Lib/test/regrtest.py test_gdb test_gdb 1 test OK. [39894 refs] There was also some breakage of the PyListTests due to significant trailing whitespace within the multiline string containing the expected result. The trailing whitespace was stripped in test_gdb.py. I've rewritten these multiline string literals as adjacent single-line string literals, so that this significant whitespace is explicit. (The output of each line has the line number, then four spaces, then the content of the line from the source file. An empty source line thus has the number followed by four trailing spaces.) I've also slightly changed the regex in get_gdb_repr() that carves up what GDB prints, since gdb can insert newlines and spaces in a somewhat arbitrary way, apparently based on the width of the tty that its stdout is connected to. The tests were passing when run from a full-screen terminal, but some would fail if I resized the terminal to 80 columns (!). I've tested the new code at both terminal sizes, and piping to "cat" (so that it's not at tty), and all tests now pass for all three cases. ---------- keywords: +patch Added file: http://bugs.python.org/file16723/fix-test_gdb_sample-path-and-whitespace-issues.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 18:07:08 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 01 Apr 2010 16:07:08 +0000 Subject: [issue8279] python-gdb PyListTests fail In-Reply-To: <1270108061.33.0.213932386799.issue8279@psf.upfronthosting.co.za> Message-ID: <1270138028.12.0.382283061425.issue8279@psf.upfronthosting.co.za> Changes by Dave Malcolm : ---------- stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 18:08:33 2010 From: report at bugs.python.org (INADA Naoki) Date: Thu, 01 Apr 2010 16:08:33 +0000 Subject: [issue8280] urllib2 passes fragment identifier to server In-Reply-To: <1270138113.06.0.589316518246.issue8280@psf.upfronthosting.co.za> Message-ID: <1270138113.06.0.589316518246.issue8280@psf.upfronthosting.co.za> New submission from INADA Naoki : >>> urllib2.urlopen("http://wave-robot-python-client.googlecode.com/svn/trunk/pydocs/index.html#module-wavelet") Traceback (most recent call last): File "", line 1, in File "C:\usr\Python2.6\lib\urllib2.py", line 126, in urlopen return _opener.open(url, data, timeout) File "C:\usr\Python2.6\lib\urllib2.py", line 398, in open response = meth(req, response) File "C:\usr\Python2.6\lib\urllib2.py", line 511, in http_response 'http', request, response, code, msg, hdrs) File "C:\usr\Python2.6\lib\urllib2.py", line 436, in error return self._call_chain(*args) File "C:\usr\Python2.6\lib\urllib2.py", line 370, in _call_chain result = func(*args) File "C:\usr\Python2.6\lib\urllib2.py", line 519, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 400: Bad Request This happens when redirected URL contains fragment. >>> urllib2.urlopen("http://goo.gl/z1d5") Traceback (most recent call last): File "", line 1, in File "C:\usr\Python2.6\lib\urllib2.py", line 126, in urlopen return _opener.open(url, data, timeout) File "C:\usr\Python2.6\lib\urllib2.py", line 398, in open response = meth(req, response) File "C:\usr\Python2.6\lib\urllib2.py", line 511, in http_response 'http', request, response, code, msg, hdrs) File "C:\usr\Python2.6\lib\urllib2.py", line 430, in error result = self._call_chain(*args) File "C:\usr\Python2.6\lib\urllib2.py", line 370, in _call_chain result = func(*args) File "C:\usr\Python2.6\lib\urllib2.py", line 606, in http_error_302 return self.parent.open(new, timeout=req.timeout) File "C:\usr\Python2.6\lib\urllib2.py", line 398, in open response = meth(req, response) File "C:\usr\Python2.6\lib\urllib2.py", line 511, in http_response 'http', request, response, code, msg, hdrs) File "C:\usr\Python2.6\lib\urllib2.py", line 436, in error return self._call_chain(*args) File "C:\usr\Python2.6\lib\urllib2.py", line 370, in _call_chain result = func(*args) File "C:\usr\Python2.6\lib\urllib2.py", line 519, in http_error_default raise HTTPError(req.get_full_url(), code, msg, hdrs, fp) urllib2.HTTPError: HTTP Error 400: Bad Request urllib2.Request.get_selector() should be: def get_selector(self): return self.__r_host.split('#')[0] ---------- messages: 102103 nosy: naoki severity: normal status: open title: urllib2 passes fragment identifier to server _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 18:09:24 2010 From: report at bugs.python.org (INADA Naoki) Date: Thu, 01 Apr 2010 16:09:24 +0000 Subject: [issue8280] urllib2 passes fragment identifier to server In-Reply-To: <1270138113.06.0.589316518246.issue8280@psf.upfronthosting.co.za> Message-ID: <1270138164.66.0.448124469061.issue8280@psf.upfronthosting.co.za> Changes by INADA Naoki : ---------- components: +Library (Lib) type: -> behavior versions: +Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 18:12:31 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 01 Apr 2010 16:12:31 +0000 Subject: [issue8280] urllib2 passes fragment identifier to server In-Reply-To: <1270138113.06.0.589316518246.issue8280@psf.upfronthosting.co.za> Message-ID: <1270138351.5.0.57892252841.issue8280@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +orsenthil versions: -Python 2.5, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 18:16:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 01 Apr 2010 16:16:10 +0000 Subject: [issue8280] urllib2 passes fragment identifier to server In-Reply-To: <1270138113.06.0.589316518246.issue8280@psf.upfronthosting.co.za> Message-ID: <1270138570.1.0.90673529546.issue8280@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 18:44:56 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Apr 2010 16:44:56 +0000 Subject: [issue8281] test_gdb_sample fails In-Reply-To: <1270140296.29.0.699227538452.issue8281@psf.upfronthosting.co.za> Message-ID: <1270140296.29.0.699227538452.issue8281@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This doesn't happen in verbose mode, because stdout isn't checked: $ ./python -m test.regrtest test_gdb_sample test_gdb_sample test test_gdb_sample produced unexpected output: ********************************************************************** 42 ********************************************************************** 1 test failed: test_gdb_sample ---------- assignee: dmalcolm components: Library (Lib), Tests messages: 102104 nosy: dmalcolm, loewis, pitrou severity: normal stage: needs patch status: open title: test_gdb_sample fails type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 18:53:46 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Apr 2010 16:53:46 +0000 Subject: [issue8276] useless PyEval_CallObject function In-Reply-To: <1270073212.98.0.119754246418.issue8276@psf.upfronthosting.co.za> Message-ID: <1270140826.39.0.260863655196.issue8276@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Fixed in r79555 (trunk), r79556 (py3k). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 18:53:54 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Apr 2010 16:53:54 +0000 Subject: [issue8276] useless PyEval_CallObject function In-Reply-To: <1270073212.98.0.119754246418.issue8276@psf.upfronthosting.co.za> Message-ID: <1270140834.52.0.631467981425.issue8276@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 18:54:41 2010 From: report at bugs.python.org (cburroughs) Date: Thu, 01 Apr 2010 16:54:41 +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: <1270140881.6.0.0504269112575.issue3073@psf.upfronthosting.co.za> Changes by cburroughs : ---------- nosy: +cburroughs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 18:58:05 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 16:58:05 +0000 Subject: [issue1659] Tests needing network flag? In-Reply-To: <18281.12938.264352.782990@montanaro.dyndns.org> Message-ID: <1270141085.79.0.697952656035.issue1659@psf.upfronthosting.co.za> anatoly techtonik added the comment: Updated patch. test_socket - whole suite will be skipped test_socket_ssl - no more avail test_ssl - only test that require network will be marked as skipped test_urllib2 - untouched, requires fine-grained approach, probably for separate ticket ---------- components: +Tests keywords: +patch nosy: +techtonik versions: +Python 2.7 Added file: http://bugs.python.org/file16724/1659.no_network.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 19:01:04 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 17:01:04 +0000 Subject: [issue1659] Tests needing network flag? In-Reply-To: <18281.12938.264352.782990@montanaro.dyndns.org> Message-ID: <1270141264.33.0.74438164288.issue1659@psf.upfronthosting.co.za> anatoly techtonik added the comment: I propose to split this issue. One is to test which tests that marked with `test_support.requires('network')` _really_ need network connection. Second is annotation of appropriate methods instead of whole test suite to count exact number of tests skipped due to absent resource. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 19:13:11 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 01 Apr 2010 17:13:11 +0000 Subject: [issue8281] test_gdb_sample fails In-Reply-To: <1270140296.29.0.699227538452.issue8281@psf.upfronthosting.co.za> Message-ID: <1270141991.94.0.559037811144.issue8281@psf.upfronthosting.co.za> Dave Malcolm added the comment: Sorry about that. "test_gdb_sample.py" is merely a sample script for use by "test_gdb.py" (see issue 8032); it's not intended to do anything useful by itself (though it does need a "print" invocation, since test_gdb.py uses a breakpoint in PyObject_Print). I would probably be simplest to rename it so it doesn't have a "test_" prefix. How about "sample_for_test_gdb.py", or somesuch? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 19:14:17 2010 From: report at bugs.python.org (Florent Xicluna) Date: Thu, 01 Apr 2010 17:14:17 +0000 Subject: [issue8281] test_gdb_sample fails In-Reply-To: <1270140296.29.0.699227538452.issue8281@psf.upfronthosting.co.za> Message-ID: <1270142057.06.0.758289306134.issue8281@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- keywords: +buildbot priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 19:21:09 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 01 Apr 2010 17:21:09 +0000 Subject: [issue8278] os.utime doesn't allow a atime (Last Access) which is 27 years in the future. In-Reply-To: <1270107966.42.0.283455861085.issue8278@psf.upfronthosting.co.za> Message-ID: <1270142469.03.0.267206005926.issue8278@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: On Windows, time_t is 64bit, but various functions convert it to a 32bit long. Attached patch uses time_t instead of long in various places, this fixes the proposed test. Martin, do you think it's a viable approach? If so, I'll go and add some tests for the modified functions. ---------- keywords: +patch nosy: +amaury.forgeotdarc, loewis Added file: http://bugs.python.org/file16725/timet_64.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 19:24:07 2010 From: report at bugs.python.org (Patrick W.) Date: Thu, 01 Apr 2010 17:24:07 +0000 Subject: [issue8277] ElementTree won't parse comments In-Reply-To: <1270085866.99.0.0885322891054.issue8277@psf.upfronthosting.co.za> Message-ID: <1270142647.82.0.567664076091.issue8277@psf.upfronthosting.co.za> Patrick W. added the comment: Thanks for your reply, Amaury. That page really might mean that it was not intended for ElementTree to parse such things by default. Although it might be nice if there was some easy way to simply enable it, instead of having to hack it into there and depending on details of some internal code (which might change in the future). Your code btw. didn't work for me, but based on it and on that effbot page, I came up with the following solution, which works fine. test.py ------- from xml.etree import ElementTree class CommentedTreeBuilder ( ElementTree.XMLTreeBuilder ): def __init__ ( self, html = 0, target = None ): ElementTree.XMLTreeBuilder.__init__( self, html, target ) self._parser.CommentHandler = self.handle_comment def handle_comment ( self, data ): self._target.start( ElementTree.Comment, {} ) self._target.data( data ) self._target.end( ElementTree.Comment ) with open( 'test.xml', 'r' ) as f: xml = ElementTree.parse( f, parser = CommentedTreeBuilder() ) ElementTree.dump( xml ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 19:24:25 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Apr 2010 17:24:25 +0000 Subject: [issue8281] test_gdb_sample fails In-Reply-To: <1270141991.94.0.559037811144.issue8281@psf.upfronthosting.co.za> Message-ID: <1270142779.3423.6.camel@localhost> Antoine Pitrou added the comment: > I would probably be simplest to rename it so it doesn't have a "test_" prefix. Indeed. Otherwise it gets caught and executed by regrtest as part of the standard test suite. > How about "sample_for_test_gdb.py", or somesuch? Shorter would be better :) For example gdb_sample.py, gdb_fodder.py... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 19:29:23 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 01 Apr 2010 17:29:23 +0000 Subject: [issue8277] ElementTree won't parse comments In-Reply-To: <1270085866.99.0.0885322891054.issue8277@psf.upfronthosting.co.za> Message-ID: <1270142963.96.0.380958505635.issue8277@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: yes, my code uses the newer version of ElementTree which will be included with 2.7 and 3.2 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 19:29:36 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 17:29:36 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270142976.66.0.263871338663.issue2810@psf.upfronthosting.co.za> anatoly techtonik added the comment: I propose to close this as "invalid", because the bug with _winreg.EnumValue can not be confirmed. However, it seems to be impossible to return unicode data from _winreg.EnumKey, and this deserves a new bug. ---------- nosy: +techtonik versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 19:32:01 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 01 Apr 2010 17:32:01 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270143121.97.0.492217366229.issue2810@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 19:33:45 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 17:33:45 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270143225.9.0.712932975524.issue2810@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file16726/issue2810_registry.png _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 19:50:47 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 01 Apr 2010 17:50:47 +0000 Subject: [issue8281] test_gdb_sample fails In-Reply-To: <1270140296.29.0.699227538452.issue8281@psf.upfronthosting.co.za> Message-ID: <1270144247.17.0.111051770854.issue8281@psf.upfronthosting.co.za> Dave Malcolm added the comment: "gdb_sample.py" as a name works for me. I don't have commit rights to SVN so I can't perform the rename myself. (Note that due to issue 8279 the file isn't actually used at the moment by test_gdb.py so it should be safe to rename. I have a patch attached to that latter bug; I'll fix up the patch after that file is renamed). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 19:57:38 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 01 Apr 2010 17:57:38 +0000 Subject: [issue8281] test_gdb_sample fails In-Reply-To: <1270140296.29.0.699227538452.issue8281@psf.upfronthosting.co.za> Message-ID: <1270144658.31.0.390325588419.issue8281@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > (Note that due to issue 8279 the file isn't actually used at the moment > by test_gdb.py so it should be safe to rename. I have a patch attached > to that latter bug; I'll fix up the patch after that file is renamed). Thank you, this is done in r79557. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 19:59:23 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 17:59:23 +0000 Subject: [issue3778] python uninstaller leave registry entries In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za> Message-ID: <1270144763.54.0.89639549052.issue3778@psf.upfronthosting.co.za> anatoly techtonik added the comment: Confirmed 2.6.5 installer leaves "HKLM\SOFTWARE\Python\PythonCore\2.6\Modules" on install/uninstall without \2.6\ key. I propose to mark it as 'low' priority. ---------- nosy: +techtonik versions: +Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 20:07:23 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 18:07:23 +0000 Subject: [issue8282] Windows uninstaller requests admin access for unindentified program In-Reply-To: <1270145243.88.0.407783271533.issue8282@psf.upfronthosting.co.za> Message-ID: <1270145243.88.0.407783271533.issue8282@psf.upfronthosting.co.za> New submission from anatoly techtonik : Uninstall on Vista requires administrative privileges to "Unindentified program" from "Unindentified publisher". Tested 2.6.5 and 2.7a4 ---------- components: Installation messages: 102117 nosy: techtonik severity: normal status: open title: Windows uninstaller requests admin access for unindentified program versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 20:11:46 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 01 Apr 2010 18:11:46 +0000 Subject: [issue8279] python-gdb PyListTests fail In-Reply-To: <1270108061.33.0.213932386799.issue8279@psf.upfronthosting.co.za> Message-ID: <1270145506.97.0.62524346511.issue8279@psf.upfronthosting.co.za> Dave Malcolm added the comment: I'm attaching a revised version of the patch; this is as before, but takes account of the rename of the sample file from "test_gdb_sample.py" to "gdb_sample.py" in r79557. ---------- Added file: http://bugs.python.org/file16727/fix-test_gdb_sample-path-and-whitespace-issues-changing-sample-filename.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 20:18:57 2010 From: report at bugs.python.org (Florent Xicluna) Date: Thu, 01 Apr 2010 18:18:57 +0000 Subject: [issue7092] Test suite emits many DeprecationWarnings when -3 is enabled In-Reply-To: <1255098633.29.0.866346989212.issue7092@psf.upfronthosting.co.za> Message-ID: <1270145937.03.0.881925995695.issue7092@psf.upfronthosting.co.za> Florent Xicluna added the comment: Fixed with r79558, except test_multiprocessing. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 20:26:02 2010 From: report at bugs.python.org (alan hoover) Date: Thu, 01 Apr 2010 18:26:02 +0000 Subject: [issue8283] series of lamdas in loop sets the paramater on all calls to that of the last call In-Reply-To: <1270146362.25.0.403939205554.issue8283@psf.upfronthosting.co.za> Message-ID: <1270146362.25.0.403939205554.issue8283@psf.upfronthosting.co.za> New submission from alan hoover : Background: building a screen using Tkinter based on information from a database to let user take action on the database rows. I don't know how many rows there will be, so I'm storing the widgets in arrays for each column. Code: for row in getDBrows(): self.buttons.append(Tkinter.Button(self,text='UnLoad it', command=lambda :self.unload(row[0]))) Problem: When executing the above code, all the buttons have the key to the database table that belongs to the last row. I found a work around -- by moving the call to create the button (containing the lambda) to a separate function and call that function to create the button instead of creating the button directly, the buttons then make their callback with a correct database key. Workaround: for row in getDBrows(): self.buttons.append(self.buildbutton(row[0])) . . def buildbutton(self,key): return Tkinter.Button(self,text='UnLoad it', command=lambda: self.unload(key)) When using the workaround code instead of the original code, the button for each row has the appropriate key to the database. Speculation: It acts like the lambda definitions don't get solidified until the containing block exits; at that time, the lambda definition(s) get locked in with the current value of the variable getting passed into the lambda as a parameter. By moving the lambda call to a different block (separate function), the lambda gets "locked" when that block (function) exits instead of when the containing block (loop) exits. ---------- components: IDLE, Tkinter, Windows messages: 102120 nosy: alan.hoover severity: normal status: open title: series of lamdas in loop sets the paramater on all calls to that of the last call type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 20:26:04 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 01 Apr 2010 18:26:04 +0000 Subject: [issue3778] python uninstaller leave registry entries In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za> Message-ID: <1270146364.42.0.231062643134.issue3778@psf.upfronthosting.co.za> R. David Murray added the comment: I imagine this affects 3.1 and 3.2 as well, but I haven't added them to versions since that hasn't been confirmed. ---------- keywords: +easy nosy: +brian.curtin, loewis, r.david.murray priority: -> low stage: -> needs patch type: -> behavior versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 20:28:50 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 01 Apr 2010 18:28:50 +0000 Subject: [issue8283] series of lamdas in loop sets the paramater on all calls to that of the last call In-Reply-To: <1270146362.25.0.403939205554.issue8283@psf.upfronthosting.co.za> Message-ID: <1270146530.22.0.54991084148.issue8283@psf.upfronthosting.co.za> Benjamin Peterson added the comment: This is a defined behavior of closures. ---------- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 20:28:54 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 01 Apr 2010 18:28:54 +0000 Subject: [issue8282] Windows uninstaller requests admin access for unindentified program In-Reply-To: <1270145243.88.0.407783271533.issue8282@psf.upfronthosting.co.za> Message-ID: <1270146534.08.0.497979731339.issue8282@psf.upfronthosting.co.za> Brian Curtin added the comment: This is a known issue which is fixed in Windows Installer 5.0. See http://blogs.msdn.com/heaths/archive/2009/02/02/changes-to-package-caching-in-windows-installer-5-0.aspx One sentence summary snippet: "But during uninstall, packages would display ?Unidentified Publisher? even if they were signed because their embedded cabinets were stripped" Martin may want to have a look at the blog post to see if we need to make a change (last paragraph in the blog post). ---------- nosy: +brian.curtin, loewis status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 21:24:03 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 01 Apr 2010 19:24:03 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270149843.23.0.250079240193.issue2810@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: Attached is a file that reliably produces the "More data is available" error from _winreg.EnumValue in Python 2.6. The script triggers the error via a race condition, by modifying the value after PyEnumValue() calls RegQueryInfoKey() but before it calls RegEnumValue(). I don't know if that's what caused the original problem for my end-user, but it certainly is one way to trigger the problem. I can work on a patch next week for a proper test case and to fix PyEnumValue(). ---------- Added file: http://bugs.python.org/file16728/more_data_is_available.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 21:26:56 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Thu, 01 Apr 2010 19:26:56 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270150016.78.0.924042954783.issue2810@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: Here's another script that causes a "More data is available" error. This one creates a key with a name that's exactly 256 characters long. (The Windows Registry Editor can't display the key either) I'm testing this on XP. Newer versions of Windows might handle long key names better, or have a different magic length that causes failures. ---------- Added file: http://bugs.python.org/file16729/more_data_is_available2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 21:30:49 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 01 Apr 2010 19:30:49 +0000 Subject: [issue3778] python uninstaller leave registry entries In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za> Message-ID: <1270150249.65.0.0172228699392.issue3778@psf.upfronthosting.co.za> Brian Curtin added the comment: Confirmed on 3.x. ---------- versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 21:39:23 2010 From: report at bugs.python.org (OMFGROFLMAO) Date: Thu, 01 Apr 2010 19:39:23 +0000 Subject: [issue8284] urlparse incorrect parse In-Reply-To: <1270150763.27.0.00719913444678.issue8284@psf.upfronthosting.co.za> Message-ID: <1270150763.27.0.00719913444678.issue8284@psf.upfronthosting.co.za> New submission from OMFGROFLMAO : >>> urlparse.urlparse("example.com/directory/file.ext") ParseResult(scheme='', netloc='', path='example.com/directory/file.ext', params='', query='', fragment='') Where it should be: ParseResult(scheme='', netloc='example.com', path='/directory/file.ext', params='', query='', fragment='') ---------- messages: 102127 nosy: OMFGROFLMAO severity: normal status: open title: urlparse incorrect parse type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 21:45:07 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 01 Apr 2010 19:45:07 +0000 Subject: [issue8284] urlparse incorrect parse In-Reply-To: <1270150763.27.0.00719913444678.issue8284@psf.upfronthosting.co.za> Message-ID: <1270151107.85.0.0216111530544.issue8284@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hello Do you have references to back your claim, like RFCs quotations and links? The bahavior seems correct to me off the top of my head; a URI needs a ?://? delimiter after the scheme to mark there is a netloc part. Regards ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 22:05:45 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 20:05:45 +0000 Subject: [issue7585] difflib should separate filename from timestamp with tab In-Reply-To: <1261947458.0.0.959368598145.issue7585@psf.upfronthosting.co.za> Message-ID: <1270152345.69.0.153570119325.issue7585@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file16730/issue7585.difflib-tab-separator.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 22:10:11 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 01 Apr 2010 20:10:11 +0000 Subject: [issue8269] Missing return values for PyUnicode C/API functions In-Reply-To: <1269991617.43.0.918560470794.issue8269@psf.upfronthosting.co.za> Message-ID: <1270152611.69.0.356321795201.issue8269@psf.upfronthosting.co.za> Georg Brandl added the comment: I'd like to add that a patch would need to modify Doc/data/refcounts.dat, not the .rst files. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 22:12:33 2010 From: report at bugs.python.org (OMFGROFLMAO) Date: Thu, 01 Apr 2010 20:12:33 +0000 Subject: [issue8284] urlparse incorrect parse In-Reply-To: <1270150763.27.0.00719913444678.issue8284@psf.upfronthosting.co.za> Message-ID: <1270152753.42.0.607507265399.issue8284@psf.upfronthosting.co.za> OMFGROFLMAO added the comment: example.com is a netloc not a path. I agree that it needs a scheme followed by ://, otherwise it will be invalid, from the technical point of view, but still, it's a domain. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 22:21:14 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 01 Apr 2010 20:21:14 +0000 Subject: [issue8284] urlparse incorrect parse In-Reply-To: <1270151107.85.0.0216111530544.issue8284@psf.upfronthosting.co.za> Message-ID: <1270153274.57.0.434389972344.issue8284@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 22:21:57 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 01 Apr 2010 20:21:57 +0000 Subject: [issue8284] urlparse incorrect parse In-Reply-To: <1270151107.85.0.0216111530544.issue8284@psf.upfronthosting.co.za> Message-ID: <1270153317.38.0.951496977615.issue8284@psf.upfronthosting.co.za> Benjamin Peterson added the comment: My apologies for accidentally removing msg102127. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 22:22:10 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Thu, 01 Apr 2010 20:22:10 +0000 Subject: [issue8284] urlparse incorrect parse In-Reply-To: <1270151107.85.0.0216111530544.issue8284@psf.upfronthosting.co.za> Message-ID: <1270153330.96.0.626420068293.issue8284@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- nosy: -benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 22:22:22 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 01 Apr 2010 20:22:22 +0000 Subject: [issue7585] difflib should separate filename from timestamp with tab In-Reply-To: <1261947458.0.0.959368598145.issue7585@psf.upfronthosting.co.za> Message-ID: <1270153342.98.0.781580871255.issue7585@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file16731/issue7585.difflib-tab-separator-no-trail.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 22:25:14 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 01 Apr 2010 20:25:14 +0000 Subject: [issue8284] urlparse incorrect parse In-Reply-To: <1270151107.85.0.0216111530544.issue8284@psf.upfronthosting.co.za> Message-ID: <1270153514.05.0.972706034127.issue8284@psf.upfronthosting.co.za> ?ric Araujo added the comment: Yes and no. To you, in some contexts, the characters ?example.org? identify a domain from the domain name system. However, from the URI spec viewpoint, netloc has the precise meaning of ?machine to connect to to accomplish the rest of the URI role?. In other words, the URI spec does not call any sequence of characters that is a valid domain name a netloc. In schemes without a netloc part, the part after the colon is called a path, event if it contains a domain name (e.g. mailto:wok at example.org). In your scheme-less example, the absence of ?://? means that urlparse must assume there is no netloc part. Have you checked that the spec says we should assume an empty scheme (making urlparse right) or refuse to parse and bail? Regards ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 22:34:02 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 01 Apr 2010 20:34:02 +0000 Subject: [issue8284] urlparse incorrect parse In-Reply-To: <1270151107.85.0.0216111530544.issue8284@psf.upfronthosting.co.za> Message-ID: <1270154042.54.0.417983276789.issue8284@psf.upfronthosting.co.za> Georg Brandl added the comment: This will be a release blocker for Python 4.1, but for now I'm closing it. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 22:50:22 2010 From: report at bugs.python.org (Tofystedeth) Date: Thu, 01 Apr 2010 20:50:22 +0000 Subject: [issue8285] IDLE not smart indenting correctly in nested statements Message-ID: <1270155022.9.0.253546918439.issue8285@psf.upfronthosting.co.za> Changes by Tofystedeth : ---------- components: IDLE nosy: Tofystedeth severity: normal status: open title: IDLE not smart indenting correctly in nested statements versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 23:24:40 2010 From: report at bugs.python.org (Tofystedeth) Date: Thu, 01 Apr 2010 21:24:40 +0000 Subject: [issue8285] IDLE not smart indenting correctly in nested statements In-Reply-To: <1270157080.33.0.1290049865.issue8285@psf.upfronthosting.co.za> Message-ID: <1270157080.33.0.1290049865.issue8285@psf.upfronthosting.co.za> New submission from Tofystedeth : huh, somehow I submitted this before I was done, sorry bout that. IDLE (the shell, not the text editor) doubles the indentation when in nested statements. For instance while True: while True: while True: becomes >>> while True: while True: while True: backspacing removes all 8 spaces as well, so once I'm nested that far I have to manually indent. ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 23:34:06 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 01 Apr 2010 21:34:06 +0000 Subject: [issue8265] test_float fails on ARM Linux EABI with soft floating point In-Reply-To: <1269946366.65.0.0501186219601.issue8265@psf.upfronthosting.co.za> Message-ID: <1270157646.29.0.160288531157.issue8265@psf.upfronthosting.co.za> Mark Dickinson added the comment: >From the values in the report, float.fromhex is giving the correct value here, but MIN-3*TINY is somehow coming out incorrectly. Correct values (with Python 2.6, so old float repr; OS X 10.6.2): Python 2.6.5+ (release26-maint:79559:79560, Apr 1 2010, 21:54:0) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> float.fromhex('0x0.ffffffffffffd6p-1022') 2.2250738585071999e-308 >>> MIN = float.fromhex('0x1p-1022') >>> TINY = float.fromhex('0x0.0000000000001p-1022') >>> MIN 2.2250738585072014e-308 >>> TINY 4.9406564584124654e-324 >>> 3*TINY 1.4821969375237396e-323 >>> MIN - 3*TINY 2.2250738585071999e-308 >>> from math import ldexp >>> ldexp(1.0, -1074) 4.9406564584124654e-324 It would be helpful to see the corresponding ARM outputs. I suspect a platform bug either in ldexp or in the multiplication or subtraction above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 1 23:36:53 2010 From: report at bugs.python.org (Matthias Klose) Date: Thu, 01 Apr 2010 21:36:53 +0000 Subject: [issue8032] Add gdb7 hooks to make it easier to debug Python In-Reply-To: <1267400432.35.0.113003499435.issue8032@psf.upfronthosting.co.za> Message-ID: <1270157813.48.0.106603505927.issue8032@psf.upfronthosting.co.za> Changes by Matthias Klose : ---------- nosy: +doko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 00:47:15 2010 From: report at bugs.python.org (dauerbaustelle) Date: Thu, 01 Apr 2010 22:47:15 +0000 Subject: [issue1683368] object.__init__ shouldn't allow args/kwds Message-ID: <1270162035.17.0.91267039659.issue1683368@psf.upfronthosting.co.za> dauerbaustelle added the comment: What exactly is the correct solution with Python 2.6 to avoid this warning? My use case is something like class myunicode(unicode): def __init__(self, *args, **kwargs): unicode.__init__(self, *args, **kwargs) self.someattribute = calculate_attribute_once() Shall I overwrite __new__ rather than __init__? Or what :-) ---------- nosy: +dauerbaustelle _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 00:56:48 2010 From: report at bugs.python.org (Andrew Svetlov) Date: Thu, 01 Apr 2010 22:56:48 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <1260026404.41.0.635406889881.issue7443@psf.upfronthosting.co.za> Message-ID: <1270162608.7.0.0226561926475.issue7443@psf.upfronthosting.co.za> Andrew Svetlov added the comment: Florent, sorry. I have no Windows workstation now, so I cannot follow this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 01:16:12 2010 From: report at bugs.python.org (Terry J. Reedy) Date: Thu, 01 Apr 2010 23:16:12 +0000 Subject: [issue1683368] object.__init__ shouldn't allow args/kwds Message-ID: <1270163772.97.0.509792032879.issue1683368@psf.upfronthosting.co.za> Terry J. Reedy added the comment: @dauerbaustelle I believe your question is a separate issue and that it should have been asked on Python list. However, yes, subclasses of immutables must override __new__. For more, do ask on the list, not here. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 01:34:19 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 01 Apr 2010 23:34:19 +0000 Subject: [issue8278] os.utime doesn't allow a atime (Last Access) which is 27 years in the future. In-Reply-To: <1270107966.42.0.283455861085.issue8278@psf.upfronthosting.co.za> Message-ID: <1270164859.52.0.986522568088.issue8278@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch looks fine to me, please apply. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 01:41:22 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 01 Apr 2010 23:41:22 +0000 Subject: [issue8282] Windows uninstaller requests admin access for unindentified program In-Reply-To: <1270145243.88.0.407783271533.issue8282@psf.upfronthosting.co.za> Message-ID: <1270165282.35.0.732943446732.issue8282@psf.upfronthosting.co.za> Martin v. L?wis added the comment: IIUC, fixing this would require to split the installer into two files: the msi and the cab. This would not be acceptable, so I'm closing this as "won't fix". ---------- resolution: -> wont fix status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 01:44:09 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 01 Apr 2010 23:44:09 +0000 Subject: [issue3778] python uninstaller leave registry entries In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za> Message-ID: <1270165449.0.0.887860129675.issue3778@psf.upfronthosting.co.za> Martin v. L?wis added the comment: FWIW: contributions are welcome. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 06:03:00 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Fri, 02 Apr 2010 04:03:00 +0000 Subject: [issue8286] distutils: path '[...]' cannot end with '/' In-Reply-To: <1270180979.93.0.404335172952.issue8286@psf.upfronthosting.co.za> Message-ID: <1270180979.93.0.404335172952.issue8286@psf.upfronthosting.co.za> New submission from Sridhar Ratnakumar : I noticed this exception in http://pypm-free.activestate.com/2.6/win32-x86/pool/d/dj/django-navbar-0.2.0_win32-x86_2.6_1.pypm.d/log [...] reading manifest file 'django_navbar.egg-info\SOURCES.txt' reading manifest template 'MANIFEST.in' Traceback (most recent call last): File "setup.py", line 25, in zip_safe=False, File "C:\ActivePython32Python26\lib\distutils\core.py", line 152, in setup dist.run_commands() File "C:\ActivePython32Python26\lib\distutils\dist.py", line 975, in run_commands self.run_command(cmd) File "C:\ActivePython32Python26\lib\distutils\dist.py", line 995, in run_command cmd_obj.run() File "C:\ActivePython32Python26\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\install.py", line 53, in run return _install.run(self) File "C:\ActivePython32Python26\lib\distutils\command\install.py", line 577, in run self.run_command('build') File "C:\ActivePython32Python26\lib\distutils\cmd.py", line 333, in run_command self.distribution.run_command(command) File "C:\ActivePython32Python26\lib\distutils\dist.py", line 995, in run_command cmd_obj.run() File "C:\ActivePython32Python26\lib\distutils\command\build.py", line 134, in run self.run_command(cmd_name) File "C:\ActivePython32Python26\lib\distutils\cmd.py", line 333, in run_command self.distribution.run_command(command) File "C:\ActivePython32Python26\lib\distutils\dist.py", line 995, in run_command cmd_obj.run() File "C:\ActivePython32Python26\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\build_py.py", line 78, in run self.build_package_data() File "C:\ActivePython32Python26\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\build_py.py", line 133, in build_package_data for package, src_dir, build_dir, filenames in self.data_files: File "C:\ActivePython32Python26\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\build_py.py", line 90, in __getattr__ self.data_files = files = self._get_data_files(); return files File "C:\ActivePython32Python26\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\build_py.py", line 101, in _get_data_files self.analyze_manifest() File "C:\ActivePython32Python26\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\build_py.py", line 153, in analyze_manifest self.run_command('egg_info') File "C:\ActivePython32Python26\lib\distutils\cmd.py", line 333, in run_command self.distribution.run_command(command) File "C:\ActivePython32Python26\lib\distutils\dist.py", line 995, in run_command cmd_obj.run() File "C:\ActivePython32Python26\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\egg_info.py", line 179, in run self.find_sources() File "C:\ActivePython32Python26\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\egg_info.py", line 254, in find_sources mm.run() File "C:\ActivePython32Python26\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\egg_info.py", line 310, in run self.read_template() File "C:\ActivePython32Python26\lib\site-packages\distribute-0.6.10-py2.6.egg\setuptools\command\sdist.py", line 204, in read_template _sdist.read_template(self) File "C:\ActivePython32Python26\lib\distutils\command\sdist.py", line 336, in read_template self.filelist.process_template_line(line) File "C:\ActivePython32Python26\lib\distutils\filelist.py", line 129, in process_template_line (action, patterns, dir, dir_pattern) = self._parse_template_line(line) File "C:\ActivePython32Python26\lib\distutils\filelist.py", line 104, in _parse_template_line dir = convert_path(words[1]) File "C:\ActivePython32Python26\lib\distutils\util.py", line 191, in convert_path raise ValueError, "path '%s' cannot end with '/'" % pathname ValueError: path 'examples/templates/' cannot end with '/' ---------- assignee: tarek components: Distutils messages: 102142 nosy: srid, tarek severity: normal status: open title: distutils: path '[...]' cannot end with '/' type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 06:03:07 2010 From: report at bugs.python.org (Sridhar Ratnakumar) Date: Fri, 02 Apr 2010 04:03:07 +0000 Subject: [issue8286] distutils: path '[...]' cannot end with '/' In-Reply-To: <1270180979.93.0.404335172952.issue8286@psf.upfronthosting.co.za> Message-ID: <1270180987.87.0.483358886678.issue8286@psf.upfronthosting.co.za> Changes by Sridhar Ratnakumar : ---------- components: +Windows _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 10:31:09 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 02 Apr 2010 08:31:09 +0000 Subject: [issue8245] email examples don't actually work (SMTP.connect is not called) In-Reply-To: <1269714048.68.0.587279851175.issue8245@psf.upfronthosting.co.za> Message-ID: <1270197069.64.0.240557036949.issue8245@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> asmodai nosy: +asmodai _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 10:35:53 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 02 Apr 2010 08:35:53 +0000 Subject: [issue8261] License link for Python 2.6.5 release is broken In-Reply-To: <1269879038.0.0.542921448766.issue8261@psf.upfronthosting.co.za> Message-ID: <1270197353.54.0.135130649342.issue8261@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, should be fixed now. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 10:39:41 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 02 Apr 2010 08:39:41 +0000 Subject: [issue2768] os.fstat and other os.f* methods should use PyObject_AsFileDescriptor In-Reply-To: <1209986866.69.0.462896858511.issue2768@psf.upfronthosting.co.za> Message-ID: <1270197581.22.0.835189984697.issue2768@psf.upfronthosting.co.za> Georg Brandl added the comment: I applied the first part of the patch in r79580. I don't see that the second part is necessary, the other functions don't have such a note. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 10:40:38 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 02 Apr 2010 08:40:38 +0000 Subject: [issue8227] Fix C API documentation: Argument parsing In-Reply-To: <1269475758.09.0.479187943565.issue8227@psf.upfronthosting.co.za> Message-ID: <1270197638.27.0.981475751448.issue8227@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks good to me. ---------- assignee: georg.brandl -> haypo resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 10:41:01 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 02 Apr 2010 08:41:01 +0000 Subject: [issue7696] Improve Memoryview/Buffer documentation In-Reply-To: <1263418431.81.0.407262013758.issue7696@psf.upfronthosting.co.za> Message-ID: <1270197661.71.0.0557582108968.issue7696@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: georg.brandl -> pitrou nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 10:41:36 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 08:41:36 +0000 Subject: [issue8257] Decimal constructor to accept float In-Reply-To: <1269817941.42.0.43725007158.issue8257@psf.upfronthosting.co.za> Message-ID: <1270197696.47.0.585205088311.issue8257@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- priority: -> high _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 10:47:27 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 02 Apr 2010 08:47:27 +0000 Subject: [issue8213] Python 3 ignored PYTHONUNBUFFERED and -u In-Reply-To: <1269357614.92.0.757085981677.issue8213@psf.upfronthosting.co.za> Message-ID: <1270198047.24.0.927636431552.issue8213@psf.upfronthosting.co.za> Georg Brandl added the comment: I've fixed the using/cmdline and manpage to describe the current behavior. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 11:03:58 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 09:03:58 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1270199038.52.0.50813323541.issue2531@psf.upfronthosting.co.za> Mark Dickinson added the comment: Float-to-decimal comparisons have been fixed, and the Decimal hash function changed so that numerically equal Decimal and float instances hash equal, in r79583. The idea of raising an exception for float<->Decimal comparisons was discarded partly for backwards compatibility reasons, and partly because having __eq__ raise an exception causes difficulties for sets and dicts: for example, if equality checks between floats and Decimals raised an exception then '{-1.0, Decimal(-3)}' would give a valid set (the two values have different hashes, so the Decimal.__eq__ method is never invoked), but '{-1.0, Decimal(-2)}' would raise an exception (because the two set elements have equal hashes, so Decimal.__eq__ is invoked in order to determine whether the two elements are equal or not). (General principle: if x and y are hashable, x == y should never raise an exception.) This is still only a partial fix: comparisons between Decimal and Fraction instances still behave oddly. This seems less likely to cause problems in real-life code, though. The changes needed to make Decimal <-> Fraction comparisons correct are too intrusive and not yet well tested enough to make it into 2.7. (See issue 8188). As discussed on python-dev, I'll forward port this to py3k; with any luck, py3k will also grow valid comparisons for Decimal <-> Fraction. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 11:12:37 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 02 Apr 2010 09:12:37 +0000 Subject: [issue8012] Revise generator-related Glossary entries In-Reply-To: <1267028101.75.0.785199066969.issue8012@psf.upfronthosting.co.za> Message-ID: <1270199557.41.0.639235320656.issue8012@psf.upfronthosting.co.za> Georg Brandl added the comment: I think this patch is not correct: a "generator" really is the same as "generator function". Both generators and genexps return an iterator; I've fixed that in r79587. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 11:17:16 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 09:17:16 +0000 Subject: [issue8257] Decimal constructor to accept float In-Reply-To: <1269817941.42.0.43725007158.issue8257@psf.upfronthosting.co.za> Message-ID: <1270199836.48.0.918975039114.issue8257@psf.upfronthosting.co.za> Mark Dickinson added the comment: Raymond, do you want this to go into 2.7 as well? I'm assuming that we're not going to allow mixed-type float+decimal operations in 2.7. Also, if we're doing this, it seems to me that all the reasons you give for the Decimal constructor accepting floats also apply to the Fraction constructor. The patch looks fine to me. The new testcase is specific to IEEE 754 binary64 floating-point format, so I'll slap a 'requires_IEEE_754' decorator on it (copying the definition from test_math.py), if that's okay. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 11:17:34 2010 From: report at bugs.python.org (Florent Xicluna) Date: Fri, 02 Apr 2010 09:17:34 +0000 Subject: [issue7092] Test suite emits many DeprecationWarnings when -3 is enabled In-Reply-To: <1255098633.29.0.866346989212.issue7092@psf.upfronthosting.co.za> Message-ID: <1270199854.39.0.0280948758966.issue7092@psf.upfronthosting.co.za> Florent Xicluna added the comment: Additional fixes: r79576, r79577, r79578 (idlelib package and some test modules) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 11:40:46 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 02 Apr 2010 09:40:46 +0000 Subject: [issue8267] Tutorial section on dictionary keys recommends sort instead of sorted In-Reply-To: <1269976733.25.0.679757604507.issue8267@psf.upfronthosting.co.za> Message-ID: <1270201246.91.0.864078625378.issue8267@psf.upfronthosting.co.za> Georg Brandl added the comment: I'm not sure about this; what is the advantage? If you already have a list, calling .sort() on it is more efficient since it doesn't have to create a new list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 12:18:13 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 10:18:13 +0000 Subject: [issue7279] decimal.py: == and != comparisons involving NaNs In-Reply-To: <1257590632.12.0.893741146745.issue7279@psf.upfronthosting.co.za> Message-ID: <1270203493.89.0.380757907073.issue7279@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks, Stefan. Applied to trunk in r79588. Still needs to be forward ported to py3k. ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 12:37:00 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 10:37:00 +0000 Subject: [issue7279] decimal.py: == and != comparisons involving NaNs In-Reply-To: <1257590632.12.0.893741146745.issue7279@psf.upfronthosting.co.za> Message-ID: <1270204620.35.0.305156378836.issue7279@psf.upfronthosting.co.za> Mark Dickinson added the comment: Allowed hashing of Decimal('nan') in r79589; Decimal('snan') continues to raise TypeError. I've also rewritten Decimal.__hash__ a little bit, so that it won't care if float('inf') raises an exception. This will all be much neater if the unified numeric hash is applied. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 12:49:12 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 02 Apr 2010 10:49:12 +0000 Subject: [issue7585] difflib should separate filename from timestamp with tab In-Reply-To: <1261947458.0.0.959368598145.issue7585@psf.upfronthosting.co.za> Message-ID: <1270205352.79.0.927538247038.issue7585@psf.upfronthosting.co.za> anatoly techtonik added the comment: Refreshed patches - feel free to apply in any order you want. Convenience link for reviews: http://codereview.appspot.com/809043/show ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 12:55:39 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Fri, 02 Apr 2010 10:55:39 +0000 Subject: [issue8278] os.utime doesn't allow a atime (Last Access) which is 27 years in the future. In-Reply-To: <1270107966.42.0.283455861085.issue8278@psf.upfronthosting.co.za> Message-ID: <1270205739.94.0.855121495968.issue8278@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- assignee: -> amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 12:56:20 2010 From: report at bugs.python.org (Florent Xicluna) Date: Fri, 02 Apr 2010 10:56:20 +0000 Subject: [issue8287] python-gdb.py triggers compile errors on FreeBSD and Solaris In-Reply-To: <1270205780.23.0.00384755916779.issue8287@psf.upfronthosting.co.za> Message-ID: <1270205780.23.0.00384755916779.issue8287@psf.upfronthosting.co.za> New submission from Florent Xicluna : The compile step fails on "python-gdb.py" on some buildbots. # #### sparc solaris 10 gcc #### running build_scripts [51847 refs] ./install-sh -c python-gdb.py ./install-sh: python-gdb.py does not exist *** Error code 1 make: Fatal error: Command failed for target `python-gdb.py' # #### x86 FreeBSD #### running build_scripts [53576 refs] /usr/bin/install -c python-gdb.py usage: install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 file2 install [-bCcpSsv] [-B suffix] [-f flags] [-g group] [-m mode] [-o owner] file1 ... fileN directory install -d [-v] [-g group] [-m mode] [-o owner] directory ... *** Error code 64 ---------- components: Build keywords: buildbot messages: 102155 nosy: doko, flox, loewis priority: high severity: normal stage: needs patch status: open title: python-gdb.py triggers compile errors on FreeBSD and Solaris type: compile error versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 13:09:19 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 02 Apr 2010 11:09:19 +0000 Subject: [issue8287] python-gdb.py triggers compile errors on FreeBSD and Solaris In-Reply-To: <1270205780.23.0.00384755916779.issue8287@psf.upfronthosting.co.za> Message-ID: <1270206559.41.0.42480310596.issue8287@psf.upfronthosting.co.za> Martin v. L?wis added the comment: David, can you please take a look? ---------- assignee: -> dmalcolm nosy: +dmalcolm _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 13:18:27 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 02 Apr 2010 11:18:27 +0000 Subject: [issue7585] difflib should separate filename from timestamp with tab In-Reply-To: <1261947458.0.0.959368598145.issue7585@psf.upfronthosting.co.za> Message-ID: <1270207107.57.0.695554556713.issue7585@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file16732/issue7585.difflib-tab-update-docs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 13:20:32 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 11:20:32 +0000 Subject: [issue1023290] Conversion of longs to bytes and vice-versa. Message-ID: <1270207232.03.0.52250021383.issue1023290@psf.upfronthosting.co.za> Mark Dickinson added the comment: The backport wasn't as straightforward as I'd hoped, and we've pretty much run out of time for 2.7. One issue is that long.from_bytes(b, ...) converts b to bytes type using the equivalent of "bytes(b)". This doesn't work well in 2.7 (consider "bytes([255, 0, 0])" for example. So different code is needed in 2.7 when interpreting an arbitrary Python object as a sequence of bytes. Perhaps the 2.7 version could just iterate over the given object, and raise an exception if any of the iterates are not integers in the range [0, 256). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 13:24:08 2010 From: report at bugs.python.org (=?utf-8?q?Kent_Engstr=C3=B6m?=) Date: Fri, 02 Apr 2010 11:24:08 +0000 Subject: [issue8267] Tutorial section on dictionary keys recommends sort instead of sorted In-Reply-To: <1269976733.25.0.679757604507.issue8267@psf.upfronthosting.co.za> Message-ID: <1270207448.21.0.505123820887.issue8267@psf.upfronthosting.co.za> Kent Engstr?m added the comment: Is should have mentioned that we're discussion a section of the tutorial concerned with dictionaries. It is not a section on lists, sequences or sorting as such. My colleague, who asked me for help after getting confused by sort, was trying to loop over the keys in the dictionary in sorted order. In that context, sorted is superior to sort. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 13:29:46 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 11:29:46 +0000 Subject: [issue8259] left shift operator doesn't accepts long as second argument In-Reply-To: <1269865762.04.0.794045726086.issue8259@psf.upfronthosting.co.za> Message-ID: <1270207786.21.0.850489419135.issue8259@psf.upfronthosting.co.za> Mark Dickinson added the comment: The original error, for a 32-bit machine, looks like expected behaviour to me; at worst, it's a doc bug. If the right-hand argument doesn't fit into a Py_ssize_t, then I think it's reasonable to refuse to do the shift. But Antoine's 'outrageous left shift count' comes from the following code, in long_lshift in Objects/longobject.c. if ((long)(int)shiftby != shiftby) { PyErr_SetString(PyExc_ValueError, "outrageous left shift count"); goto lshift_error; } I think this code dates from the days when the number of 'digits' of a PyLong was held in an int rather than a Py_ssize_t, and I think it's a (minor) bug. A 64-bit machine with sufficient RAM shouldn't mind shifting something by >= 2**31 places. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 13:35:26 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 02 Apr 2010 11:35:26 +0000 Subject: [issue7585] difflib should separate filename from timestamp with tab In-Reply-To: <1261947458.0.0.959368598145.issue7585@psf.upfronthosting.co.za> Message-ID: <1270208126.35.0.555029200783.issue7585@psf.upfronthosting.co.za> Changes by anatoly techtonik : Removed file: http://bugs.python.org/file16732/issue7585.difflib-tab-update-docs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 13:41:25 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 02 Apr 2010 11:41:25 +0000 Subject: [issue7585] difflib should separate filename from timestamp with tab In-Reply-To: <1261947458.0.0.959368598145.issue7585@psf.upfronthosting.co.za> Message-ID: <1270208485.53.0.421479338209.issue7585@psf.upfronthosting.co.za> anatoly techtonik added the comment: These patches are incrementally add features. Feel free to apply one that suits most. Codereview provides more convenient way to review differences between these. attaching optional patch that removes recommendation to use ctime format for timestamps ---------- Added file: http://bugs.python.org/file16733/issue7585.difflib-tab-update-docs.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 13:43:18 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 02 Apr 2010 11:43:18 +0000 Subject: [issue7585] difflib should separate filename from timestamp with tab In-Reply-To: <1261947458.0.0.959368598145.issue7585@psf.upfronthosting.co.za> Message-ID: <1270208598.35.0.893318123384.issue7585@psf.upfronthosting.co.za> Changes by anatoly techtonik : Added file: http://bugs.python.org/file16734/issue7585.difflib-tab-updoc-iso8601.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 13:48:36 2010 From: report at bugs.python.org (Larry Hastings) Date: Fri, 02 Apr 2010 11:48:36 +0000 Subject: [issue8235] Support FreeBSD's SO_SETFIB in socketmodule.c In-Reply-To: <1269560401.06.0.703544255222.issue8235@psf.upfronthosting.co.za> Message-ID: <1270208916.67.0.64905920666.issue8235@psf.upfronthosting.co.za> Larry Hastings added the comment: Committed in Python 2.7 as revision r79592 Committed in Python 3.2 as revision r79594 Thanks for the patch! ---------- assignee: -> larry resolution: -> accepted status: open -> closed versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 14:35:41 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 02 Apr 2010 12:35:41 +0000 Subject: [issue7994] object.__format__ should reject format strings In-Reply-To: <1266875939.21.0.792202593026.issue7994@psf.upfronthosting.co.za> Message-ID: <1270211741.2.0.835901508805.issue7994@psf.upfronthosting.co.za> Eric Smith added the comment: Committed in trunk in r79596. I'll leave this open until I port to py3k, check the old tests for this usage, and create the issue to make it a DeprecationWarning. ---------- stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 14:44:49 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 02 Apr 2010 12:44:49 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270212289.32.0.372631149172.issue2810@psf.upfronthosting.co.za> anatoly techtonik added the comment: If this doesn't relate to multibyte strings anymore, but just to long strings then I'd open new bug. If even regedit fails to query then maybe its WinAPI flaw? Maybe it will worth to try ctypes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 14:51:31 2010 From: report at bugs.python.org (Florent Xicluna) Date: Fri, 02 Apr 2010 12:51:31 +0000 Subject: [issue7992] Backport capsule object In-Reply-To: <1266863326.18.0.347467422477.issue7992@psf.upfronthosting.co.za> Message-ID: <1270212691.79.0.327761287195.issue7992@psf.upfronthosting.co.za> Florent Xicluna added the comment: The PendingDeprecationWarning is still spit by the bsddb module. $ ./python -Wd -m test.regrtest test_bsddb test_bsddb ./Lib/importlib/__init__.py:37: PendingDeprecationWarning: The CObject type is marked Pending Deprecation in Python 2.7. Please use capsule objects instead. __import__(name)h 1 test OK. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 15:20:23 2010 From: report at bugs.python.org (Michael Foord) Date: Fri, 02 Apr 2010 13:20:23 +0000 Subject: [issue3778] python uninstaller leave registry entries In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za> Message-ID: <1270214423.49.0.228083839136.issue3778@psf.upfronthosting.co.za> Michael Foord added the comment: Isn't there an issue around having multiple versions of Python installed? The top level folder should only be removed if the version of Python being uninstalled is the last installed Python. This means executing code on uninstall and doesn't seem worth the effort. If I'm correct in this then I would suggest closing as wontfix. ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 15:48:23 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 02 Apr 2010 13:48:23 +0000 Subject: [issue3778] python uninstaller leave registry entries In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za> Message-ID: <1270216103.65.0.561912213051.issue3778@psf.upfronthosting.co.za> anatoly techtonik added the comment: The top level should be removed only when it is empty after Python that is being uninstalled removed its own branch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 15:50:20 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 02 Apr 2010 13:50:20 +0000 Subject: [issue3778] python uninstaller leave registry entries In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za> Message-ID: <1270216220.83.0.0575076838853.issue3778@psf.upfronthosting.co.za> anatoly techtonik added the comment: There should be a "function" to remove key if empty. BTW, what software is used to create (un)installer and where is Python code for it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 15:52:57 2010 From: report at bugs.python.org (Grigory) Date: Fri, 02 Apr 2010 13:52:57 +0000 Subject: [issue8288] zipfile module documentation misprint In-Reply-To: <1270216377.49.0.632972257682.issue8288@psf.upfronthosting.co.za> Message-ID: <1270216377.49.0.632972257682.issue8288@psf.upfronthosting.co.za> New submission from Grigory : Zipfile module documentaion says: """ The file-like object is read-only and provides the following methods: read(), readline(), readlines(), __iter__(), next() """ But ZipExtFile class doesn't provide next(), it provides __next__(). ---------- assignee: georg.brandl components: Documentation messages: 102168 nosy: georg.brandl, matpuk severity: normal status: open title: zipfile module documentation misprint versions: Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 15:54:09 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 02 Apr 2010 13:54:09 +0000 Subject: [issue3778] python uninstaller leave registry entries In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za> Message-ID: <1270216449.62.0.692068650515.issue3778@psf.upfronthosting.co.za> Brian Curtin added the comment: See PC/_msi.c, Lib/msilib, and Tools/msi ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 16:05:10 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 02 Apr 2010 14:05:10 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270217110.57.0.0185989659894.issue2810@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: It was never 100% clear that it ever related to multi-byte strings, so (as the original reporter) I'd prefer to continue using this bug and just update the title to: _winreg.EnumValue sometimes raises WindowsError ("More data is available"). The patch I have planned will fix the problem regardless of the cause, (except for impossible-to-fix causes, such as if there really is an API flaw). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 16:28:30 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Fri, 02 Apr 2010 14:28:30 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270218510.68.0.683801150005.issue2810@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: I just wrote a C program that can read the long key name just fine, so it's not a Windows API bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 17:06:49 2010 From: report at bugs.python.org (Ram Rachum) Date: Fri, 02 Apr 2010 15:06:49 +0000 Subject: [issue8289] multiprocessing.Process.__init__ pickles all arguments In-Reply-To: <1270220809.31.0.384012166997.issue8289@psf.upfronthosting.co.za> Message-ID: <1270220809.31.0.384012166997.issue8289@psf.upfronthosting.co.za> New submission from Ram Rachum : Currently, when you create a Process, all arguments you pass to its __init__ get pickled. I understood this is done because arguments to __init__ almost always become attributes to the Process. Like this: def MyProcess(multiprocessing.Process): def __init__(self, whatever): self.whatever = whatever Of course, attributes must be pickled so they can be accessed from the separate process (on Windows). And indeed in most cases all arguments to __init__ become attributes, so this makes sense. But, in some cases you pass in arguments to __init__ that do not become attributes. In my case, __init__ takes an object, and takes some attributes of this object as attributes to itself. The object is unpicklable, but the attributes are. So I had to make some ugly workaround to make the program run. So I think it would be better if Process would be smart enough to pickle only the arguments that get set as attributes. ---------- components: Library (Lib) messages: 102172 nosy: cool-RR severity: normal status: open title: multiprocessing.Process.__init__ pickles all arguments type: feature request 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 Apr 2 17:07:46 2010 From: report at bugs.python.org (Ram Rachum) Date: Fri, 02 Apr 2010 15:07:46 +0000 Subject: [issue8289] multiprocessing.Process.__init__ pickles all arguments In-Reply-To: <1270220809.31.0.384012166997.issue8289@psf.upfronthosting.co.za> Message-ID: <1270220866.01.0.907652096742.issue8289@psf.upfronthosting.co.za> Ram Rachum added the comment: Sorry, I accidentally typed "def" instead of "class" in my code sample. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 17:34:45 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 02 Apr 2010 15:34:45 +0000 Subject: [issue8287] python-gdb.py triggers compile errors on FreeBSD and Solaris In-Reply-To: <1270205780.23.0.00384755916779.issue8287@psf.upfronthosting.co.za> Message-ID: <1270222485.93.0.642973465461.issue8287@psf.upfronthosting.co.za> Dave Malcolm added the comment: Sorry about this. I believe this is the expansion of these fragments from the Makefile.pre.in (indenting for clarity): gdbhooks: $(BUILDPYTHON)-gdb.py $(BUILDPYTHON)-gdb.py: Tools/gdb/libpython.py $(INSTALL_SCRIPT) $< $(BUILDPYTHON)-gdb.py It looks like the second of these is being invoked in both cases with "$<" as the empty string, rather than "Tools/gdb/libpython.py" (and each with their own expansion of "INSTALL_SCRIPT"). I'm guessing that the "$<" is a GNU Make-ism that isn't available on all implementations of "make". If so, the quick fix is probably to replace "$<" with "Tools/gdb/libpython.py" in Makefile.pre.in I'm attaching a patch which introduces a variable for the path and uses this, rather than "$<". I only have access to Linux machines; I've tested it on one, and it works. I don't have commit rights, so I can't fix this directly myself. $ make -v GNU Make 3.81 >From "info make": `$<' The name of the first prerequisite. If the target got its commands from an implicit rule, this will be the first prerequisite added by the implicit rule (*note Implicit Rules::). (In my defence, "$<" appeared to be used already in the "Some make's put the object file in the current directory" rule). Sorry again from breaking the build on those configurations. ---------- keywords: +patch stage: needs patch -> patch review Added file: http://bugs.python.org/file16735/introduce-var-for-gdb-hooks.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 18:03:51 2010 From: report at bugs.python.org (LOLLA RADHA KRISHNA MURTHY) Date: Fri, 02 Apr 2010 16:03:51 +0000 Subject: [issue8290] I HAVE A PROBLEM WITH PYTHON In-Reply-To: <1270224231.7.0.39248878914.issue8290@psf.upfronthosting.co.za> Message-ID: <1270224231.7.0.39248878914.issue8290@psf.upfronthosting.co.za> New submission from LOLLA RADHA KRISHNA MURTHY : I HAVE TO PERFORM A TASK THAT IS CALENDER.PY in what way it is easier to me please tell ---------- files: day.py messages: 102175 nosy: krishnalolla severity: normal status: open title: I HAVE A PROBLEM WITH PYTHON type: performance Added file: http://bugs.python.org/file16736/day.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 18:07:00 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 02 Apr 2010 16:07:00 +0000 Subject: [issue8290] I HAVE A PROBLEM WITH PYTHON In-Reply-To: <1270224231.7.0.39248878914.issue8290@psf.upfronthosting.co.za> Message-ID: <1270224420.55.0.305503753086.issue8290@psf.upfronthosting.co.za> Ezio Melotti added the comment: HI! This is the wrong place where to ask help, try http://www.python.org/about/help/#got-a-python-problem-or-question ---------- nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 18:19:03 2010 From: report at bugs.python.org (LOLLA RADHA KRISHNA MURTHY) Date: Fri, 02 Apr 2010 16:19:03 +0000 Subject: [issue8291] i have a doubt with using __init__ and .self and classes In-Reply-To: <1270225143.56.0.0738074047322.issue8291@psf.upfronthosting.co.za> Message-ID: <1270225143.56.0.0738074047322.issue8291@psf.upfronthosting.co.za> New submission from LOLLA RADHA KRISHNA MURTHY : i have a doubt with __init__ and .self how it is useful to us? are we have to define a class in another class?if it is by what function ---------- messages: 102177 nosy: krishnalolla, skip.montanaro severity: normal status: open title: i have a doubt with using __init__ and .self and classes type: feature request versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 18:20:16 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 02 Apr 2010 16:20:16 +0000 Subject: [issue8291] i have a doubt with using __init__ and .self and classes In-Reply-To: <1270225143.56.0.0738074047322.issue8291@psf.upfronthosting.co.za> Message-ID: <1270225216.69.0.281410025829.issue8291@psf.upfronthosting.co.za> Ezio Melotti added the comment: Hi! This is the wrong place where to ask help, try http://www.python.org/about/help/#got-a-python-problem-or-question ---------- nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 18:48:38 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 02 Apr 2010 16:48:38 +0000 Subject: [issue8292] Incorrect condition test in platform.py In-Reply-To: <1270226918.36.0.398729222231.issue8292@psf.upfronthosting.co.za> Message-ID: <1270226918.36.0.398729222231.issue8292@psf.upfronthosting.co.za> New submission from A.M. Kuchling : While looking at #4440, I grepped for similar problems and found one in platform.py in the following line: if no_os_uname or not filter(None, (system, node, release, version, machine)) In 3.x, filter() returns an object, not a list, so 'not filter()' will always be false. One fix is to either convert filter's output by adding list() or tuple(). Another fix could be 'not any ((system, node, release, version, machine))', but I don't know if platform.py is trying to stay compatible with versions of Python that lack any(). ---------- assignee: lemburg keywords: easy messages: 102179 nosy: akuchling, lemburg severity: normal status: open title: Incorrect condition test in platform.py versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 19:05:12 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 02 Apr 2010 17:05:12 +0000 Subject: [issue4440] "sort" command doesn't work in pstats if run interactively In-Reply-To: <1227711651.41.0.519645038553.issue4440@psf.upfronthosting.co.za> Message-ID: <1270227912.94.0.617711409993.issue4440@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Thanks for your bug report and patch! The original 2.x version was pretty ugly code with a lambda that used default arguments, so I rewrote the line to be more modern; it now does ' all((x in abbrevs) for x in line.split())'. Committed my version to trunk to r79603, and to 3.x trunk in r79604. (A lot of pstats.py is pretty old-looking and could be tied up.) ---------- assignee: -> akuchling nosy: +akuchling resolution: -> fixed status: open -> closed Added file: http://bugs.python.org/file16737/pstats-simplify.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 19:06:41 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 02 Apr 2010 17:06:41 +0000 Subject: [issue8257] Decimal constructor to accept float In-Reply-To: <1269817941.42.0.43725007158.issue8257@psf.upfronthosting.co.za> Message-ID: <1270228001.64.0.611081629886.issue8257@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Added the requires decorator as requested. Committed in r79602. Will backport to 2.7 this weekend. And yes, I agree that Fraction(somedecimal) should work too. It would be weird to have Fraction("1.1") work but not Fraction(Decimal("1.1")). Mark, I do think we should have decimal+float-->float in 2.7 also. I don't see any reason to have the two versions diverge on this issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 19:08:44 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 17:08:44 +0000 Subject: [issue8257] Decimal constructor to accept float In-Reply-To: <1269817941.42.0.43725007158.issue8257@psf.upfronthosting.co.za> Message-ID: <1270228124.66.0.5664829269.issue8257@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Mark, I do think we should have decimal+float-->float in 2.7 also. That's fine with me in principle. But isn't 2.7 in feature freeze from tomorrow? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 19:11:11 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 17:11:11 +0000 Subject: [issue8257] Decimal constructor to accept float In-Reply-To: <1269817941.42.0.43725007158.issue8257@psf.upfronthosting.co.za> Message-ID: <1270228271.5.0.757722505078.issue8257@psf.upfronthosting.co.za> Mark Dickinson added the comment: > And yes, I agree that Fraction(somedecimal) should work too. What about Fraction(1.1)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 19:26:32 2010 From: report at bugs.python.org (Michael Foord) Date: Fri, 02 Apr 2010 17:26:32 +0000 Subject: [issue1220212] os.kill on windows Message-ID: <1270229192.54.0.23112197594.issue1220212@psf.upfronthosting.co.za> Michael Foord added the comment: After discussion with Brian it seems like it should be possible for os.kill(...) on Windows to support both pids *and* process handles. This seems ideal. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 19:54:35 2010 From: report at bugs.python.org (A.M. Kuchling) Date: Fri, 02 Apr 2010 17:54:35 +0000 Subject: [issue6647] warnings.catch_warnings is not thread-safe In-Reply-To: <1249447980.99.0.321429613778.issue6647@psf.upfronthosting.co.za> Message-ID: <1270230875.87.0.646960273567.issue6647@psf.upfronthosting.co.za> A.M. Kuchling added the comment: Added a warning to 2.x trunk in r79607, and Gabriel's doc change in r79608. This thread-unsafety seems specialized and rarely of great importance, so I used the note:: directive, not warning::. ---------- nosy: +akuchling resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 20:58:29 2010 From: report at bugs.python.org (David Andrzejewski) Date: Fri, 02 Apr 2010 18:58:29 +0000 Subject: [issue8293] HTTPSConnection.close() does not immediately close the connection. In-Reply-To: <1270234708.91.0.197021276581.issue8293@psf.upfronthosting.co.za> Message-ID: <1270234708.91.0.197021276581.issue8293@psf.upfronthosting.co.za> New submission from David Andrzejewski : Python 2.6.4, Windows XP. If you run the following code: import httplib http_connection = httplib.HTTPConnection("192.168.192.196") http_connection.request("GET", "/") http_connection.sock.settimeout(20) response = http_connection.getresponse() data = response.read() http_connection.close() And then run a netstat -a, you'll see that the connection is no longer established (it'll have a status of TIME_WAIT or something along those lines). However, if you run the following code: import httplib http_connection = httplib.HTTPSConnection("192.168.192.196") http_connection.request("GET", "/") http_connection.sock.settimeout(20) response = http_connection.getresponse() data = response.read() http_connection.close() And run a netstat, the connection will still be in the ESTABLISHED state. The connection does not end for several minutes (or when you terminate the program). I can get the connection to end when I want it by doing a del on the connection object and then manually running garbage collection - although that seems a bit wonky. I'm not really sure what all the differences are between HTTPConnection and HTTPSConnection, but it seems like they should both behave the same way in this regard. ---------- components: Library (Lib) messages: 102186 nosy: dandrzejewski severity: normal status: open title: HTTPSConnection.close() does not immediately close the connection. type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 21:01:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 02 Apr 2010 19:01:11 +0000 Subject: [issue8293] HTTPSConnection.close() does not immediately close the connection. In-Reply-To: <1270234708.91.0.197021276581.issue8293@psf.upfronthosting.co.za> Message-ID: <1270234871.09.0.172577291876.issue8293@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +orsenthil priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 21:16:39 2010 From: report at bugs.python.org (John Posner) Date: Fri, 02 Apr 2010 19:16:39 +0000 Subject: [issue8012] Revise generator-related Glossary entries In-Reply-To: <1267028101.75.0.785199066969.issue8012@psf.upfronthosting.co.za> Message-ID: <1270235799.09.0.539614084701.issue8012@psf.upfronthosting.co.za> John Posner added the comment: Georg, your change (r79587) makes this the main definition: generator A function which returns an iterator. I'm concerned that this definition does not fit well with the occurrence of "generator object" in the following: Python 2.6.5 (r265:79096, Mar 19 2010, 21:48:26) [MSC v.1500 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information. >>> obj1 = (x for x in [1,2]) >>> def gfunc(): ... count = 0 ... while True: ... count += 1 ... yield count ... >>> obj2 = gfunc() >>> obj1 at 0x00CC6378> >>> obj2 >>> My patch attempted to make "generator" be the same as "generator object" in the above. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 21:22:29 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 19:22:29 +0000 Subject: [issue8265] test_float fails on ARM Linux EABI with soft floating point In-Reply-To: <1269946366.65.0.0501186219601.issue8265@psf.upfronthosting.co.za> Message-ID: <1270236149.35.0.600002620902.issue8265@psf.upfronthosting.co.za> Mark Dickinson added the comment: I made a couple of experimental checkins to the release26-maint branch (I didn't want to do a temporary checkin to the trunk with a release imminent): see r79560 (which didn't work :) and its fix in r79601. Results: MIN = 2.2250738585072014e-308 TINY = 4.9406564584124654e-324 3*TINY = 1.4821969375237396e-323 MIN - 3*TINY = 2.2250738585071984e-308 ldexp(1.0, -1074) = 4.9406564584124654e-324 The values for MIN, TINY and 3*TINY are correct; the value for MIN - 3*TINY (which should be an exact operation) is not: it's giving something equal to MIN - 6*TINY instead. This should be easily reproducible at the C level, since the Python subtraction is just a thin wrapper around the corresponding C operation. So it looks as though the float emulation is buggy on this platform, and this bug should be reported upstream. Matthias, can you take care of this? For Python, I'm not sure what the appropriate action is, but I'd rather not skip the test, or otherwise completely silence the error. Maybe some sort of "expected failure due to platform floating-point bug" output? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 21:36:20 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 02 Apr 2010 19:36:20 +0000 Subject: [issue8012] Revise generator-related Glossary entries In-Reply-To: <1267028101.75.0.785199066969.issue8012@psf.upfronthosting.co.za> Message-ID: <1270236980.65.0.10453480402.issue8012@psf.upfronthosting.co.za> Georg Brandl added the comment: Well, the object returned is "just" an iterator (which happens to be implemented by a generator-iterator). I wouldn't be so concerned about the repr() of the it. If you look at the generator PEP, number 255, it says: """Note that when the intent is clear from context, the unqualified name "generator" may be used to refer either to a generator-function or a generator-iterator.""" My experience is that most people use "generator" to mean the actual function. The returned object is mostly called iterator. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 21:54:58 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 19:54:58 +0000 Subject: [issue8032] Add gdb7 hooks to make it easier to debug Python In-Reply-To: <1267400432.35.0.113003499435.issue8032@psf.upfronthosting.co.za> Message-ID: <1270238098.0.0.100822858192.issue8032@psf.upfronthosting.co.za> Mark Dickinson added the comment: A nitpick: on OS X, the gdb script ends up being called: python.exe-gdb.py Is this intentional? If it is, then I'll add this filename to the svn:ignore property. (And also to make distclean, I guess. Is python-gdb.py currently deleted by a 'make distclean'?) ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 22:13:15 2010 From: report at bugs.python.org (Georg Brandl) Date: Fri, 02 Apr 2010 20:13:15 +0000 Subject: [issue8288] zipfile module documentation misprint In-Reply-To: <1270216377.49.0.632972257682.issue8288@psf.upfronthosting.co.za> Message-ID: <1270239195.45.0.471737315574.issue8288@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r79615 (only applies to py3k.) ---------- resolution: -> fixed status: open -> closed versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 22:15:00 2010 From: report at bugs.python.org (Larry Hastings) Date: Fri, 02 Apr 2010 20:15:00 +0000 Subject: [issue7992] Backport capsule object In-Reply-To: <1266863326.18.0.347467422477.issue7992@psf.upfronthosting.co.za> Message-ID: <1270239300.07.0.212424028655.issue7992@psf.upfronthosting.co.za> Larry Hastings added the comment: Yes. I was told it was inappropriate for me to change the bsddb module, as it's independently maintained by Jesus Cea. I sent Mr. Cea a patch last night; I hope he chooses to merge it soon. Since CObjects are marked Pending Deprecation, and bsddb is using a CObject, this is correct behavior. Were you mentioning it simply to bring it my attention, or am I missing something important? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 22:15:46 2010 From: report at bugs.python.org (Dave Malcolm) Date: Fri, 02 Apr 2010 20:15:46 +0000 Subject: [issue8032] Add gdb7 hooks to make it easier to debug Python In-Reply-To: <1267400432.35.0.113003499435.issue8032@psf.upfronthosting.co.za> Message-ID: <1270239346.13.0.696602793435.issue8032@psf.upfronthosting.co.za> Dave Malcolm added the comment: > A nitpick: on OS X, the gdb script ends up being called: > > python.exe-gdb.py > > Is this intentional? If it is, then I'll add this filename to the > svn:ignore property. (And also to make distclean, I guess. Is python- > gdb.py currently deleted by a 'make distclean'?) That was unexpected, but re-reading Makefile.pre.in I see where it's coming from. Please do add it to svn:ignore. Looks like I forgot to add the removal of the file to the "distclean" target. Sorry about that. Presumably adding: -rm -f python*-gdb.py should do the trick (as I understand it, if the glob fails to match, it will happily fail to "rm" the non-existant file named "python*-gdb.py"). Another nit I spotted: the buildbot is "unexpectedly" skipping test_gdb on Win32 (with "gdb not found in path"). Looking at _expectations in Lib/test/regrtest.py it strikes me that test_gdb is likely to be skipped on every configuration other than on "linux2") - should I wire that in with a decorator within test_gdb.py? To my knowledge, OS X doesn't ship with gdb 7 - though presumably someone could build their own copy, linking with the system Python, and if so, the python.exe-gdb.py file would then be of use in debugging the freshly-built ./python.exe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 22:19:23 2010 From: report at bugs.python.org (Larry Hastings) Date: Fri, 02 Apr 2010 20:19:23 +0000 Subject: [issue7992] Backport capsule object In-Reply-To: <1266863326.18.0.347467422477.issue7992@psf.upfronthosting.co.za> Message-ID: <1270239563.71.0.30247778619.issue7992@psf.upfronthosting.co.za> Larry Hastings added the comment: Oh, and, last night I checked in r79590. This is the checkin that ameliorates the backwards compatibility issues. Specifically, I changed four things: * PyCObject_AsVoidPtr() can now open capsules. This addresses most of the remaining backwards-compatibility concerns about the conversion of Python 2.7 from CObjects to capsules. * CObjects were marked Pending Deprecation. * Documentation about this pending deprecation was added to cobject.h. * The capsule source files were added to the legacy PC build processes. (Someone had already added them to the current PC build process, a day or two after I committed the previous checkin.) Sorry for forgetting to update the issue last night, but I was in a bit of a hurry to get this done before Benjamin cut 2.7b1. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 22:24:58 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 20:24:58 +0000 Subject: [issue8032] Add gdb7 hooks to make it easier to debug Python In-Reply-To: <1267400432.35.0.113003499435.issue8032@psf.upfronthosting.co.za> Message-ID: <1270239898.62.0.627936680716.issue8032@psf.upfronthosting.co.za> Mark Dickinson added the comment: Added python.exe-gdb.py to svn:ignore in r79616. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 22:25:29 2010 From: report at bugs.python.org (Florent Xicluna) Date: Fri, 02 Apr 2010 20:25:29 +0000 Subject: [issue7992] Backport capsule object In-Reply-To: <1266863326.18.0.347467422477.issue7992@psf.upfronthosting.co.za> Message-ID: <1270239929.17.0.6912913736.issue7992@psf.upfronthosting.co.za> Florent Xicluna added the comment: Ok, I put J?sus in the nosy list. It makes the test___all__ fail on trunk because it checks the warnings raised during import. AFAIU, the patch is something like: -#if (PY_VERSION_HEX < 0x03020000) +#if (PY_VERSION_HEX < 0x02070000) ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 22:34:54 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 20:34:54 +0000 Subject: [issue8032] Add gdb7 hooks to make it easier to debug Python In-Reply-To: <1267400432.35.0.113003499435.issue8032@psf.upfronthosting.co.za> Message-ID: <1270240494.54.0.615551206077.issue8032@psf.upfronthosting.co.za> Mark Dickinson added the comment: > To my knowledge, OS X doesn't ship with gdb 7 That sounds right. On my OS X 10.6.3 machine, the system gdb is: Mark-Dickinsons-MacBook-Pro:py3k dickinsm$ gdb --version GNU gdb 6.3.50-20050815 (Apple version gdb-1346) (Fri Sep 18 20:40:51 UTC 2009) I have the impression that few people have got gdb 7 working on OS X yet, but I might be wrong. Certainly macports doesn't seem to offer it yet. I expect that'll change, though. [About make distclean] > Presumably adding: > -rm -f python*-gdb.py > should do the trick Yes, that seems to work. Thanks! Added in r79617. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 22:42:43 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 20:42:43 +0000 Subject: [issue8294] Allow Fraction constructor to accept float and decimal instances directly. In-Reply-To: <1270240962.97.0.707473120534.issue8294@psf.upfronthosting.co.za> Message-ID: <1270240962.97.0.707473120534.issue8294@psf.upfronthosting.co.za> New submission from Mark Dickinson : Here's a patch that allows direct construction of a Fraction instance from a float or Decimal instance, performing an exact conversion in either case. >>> from fractions import Fraction >>> from decimal import Decimal >>> Fraction(1.1) Fraction(2476979795053773, 2251799813685248) >>> Fraction(Decimal('1.1')) Fraction(11, 10) >>> Fraction(Decimal(1.1)) Fraction(2476979795053773, 2251799813685248) ---------- assignee: rhettinger components: Library (Lib) files: fraction_from_float.patch keywords: patch messages: 102198 nosy: mark.dickinson, rhettinger severity: normal status: open title: Allow Fraction constructor to accept float and decimal instances directly. type: feature request versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file16738/fraction_from_float.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 22:43:33 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 20:43:33 +0000 Subject: [issue8294] Allow Fraction constructor to accept float and decimal instances directly. In-Reply-To: <1270240962.97.0.707473120534.issue8294@psf.upfronthosting.co.za> Message-ID: <1270241013.6.0.945937520228.issue8294@psf.upfronthosting.co.za> Mark Dickinson added the comment: (The patch is against trunk, btw.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 22:48:44 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 02 Apr 2010 20:48:44 +0000 Subject: [issue1220212] os.kill on windows Message-ID: <1270241324.26.0.764962429778.issue1220212@psf.upfronthosting.co.za> Changes by Brian Curtin : Removed file: http://bugs.python.org/file16704/issue1220212.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 23:01:27 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 02 Apr 2010 21:01:27 +0000 Subject: [issue1220212] os.kill on windows Message-ID: <1270242087.9.0.210083557097.issue1220212@psf.upfronthosting.co.za> Brian Curtin added the comment: Michael, do you have an example of something which returns a handle? This current patch doesn't work with handles, but it wouldn't be hard to add it. I could make it work with the _handle object of a Popen object, but you could just as easily call os.kill on the pid of the Popen object. I don't know of any Python-wide handle object...I know subprocess has it's own, and don't really know what other functions are returning handles. Anyways, this patch includes an additional test script which uses ctypes to setup a console control handler, and CTRL_BREAK_EVENT is tested successfully. However, CTRL_C_EVENT is not. See http://msdn.microsoft.com/en-us/library/ms686016%28v=VS.85%29.aspx for details, but I'm not able to get the subprocess to work with CTRL+C. Calling SetConsoleCtrlHandler(NULL, FALSE) either in the script, test_os, or in _subprocess.c does not change anything, although it seems that it should. The CTRL_C_EVENT test is currently skipped in the patch until I can figure that out. ---------- nosy: +dino.viehland Added file: http://bugs.python.org/file16739/issue1220212.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 23:04:19 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 02 Apr 2010 21:04:19 +0000 Subject: [issue8294] Allow Fraction constructor to accept float and decimal instances directly. In-Reply-To: <1270240962.97.0.707473120534.issue8294@psf.upfronthosting.co.za> Message-ID: <1270242259.5.0.65285241535.issue8294@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The patch looks like what I expected. In the docstring, it would be nice if we kept the line with the spec for decimal strings: [-+]?[0-9]+((/|.)[0-9]+)? ---------- assignee: rhettinger -> mark.dickinson resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 23:05:33 2010 From: report at bugs.python.org (Michael Foord) Date: Fri, 02 Apr 2010 21:05:33 +0000 Subject: [issue1220212] os.kill on windows Message-ID: <1270242333.61.0.447469814582.issue1220212@psf.upfronthosting.co.za> Michael Foord added the comment: According to earlier discussion in this issue os.spawn() return process handles on Windows. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 23:06:17 2010 From: report at bugs.python.org (Larry Hastings) Date: Fri, 02 Apr 2010 21:06:17 +0000 Subject: [issue7992] Backport capsule object In-Reply-To: <1266863326.18.0.347467422477.issue7992@psf.upfronthosting.co.za> Message-ID: <1270242377.79.0.346700559997.issue7992@psf.upfronthosting.co.za> Larry Hastings added the comment: The patch is a bit more involved than that. Capsules didn't exist in 3.0, and the bsddb module published a CObject in 3.1. So bsddb must continue to use CObject for those two releases. Therefore the patch to the line you were addressing looks like this: -#if (PY_VERSION_HEX < 0x03020000) +#if (PY_VERSION_HEX < ((PY_MAJOR_VERSION < 3) ? 0x02070000 : 0x03020000)) However, Jesus's use of capsules has a bug. The capsule API requires that the string passed in to PyCapsule_New() must "outlive" the capsule; he's passing in a stack buffer. So my patch also fixes that. Finally my bsddb patch adds the appropriate text to the header file where it describes how to import the _bsddb C API object (CObject vs capsule). FWIW, I want to close this issue soon. How about I close it after 2.7b1 has been out for a week or so--assuming there aren't any new concerns regarding the capsule backport. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 23:07:08 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 21:07:08 +0000 Subject: [issue8294] Allow Fraction constructor to accept float and decimal instances directly. In-Reply-To: <1270240962.97.0.707473120534.issue8294@psf.upfronthosting.co.za> Message-ID: <1270242428.63.0.959783893861.issue8294@psf.upfronthosting.co.za> Mark Dickinson added the comment: Unfortunately, that line is wrong (or at least incomplete), since decimals in exponential form are also accepted: >>> Fraction('2.3e4') Fraction(23000, 1) I could try to reinstate a fixed version. Attaching a second version of the patch: same as the first, except for some doc tweaks. (Rewording, markup fixes.) ---------- Added file: http://bugs.python.org/file16740/fraction_from_float2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 23:13:07 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Fri, 02 Apr 2010 21:13:07 +0000 Subject: [issue8294] Allow Fraction constructor to accept float and decimal instances directly. In-Reply-To: <1270240962.97.0.707473120534.issue8294@psf.upfronthosting.co.za> Message-ID: <1270242787.04.0.336237240247.issue8294@psf.upfronthosting.co.za> Raymond Hettinger added the comment: Being wrong is a good reason to eliminate that line from the docstring :-) So, I'm happy with the patch as-is. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 23:19:55 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 02 Apr 2010 21:19:55 +0000 Subject: [issue7347] Add {Create|Delete}KeyEx to _winreg, doc and test updates In-Reply-To: <1258566495.76.0.636986979508.issue7347@psf.upfronthosting.co.za> Message-ID: <1270243195.51.0.00483103702536.issue7347@psf.upfronthosting.co.za> Brian Curtin added the comment: Committed to trunk in r79620. I'll do the forward port after 2.7b1. ---------- stage: patch review -> committed/rejected _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 2 23:25:59 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 02 Apr 2010 21:25:59 +0000 Subject: [issue8293] HTTPSConnection.close() does not immediately close the connection. In-Reply-To: <1270234708.91.0.197021276581.issue8293@psf.upfronthosting.co.za> Message-ID: <1270243559.28.0.00664398317547.issue8293@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 00:15:21 2010 From: report at bugs.python.org (John Posner) Date: Fri, 02 Apr 2010 22:15:21 +0000 Subject: [issue8012] Revise generator-related Glossary entries In-Reply-To: <1267028101.75.0.785199066969.issue8012@psf.upfronthosting.co.za> Message-ID: <1270246521.92.0.568406285789.issue8012@psf.upfronthosting.co.za> John Posner added the comment: Fair enough, Georg. Case closed. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 00:22:39 2010 From: report at bugs.python.org (John Ehresman) Date: Fri, 02 Apr 2010 22:22:39 +0000 Subject: [issue2799] Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() In-Reply-To: <1210329112.66.0.505096173761.issue2799@psf.upfronthosting.co.za> Message-ID: <1270246959.84.0.895382129789.issue2799@psf.upfronthosting.co.za> John Ehresman added the comment: I'm trying to port an existing C extension to py3k and find myself wanting something like PyUnicode_AsString so I don't need to introduce other objects to do memory management. PyUnicode_AsString is equivalent to PyArg_Parse w/ a 's' format code, which I find hard to believe will be removed. Another bug proposes changing the name and passing in a default value, which may be a good idea. ---------- nosy: +jpe _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 00:27:18 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 02 Apr 2010 22:27:18 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270247238.98.0.791005996157.issue8271@psf.upfronthosting.co.za> Ezio Melotti added the comment: Here's a new patch. Should be complete but I want to test it some more before committing. I decided to follow RFC 3629, putting 0 instead of 5/6 for bytes in range F5-FD (we can always put them back in the unlikely case that the Unicode Consortium changed its mind) and also for other invalid ranges (e.g. C0-C1). This lead to some simplification in the code. I also found out that, according to RFC 3629, surrogates are considered invalid and they can't be encoded/decoded, but the UTF-8 codec actually does it. I included tests and fix but I left them commented out because this is out of the scope of this patch, and it probably need a discussion on python-dev. ---------- stage: test needed -> patch review versions: +Python 2.6 Added file: http://bugs.python.org/file16741/issue8271v2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 00:28:11 2010 From: report at bugs.python.org (Mark Dickinson) Date: Fri, 02 Apr 2010 22:28:11 +0000 Subject: [issue8294] Allow Fraction constructor to accept float and decimal instances directly. In-Reply-To: <1270240962.97.0.707473120534.issue8294@psf.upfronthosting.co.za> Message-ID: <1270247291.98.0.00357157961797.issue8294@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks, Raymond. Committed to trunk in r79629. Will forward port to py3k. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 00:56:18 2010 From: report at bugs.python.org (Michael Foord) Date: Fri, 02 Apr 2010 22:56:18 +0000 Subject: [issue8038] Provide unittest.TestCase.assertNotRegexpMatches In-Reply-To: <1267538266.49.0.841042020206.issue8038@psf.upfronthosting.co.za> Message-ID: <1270248978.93.0.00882405489308.issue8038@psf.upfronthosting.co.za> Michael Foord added the comment: Committed revision 79632. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 01:26:00 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 02 Apr 2010 23:26:00 +0000 Subject: [issue8295] add unpack_archive to shutil In-Reply-To: <1270250760.18.0.650473997279.issue8295@psf.upfronthosting.co.za> Message-ID: <1270250760.18.0.650473997279.issue8295@psf.upfronthosting.co.za> New submission from Tarek Ziad? : unpack_archive is the reverse operation of make_archive and works the same way: it has a registery of function for each archive format. ---------- assignee: tarek components: Library (Lib) messages: 102212 nosy: tarek priority: normal severity: normal status: open title: add unpack_archive to shutil type: feature request versions: Python 2.7, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 01:27:49 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 02 Apr 2010 23:27:49 +0000 Subject: [issue1220212] os.kill on windows Message-ID: <1270250869.39.0.587854795789.issue1220212@psf.upfronthosting.co.za> Brian Curtin added the comment: Committed to trunk in r79633 after talking with Michael about it. I'll forward port it after the 2.7 beta goes out. ---------- assignee: -> brian.curtin stage: -> committed/rejected type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 02:58:39 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 03 Apr 2010 00:58:39 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1270256319.77.0.488400365643.issue1222585@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Added file: http://bugs.python.org/file16742/distutils2-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 03:16:32 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 03 Apr 2010 01:16:32 +0000 Subject: [issue8038] Provide unittest.TestCase.assertNotRegexpMatches In-Reply-To: <1267538266.49.0.841042020206.issue8038@psf.upfronthosting.co.za> Message-ID: <1270257392.56.0.469438223919.issue8038@psf.upfronthosting.co.za> Michael Foord added the comment: Further commit revision 79643. Needs tests and documentation. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 03:16:50 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 03 Apr 2010 01:16:50 +0000 Subject: [issue8038] Provide unittest.TestCase.assertNotRegexpMatches In-Reply-To: <1267538266.49.0.841042020206.issue8038@psf.upfronthosting.co.za> Message-ID: <1270257410.49.0.771323094443.issue8038@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 03:17:27 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 03 Apr 2010 01:17:27 +0000 Subject: [issue7780] unittest: allow an 'import_path' as an alternative to 'top_level_dir' in test discover In-Reply-To: <1264458689.45.0.447107444877.issue7780@psf.upfronthosting.co.za> Message-ID: <1270257447.53.0.959896862683.issue7780@psf.upfronthosting.co.za> Michael Foord added the comment: Committed revision 79643. Needs test and documentation. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 03:58:37 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 Apr 2010 01:58:37 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1270259917.58.0.786714351961.issue1222585@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think python-LDCXXSHARED.patch is fine. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 04:37:45 2010 From: report at bugs.python.org (Clovis Fabricio) Date: Sat, 03 Apr 2010 02:37:45 +0000 Subject: [issue5712] tkinter - askopenfilenames returns string instead of tuple in windows 2.6.1 release In-Reply-To: <1239039911.64.0.172824576559.issue5712@psf.upfronthosting.co.za> Message-ID: <1270262265.64.0.825275058996.issue5712@psf.upfronthosting.co.za> Changes by Clovis Fabricio : ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 05:17:52 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 03 Apr 2010 03:17:52 +0000 Subject: [issue7337] Add lossy queue to queue library module In-Reply-To: <1258454440.69.0.147012340761.issue7337@psf.upfronthosting.co.za> Message-ID: <1270264672.28.0.060087914434.issue7337@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think it would be better to put this in the ASPN recipes cookbook to let it mature and gather a following. Right now, it is not at all clear that this is the right thing to do. ---------- resolution: -> rejected status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 05:20:19 2010 From: report at bugs.python.org (Grigory) Date: Sat, 03 Apr 2010 03:20:19 +0000 Subject: [issue8288] zipfile module documentation misprint In-Reply-To: <1270216377.49.0.632972257682.issue8288@psf.upfronthosting.co.za> Message-ID: <1270264819.37.0.242953410456.issue8288@psf.upfronthosting.co.za> Grigory added the comment: What about 2.7? I see the issue there too. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 05:20:48 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 03 Apr 2010 03:20:48 +0000 Subject: [issue6133] LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_CONST In-Reply-To: <1243466391.88.0.68447044966.issue6133@psf.upfronthosting.co.za> Message-ID: <1270264848.93.0.166116562741.issue6133@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- priority: -> low versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 05:24:18 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 03 Apr 2010 03:24:18 +0000 Subject: [issue7764] Doc for itertools recipe consume is complicated and less efficient In-Reply-To: <1264254781.04.0.3391109102.issue7764@psf.upfronthosting.co.za> Message-ID: <1270265058.48.0.616245522379.issue7764@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 05:37:15 2010 From: report at bugs.python.org (Andrey Vlasovskikh) Date: Sat, 03 Apr 2010 03:37:15 +0000 Subject: [issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt In-Reply-To: <1270265835.83.0.251816264221.issue8296@psf.upfronthosting.co.za> Message-ID: <1270265835.83.0.251816264221.issue8296@psf.upfronthosting.co.za> New submission from Andrey Vlasovskikh : multiprocessing.Pool methods map, imap, etc. are said to be able to normally handle exceptions. But it seems that it is true only for synchronous exceptions inside their first func arguments. When (typically during a long-running parallel map) a user hits ^C, an asynchronous KeyboardInterrupt isn't handled properly and leads to the interpreter hangup. More precisely, children processes become (on Linux), so the only way to terminate the whole program is to issue the KILL signal. As stopping a program with ^C while running potentially long parallel computations is probably quite a common scenario, the interpreter should not hang up in such a case. I'm using Python 2.6.5 (r265:79063, Mar 23 2010, 04:44:21) [GCC 4.4.3] on linux2. I've also tried to use the current multiprocessing.pool module from the current (2.7) trunk with my 2.6.5 installation, but the bug persists. ---------- components: Library (Lib) messages: 102219 nosy: vlasovskikh severity: normal status: open title: multiprocessing.Pool hangs when issuing KeyboardInterrupt type: crash versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 05:39:15 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 03 Apr 2010 03:39:15 +0000 Subject: [issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt In-Reply-To: <1270265835.83.0.251816264221.issue8296@psf.upfronthosting.co.za> Message-ID: <1270265955.05.0.321760636846.issue8296@psf.upfronthosting.co.za> Brian Curtin added the comment: Do you have a test case which can reproduce the issue? ---------- nosy: +brian.curtin stage: -> test needed type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 05:45:54 2010 From: report at bugs.python.org (Andrey Vlasovskikh) Date: Sat, 03 Apr 2010 03:45:54 +0000 Subject: [issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt In-Reply-To: <1270265835.83.0.251816264221.issue8296@psf.upfronthosting.co.za> Message-ID: <1270266354.76.0.869187089894.issue8296@psf.upfronthosting.co.za> Andrey Vlasovskikh added the comment: Yes, here is my test case. ---------- Added file: http://bugs.python.org/file16743/test_pool_keyboardinterrupt.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 05:54:03 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 03 Apr 2010 03:54:03 +0000 Subject: [issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt In-Reply-To: <1270265835.83.0.251816264221.issue8296@psf.upfronthosting.co.za> Message-ID: <1270266843.08.0.171052701164.issue8296@psf.upfronthosting.co.za> Brian Curtin added the comment: You might want to take a look here: http://jessenoller.com/2009/01/08/multiprocessingpool-and-keyboardinterrupt/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 06:07:49 2010 From: report at bugs.python.org (Andrey Vlasovskikh) Date: Sat, 03 Apr 2010 04:07:49 +0000 Subject: [issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt In-Reply-To: <1270265835.83.0.251816264221.issue8296@psf.upfronthosting.co.za> Message-ID: <1270267669.64.0.789039141805.issue8296@psf.upfronthosting.co.za> Andrey Vlasovskikh added the comment: Yes, I've come up with the same solution by myself, but it cannot cover all the cases of the bug. It works only for cases when ^C is hit during a call to the users' function: http://stackoverflow.com/questions/1408356/keyboard-interrupts-with-pythons-multiprocessing-pool/2561809#2561809 If the user is "lucky", he may hit ^C during getting or putting data into the queues in multiprocessing.pool.worker. To reproduce such a case, you may insert `sleep(10)` before `task = get()` or `put((job, i, result))`, for example. I've encountered such cases just by running test examples several times. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 07:30:08 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 03 Apr 2010 05:30:08 +0000 Subject: [issue8297] AttributeError message text should include module name In-Reply-To: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> Message-ID: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> New submission from Chris Jerdonek : It would be nice if the error message for an AttributeError could include the module name when getting from a module -- just like it does for getting from a class. This would make the message more helpful. For example, it would help in diagnosing issues like the ones mentioned in this report: http://bugs.python.org/issue7559 EXAMPLE (using latest from trunk Python 2.7a4+): import sys class TestClass(object): pass m = sys c = TestClass print "CLASS: %s" % c try: c.asdf except AttributeError, err: print err print "\nMODULE: %s" % m try: m.adsf except AttributeError, err: print err *** OUTPUT: CLASS: type object 'TestClass' has no attribute 'asdf' MODULE: 'module' object has no attribute 'adsf' *** The latter message could instead be (paralleling the text in the case of a class)-- module object 'sys' has no attribute 'adsf' ---------- components: Library (Lib) messages: 102224 nosy: cjerdonek severity: normal status: open title: AttributeError message text should include module name type: feature request versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 07:51:50 2010 From: report at bugs.python.org (LOLLA RADHA KRISHNA MURTHY) Date: Sat, 03 Apr 2010 05:51:50 +0000 Subject: [issue8298] in what way we have to save tha module? In-Reply-To: <1270273910.06.0.788971475779.issue8298@psf.upfronthosting.co.za> Message-ID: <1270273910.06.0.788971475779.issue8298@psf.upfronthosting.co.za> New submission from LOLLA RADHA KRISHNA MURTHY : what is the process to save the module in python? ---------- messages: 102225 nosy: krishnalolla severity: normal status: open title: in what way we have to save tha module? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 07:54:45 2010 From: report at bugs.python.org (LOLLA RADHA KRISHNA MURTHY) Date: Sat, 03 Apr 2010 05:54:45 +0000 Subject: [issue8298] in what way we have to save tha module? In-Reply-To: <1270273910.06.0.788971475779.issue8298@psf.upfronthosting.co.za> Message-ID: <1270274085.27.0.390374221671.issue8298@psf.upfronthosting.co.za> Changes by LOLLA RADHA KRISHNA MURTHY : ---------- type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 08:15:42 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 03 Apr 2010 06:15:42 +0000 Subject: [issue8288] zipfile module documentation misprint In-Reply-To: <1270216377.49.0.632972257682.issue8288@psf.upfronthosting.co.za> Message-ID: <1270275342.3.0.654847702536.issue8288@psf.upfronthosting.co.za> Georg Brandl added the comment: In 2.x, the method is really called next(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 08:22:02 2010 From: report at bugs.python.org (Eric Smith) Date: Sat, 03 Apr 2010 06:22:02 +0000 Subject: [issue8298] in what way we have to save tha module? In-Reply-To: <1270273910.06.0.788971475779.issue8298@psf.upfronthosting.co.za> Message-ID: <1270275722.14.0.869268924456.issue8298@psf.upfronthosting.co.za> Eric Smith added the comment: Hi. Please don't use the bug tracker to ask Python questions. You've already been asked twice to refer to http://www.python.org/about/help/#got-a-python-problem-or-question . Please read and follow those instructions. Your questions have not been about bugs in Python, so this is not the correct place to ask them. ---------- nosy: +eric.smith resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 09:07:38 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 03 Apr 2010 07:07:38 +0000 Subject: [issue1086642] Compile of _socket fails on IRIX with 2.4 Message-ID: <1270278458.37.0.330152937094.issue1086642@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: pending -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 09:08:39 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 03 Apr 2010 07:08:39 +0000 Subject: [issue1542308] Nested finally in generators don't follow PEP 342 Message-ID: <1270278519.46.0.989232052818.issue1542308@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 09:22:00 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 03 Apr 2010 07:22:00 +0000 Subject: [issue1518617] PEP101/102 out of date Message-ID: <1270279320.16.0.564112725085.issue1518617@psf.upfronthosting.co.za> Georg Brandl added the comment: PEP 101 is up to date. I don't know about 102, it should probably be withdrawn, as 101 has all the info. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 09:25:34 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 03 Apr 2010 07:25:34 +0000 Subject: [issue1944] Documentation for PyUnicode_AsString (et al.) missing. In-Reply-To: <1201415203.65.0.272410099804.issue1944@psf.upfronthosting.co.za> Message-ID: <1270279534.12.0.190657905518.issue1944@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- assignee: -> georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 10:34:16 2010 From: report at bugs.python.org (Ray.Allen) Date: Sat, 03 Apr 2010 08:34:16 +0000 Subject: [issue8297] AttributeError message text should include module name In-Reply-To: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> Message-ID: <1270283656.21.0.6139548327.issue8297@psf.upfronthosting.co.za> Ray.Allen added the comment: Yes, I agree with this feature request. And also the super(Class, obj) call should return a reasonable AttributeError message when the requested attribute is not found in one of Class's base classes, not just 'super' object has no attribute 'xxx'. ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 10:44:02 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 03 Apr 2010 08:44:02 +0000 Subject: [issue8227] Fix C API documentation: Argument parsing In-Reply-To: <1269475758.09.0.479187943565.issue8227@psf.upfronthosting.co.za> Message-ID: <1270284242.61.0.847322997376.issue8227@psf.upfronthosting.co.za> STINNER Victor added the comment: Commited: r79654 (trunk), r79655 (2.7), blocked in py3k and 3.1 (see #8215 and #2322) ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 10:47:29 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sat, 03 Apr 2010 08:47:29 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1270284449.37.0.382435726268.issue1222585@psf.upfronthosting.co.za> Tarek Ziad? added the comment: LDCXXSHARED added in r79652 and r79657. Now we can work on distutils2 side ---------- priority: high -> normal versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 11:17:20 2010 From: report at bugs.python.org (Ray.Allen) Date: Sat, 03 Apr 2010 09:17:20 +0000 Subject: [issue8297] AttributeError message text should include module name In-Reply-To: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> Message-ID: <1270286240.56.0.529198549222.issue8297@psf.upfronthosting.co.za> Ray.Allen added the comment: In fact, there are only three types of tp_getattro functions: 1.For type objects, it is type_getattro(), in case of AttributeError, this function give the message format: type object %(type)s has no attribute %(attr)s 2.For super objects, it is super_getattro(), in case of no attribute found in one of its base class, it calls the 3'th getattr function below. 3.For the base type 'object' and other new style class, it is PyObject_GenericGetAttr(), and in case of AttributeError, this function give the message format: %(type)s object has no attribute %(attr)s So, there are only tow formats of AttributeError's exception messages: 1.type object %(type)s has no attribute %(attr)s 2.%(type)s object has no attribute %(attr)s The first one is for type objects, the second one is for all the instances objects. In most cases, these tow formats it is enough for program to display, bu t it is not well enough. Take the module objects for example, in case of AttributeError, we will always hope to know exactly which module has no attribute, not only the message: 'module object has attribute xxx'. Also for the super() call, take super(A, b).xxx() for example, if the attribute is not found in the class next to the A in b's type's mro list, PyObject_GenericGetAttr() will be called with the two arguments, the super object its self and 'xxx'. But there are only few valid attributes of a super object, like '__thisclass__', '__self__', '__self_class__'. In most cases, we don't need these attributes of a super object, what we need is the attribute of one of b's type's base types. So I think once the AttributeError is raised in PyObject_GenericGetAttr() call in the end of super_getattro(), the exception message should tell us in which base class python can not found the attribte 'xxx', but not the super object itself, although the exception is raised in the PyObject_GenericGetAttr(, 'xxx'). For the solution, I think the type_getattro and super_getattro can just return NULL to indicate the attribute is not found, but for a wrapper function of this tow which is the tp_getattro for each type to raise the attribute error, with the reasonable exception message. For example, mudule type can tell which module has no attribute, super type can tell which base class has no attribute, and so on. What about others' opinion? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 12:20:11 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Sat, 03 Apr 2010 10:20:11 +0000 Subject: [issue1501108] Add write buffering to gzip Message-ID: <1270290011.66.0.13851394045.issue1501108@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: In the test script, simply changing def emit(f, data=snips): for datum in data: f.write(datum) to def gemit(f, data=snips): datas = ''.join(data) f.write(datas) improves direct gzip performance from [1.1799781322479248, 0.50524115562438965, 0.2713780403137207] [1.183434009552002, 0.50997591018676758, 0.26801109313964844] [1.173914909362793, 0.51325297355651855, 0.26233196258544922] to [0.43065404891967773, 0.50007486343383789, 0.26698708534240723] [0.43662095069885254, 0.49983596801757812, 0.2686460018157959] [0.43778109550476074, 0.50057196617126465, 0.2687230110168457] which means that you're better off letting the application handle buffering issues. Furthermore, the problem with gzip-level buffering is the choice of the default buffer size. Time to close ? ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 12:27:25 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sat, 03 Apr 2010 10:27:25 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> New submission from Kristj?n Valur J?nsson : This patch does several things: 1) Creates a separate lock type PyThread_type_gil and locking functions for that. This allows tweaking of the GIL without affecting regular lock behaviour. 2) Creates a uniform implementation of the GIL on windows/pthreads using macros, with emulated condition variables on windows (Lifted Antoine's code from py3k, adding own improvements to the slightly problematic windows implementation). This makes the GIL behave the same on windows and pthreads platforms, if we so choose, and allows cross-platform development. 3) provide three GIL implementations: a) legacy gil, which is the same as the one used on pthreads b) a roundrobin gil, which fixes the multicore problem on pthreads and exhibits the same behaviour as the legacy GIL on windows did (no jumping the gil queue) c) a priority based gil, with n given priority levels, and optionally, the ability to request immediate GIL drop by the ceval.c loop. See thread_gil.h for details of the three modes. In my experiments using David Beazley's scripts from http://www.dabeaz.com/blog/dablog.html, implementation "b" fixed the performance problems encountered on multicore machines. This is, I believe, the original impetus for Antoine Pitrou's work on the new GIL. Implementation "c" improved data transfer still, by allowing faster wakeup of completed IO. Please note that I was not able to test this patch on a pthreads machine, I can only hope that it compiles :) ---------- components: Interpreter Core files: gil.patch keywords: patch, patch messages: 102234 nosy: beazley, krisvale, pitrou severity: normal status: open title: Improve GIL in 2.7 type: performance versions: Python 2.7 Added file: http://bugs.python.org/file16744/gil.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 12:58:11 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 03 Apr 2010 10:58:11 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270292291.36.0.319450835835.issue8299@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think this is too late for 2.7. 2.7b1 will be released RSN, and we should not implement such a change after the first beta release. ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 13:01:37 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 03 Apr 2010 11:01:37 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1270292497.81.0.953286213736.issue7559@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I think in both cases the error text should state not just what module was being imported but also what module was being imported from FYI, I filed the following report partly in response to some of the comments I made above: http://bugs.python.org/issue8297 (regarding the AttributeError not displaying the name of the module from which the caller is trying to get the attribute) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 13:26:00 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 03 Apr 2010 11:26:00 +0000 Subject: [issue8279] python-gdb PyListTests fail In-Reply-To: <1270108061.33.0.213932386799.issue8279@psf.upfronthosting.co.za> Message-ID: <1270293960.54.0.389760339065.issue8279@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I still get failures, after applying file16727. I'm attaching the complete regrtest output. ---------- versions: +Python 2.7 Added file: http://bugs.python.org/file16745/failures _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 13:40:57 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 11:40:57 +0000 Subject: [issue8294] Allow Fraction constructor to accept float and decimal instances directly. In-Reply-To: <1270240962.97.0.707473120534.issue8294@psf.upfronthosting.co.za> Message-ID: <1270294857.76.0.950529578289.issue8294@psf.upfronthosting.co.za> Mark Dickinson added the comment: Merged to py3k in r79670. ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 13:41:36 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 03 Apr 2010 11:41:36 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270247238.98.0.791005996157.issue8271@psf.upfronthosting.co.za> Message-ID: <4BB7296C.3050601@egenix.com> Marc-Andre Lemburg added the comment: Ezio Melotti wrote: > > Ezio Melotti added the comment: > > Here's a new patch. Should be complete but I want to test it some more before committing. > I decided to follow RFC 3629, putting 0 instead of 5/6 for bytes in range F5-FD (we can always put them back in the unlikely case that the Unicode Consortium changed its mind) and also for other invalid ranges (e.g. C0-C1). This lead to some simplification in the code. Ok. > I also found out that, according to RFC 3629, surrogates are considered invalid and they can't be encoded/decoded, but the UTF-8 codec actually does it. I included tests and fix but I left them commented out because this is out of the scope of this patch, and it probably need a discussion on python-dev. Right, but that idea is controversial. In Python we need to be able to put those surrogate code points into source code (encoded as UTF-8) as well as pickle and marshal dumps of Unicode object dumps, so we can't consider them invalid UTF-8. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 13:43:25 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 11:43:25 +0000 Subject: [issue7279] decimal.py: == and != comparisons involving NaNs In-Reply-To: <1257590632.12.0.893741146745.issue7279@psf.upfronthosting.co.za> Message-ID: <1270295005.05.0.674243407563.issue7279@psf.upfronthosting.co.za> Mark Dickinson added the comment: r79588 and r79589 were merged to py3k in r79668. ---------- resolution: invalid -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 13:44:18 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 11:44:18 +0000 Subject: [issue1023290] Conversion of longs to bytes and vice-versa. Message-ID: <1270295058.03.0.0717600283821.issue1023290@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing this; it's too late for Python 2.7. ---------- status: open -> closed versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 13:45:04 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 11:45:04 +0000 Subject: [issue2531] float compared to decimal is silently incorrect. In-Reply-To: <1207087897.38.0.261389881483.issue2531@psf.upfronthosting.co.za> Message-ID: <1270295104.19.0.421673306256.issue2531@psf.upfronthosting.co.za> Mark Dickinson added the comment: Merged to py3k in r79668. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 13:47:22 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 03 Apr 2010 11:47:22 +0000 Subject: [issue2799] Remove _PyUnicode_AsString(), rework _PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() In-Reply-To: <1210329112.66.0.505096173761.issue2799@psf.upfronthosting.co.za> Message-ID: <1270295242.11.0.568743526457.issue2799@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Updating the ticket title to what we actually have in SVN (I had renamed the APIs to mark them as private to the interpreter some time ago). ---------- title: Remove PyUnicode_AsString(), rework PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() -> Remove _PyUnicode_AsString(), rework _PyUnicode_AsStringAndSize(), add PyUnicode_AsChar() _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 13:47:31 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 11:47:31 +0000 Subject: [issue1530559] struct.pack raises TypeError where it used to convert Message-ID: <1270295251.71.0.85447009601.issue1530559@psf.upfronthosting.co.za> Mark Dickinson added the comment: Closing this; a separate feature request should be opened for the idea of adding __index__ awareness to struct.pack in py3k. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 13:51:47 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 11:51:47 +0000 Subject: [issue8300] Allow struct.pack to handle objects with an __index__ method. In-Reply-To: <1270295507.67.0.95768179333.issue8300@psf.upfronthosting.co.za> Message-ID: <1270295507.67.0.95768179333.issue8300@psf.upfronthosting.co.za> New submission from Mark Dickinson : In Python 2.7, struct.pack with an integer format can handle non-integers that provide an __int__ method (although this *does* raise a DeprecationWarning). Python 2.7a4+ (trunk:79659:79661, Apr 3 2010, 11:28:19) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from struct import pack [35194 refs] >>> pack('L', 3.1415) '\x03\x00\x00\x00\x00\x00\x00\x00' [35210 refs] This behaviour isn't particularly desirable for floats or Decimal instances, but it's useful for integer-like objects. In Python 3.x, there's no provision for handling integer-like objects than aren't actually integers. I propose that in 3.x, struct.pack should try to convert any non-integer to an integer by using its __index__ method, before packing. ---------- assignee: mark.dickinson messages: 102245 nosy: mark.dickinson severity: normal status: open title: Allow struct.pack to handle objects with an __index__ method. versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 13:52:08 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 11:52:08 +0000 Subject: [issue8300] Allow struct.pack to handle objects with an __index__ method. In-Reply-To: <1270295507.67.0.95768179333.issue8300@psf.upfronthosting.co.za> Message-ID: <1270295528.46.0.892130266703.issue8300@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- components: +Extension Modules stage: -> test needed type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 13:52:53 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 11:52:53 +0000 Subject: [issue1530559] struct.pack raises TypeError where it used to convert Message-ID: <1270295573.43.0.483365536579.issue1530559@psf.upfronthosting.co.za> Mark Dickinson added the comment: I've opened issue 8300 for adding the __index__ handling. ---------- superseder: -> Allow struct.pack to handle objects with an __index__ method. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 14:11:38 2010 From: report at bugs.python.org (Michel Samia) Date: Sat, 03 Apr 2010 12:11:38 +0000 Subject: [issue4147] xml.dom.minidom toprettyxml: omit whitespace for text-only elements In-Reply-To: <1224430404.43.0.0672391440841.issue4147@psf.upfronthosting.co.za> Message-ID: <1270296698.34.0.423152862736.issue4147@psf.upfronthosting.co.za> Michel Samia added the comment: Could you please apply that patch? People are starting to use non-standard libraries to process xml files because of this issue for example this man is using lxml or pyxml: http://ronrothman.com/public/leftbraned/xml-dom-minidom-toprettyxml-and-silly-whitespace/ Is there any problem with that patch? ---------- nosy: +m-samia _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 14:32:23 2010 From: report at bugs.python.org (David Beazley) Date: Sat, 03 Apr 2010 12:32:23 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270297943.94.0.379303733439.issue8299@psf.upfronthosting.co.za> David Beazley added the comment: Without looking at this patch, I think it would wise to proceed with caution on incorporating any kind of GIL patch into 2.X. If there is anything to be taken away from my own working studying the GIL, it's that the problem is far more tricky than it looks and that any kind of fix has the potential to adversely affect something that you might not expect. That said, I would only suggest that any kind of "new gil" incorporated in 2.X be disabled by default and enabled with special configuration options for those who want to try it out. ---------- nosy: +dabeaz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 14:33:37 2010 From: report at bugs.python.org (Lukas Lueg) Date: Sat, 03 Apr 2010 12:33:37 +0000 Subject: [issue1501108] Add write buffering to gzip Message-ID: <1270298017.91.0.9685661804.issue1501108@psf.upfronthosting.co.za> Lukas Lueg added the comment: agreed ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 14:33:44 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sat, 03 Apr 2010 12:33:44 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270298024.78.0.637170322151.issue8299@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Martin: Well, this patch was originally conceived more as a demonstration of the GIL problem and an alternative fix proposal. However, it is possible to configure it so that there is no change from existing functionality, simply by not including thread_gil.h in thread_pthread.h and thread_nt.h. The only change would then be the presence of the new PyThread_type_gil and associating locking functions which delegate directly to the old PyThread_type_lock functions. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 14:36:15 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sat, 03 Apr 2010 12:36:15 +0000 Subject: [issue8292] Incorrect condition test in platform.py In-Reply-To: <1270226918.36.0.398729222231.issue8292@psf.upfronthosting.co.za> Message-ID: <4BB7363A.9040703@egenix.com> Marc-Andre Lemburg added the comment: A.M. Kuchling wrote: > > New submission from A.M. Kuchling : > > While looking at #4440, I grepped for similar problems and found one in > platform.py in the following line: > > if no_os_uname or not filter(None, (system, node, release, version, machine)) > > In 3.x, filter() returns an object, not a list, so 'not filter()' will always be false. > > One fix is to either convert filter's output by adding list() or tuple(). Another fix could be 'not any ((system, node, release, version, machine))', but I don't know if platform.py is trying to stay compatible with versions of Python that lack any(). I'm trying to keep platform.py compatible with all Python versions since 2.3, so using the list() wrapper appears to be the better solution. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 14:37:35 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sat, 03 Apr 2010 12:37:35 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270298255.15.0.238983675567.issue8299@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Antoine: Please take a look, the change is really simple, particularly the ROUNDROBIN_GIL variant which fixes the originally observed problem. the GIL is still a lock, implemented using a mutex and a semaphore. It is modified to work exactly as the lock always has done on windows (which is why the original problem isn't present on that platform). The simplicity of the change stems from the fact that the gil is still just a mutex-type object, which is aqcuired and released just as it has always been. The change is in the internal rules of the mutex, making sure that threads queue up properly and (optionally) that they are released in a priority based order. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 14:45:19 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Apr 2010 12:45:19 +0000 Subject: [issue1501108] Add write buffering to gzip Message-ID: <1270298719.05.0.0821442317424.issue1501108@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Additionally, since issue7471 was fixed, you should be able to wrap a GzipFile in a Buffered{Reader,Writer} object for faster buffering. ---------- resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 14:45:38 2010 From: report at bugs.python.org (David Beazley) Date: Sat, 03 Apr 2010 12:45:38 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270298738.45.0.522970291506.issue8299@psf.upfronthosting.co.za> David Beazley added the comment: I'm not sure where you're getting your information, but the original GIL problem *DEFINITELY* exists on multicore Windows machines. I've had numerous participants try it in training classes and workshops they've all observed severely degraded performance for CPU-bound threads on Windows (XP, Vista, and Windows 7). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 14:55:03 2010 From: report at bugs.python.org (David Beazley) Date: Sat, 03 Apr 2010 12:55:03 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270299303.6.0.270259323048.issue8299@psf.upfronthosting.co.za> David Beazley added the comment: Just ran the CPU-bound GIL test on my wife's dual core Windows Vista machine. The code runs twice as slow using two threads as it does using no threads (original observed behavior in my GIL talk). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 15:04:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Apr 2010 13:04:47 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270298255.15.0.238983675567.issue8299@psf.upfronthosting.co.za> Message-ID: <1270299999.3761.11.camel@localhost> Antoine Pitrou added the comment: Kristjan, I agree with Martin, it's probably too late to make such changes for 2.7. Additionally, your "round-robin" scheme only seems round-robin when there are two threads competing. Otherwise, you could have three threads A, B and C, and the GIL bouncing between A and B. I would advocate opening a separate issue to improve the Windows condition variable code under 3.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 15:24:15 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 13:24:15 +0000 Subject: [issue8300] Allow struct.pack to handle objects with an __index__ method. In-Reply-To: <1270295507.67.0.95768179333.issue8300@psf.upfronthosting.co.za> Message-ID: <1270301055.08.0.729640352711.issue8300@psf.upfronthosting.co.za> Mark Dickinson added the comment: Here's a patch for trunk. It combines the docs and tests from Meador Inge's patch in issue 1530559 with a C-level change to get_pylong in Modules/struct.c. ---------- keywords: +patch versions: +Python 2.7 Added file: http://bugs.python.org/file16746/struct_index_trunk.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 15:25:10 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 13:25:10 +0000 Subject: [issue8300] Allow struct.pack to handle objects with an __index__ method. In-Reply-To: <1270295507.67.0.95768179333.issue8300@psf.upfronthosting.co.za> Message-ID: <1270301110.51.0.79326504187.issue8300@psf.upfronthosting.co.za> Mark Dickinson added the comment: Adding Meador Inge to nosy. ---------- nosy: +minge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 15:32:04 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 03 Apr 2010 13:32:04 +0000 Subject: [issue8301] Putting a function in a unittest.TestSuite doesn't work In-Reply-To: <1270301524.85.0.299541369901.issue8301@psf.upfronthosting.co.za> Message-ID: <1270301524.85.0.299541369901.issue8301@psf.upfronthosting.co.za> New submission from Michael Foord : Putting functions (rather than TestCase instances) directly in TestSuites was never officially supported but it used to work: >>> from unittest import TestSuite, TestResult >>> def f(): pass ... >>> s = TestSuite() >>> s.addTest(f) >>> s.run(TestResult()) Traceback (most recent call last): File "", line 1, in File "/compile/python-trunk/Lib/unittest/suite.py", line 85, in run self._wrapped_run(result) File "/compile/python-trunk/Lib/unittest/suite.py", line 100, in _wrapped_run self._handleClassSetUp(test, result) File "/compile/python-trunk/Lib/unittest/suite.py", line 122, in _handleClassSetUp currentClass._classSetupFailed = False TypeError: can't set attributes of built-in/extension type 'function' ---------- assignee: michael.foord components: Library (Lib) messages: 102259 nosy: michael.foord severity: normal stage: needs patch status: open title: Putting a function in a unittest.TestSuite doesn't work type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 15:34:12 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 03 Apr 2010 13:34:12 +0000 Subject: [issue8302] SkipTest exception in setUpClass or setUpModule is marked as an error rather than a skip In-Reply-To: <1270301652.92.0.301047962487.issue8302@psf.upfronthosting.co.za> Message-ID: <1270301652.92.0.301047962487.issue8302@psf.upfronthosting.co.za> New submission from Michael Foord : SkipTest exception in setUpClass or setUpModule is marked as an error rather than a skip. ---------- assignee: michael.foord messages: 102260 nosy: michael.foord severity: normal stage: needs patch status: open title: SkipTest exception in setUpClass or setUpModule is marked as an error rather than a skip type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 15:39:16 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Sat, 03 Apr 2010 13:39:16 +0000 Subject: [issue1441530] socket read() can cause MemoryError in Windows Message-ID: <1270301956.96.0.536341826844.issue1441530@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: $ cat /tmp/test.py import socket SIZE = 1000000000L s = socket.socket(socket.AF_INET, socket.SOCK_DGRAM) try: s.recv(SIZE) finally: s.close() $ python /tmp/test.py Traceback (most recent call last): File "/tmp/test.py", line 8, in s.recv(SIZE) MemoryError $ strace python /tmp/test.py [...] socket(PF_INET, SOCK_DGRAM, IPPROTO_IP) = 3 mmap2(NULL, 1000001536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory) brk(0x4440c000) = 0x8a56000 mmap2(NULL, 1000132608, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory) mmap2(NULL, 2097152, PROT_NONE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_NORESERVE, -1, 0) = 0xb79b1000 munmap(0xb79b1000, 323584) = 0 munmap(0xb7b00000, 724992) = 0 mprotect(0xb7a00000, 135168, PROT_READ|PROT_WRITE) = 0 mmap2(NULL, 1000001536, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = -1 ENOMEM (Cannot allocate memory) [...] imaplib is simply requesting too much at a time: the memory error is probably raised in Modules/socketmodule.c:sock_recv /* Allocate a new string. */ buf = PyString_FromStringAndSize((char *) 0, recvlen); if (buf == NULL) return NULL; Requesting a 10M read is indeed quite questionable, and will fail no matter what system is used (the limit will depend on the heap usage and OS, though). The fix should be made at imaplib level, rather than requiring users to redefine IMAP4 read method. A patch is attached (imaplib_read.diff). ---------- keywords: +patch nosy: +neologix Added file: http://bugs.python.org/file16747/imaplib_read.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 15:51:46 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Sat, 03 Apr 2010 13:51:46 +0000 Subject: [issue1222585] C++ compilation support for distutils Message-ID: <1270302706.21.0.525509303104.issue1222585@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : Removed file: http://bugs.python.org/file16519/python-distutils-C++.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 15:57:09 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 13:57:09 +0000 Subject: [issue8300] Allow struct.pack to handle objects with an __index__ method. In-Reply-To: <1270295507.67.0.95768179333.issue8300@psf.upfronthosting.co.za> Message-ID: <1270303029.02.0.885523101722.issue8300@psf.upfronthosting.co.za> Mark Dickinson added the comment: That patch was a bit hasty in many respects; here's a better one. For 2.7, the scheme is as follows: when packing a non-integer with an integer format: (1) First __index__ is tried (2) If the __index__ method doesn't exist, or the call to __index__ raises TypeError, then the __int__ method is tried. (3) If the __index__ method raises something other than TypeError, or returns a non-integer, then struct.pack fails. ---------- Added file: http://bugs.python.org/file16748/struct_index_trunk2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 15:58:52 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 13:58:52 +0000 Subject: [issue8300] Allow struct.pack to handle objects with an __index__ method. In-Reply-To: <1270295507.67.0.95768179333.issue8300@psf.upfronthosting.co.za> Message-ID: <1270303132.3.0.455270483579.issue8300@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- priority: -> normal stage: test needed -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 16:06:28 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 14:06:28 +0000 Subject: [issue8300] Allow struct.pack to handle objects with an __index__ method. In-Reply-To: <1270295507.67.0.95768179333.issue8300@psf.upfronthosting.co.za> Message-ID: <1270303588.58.0.956378385843.issue8300@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed this patch to trunk in r79674. Will forward port to py3k. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 16:22:03 2010 From: report at bugs.python.org (Andy Buckley) Date: Sat, 03 Apr 2010 14:22:03 +0000 Subject: [issue4256] optparse: provide a simple way to get a programmatically useful list of options In-Reply-To: <1225729854.98.0.852900527881.issue4256@psf.upfronthosting.co.za> Message-ID: <1270304523.43.0.288930201363.issue4256@psf.upfronthosting.co.za> Andy Buckley added the comment: That sort of idea, yes: just a wild thought, but it would be really nice if this was available so that in combination with a standard bash/zsh function, getting basic automatic command completion for scripts built with optparse (and any other implementer of such a scheme) was as simple as adding complete -F _optparse -o default mycmdname to the completion script library. The simple scheme you laid out seems fine to me, but in the best bikeshedding tradition it would be useful to distinguish between options which take an argument and those which don't, pre-empt the need for a format version, and make the parsing even easier by removing cosmetic whitespace, commas etc.: gruszczy at gruszczy-laptop:~/Programs/logbuilder$ ./logbuilder --help-options #OPTPARSE_FORMAT 0 --version -h --help -r= --regexp= -c= --contains= -s= --start= -e= --end= -f= --file= -t= --template= -p= --purge= Maybe this is just a pipe-dream, but the need to hand-write basic completion scripts seems so unnecessary, just for lack of any (even de-facto) standardisation. As optparse already enforces/encourages many good habits and conventions, some system like this would further help the integration with shell completion. Or maybe the existing --help output is good enough for a rather more fiddly standard bash completion parsing function. I've tried writing one of these, but it would hard for it be generally robust since the descriptive strings can contain any structure that they feel like, and could hence mess up the pattern-matching. I'm very happy if someone can out-sed me and make that work! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 16:43:22 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 03 Apr 2010 14:43:22 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270305802.77.0.0073241346145.issue8271@psf.upfronthosting.co.za> STINNER Victor added the comment: > I also found out that, according to RFC 3629, surrogates > are considered invalid and they can't be encoded/decoded, > but the UTF-8 codec actually does it. Python2 does, but Python3 raises an error. Python 2.7a4+ (trunk:79675, Apr 3 2010, 16:11:36) >>> u"\uDC80".encode("utf8") '\xed\xb2\x80' Python 3.2a0 (py3k:79441, Mar 26 2010, 13:04:55) >>> "\uDC80".encode("utf8") UnicodeEncodeError: 'utf-8' codec can't encode character '\udc80' in position 0: surrogates not allowed Deny encoding surrogates (in utf8) causes a lot of crashs in Python3, because most functions calling suppose that _PyUnicode_AsString() does never fail: see #6687 (and #8195 and a lot of other crashs). It's not a good idea to change it in Python 2.7, because it would require a huge work and we are close to the first beta of 2.7. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 16:53:26 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 03 Apr 2010 14:53:26 +0000 Subject: [issue8215] getargs.c in Python3 contains some TODO and the documentation is outdated In-Reply-To: <1269383341.97.0.71915040037.issue8215@psf.upfronthosting.co.za> Message-ID: <1270306406.84.0.219067507561.issue8215@psf.upfronthosting.co.za> STINNER Victor added the comment: The PEP 3118 describes some points about discontigious buffers, but there is no module nor third party libraries supporting them. PIL 1.1.7 (the last version) doesn't support the buffer API (an image can not be "exported" as a buffer, but PIL accepts a buffer as input in some functions). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 16:54:13 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 03 Apr 2010 14:54:13 +0000 Subject: [issue8303] python -m unittest -h and python -m unittest discover -h message slightly incorrect In-Reply-To: <1270306453.69.0.686553855544.issue8303@psf.upfronthosting.co.za> Message-ID: <1270306453.69.0.686553855544.issue8303@psf.upfronthosting.co.za> New submission from Michael Foord : The usage messages for unittest from the command line are slightly incorrect. They show: "Usage: unittest [options]" when it should be "Usage: python -m unittest [options]" (or even "python -m unittest discover"). ---------- assignee: michael.foord messages: 102267 nosy: michael.foord severity: normal status: open title: python -m unittest -h and python -m unittest discover -h message slightly incorrect versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:01:46 2010 From: report at bugs.python.org (Michael Foord) Date: Sat, 03 Apr 2010 15:01:46 +0000 Subject: [issue8303] python -m unittest -h and python -m unittest discover -h message slightly incorrect In-Reply-To: <1270306453.69.0.686553855544.issue8303@psf.upfronthosting.co.za> Message-ID: <1270306906.14.0.00223995077559.issue8303@psf.upfronthosting.co.za> Michael Foord added the comment: In TestProgram.usageExit the command name comes from: self.progName = os.path.basename(argv[0]) For test discovery the usage message is auto-generated by optparse. Probably using sys.argv[0]. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:08:44 2010 From: report at bugs.python.org (AndiDog) Date: Sat, 03 Apr 2010 15:08:44 +0000 Subject: [issue8304] strftime and Unicode characters In-Reply-To: <1270307324.04.0.0348018847246.issue8304@psf.upfronthosting.co.za> Message-ID: <1270307324.04.0.0348018847246.issue8304@psf.upfronthosting.co.za> New submission from AndiDog : There is inconsistent behavior in time.strftime, comparing Python 2.6 and 3.1. In 3.1, non-ASCII Unicode characters seem to get dropped whereas in 2.6 you can keep them using the necessary Unicode-to-UTF8 workaround. This should be fixed if it isn't intended behavior. Python 2.6 >>> time.strftime(u"%d\u200F%A".encode("utf-8"), time.gmtime()).decode("utf-8") u'03\u200fSaturday' >>> time.strftime(u"%d\u0041%A".encode("utf-8"), time.gmtime()).decode("utf-8") u'03ASaturday' Python 3.1 >>> time.strftime("%d\u200F%A", time.gmtime()) '' >>> len(time.strftime("%d\u200F%A", time.gmtime())) 0 >>> time.strftime("%d\u0041%A", time.gmtime()) '03ASaturday' ---------- components: Library (Lib), Unicode messages: 102269 nosy: AndiDog severity: normal status: open title: strftime and Unicode characters type: behavior versions: Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:24:42 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 03 Apr 2010 15:24:42 +0000 Subject: [issue8305] memoview[0] creates an invalid view if ndim != 1 In-Reply-To: <1270308282.65.0.542260907353.issue8305@psf.upfronthosting.co.za> Message-ID: <1270308282.65.0.542260907353.issue8305@psf.upfronthosting.co.za> New submission from STINNER Victor : memory_item() function creates a new memoryview object if ndim is different than 1. Example with numpy: from numpy import array y=array([ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11]) y.shape = 3,4 view=memoryview(y) view2 = view[0] print type(view2) Result: . (Without the shape, ndim equals 1, and view2 is a standard str object.) The problem is that view attribute of the view2 (PyMemoryViewObject) is not initialized. Extract of memory_item(): /* Return a new memory-view object */ Py_buffer newview; memset(&newview, 0, sizeof(newview)); /* XXX: This needs to be fixed so it actually returns a sub-view */ return PyMemoryView_FromBuffer(&newview); "This needs to be fixed" :-/ -- view2 is not initialized and so view2.tolist() does crash. ---------- messages: 102270 nosy: haypo severity: normal status: open title: memoview[0] creates an invalid view if ndim != 1 versions: Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:25:58 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 03 Apr 2010 15:25:58 +0000 Subject: [issue8305] memoview[0] creates an invalid view if ndim != 1 In-Reply-To: <1270308282.65.0.542260907353.issue8305@psf.upfronthosting.co.za> Message-ID: <1270308358.17.0.760607892768.issue8305@psf.upfronthosting.co.za> STINNER Victor added the comment: Full example (using numpy) crashing Python: memoryview_crash.py ---------- Added file: http://bugs.python.org/file16749/memoryview_crash.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:26:35 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 03 Apr 2010 15:26:35 +0000 Subject: [issue8305] memoview[0] creates an invalid view if ndim != 1 In-Reply-To: <1270308282.65.0.542260907353.issue8305@psf.upfronthosting.co.za> Message-ID: <1270308395.2.0.731910861085.issue8305@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- components: +Interpreter Core type: -> crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:26:35 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 Apr 2010 15:26:35 +0000 Subject: [issue7723] sqlite only accept buffer() for BLOB objects (input/output) In-Reply-To: <1263735953.04.0.426363629034.issue7723@psf.upfronthosting.co.za> Message-ID: <1270308395.73.0.0909964770085.issue7723@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:26:36 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 Apr 2010 15:26:36 +0000 Subject: [issue3928] os.mknod missing on Solaris In-Reply-To: <1222076334.46.0.231050042066.issue3928@psf.upfronthosting.co.za> Message-ID: <1270308396.39.0.0691351869224.issue3928@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think this small change can slip in after beta. ---------- nosy: +benjamin.peterson priority: release blocker -> deferred blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:27:14 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 Apr 2010 15:27:14 +0000 Subject: [issue7319] Silence DeprecationWarning by default In-Reply-To: <1258157753.29.0.814065625122.issue7319@psf.upfronthosting.co.za> Message-ID: <1270308434.3.0.462154723885.issue7319@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Lowering priority. ---------- priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:27:35 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 Apr 2010 15:27:35 +0000 Subject: [issue7092] Test suite emits many DeprecationWarnings when -3 is enabled In-Reply-To: <1255098633.29.0.866346989212.issue7092@psf.upfronthosting.co.za> Message-ID: <1270308455.81.0.388667628987.issue7092@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:28:35 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 Apr 2010 15:28:35 +0000 Subject: [issue7755] copyright clarification for audiotest.au In-Reply-To: <1264154754.86.0.286834971555.issue7755@psf.upfronthosting.co.za> Message-ID: <1270308515.81.0.260409063208.issue7755@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Lowering priority. ---------- nosy: +benjamin.peterson priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:34:34 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 03 Apr 2010 15:34:34 +0000 Subject: [issue3778] python uninstaller leave registry entries In-Reply-To: <1220562494.43.0.987039023455.issue3778@psf.upfronthosting.co.za> Message-ID: <1270308874.86.0.215812210405.issue3778@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I think Installer has features to remove registry keys with no subkeys; we probably would need to declare that we create these keys, and then Installer might remove them automatically. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:37:48 2010 From: report at bugs.python.org (Dave Malcolm) Date: Sat, 03 Apr 2010 15:37:48 +0000 Subject: [issue8279] python-gdb PyListTests fail In-Reply-To: <1270108061.33.0.213932386799.issue8279@psf.upfronthosting.co.za> Message-ID: <1270309068.18.0.720455881047.issue8279@psf.upfronthosting.co.za> Dave Malcolm added the comment: It looks like all of the failures were due to gdb.Frame not having a "function" method. I did some digging, and it appears that this attribute may not yet be in the upstream version of gdb. The gdb/python integration was largely implemented by colleagues of mine at Red Hat, and Fedora's build of gdb is closely tracking their work. It looks to me like only a subset of their work has been merged into upstream gdb so far. Specifically http://cvs.fedoraproject.org/viewvc/rpms/gdb/F-12/gdb-archer.patch?revision=1.40&view=markup (warning: large) contains a hunk that applies to gdb/python/py-frame.c which adds "frapy_function". So it appears that I've unwittingly coded this to a very recent pre-merge version of gdb. Sorry about this. What is the output of "gdb --version" on this machine? What happens if you run: $ gdb --batch --eval-command "python print gdb.Frame.function" --eval-command "python print dir(gdb.Frame)" For reference, on Fedora 12 I see: [david at surprise ~]$ gdb --version GNU gdb (GDB) Fedora (7.0.1-33.fc12) Copyright (C) 2009 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: . [david at surprise ~]$ gdb --batch --eval-command "python print gdb.Frame.function" --eval-command "python print dir(gdb.Frame)" ['__class__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'block', 'find_sal', 'function', 'is_valid', 'name', 'newer', 'older', 'pc', 'read_var', 'select', 'type', 'unwind_stop_reason'] On Fedora 13: [david at f13 ~]$ gdb --version GNU gdb (GDB) Fedora (7.0.50.20100203-15.fc13) Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-redhat-linux-gnu". For bug reporting instructions, please see: . [david at f13 ~]$ gdb --batch --eval-command "python print gdb.Frame.function" --eval-command "python print dir(gdb.Frame)" ['__class__', '__delattr__', '__doc__', '__eq__', '__format__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__sizeof__', '__str__', '__subclasshook__', 'block', 'find_sal', 'function', 'is_valid', 'name', 'newer', 'older', 'pc', 'read_var', 'select', 'type', 'unwind_stop_reason'] The code works for me on both of these machines; all tests pass. Assuming that my analysis above is correct, then I'd expect other builds of gdb not to have the gdb.Frame.function method. This method is critical for the libpython.py:Frame class, and so without it the various extension commands aren't going to be usable. The pretty-printers ought to still work. The fix would be to detect the presence of gdb.Frame.function, and enable/disable the commands and their selftests accordingly, assuming that it's OK to add a conditional dependency on code that isn't merged into gdb's trunk yet. I'll do a patch for this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:39:00 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 03 Apr 2010 15:39:00 +0000 Subject: [issue7433] MemoryView memory_getbuf causes segfaults, double call to tp_releasebuffer In-Reply-To: <1259880029.03.0.2026580728.issue7433@psf.upfronthosting.co.za> Message-ID: <1270309140.04.0.0163722659577.issue7433@psf.upfronthosting.co.za> STINNER Victor added the comment: > I can try to cook up a patch fixing this. Did you wrote something? I don't see any patch attached to this issue :-/ ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:44:57 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 03 Apr 2010 15:44:57 +0000 Subject: [issue8305] memoview[0] creates an invalid view if ndim != 1 In-Reply-To: <1270308282.65.0.542260907353.issue8305@psf.upfronthosting.co.za> Message-ID: <1270309497.98.0.236552116888.issue8305@psf.upfronthosting.co.za> STINNER Victor added the comment: According to #2394, the implementation of the new buffer API is not complete. ---------- nosy: +teoliphant _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:45:52 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 03 Apr 2010 15:45:52 +0000 Subject: [issue8279] python-gdb PyListTests fail In-Reply-To: <1270309068.18.0.720455881047.issue8279@psf.upfronthosting.co.za> Message-ID: <4BB762AC.4020104@v.loewis.de> Martin v. L?wis added the comment: > What is the output of "gdb --version" on this machine? GNU gdb (GDB) 7.0.1-debian This GDB was configured as "x86_64-linux-gnu". The debian package is 7.0.1-2 > $ gdb --batch --eval-command "python print gdb.Frame.function" > --eval-command "python print dir(gdb.Frame)" Traceback (most recent call last): File "", line 1, in AttributeError: type object 'gdb.Frame' has no attribute 'function' Error while executing Python code. ['__class__', '__delattr__', '__doc__', '__eq__', '__ge__', '__getattribute__', '__gt__', '__hash__', '__init__', '__le__', '__lt__', '__ne__', '__new__', '__reduce__', '__reduce_ex__', '__repr__', '__setattr__', '__str__', 'is_valid', 'name', 'newer', 'older', 'pc', 'read_var', 'type', 'unwind_stop_reason'] > The fix would be to detect the presence of gdb.Frame.function, and > enable/disable the commands and their selftests accordingly, assuming > that it's OK to add a conditional dependency on code that isn't > merged into gdb's trunk yet. That would be fine, I think. Please add a comment saying that gdb 7.0.1 didn't have this feature yet. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:46:06 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 03 Apr 2010 15:46:06 +0000 Subject: [issue6409] 2to3 -j 4 generates malformed diffs In-Reply-To: <1246636426.08.0.872531312657.issue6409@psf.upfronthosting.co.za> Message-ID: <1270309566.94.0.551360654969.issue6409@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- title: 2to3 generates malformed diffs -> 2to3 -j 4 generates malformed diffs _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 17:52:06 2010 From: report at bugs.python.org (STINNER Victor) Date: Sat, 03 Apr 2010 15:52:06 +0000 Subject: [issue7696] Improve Memoryview/Buffer documentation In-Reply-To: <1263418431.81.0.407262013758.issue7696@psf.upfronthosting.co.za> Message-ID: <1270309926.7.0.974088802951.issue7696@psf.upfronthosting.co.za> STINNER Victor added the comment: memoryview() function is not documented in library/functions.rst, whereas it's a builtin function. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 18:05:03 2010 From: report at bugs.python.org (Eric Smith) Date: Sat, 03 Apr 2010 16:05:03 +0000 Subject: [issue8304] strftime and Unicode characters In-Reply-To: <1270307324.04.0.0348018847246.issue8304@psf.upfronthosting.co.za> Message-ID: <1270310703.34.0.195620881745.issue8304@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 18:10:16 2010 From: report at bugs.python.org (=?utf-8?q?Filip_Gruszczy=C5=84ski?=) Date: Sat, 03 Apr 2010 16:10:16 +0000 Subject: [issue4256] optparse: provide a simple way to get a programmatically useful list of options In-Reply-To: <1225729854.98.0.852900527881.issue4256@psf.upfronthosting.co.za> Message-ID: <1270311016.49.0.364995999373.issue4256@psf.upfronthosting.co.za> Filip Gruszczy?ski added the comment: I'll take a look at optparse code and try to provide a patch. But first holidays must finish and I must come back to ma usual residence, where I have programming environment. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 18:41:58 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 Apr 2010 16:41:58 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270312918.16.0.230205645892.issue8108@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: high -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 18:57:48 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 Apr 2010 16:57:48 +0000 Subject: [issue8306] ctypes.create_string_buffer should only accept bytes In-Reply-To: <1270313868.4.0.365365163519.issue8306@psf.upfronthosting.co.za> Message-ID: <1270313868.4.0.365365163519.issue8306@psf.upfronthosting.co.za> New submission from Benjamin Peterson : These coercions shouldn't be allowed: import ctypes >>> buf = ctypes.create_string_buffer("hi") >>> buf.value b'hi' >>> buf.value = "23" >>> buf.value b'23' ---------- assignee: theller components: ctypes messages: 102282 nosy: benjamin.peterson, theller severity: normal status: open title: ctypes.create_string_buffer should only accept bytes versions: Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 19:08:50 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 Apr 2010 17:08:50 +0000 Subject: [issue8032] Add gdb7 hooks to make it easier to debug Python In-Reply-To: <1267400432.35.0.113003499435.issue8032@psf.upfronthosting.co.za> Message-ID: <1270314530.66.0.496322112921.issue8032@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Could I request that the python-gdb.py script not be put in the top level directory? It's a little annoying to have another executable script starting with "python" when you're trying to test the "python" executable. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 19:19:53 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 03 Apr 2010 17:19:53 +0000 Subject: [issue8032] Add gdb7 hooks to make it easier to debug Python In-Reply-To: <1267400432.35.0.113003499435.issue8032@psf.upfronthosting.co.za> Message-ID: <1270315193.53.0.717060981723.issue8032@psf.upfronthosting.co.za> Martin v. L?wis added the comment: That is tricky to do. gdb will consider it automatically only if it is called -gdb.py. I agree that there should be a better solution, though. David, is it possible to somehow hook this into .gdbinit, with an arbitrary path? Benjamin, would a .gdbinit in the top-level build directory still be annoying? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 19:27:14 2010 From: report at bugs.python.org (Jeffrey Yasskin) Date: Sat, 03 Apr 2010 17:27:14 +0000 Subject: [issue8032] Add gdb7 hooks to make it easier to debug Python In-Reply-To: <1267400432.35.0.113003499435.issue8032@psf.upfronthosting.co.za> Message-ID: <1270315634.43.0.210763919591.issue8032@psf.upfronthosting.co.za> Jeffrey Yasskin added the comment: http://sourceware.org/gdb/current/onlinedocs/gdb/Auto_002dloading.html says "If this file exists and is readable, gdb will evaluate it as a Python script." So maybe it doesn't need to be executable? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 19:31:45 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 Apr 2010 17:31:45 +0000 Subject: [issue8032] Add gdb7 hooks to make it easier to debug Python In-Reply-To: <1270315193.53.0.717060981723.issue8032@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: 2010/4/3 Martin v. L?wis : > Benjamin, would a .gdbinit in the top-level build directory still be annoying? That would be fine with me. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 19:39:08 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 03 Apr 2010 17:39:08 +0000 Subject: [issue8218] Fix typos and phrasing in the Web servers howto In-Reply-To: <1269394991.51.0.861768873468.issue8218@psf.upfronthosting.co.za> Message-ID: <1270316348.51.0.0718358670517.issue8218@psf.upfronthosting.co.za> R. David Murray added the comment: I do know something about web development, so I did a more extensive edit. I'm not saying I've brought it completely up to date or fixed any inaccuracies, but I did change the tone here and there, tightened up a bunch of the language, clarified a few things, and updated a few statements. ---------- Added file: http://bugs.python.org/file16750/webservers_howto.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 20:58:24 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 03 Apr 2010 18:58:24 +0000 Subject: [issue8032] Add gdb7 hooks to make it easier to debug Python In-Reply-To: <1267400432.35.0.113003499435.issue8032@psf.upfronthosting.co.za> Message-ID: <1270321104.86.0.407026309884.issue8032@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I have now changed Makefile.pre.in to not install python-gdb.py as a script anymore; this seems to work fine. People will still need to remove there existing python-gdb.py (or make clean) to see this change. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 21:03:49 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 19:03:49 +0000 Subject: [issue7772] test_py3kwarn fails when running the whole test suite In-Reply-To: <1264358547.08.0.209937802024.issue7772@psf.upfronthosting.co.za> Message-ID: <1270321429.91.0.279514342149.issue7772@psf.upfronthosting.co.za> Mark Dickinson added the comment: This still seems to be an issue for OS X. With the current trunk (r79716), I get: Mark-Dickinsons-MacBook-Pro:trunk dickinsm$ ./python.exe -3 ./Lib/test/regrtest.py test_macostools test_py3kwarn test_macostools /Users/dickinsm/python/svn/trunk/Lib/importlib/__init__.py:37: DeprecationWarning: In 3.x, the MacOS module is removed. __import__(name) /Users/dickinsm/python/svn/trunk/Lib/test/test_macostools.py:10: DeprecationWarning: In 3.x, the Carbon package is removed. import Carbon.File /Users/dickinsm/python/svn/trunk/Lib/test/test_macostools.py:11: DeprecationWarning: In 3.x, the macostools module is removed. import macostools test_py3kwarn test test_py3kwarn failed -- Traceback (most recent call last): File "/Users/dickinsm/python/svn/trunk/Lib/test/test_py3kwarn.py", line 387, in test_platform_specific_removals self.check_removal(module_name, optional=True) File "/Users/dickinsm/python/svn/trunk/Lib/test/test_py3kwarn.py", line 376, in check_removal .format(module_name)) AssertionError: DeprecationWarning not raised for MacOS 1 test OK. 1 test failed: test_py3kwarn [40996 refs] ---------- nosy: +mark.dickinson status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 22:01:45 2010 From: report at bugs.python.org (Torsten Landschoff) Date: Sat, 03 Apr 2010 20:01:45 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270324905.17.0.560782094369.issue8299@psf.upfronthosting.co.za> Torsten Landschoff added the comment: Silly question, I know, but why isn't the GIL just implemented as a lock of the host operating system? After all, we want mutual exclusion, I don't see why condition variables are required for this. I have to admin that I did not look at the source, so the reason might be documented there. ---------- nosy: +torsten _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 22:11:03 2010 From: report at bugs.python.org (David Beazley) Date: Sat, 03 Apr 2010 20:11:03 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270325463.67.0.358156110676.issue8299@psf.upfronthosting.co.za> David Beazley added the comment: It's not a simple mutex because if you did that, you would have performance problems much worse than those described in issue 7946. http://bugs.python.org/issue7946 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 22:15:17 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Apr 2010 20:15:17 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270325717.77.0.0159123243724.issue8108@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I don't think this should be a release blocker for the beta, although I agree it should be one for the final release (and RCs). By the way, it doesn't affect maintenance branches. ---------- versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 22:16:42 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Apr 2010 20:16:42 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270325802.96.0.0169081306233.issue8108@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Giampaolo, which call exactly triggers the "error: [Errno 0] Error"? It doesn't seem it can be _sslobj.shutdown itself. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 22:44:34 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 03 Apr 2010 20:44:34 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270327474.26.0.797070294421.issue8108@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: release blocker -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 23:00:21 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 21:00:21 +0000 Subject: [issue8307] test_pep263 failure on OS X In-Reply-To: <1270328421.06.0.903952382784.issue8307@psf.upfronthosting.co.za> Message-ID: <1270328421.06.0.903952382784.issue8307@psf.upfronthosting.co.za> New submission from Mark Dickinson : I'm seeing a very peculiar test_pep263 failure when doing 'make test' on OS X 10.6.3. It's enough to run test___all__ and test_pep263, in that order: Mark-Dickinsons-MacBook-Pro:trunk dickinsm$ ./python.exe -Wd -3 -E -tt ./Lib/test/regrtest.py test___all__ test_pep263 test___all__ /Users/dickinsm/python/svn/trunk/Lib/test/test___all__.py:3: DeprecationWarning: in 3.x, the bsddb module has been removed; please use the pybsddb project instead import bsddb /Users/dickinsm/python/svn/trunk/Lib/bsddb/__init__.py:67: PendingDeprecationWarning: The CObject type is marked Pending Deprecation in Python 2.7. Please use capsule objects instead. import _bsddb test_pep263 test test_pep263 failed -- Traceback (most recent call last): File "/Users/dickinsm/python/svn/trunk/Lib/test/test_pep263.py", line 39, in test_issue7820 self.assertRaises(SyntaxError, eval, '\xff\x20') File "/Users/dickinsm/python/svn/trunk/Lib/unittest/case.py", line 444, in assertRaises callableObj(*args, **kwargs) File "", line 1, in NameError: name '?' is not defined 1 test OK. 1 test failed: test_pep263 [218378 refs] The failing test is expecting a SyntaxError, but gets a NameError instead. I've narrowed down the cause of the failure to a Tkinter import: Python 2.7a4+ (trunk:79716, Apr 3 2010, 20:30:09) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> eval('\xff\x20') Traceback (most recent call last): File "", line 1, in File "", line 1 ? ^ SyntaxError: invalid syntax [35036 refs] >>> import Tkinter [51314 refs] >>> eval('\xff\x20') Traceback (most recent call last): File "", line 1, in File "", line 1, in NameError: name '?' is not defined [51324 refs] But I'm now mystified: why does the eval raise a SyntaxError before the import and a TypeError afterwards? ---------- messages: 102294 nosy: mark.dickinson severity: normal status: open title: test_pep263 failure on OS X versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 23:00:53 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 21:00:53 +0000 Subject: [issue8307] test_pep263 failure on OS X In-Reply-To: <1270328421.06.0.903952382784.issue8307@psf.upfronthosting.co.za> Message-ID: <1270328453.06.0.785240501816.issue8307@psf.upfronthosting.co.za> Mark Dickinson added the comment: That should be "NameError" in the last line of the previous message, not "TypeError". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 23:07:41 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Apr 2010 21:07:41 +0000 Subject: [issue7696] Improve Memoryview/Buffer documentation In-Reply-To: <1263418431.81.0.407262013758.issue7696@psf.upfronthosting.co.za> Message-ID: <1270328861.8.0.567399582972.issue7696@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > This is quite obscure because there's no definition of the "buffer > protocol". You can find it at http://www.python.org/dev/peps/pep-3118/#id5 (assuming it is not outdated) > the memoryview.suboffsets attribute is not documented on the "6.10 > memoryview Type" page I don't know what it does. By the way, I don't really know how to do links and glossary entries. I suppose someone else knows (and enjoys) ReST formatting better than I do. ---------- assignee: pitrou -> teoliphant nosy: +teoliphant _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 23:17:16 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 03 Apr 2010 21:17:16 +0000 Subject: [issue7696] Improve Memoryview/Buffer documentation In-Reply-To: <1263418431.81.0.407262013758.issue7696@psf.upfronthosting.co.za> Message-ID: <1270329436.02.0.597840180441.issue7696@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > memoryview() function is not documented in library/functions.rst You should look more carefully... See http://docs.python.org/dev/library/functions.html#max (I don't know why it doesn't have its own anchor, though) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 3 23:49:48 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Apr 2010 21:49:48 +0000 Subject: [issue8304] strftime and Unicode characters In-Reply-To: <1270307324.04.0.0348018847246.issue8304@psf.upfronthosting.co.za> Message-ID: <1270331388.86.0.383357717243.issue8304@psf.upfronthosting.co.za> Ezio Melotti added the comment: This seems to be fixed now, on both 3.1 and 3.2. Can you try with 3.1.2 and see if it works? What operating system are you using? ---------- nosy: +ezio.melotti priority: -> normal status: open -> pending versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 00:07:36 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 03 Apr 2010 22:07:36 +0000 Subject: [issue8208] test_issue7820 fails: "name '?' is not defined" In-Reply-To: <1269323557.38.0.386457412233.issue8208@psf.upfronthosting.co.za> Message-ID: <1270332456.08.0.971882854912.issue8208@psf.upfronthosting.co.za> Ned Deily added the comment: Duplicated in Issue8307 ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 00:12:43 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Apr 2010 22:12:43 +0000 Subject: [issue8208] test_issue7820 fails: "name '?' is not defined" In-Reply-To: <1269323557.38.0.386457412233.issue8208@psf.upfronthosting.co.za> Message-ID: <1270332763.11.0.81910150877.issue8208@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- resolution: -> duplicate stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 00:13:33 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Apr 2010 22:13:33 +0000 Subject: [issue8307] test_pep263 failure on OS X In-Reply-To: <1270328421.06.0.903952382784.issue8307@psf.upfronthosting.co.za> Message-ID: <1270332813.9.0.667699721005.issue8307@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #8208. ---------- components: +Tests nosy: +ezio.melotti, haypo, l0nwlf, ned.deily priority: -> normal stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 00:14:01 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 22:14:01 +0000 Subject: [issue8307] test_pep263 failure on OS X In-Reply-To: <1270328421.06.0.903952382784.issue8307@psf.upfronthosting.co.za> Message-ID: <1270332841.42.0.704748949397.issue8307@psf.upfronthosting.co.za> Mark Dickinson added the comment: After some more digging, it looks as though this is due to the Tkinter import (that ends up happening as a result of test___all__) changing the locale(?), and in particular the meaning of isalpha: Python 2.7a4+ (trunk:79716, Apr 3 2010, 22:06:18) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> str.isalpha(chr(255)) False [34999 refs] >>> import Tkinter [51283 refs] >>> str.isalpha(chr(255)) True [51283 refs] (Is there some way that I can see the locale change more explicitly from Python?) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 00:18:14 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 22:18:14 +0000 Subject: [issue8307] test_pep263 failure on OS X In-Reply-To: <1270328421.06.0.903952382784.issue8307@psf.upfronthosting.co.za> Message-ID: <1270333094.64.0.0877351596977.issue8307@psf.upfronthosting.co.za> Mark Dickinson added the comment: > (Is there some way that I can see the locale change more explicitly from Python?) Found it. :) >>> locale.nl_langinfo(locale.CODESET) 'US-ASCII' [40683 refs] >>> import Tkinter [56953 refs] >>> locale.nl_langinfo(locale.CODESET) 'UTF-8' [56953 refs] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 00:21:43 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Apr 2010 22:21:43 +0000 Subject: [issue8297] AttributeError message text should include module name In-Reply-To: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> Message-ID: <1270333303.0.0.665271578604.issue8297@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti priority: -> low stage: -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 00:23:33 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 03 Apr 2010 22:23:33 +0000 Subject: [issue8307] test_pep263 failure on OS X In-Reply-To: <1270328421.06.0.903952382784.issue8307@psf.upfronthosting.co.za> Message-ID: <1270333413.03.0.298738515752.issue8307@psf.upfronthosting.co.za> Ned Deily added the comment: Or this: Python 2.7a4+ (trunk, Apr 3 2010, 15:18:51) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import locale >>> locale.getlocale() (None, None) >>> import Tkinter >>> locale.getlocale() ('en_US', 'UTF8') ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 00:25:45 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 22:25:45 +0000 Subject: [issue8307] test_pep263 failure on OS X In-Reply-To: <1270328421.06.0.903952382784.issue8307@psf.upfronthosting.co.za> Message-ID: <1270333545.82.0.556420422874.issue8307@psf.upfronthosting.co.za> Mark Dickinson added the comment: I realize that the above doesn't really explain why the NameError is occurring: Python's token recognition algorithm, in tok_get in tokenizer.c, uses isalpha, which is locale-aware. In particular, it seems that chr(255) is considered alphabetic in the UTF-8 codeset, and not in ASCII. Should this instance of isalpha be replaced by something that's not locale aware? I'm not sure what the rules are supposed to be in 2.x for recognising identifiers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 00:26:32 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 03 Apr 2010 22:26:32 +0000 Subject: [issue8307] test_pep263 failure on OS X In-Reply-To: <1270328421.06.0.903952382784.issue8307@psf.upfronthosting.co.za> Message-ID: <1270333592.24.0.254175384591.issue8307@psf.upfronthosting.co.za> Mark Dickinson added the comment: Ned: yes, that works too. Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 00:36:54 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 03 Apr 2010 22:36:54 +0000 Subject: [issue4256] optparse: provide a simple way to get a programmatically useful list of options In-Reply-To: <1225729854.98.0.852900527881.issue4256@psf.upfronthosting.co.za> Message-ID: <1270334214.74.0.543011722416.issue4256@psf.upfronthosting.co.za> R. David Murray added the comment: Please target argparse rather than optparse, or better yet in addition to optparse. And I'm +1 for making it easier to write completion scripts. ---------- nosy: +bethard, r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 01:23:12 2010 From: report at bugs.python.org (Ned Deily) Date: Sat, 03 Apr 2010 23:23:12 +0000 Subject: [issue8307] test_pep263 failure on OS X In-Reply-To: <1270328421.06.0.903952382784.issue8307@psf.upfronthosting.co.za> Message-ID: <1270336992.77.0.068622302609.issue8307@psf.upfronthosting.co.za> Ned Deily added the comment: For the record, the problem here isn't new to trunk and is not limited to OS X 10.6; it's the test that's new. It's not a problem for py3k where, as expected, the locale is always set and it seems the tokenizer is a little smarter: Python 3.2a0 (py3k, Apr 3 2010, 16:02:28) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> eval(b'\xff\x20') Traceback (most recent call last): File "", line 1, in File "", line 1 ? ^ SyntaxError: invalid character in identifier ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 01:40:18 2010 From: report at bugs.python.org (John Machin) Date: Sat, 03 Apr 2010 23:40:18 +0000 Subject: [issue8308] raw_bytes.decode('cp932') -- spurious mappings In-Reply-To: <1270338018.63.0.0227454811381.issue8308@psf.upfronthosting.co.za> Message-ID: <1270338018.63.0.0227454811381.issue8308@psf.upfronthosting.co.za> New submission from John Machin : According to the following references, the bytes 80, A0, FD, FE, and FF are not defined in cp932: http://msdn.microsoft.com/en-au/goglobal/cc305152.aspx http://www.unicode.org/Public/MAPPINGS/VENDORS/MICSFT/WINDOWS/CP932.TXT http://demo.icu-project.org/icu-bin/convexp?conv=ibm-943_P15A-2003&s=ALL However CPython 3.1.2 does this: >>> print(ascii(b'\x80\xa0\xfd\xfe\xff'.decode('cp932'))) '\x80\uf8f0\uf8f1\uf8f2\uf8f3' (as do 2.5, 2.6. and 2.7 with the appropriate syntax) This maps 80 to U+0080 (not very useful) and maps the other 4 bytes into the Private Use Area ("PUA")!! Each case should be treated as undefined/unexpected/error/... ---------- components: Unicode messages: 102308 nosy: sjmachin severity: normal status: open title: raw_bytes.decode('cp932') -- spurious mappings type: behavior versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 01:44:02 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 03 Apr 2010 23:44:02 +0000 Subject: [issue8308] raw_bytes.decode('cp932') -- spurious mappings In-Reply-To: <1270338018.63.0.0227454811381.issue8308@psf.upfronthosting.co.za> Message-ID: <1270338242.48.0.344377548018.issue8308@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti priority: -> normal stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 02:00:06 2010 From: report at bugs.python.org (Ned Deily) Date: Sun, 04 Apr 2010 00:00:06 +0000 Subject: [issue8307] test_pep263 failure on OS X In-Reply-To: <1270328421.06.0.903952382784.issue8307@psf.upfronthosting.co.za> Message-ID: <1270339206.77.0.583584249098.issue8307@psf.upfronthosting.co.za> Ned Deily added the comment: Verified that r79725 fix to tokenizer.c prevents the original test failure. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 02:08:47 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Apr 2010 00:08:47 +0000 Subject: [issue8304] strftime and Unicode characters In-Reply-To: <1270307324.04.0.0348018847246.issue8304@psf.upfronthosting.co.za> Message-ID: <1270339727.61.0.347459159593.issue8304@psf.upfronthosting.co.za> Ezio Melotti added the comment: Actually the bug seems related to Windows. ---------- components: +Windows nosy: +brian.curtin status: pending -> open versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 02:38:07 2010 From: report at bugs.python.org (Meador Inge) Date: Sun, 04 Apr 2010 00:38:07 +0000 Subject: [issue8300] Allow struct.pack to handle objects with an __index__ method. In-Reply-To: <1270295507.67.0.95768179333.issue8300@psf.upfronthosting.co.za> Message-ID: <1270341487.66.0.0219258682559.issue8300@psf.upfronthosting.co.za> Meador Inge added the comment: I may be missing something subtle, but how can 'PyNumber_Index(v) != NULL' *and* '!PyInt_Check(v) && !PyLong_Check(v)' both be satisfied in the 'get_pylong' mods? It seems to me that 'PyNumber_Index' only returns non-NULL when the object being returned is an 'int' or 'long'. Attached a patch with the extra check removed and a few more test cases. ---------- Added file: http://bugs.python.org/file16751/struct_index_trunk3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 03:04:34 2010 From: report at bugs.python.org (Derek O'Connor) Date: Sun, 04 Apr 2010 01:04:34 +0000 Subject: [issue8309] Sin(x) is Wrong In-Reply-To: <1270343074.04.0.0881828805303.issue8309@psf.upfronthosting.co.za> Message-ID: <1270343074.04.0.0881828805303.issue8309@psf.upfronthosting.co.za> New submission from Derek O'Connor : Dell Precision 690, Intel 2xQuad-Core E5345 @ 2.33GHz 16GB RAM, Windows7 64-bit Professional. Python 3.1.2 (r312:79149, Mar 21 2010, 00:41:52) [MSC v.1500 32 bit (Intel)] on win32 >>> from math import sin >>> sin(1e22) 0.41214336710708466 (WRONG) >>> Python 3.1.2 (r312:79149, Mar 20 2010, 22:55:39) [MSC v.1500 64 bit (AMD64)] on win32 >>> from math import sin >>> sin(1e22) -0.8522008497671888 (CORRECT) The correct result, rounded to 20 digits is sin(10^22) = -8.5220 08497 67188 80177 e-001 Please note that 10^22 is exactly representable as an IEEE double precision floating point number, whose binary representation is 10^22 = 1000011110000110011110000011001001101110101011001001 x 2^22 Hence fl(10^22) = 10^22, whereas fl(10^23) ~= 10^23. This incorrect result suggests that the range-reduction step, where the argument x is reduced to lie in a small interval around 0, such as [-pi/2,+pi/2], has not been done properly. This means that the other trigonometric functions will be incorrect. Yours sincerely, Derek O'Connor ---------- components: Library (Lib) messages: 102312 nosy: derekroconnor severity: normal status: open title: Sin(x) is Wrong type: performance versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 03:05:57 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Apr 2010 01:05:57 +0000 Subject: [issue8309] Sin(x) is Wrong In-Reply-To: <1270343074.04.0.0881828805303.issue8309@psf.upfronthosting.co.za> Message-ID: <1270343157.66.0.890897234323.issue8309@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +mark.dickinson stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 03:25:54 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 Apr 2010 01:25:54 +0000 Subject: [issue8279] python-gdb PyListTests fail In-Reply-To: <1270108061.33.0.213932386799.issue8279@psf.upfronthosting.co.za> Message-ID: <1270344354.89.0.252439273721.issue8279@psf.upfronthosting.co.za> Nick Coghlan added the comment: This may be related to test_gdb problems I am seeing (test_gdb output attached). gdb details: GNU gdb (GDB) 7.0-ubuntu This GDB was configured as "x86_64-linux-gnu". After applying Dave's second patch, those original errors go away, but I get a lot of failures of the form: AssertionError: "Error occurred in Python command: 'gdb.Frame' object has no attribute 'function'\nError occurred in Python command: 'gdb.Frame' object has no attribute 'function'\n" != '' (Will upload the test output for the second patch shortly - I'm out of town for the next couple of days, so I won't be able to look at this again until next week) ---------- nosy: +ncoghlan Added file: http://bugs.python.org/file16752/_svn_79729_test_gdb_errors_amd64_ubuntu_9.10.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 03:26:34 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 Apr 2010 01:26:34 +0000 Subject: [issue8279] python-gdb PyListTests fail In-Reply-To: <1270108061.33.0.213932386799.issue8279@psf.upfronthosting.co.za> Message-ID: <1270344394.14.0.0326670577231.issue8279@psf.upfronthosting.co.za> Changes by Nick Coghlan : Added file: http://bugs.python.org/file16753/_svn_79729_plus_dm_patch2_test_gdb_errors_amd64_ubuntu_9.10.log _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 03:33:36 2010 From: report at bugs.python.org (Nick Coghlan) Date: Sun, 04 Apr 2010 01:33:36 +0000 Subject: [issue8279] python-gdb PyListTests fail In-Reply-To: <1270108061.33.0.213932386799.issue8279@psf.upfronthosting.co.za> Message-ID: <1270344816.38.0.94537069943.issue8279@psf.upfronthosting.co.za> Nick Coghlan added the comment: Second error log attached (and the MIME type should finally be set properly to let it display as a text file in the browser) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 03:33:48 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 04 Apr 2010 01:33:48 +0000 Subject: [issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone In-Reply-To: <1236845917.79.0.765415316549.issue5479@psf.upfronthosting.co.za> Message-ID: <1270344828.75.0.496434468444.issue5479@psf.upfronthosting.co.za> Raymond Hettinger added the comment: See r79730. Leaving open until tests are written and all is forward ported to 3.2. ---------- versions: -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 05:26:18 2010 From: report at bugs.python.org (Steven Bethard) Date: Sun, 04 Apr 2010 03:26:18 +0000 Subject: [issue4256] optparse: provide a simple way to get a programmatically useful list of options In-Reply-To: <1225729854.98.0.852900527881.issue4256@psf.upfronthosting.co.za> Message-ID: <1270351578.58.0.631291191254.issue4256@psf.upfronthosting.co.za> Steven Bethard added the comment: Someone pointed this out to me earlier: http://pypi.python.org/pypi/genzshcomp I believe it's trying to solve the same problem, and claims to work with both optparse and argparse, so it might be worth looking into what it's doing and seeing if there's a useful patch that could be proposed for argparse. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 05:26:17 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Apr 2010 03:26:17 +0000 Subject: [issue4868] Faster utf-8 decoding In-Reply-To: <1231341903.79.0.54860955311.issue4868@psf.upfronthosting.co.za> Message-ID: <1270351577.11.0.604262228605.issue4868@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 05:30:35 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 04 Apr 2010 03:30:35 +0000 Subject: [issue7583] doctest should normalize tabs when comparing output In-Reply-To: <1261932632.12.0.972907709846.issue7583@psf.upfronthosting.co.za> Message-ID: <1270351835.51.0.451402114701.issue7583@psf.upfronthosting.co.za> R. David Murray added the comment: I think I can see how it would cause confusion, and in general it shouldn't be necessary to use real tabs in a doctest. So as you say the output should be fixed to match. However, I don't think the patch is quite correct. It looks to me like the expandtabs call should be made unconditionally on the output string just like it is on the string pulled from the file. The reason is that the tabs in the output should be expanded relative to the start of the output line. The indentation is meaningless in that context. The way you did it, the output in your test appears to be indented incorrectly. If the expandtabs were done on the raw output string, it would be indented eight spaces from the start of the test indent, and that would look correct. Your change of 'iff' to 'if' is also most likely incorrect. I'm pretty sure that 'iff' is intentional (it is an abbreviation for "if and only if".) ---------- assignee: -> r.david.murray resolution: -> accepted stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 05:36:59 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 04 Apr 2010 03:36:59 +0000 Subject: [issue7585] difflib should separate filename from timestamp with tab In-Reply-To: <1261947458.0.0.959368598145.issue7585@psf.upfronthosting.co.za> Message-ID: <1270352219.42.0.315980105853.issue7585@psf.upfronthosting.co.za> R. David Murray added the comment: Your last patch looks the best to me. I agree both that a tab should not be emitted if there is no date (which is what git, for example, does), and that ISO 8601 timestamps should be promoted as the preferred format. As you pointed out, issue 7583 needs to be resolved before this can be applied. In the meantime it would be nice to add an additional test for the no-tab-if-no-date case. ---------- assignee: -> r.david.murray nosy: +r.david.murray resolution: -> accepted stage: patch review -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 06:36:21 2010 From: report at bugs.python.org (Ilya Sandler) Date: Sun, 04 Apr 2010 04:36:21 +0000 Subject: [issue8309] Sin(x) is Wrong In-Reply-To: <1270343074.04.0.0881828805303.issue8309@psf.upfronthosting.co.za> Message-ID: <1270355781.99.0.394967734102.issue8309@psf.upfronthosting.co.za> Ilya Sandler added the comment: I believe python is fully at mercy of underlying system math library. And as a matter of fact, this C program #include #include main() { printf("%.6f\n", sin(1e22)); } when compiled as 64-bit app (on linux) produces "-0.852201", but when it's compiled as a 32-bit app on the same machine (gcc -m32), it produces "0.462613". So I don't think this is a bug in python. ---------- nosy: +isandler _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 07:41:55 2010 From: report at bugs.python.org (Eric Smith) Date: Sun, 04 Apr 2010 05:41:55 +0000 Subject: [issue8309] Sin(x) is Wrong In-Reply-To: <1270343074.04.0.0881828805303.issue8309@psf.upfronthosting.co.za> Message-ID: <1270359715.09.0.704885092784.issue8309@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith type: performance -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 07:49:19 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 04 Apr 2010 05:49:19 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270360159.99.0.657484109192.issue8271@psf.upfronthosting.co.za> Ezio Melotti added the comment: This new patch (v3) should be ok. I added a few more tests and found another corner case: '\xe1a'.decode('utf-8', 'replace') was returning u'\ufffd' because \xe1 is the start byte of a 3-byte sequence and there were only two bytes in the string. This is now fixed in the latest patch. I also unrolled all the loops except the first one because I haven't found an elegant way to unroll it (yet). Finally, I changed the error messages to make them clearer: unexpected code byte -> invalid start byte; invalid data -> invalid continuation byte. (I can revert this if the old messages are better or if it is better to fix this with a separate commit.) The performances seem more or less the same, I did some benchmarks without significant changes in the results. If you have better benchmarks let me know. I used a file of 320kB with some ASCII, ASCII mixed with some accented characters, Japanese and a file with a sample of several different Unicode chars. ---------- Added file: http://bugs.python.org/file16754/issue8271v3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 08:59:16 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 04 Apr 2010 06:59:16 +0000 Subject: [issue8308] raw_bytes.decode('cp932') -- spurious mappings In-Reply-To: <1270338018.63.0.0227454811381.issue8308@psf.upfronthosting.co.za> Message-ID: <1270364356.24.0.229106708222.issue8308@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This mapping is in conformance with the de-facto standard of that encoding, Microsoft Windows, see http://www.autumn.org/etc/unidif.html http://mail.python.org/pipermail/i18n-sig/2003-June/001598.html http://homepage1.nifty.com/nomenclator/perl/ShiftJIS-CP932-MapUTF.html ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 09:03:07 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 04 Apr 2010 07:03:07 +0000 Subject: [issue7583] doctest should normalize tabs when comparing output In-Reply-To: <1261932632.12.0.972907709846.issue7583@psf.upfronthosting.co.za> Message-ID: <1270364587.42.0.809798352611.issue7583@psf.upfronthosting.co.za> R. David Murray added the comment: Having thought about it some more, I see why you did the patch the way you did. The fact that there are two completely different ways to expand tabs in the output that are equally valid and have their advantages and disadvantages makes me wonder if this should be fixed at all. Perhaps it is better to just say that you can only handle tabs in output by ignoring whitespace. ---------- resolution: accepted -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 09:06:46 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 04 Apr 2010 07:06:46 +0000 Subject: [issue7585] difflib should separate filename from timestamp with tab In-Reply-To: <1261947458.0.0.959368598145.issue7585@psf.upfronthosting.co.za> Message-ID: <1270364806.6.0.553004144813.issue7585@psf.upfronthosting.co.za> R. David Murray added the comment: We could avoid the 7583 problem by making the doctests use NORMALIZE_WHITESPACE and moving the real *tests* into the unittests for the module. I think that would be a good thing to do anyway. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 10:17:41 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Apr 2010 08:17:41 +0000 Subject: [issue8309] Sin(x) is Wrong In-Reply-To: <1270343074.04.0.0881828805303.issue8309@psf.upfronthosting.co.za> Message-ID: <1270369061.25.0.344557574619.issue8309@psf.upfronthosting.co.za> Mark Dickinson added the comment: What Ilya Sandler said! Computing sin or cos with large arguments requires high precision for the intermediate calculations (e.g., for sin(1e22) you'd need around 40 digits of precision for the reduction step), so most math libraries don't bother. This is also the reason that Intel's x87 FSIN instruction (which may or may not be being used here) requires that the argument be in the range -2**63 to 2**63. Short of Python using its own math library, or adding a dependence on a correctly rounded math library like MPFR or crlibm, there's no real way to fix this. Out of curiosity, what application do you have that requires evaluating sin for such large arguments? ---------- resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 10:34:34 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Apr 2010 08:34:34 +0000 Subject: [issue8300] Allow struct.pack to handle objects with an __index__ method. In-Reply-To: <1270295507.67.0.95768179333.issue8300@psf.upfronthosting.co.za> Message-ID: <1270370074.54.0.299825522165.issue8300@psf.upfronthosting.co.za> Mark Dickinson added the comment: Probably both those conditions can't be satisfied; I'm wasn't sure what happened if something's __index__ method returned something other than an int or long. But now I bother to look at the source (in Objects/abstract.c) I see that there *is* already an explicit check for the result of nb_index being int or long (with TypeError being raised if the result isn't one of those). Mea culpa. I'll remove those lines (though I may leave an assert, just to be on the safe side). The 2.x behaviour isn't ideal: I'd prefer to just stop if the __index__ method is present and raises TypeError, rather than going on to check __int__ in that case. But that presents problems with old-style classes, where PyIndex_Check is true even when no __index__ method is explicitly defined. Thanks for the extra tests! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 10:44:17 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Apr 2010 08:44:17 +0000 Subject: [issue8300] Allow struct.pack to handle objects with an __index__ method. In-Reply-To: <1270295507.67.0.95768179333.issue8300@psf.upfronthosting.co.za> Message-ID: <1270370657.93.0.678554026728.issue8300@psf.upfronthosting.co.za> Mark Dickinson added the comment: Committed (with some tabs in test_struct.py changed to spaces) to trunk in r79745. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 10:54:00 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Apr 2010 08:54:00 +0000 Subject: [issue8300] Allow struct.pack to handle objects with an __index__ method. In-Reply-To: <1270295507.67.0.95768179333.issue8300@psf.upfronthosting.co.za> Message-ID: <1270371240.74.0.622809693452.issue8300@psf.upfronthosting.co.za> Mark Dickinson added the comment: Merged to py3k in r79746. Meador, does this all look okay, now? ---------- resolution: -> accepted stage: patch review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 11:20:11 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Apr 2010 09:20:11 +0000 Subject: [issue8307] test_pep263 failure on OS X In-Reply-To: <1270328421.06.0.903952382784.issue8307@psf.upfronthosting.co.za> Message-ID: <1270372811.67.0.747137403669.issue8307@psf.upfronthosting.co.za> Mark Dickinson added the comment: Yes, Benjamin's checkin seems to have fixed it for me, too. Thanks, Benjamin! There's still the issue of the Tkinter import changing the locale, but that seems to be out of Python's control. As far as I can tell, it happens when the module initialization calls Tcl_FindExecutable, which is part of the Tcl library itself. This may well be deliberate: see http://www.tcl.tk/cgi-bin/tct/tip/66.html Closing. ---------- resolution: -> fixed stage: needs patch -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 11:44:52 2010 From: report at bugs.python.org (Derek O'Connor) Date: Sun, 04 Apr 2010 09:44:52 +0000 Subject: [issue8309] Sin(x) is Wrong In-Reply-To: <1270343074.04.0.0881828805303.issue8309@psf.upfronthosting.co.za> Message-ID: <1270374292.31.0.911570723835.issue8309@psf.upfronthosting.co.za> Derek O'Connor added the comment: Reply to Mark Dickinson Python 3.1.2 -- 32 bit gives sin(2^60) = -0.7391806966492228 PariGp 2.3.4 gives sin(2^60) = -0.8306492176372546505752817956 So it seems Intel's x87 FSIN is not being used. Application? I don't have one, but it is not too hard to imagine that buried deep in a large simulation, sin(x) is presented with a large argument, and whose wrong result is never noticed until ... I quote from Ng's paper : http://www.derekroconnor.net/Software/Ng--ArgReduction.pdf -------------------------- "It is often argued that being concerned about large arguments is unnecessary, because sophisticated users simply know better than to compute with large angles. It is our contention that this position is suboptimal, because: 1. It places an unnecessary burden on the user. 2. The consequences of producing incorrect (inaccurate)answers may be catastrophic; many people assume that computers can do arithmetic very well. While numerical analysts know better, not all programmers are numerical analysts, nor should they be. 3. It is a vendors responsibility to provide answers that are as correct as possible." ------------------- Derek O'Connor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 11:59:12 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Apr 2010 09:59:12 +0000 Subject: [issue8309] Sin(x) is Wrong In-Reply-To: <1270343074.04.0.0881828805303.issue8309@psf.upfronthosting.co.za> Message-ID: <1270375152.98.0.653333826323.issue8309@psf.upfronthosting.co.za> Mark Dickinson added the comment: > Python 3.1.2 -- 32 bit gives sin(2^60) = -0.7391806966492228 Interesting. I get >>> sin(2.**60) -0.83064921763725463 On both OS X 10.6.3 (64-bit build) and OS X 10.5.something (32-bit build). But this is all down to the platform math library, of course. I agree it's not ideal, but it's not really in Python's power to fix this, without adding a huge extra maintenance burden (from adding the necessary high-precision arithmetic to Python itself) or another external dependency. You could always try to come up with a patch that adds a configure option for linking Python's math library into MPFR instead of the system math library. (crlibm would also work, and would be faster; it doesn't seem to be so well maintained these days though; Pari/GP isn't such a great option since its floating-point model isn't so compatible with IEEE 754). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 13:18:20 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Sun, 04 Apr 2010 11:18:20 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270379900.99.0.210495126821.issue7978@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: A patch to make select calls EINTR-safe is attached, but: - there are many modules that suffer from the same problem, so maybe a fix at select level would be better - if not, it could be a good idea to add this EINTR-retry handler to a given module (signal, os?) so that every module doesn't have to reimplement it (I know that at least subprocess does have one). Thoughts ? ---------- keywords: +patch nosy: +neologix Added file: http://bugs.python.org/file16755/SocketServer_eintr.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 13:33:13 2010 From: report at bugs.python.org (AndiDog) Date: Sun, 04 Apr 2010 11:33:13 +0000 Subject: [issue8304] strftime and Unicode characters In-Reply-To: <1270307324.04.0.0348018847246.issue8304@psf.upfronthosting.co.za> Message-ID: <1270380793.28.0.401096493635.issue8304@psf.upfronthosting.co.za> AndiDog added the comment: Just installed Python 3.1.2, same problem. I'm using Windows XP SP2 with two Python installations (2.6.4 and now 3.1.2). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 13:47:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 04 Apr 2010 11:47:01 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270381621.22.0.616458871968.issue7978@psf.upfronthosting.co.za> Antoine Pitrou added the comment: What kind of signals can be received in real-life? (I'm assuming that most signals are of the kind that you only receive if someone else deliberately sends it to you, in which case you are supposed to be prepared to handle it) Also, does your patch still allow Python to handle the signal properly (invoke a registered signal handler, or perhaps raise KeyboardInterrupt)? You could raise the issue on the python-dev mailing-list for more advice. ---------- nosy: +exarkun, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 13:56:41 2010 From: report at bugs.python.org (John Machin) Date: Sun, 04 Apr 2010 11:56:41 +0000 Subject: [issue8308] raw_bytes.decode('cp932') -- spurious mappings In-Reply-To: <1270338018.63.0.0227454811381.issue8308@psf.upfronthosting.co.za> Message-ID: <1270382201.23.0.862672548581.issue8308@psf.upfronthosting.co.za> John Machin added the comment: Thanks, Martin. Issue closed as far as I'm concerned. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 14:07:23 2010 From: report at bugs.python.org (AndiDog) Date: Sun, 04 Apr 2010 12:07:23 +0000 Subject: [issue8304] strftime and Unicode characters In-Reply-To: <1270307324.04.0.0348018847246.issue8304@psf.upfronthosting.co.za> Message-ID: <1270382843.11.0.909421678966.issue8304@psf.upfronthosting.co.za> AndiDog added the comment: Definitely a Windows problem. I did this on Visual Studio 2008: wchar_t out[1000]; time_t currentTime; time(¤tTime); tm *timeStruct = gmtime(¤tTime); size_t ret = wcsftime(out, 1000, L"%d%A", timeStruct); wprintf(L"ret = %d, out = (%s)\n", ret, out); ret = wcsftime(out, 1000, L"%d\u200f%A", timeStruct); wprintf(L"ret = %d, out = (%s)\n", ret, out); and the output was ret = 8, out = (04Sunday) ret = 0, out = () Python really shouldn't use any so-called standard functions on Windows. They never work as expected ^^... ---------- versions: +Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 14:27:09 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Sun, 04 Apr 2010 12:27:09 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270384029.83.0.618314714408.issue7978@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: In real life, you can receive for example SIGSTOP (strace, gdb, shell), but mostly SIGCHLD (any process spawning children), etc. The attached patch just restarts calls when EINTR is received, as is done in subprocess module. The mailing list is a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 14:31:35 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Sun, 04 Apr 2010 12:31:35 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270384295.93.0.372649525527.issue7978@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: > What kind of signals can be received in real-life? There are lots of possible answers. Here's one. You launch a child process with os.fork() (and perhaps os.exec*() as well). Eventually you'll get a SIGCHLD in the parent when the child exits. If you've also installed a Python-level SIGCHLD handler with signal.signal (and not flagged the handler with SA_RESTART using signal.siginterrupt) then if you're in select.select() when the SIGCHLD is received, select.select() will fail with select.error EINTR. If your Python SIGCHLD handler deals with the SIGCHLD completely before returning, then this lets you support child processes and use SocketServer at the same time. Changing the behavior of select.select() ("a fix at select level would be better") should be *very* carefully considered, and probably rejected after such consideration. There are completely legitimate use cases which require select.select() to fail with EINTR, and these should remain supported (not to mention that existing code relying on this behavior shouldn't be broken by a Python upgrade in a quite insidious way). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 14:57:33 2010 From: report at bugs.python.org (Ozgur Dogan Ugurlu) Date: Sun, 04 Apr 2010 12:57:33 +0000 Subject: [issue8310] dis.dis function skips new-style classes in a module In-Reply-To: <1270385853.05.0.694104105245.issue8310@psf.upfronthosting.co.za> Message-ID: <1270385853.05.0.694104105245.issue8310@psf.upfronthosting.co.za> New submission from Ozgur Dogan Ugurlu : The documentation says: dis.dis([bytesource]) Disassemble the bytesource object. bytesource can denote either a module, a class, a method, a function, or a code object. For a module, it disassembles all functions. For a class, it disassembles all methods. For a single code sequence, it prints one line per bytecode instruction. If no object is provided, it disassembles the last traceback. And the behavior is correct for old-style classes. However, since the if check in the function dis.dis is like this: if hasattr(x, '__dict__'): items = x.__dict__.items() items.sort() for name, x1 in items: if type(x1) in (types.MethodType, types.FunctionType, types.CodeType, types.ClassType): when given a module (x), it doesn't handle new-style classes which are types.TypeType. (types.ClassType are old-style classes) A simple addition of types.TypeType to the list used by the inner if clause fixes the problem for me but I don't know if it could introduce another bug. ---------- components: Library (Lib) messages: 102338 nosy: dogeen severity: normal status: open title: dis.dis function skips new-style classes in a module type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 15:21:54 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 04 Apr 2010 13:21:54 +0000 Subject: [issue8308] raw_bytes.decode('cp932') -- spurious mappings In-Reply-To: <1270338018.63.0.0227454811381.issue8308@psf.upfronthosting.co.za> Message-ID: <1270387314.11.0.53260616794.issue8308@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- resolution: -> wont fix stage: test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 15:32:17 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Apr 2010 13:32:17 +0000 Subject: [issue8188] Unified hash for numeric types. In-Reply-To: <1269117270.13.0.417099891076.issue8188@psf.upfronthosting.co.za> Message-ID: <1270387937.59.0.244323130194.issue8188@psf.upfronthosting.co.za> Mark Dickinson added the comment: New patch: - document and test sys.hash_info - document numeric hash definition (in Doc/library/stdtypes.rst; I'm not sure whether this is the best place for it) - document Decimal change (Decimal instances are now comparable with instances of float, fraction.Fraction) - refresh patch to apply cleanly to current svn. I think this is close to final form: I intend to apply this patch (or something very much like it) soon; any review would be appreciated. ---------- nosy: +rhettinger stage: -> commit review Added file: http://bugs.python.org/file16756/numeric_hash6.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 15:33:43 2010 From: report at bugs.python.org (Georg Brandl) Date: Sun, 04 Apr 2010 13:33:43 +0000 Subject: [issue7696] Improve Memoryview/Buffer documentation In-Reply-To: <1263418431.81.0.407262013758.issue7696@psf.upfronthosting.co.za> Message-ID: <1270388023.22.0.0913572534116.issue7696@psf.upfronthosting.co.za> Georg Brandl added the comment: > (I don't know why it doesn't have its own anchor, though) Because that is only a link to the real description: http://docs.python.org/dev/library/stdtypes.html#memoryview And I think even you, Mr Potrou, could infer how to add glossary entries from one look at glossary.rst :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 15:35:40 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Apr 2010 13:35:40 +0000 Subject: [issue8188] Unified hash for numeric types. In-Reply-To: <1269117270.13.0.417099891076.issue8188@psf.upfronthosting.co.za> Message-ID: <1270388140.56.0.0415488362102.issue8188@psf.upfronthosting.co.za> Mark Dickinson added the comment: I've refreshed the Rietveld patch as well: http://codereview.appspot.com/660042 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 15:36:53 2010 From: report at bugs.python.org (Jeff Pursell) Date: Sun, 04 Apr 2010 13:36:53 +0000 Subject: [issue8311] wave module sets data subchunk size incorrectly when writing wav file In-Reply-To: <1270388213.12.0.14457017538.issue8311@psf.upfronthosting.co.za> Message-ID: <1270388213.12.0.14457017538.issue8311@psf.upfronthosting.co.za> New submission from Jeff Pursell : I tried to create a 4 second file and only heard the first 2 seconds. The file size was correct for a 44.1 kHz, 16 bit mono file at 4 seconds, but both aplay and audactiy ignored the second half of the file. I went to this page https://ccrma.stanford.edu/courses/422/projects/WaveFormat/ and opened the output with a hex editor in little endian mode. I found that at offset 40, the data chunk size was wrong. It looked like it was just set to the number of samples. It should be the number of samples times bytes-per-sample (2) times number-of-channels (1 in my case). I manually set the number from 176400 to 352800 and that solved the problem for that wav file. I'm guessing this was just an oversight and the fix will be simple. I'll attach the code I used to generate the test tone. Just run python -i testTone.py and it will generate out.wav with the incorrect field. I am using pything 2.6.4 in ubuntu. ---------- components: Extension Modules files: testTone.zip messages: 102342 nosy: Jeff.Pursell severity: normal status: open title: wave module sets data subchunk size incorrectly when writing wav file type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file16757/testTone.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 15:48:54 2010 From: report at bugs.python.org (Tim Peters) Date: Sun, 04 Apr 2010 13:48:54 +0000 Subject: [issue8309] Sin(x) is Wrong In-Reply-To: <1270343074.04.0.0881828805303.issue8309@psf.upfronthosting.co.za> Message-ID: <1270388934.29.0.259355731244.issue8309@psf.upfronthosting.co.za> Tim Peters added the comment: At heart, this is really the same kind of thing that eventually prodded Python into adopting David Gay's burdensome ;-) code for correctly rounded double<->string I/O conversions. We could similarly take on porting and maintaining KC Ng's fdlibm (an open source libm implementation Ng developed while at Sun - it doesn't guarantee correct rounding, but does guarantee max error strictly less than 1 ULP in all cases). The tradeoffs are roughly similar. For example, fdlibm is typically much slower than the platform C's libm, and most people using math libraries in anger are much keener about speed than avoiding noise results for inputs in ranges they never intend to use. Perhaps surprisingly, fdlibm isn't "so slow" primarily because it's aiming at max 1 ULP error, but because it was coded to be as portable as possible. Platform-specific libm implementations play every trick in the book (& invented many of the tricks in the book to begin with!) to squeeze out every cycle from the specific hardware they're intended to run on. That makes "fast versus accurate versus portable" very much a "pick at most two" proposition for libm. ---------- nosy: +tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 15:54:05 2010 From: report at bugs.python.org (Brian Curtin) Date: Sun, 04 Apr 2010 13:54:05 +0000 Subject: [issue8304] strftime and Unicode characters In-Reply-To: <1270307324.04.0.0348018847246.issue8304@psf.upfronthosting.co.za> Message-ID: <1270389245.11.0.270713132917.issue8304@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 16:11:44 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Apr 2010 14:11:44 +0000 Subject: [issue8309] Sin(x) is Wrong In-Reply-To: <1270343074.04.0.0881828805303.issue8309@psf.upfronthosting.co.za> Message-ID: <1270390304.88.0.446008226837.issue8309@psf.upfronthosting.co.za> Mark Dickinson added the comment: > We could similarly take on porting and maintaining KC Ng's fdlibm Gulp. If we did that, I'd definitely want to push for dropping Python support for non-IEEE 754 systems. I'm not sure I've fully recovered from the dtoa.c addition yet. :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 17:58:50 2010 From: report at bugs.python.org (Paul Smith) Date: Sun, 04 Apr 2010 15:58:50 +0000 Subject: [issue8154] os.execlp('true') crashes the interpreter on 2.x In-Reply-To: <1268741143.77.0.223951034557.issue8154@psf.upfronthosting.co.za> Message-ID: <1270396730.78.0.29156032522.issue8154@psf.upfronthosting.co.za> Changes by Paul Smith : ---------- nosy: +paulsmith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 18:59:21 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Sun, 04 Apr 2010 16:59:21 +0000 Subject: [issue6931] dreadful performance in difflib: ndiff and HtmlDiff In-Reply-To: <1253199298.69.0.280559653373.issue6931@psf.upfronthosting.co.za> Message-ID: <1270400361.58.0.478226919691.issue6931@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: This is because difflib.ndiff (called by difflib.HtmlDiff.make_table), contrarily to difflib.unified_diff (and probably kdiff3), doesn't restrict itself to contiguous lines, and searches diff even inside lines, so the complexity is much worse (see how many times _fancy_replace and quick_ratio are being called). It might be a good idea to allow the user to specify the type of diff needed (ndiff vs unified_diff). ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 19:57:12 2010 From: report at bugs.python.org (Jeff Pursell) Date: Sun, 04 Apr 2010 17:57:12 +0000 Subject: [issue8311] wave module sets data subchunk size incorrectly when writing wav file In-Reply-To: <1270388213.12.0.14457017538.issue8311@psf.upfronthosting.co.za> Message-ID: <1270403832.09.0.135814575217.issue8311@psf.upfronthosting.co.za> Jeff Pursell added the comment: Here's my fix. The left file is the original and the right file is my version. Perhaps someone should check this patch on a big endian machine to make sure there are no issues there. I do not anticipate any issues. 416c416 < nframes = len(data) // (self._sampwidth * self._nchannels) --- > nframes = len(data) // self._nchannels 427c427 < self._datawritten = self._datawritten + len(data) --- > self._datawritten = self._datawritten + len(data) * self._sampwidth 463c463 < self._nframes = initlength / (self._nchannels * self._sampwidth) --- > self._nframes = initlength // self._nchannels ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 20:57:53 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 04 Apr 2010 18:57:53 +0000 Subject: [issue8188] Unified hash for numeric types. In-Reply-To: <1269117270.13.0.417099891076.issue8188@psf.upfronthosting.co.za> Message-ID: <1270407473.56.0.378004457714.issue8188@psf.upfronthosting.co.za> Stefan Krah added the comment: Mark, very nice concept! - I'm just starting to review the patch, but I think the unsigned longs in_Py_HashDouble() and long_hash() should be uint64_t on a 64-bit OS. For instance, now on Windows 64-bit: >>> hash(2**61-1) 1073741823 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 21:45:34 2010 From: report at bugs.python.org (Derek O'Connor) Date: Sun, 04 Apr 2010 19:45:34 +0000 Subject: [issue8309] Sin(x) is Wrong In-Reply-To: <1270343074.04.0.0881828805303.issue8309@psf.upfronthosting.co.za> Message-ID: <1270410334.39.0.715534838365.issue8309@psf.upfronthosting.co.za> Derek O'Connor added the comment: @ Tim Peters " ... are much keener about speed than avoiding noise results for inputs in ranges they *never intend to use* ". It is the *unintended use* that worries me. Sadly, "Speed is King". Perhaps that aphorism should be "Speed is Ki(lli)ng". @ Mark Dickinson I don't write C but Gay's 4300 line dtoa.c is the most frightening piece of code I've ever seen. I think accountants have the right idea: money is in cents, with positives in the left column and negatives in the right. All they need is integer addition and comparison. Multiplication? Only if you have taxation. Derek O'Connor ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 22:31:06 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 04 Apr 2010 20:31:06 +0000 Subject: [issue8311] wave module sets data subchunk size incorrectly when writing wav file In-Reply-To: <1270388213.12.0.14457017538.issue8311@psf.upfronthosting.co.za> Message-ID: <1270413066.1.0.918226801604.issue8311@psf.upfronthosting.co.za> R. David Murray added the comment: Any chance you could create a unit test for this? (The current set of tests is...pretty minimal.) Also, having the patch in unified diff format relative to the top of the source three would be helpful (although this one is small enough we could certainly apply it by hand, having a unified diff makes it more likely someone will test it). ---------- components: +Library (Lib) -Extension Modules nosy: +r.david.murray priority: -> normal stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 22:53:26 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 04 Apr 2010 20:53:26 +0000 Subject: [issue8188] Unified hash for numeric types. In-Reply-To: <1269117270.13.0.417099891076.issue8188@psf.upfronthosting.co.za> Message-ID: <1270414406.87.0.173247030952.issue8188@psf.upfronthosting.co.za> Stefan Krah added the comment: Actually the current long_hash() is affected as well. On Windows 64-bit: >>> hash(2**31) -2147483648 >>> hash(2**32) 1 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 23:01:25 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Sun, 04 Apr 2010 21:01:25 +0000 Subject: [issue8035] urllib.request.urlretrieve hangs In-Reply-To: <1267470113.93.0.44679631442.issue8035@psf.upfronthosting.co.za> Message-ID: <1270414885.23.0.714628903416.issue8035@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: Alright, what happens is the following: - the file you're trying to retrieve is actually redirected, so the server send a HTTP/1.X 302 Moved Temporarily - in urllib, when we get a redirection, we call redirect_internal: def redirect_internal(self, url, fp, errcode, errmsg, headers, data): if 'location' in headers: newurl = headers['location'] elif 'uri' in headers: newurl = headers['uri'] else: return void = fp.read() fp.close() # In case the server sent a relative URL, join with original: newurl = basejoin(self.type + ":" + url, newurl) return self.open(newurl) the fp.read() is there to wait for the remote end to close connection The problem, in this case, is that with Python 3.1, httplib uses HTTP/1.1 instead of HTTP/1.0 in version 2.6, and with HTTP/1.1 the server doesn't close the connection after sending the redirect (shown by tcpdump). So, the process remains stuck on fp.read(). Now, in version 3.1, if we simply change Lib/http/client.py:628 from class HTTPConnection: _http_vsn = 11 _http_vsn_str = 'HTTP/1.1' to class HTTPConnection: _http_vsn = 11 _http_vsn_str = 'HTTP/1.0' to use HTTP/1.0 instead, the retrieval works fine. Obviously, this is not a good solution. Since the RFC doesn't seem to require the server to close the connection after sending a redirect, we'd probably better close the connection ourselves. That's what the attached patch does, it simply removes the call to fp.read() before closing the connection. It also removes this for http_error_default, since if an error occurs, we probably want to close the connection as soon as possible instead of waiting for server to do so. ---------- keywords: +patch nosy: +neologix Added file: http://bugs.python.org/file16758/urllib_redirect.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 23:25:35 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sun, 04 Apr 2010 21:25:35 +0000 Subject: [issue8188] Unified hash for numeric types. In-Reply-To: <1269117270.13.0.417099891076.issue8188@psf.upfronthosting.co.za> Message-ID: <1270416335.33.0.181491089931.issue8188@psf.upfronthosting.co.za> Mark Dickinson added the comment: Yes, hash values are C longs, regardless of platform. I think that's probably too ingrained to consider changing it (we'd have to change hashes of all the non-numeric types, too). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 4 23:55:01 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Sun, 04 Apr 2010 21:55:01 +0000 Subject: [issue8312] Add post/pre hooks for distutils commands In-Reply-To: <1270418101.32.0.698965190272.issue8312@psf.upfronthosting.co.za> Message-ID: <1270418101.32.0.698965190272.issue8312@psf.upfronthosting.co.za> New submission from Tarek Ziad? : Add hooks to a script can be launched before/after a command. This will be useful to build pre/post commit hooks for install/uninstall commands for instance ---------- assignee: tarek components: Distutils2 messages: 102353 nosy: tarek severity: normal status: open title: Add post/pre hooks for distutils commands _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 00:31:03 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 04 Apr 2010 22:31:03 +0000 Subject: [issue8035] urllib.request.urlretrieve hangs In-Reply-To: <1267470113.93.0.44679631442.issue8035@psf.upfronthosting.co.za> Message-ID: <1270420263.31.0.891390845301.issue8035@psf.upfronthosting.co.za> R. David Murray added the comment: @andyharrington: No, crash is when the interpreter segfaults. I'm making it priority high, though, since it is a hang during an operation that is likely to happen fairly frequently. Senthil may want to bump it up even higher. @neologix: Thanks for figuring this out. ---------- nosy: +orsenthil, r.david.murray priority: -> high stage: -> test needed type: crash -> behavior versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 00:35:28 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 04 Apr 2010 22:35:28 +0000 Subject: [issue8287] python-gdb.py triggers compile errors on FreeBSD and Solaris In-Reply-To: <1270205780.23.0.00384755916779.issue8287@psf.upfronthosting.co.za> Message-ID: <1270420528.36.0.550160246893.issue8287@psf.upfronthosting.co.za> R. David Murray added the comment: Hmm. The patch didn't apply to my current trunk checkout. I'll look into why later. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 00:45:39 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 04 Apr 2010 22:45:39 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1270421139.45.0.222623349516.issue7559@psf.upfronthosting.co.za> Chris Jerdonek added the comment: This patch implements Michael's suggestion (but not the ErrorHolder part): http://bugs.python.org/issue7559#msg97462 The unit tests all pass with no change. If this approach looks good to you, I can add a unit test to the patch that checks that this bug has been fixed. Also, Twisted Matrix's web site doesn't seem to be responding too well at the moment, but if I recall correctly, their code has a permissive (MIT?) license that should allow a small snippet like this to be copied without taking extra steps. ---------- Added file: http://bugs.python.org/file16759/_patch-7559-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 01:24:01 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 04 Apr 2010 23:24:01 +0000 Subject: [issue8310] dis.dis function skips new-style classes in a module In-Reply-To: <1270385853.05.0.694104105245.issue8310@psf.upfronthosting.co.za> Message-ID: <1270423441.9.0.620010501522.issue8310@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r79769. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 02:15:42 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 05 Apr 2010 00:15:42 +0000 Subject: [issue8287] python-gdb.py triggers compile errors on FreeBSD and Solaris In-Reply-To: <1270205780.23.0.00384755916779.issue8287@psf.upfronthosting.co.za> Message-ID: <1270426542.85.0.847048855695.issue8287@psf.upfronthosting.co.za> Dave Malcolm added the comment: I believe $(INSTALL_SCRIPT) was changed to $(INSTALL_DATA) in r79716 (see http://bugs.python.org/issue8032#msg102288 ) Attaching refreshed version of the patch. ---------- Added file: http://bugs.python.org/file16760/introduce-var-for-gdb-hooks-002.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 02:51:51 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 05 Apr 2010 00:51:51 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270428711.3.0.353592645228.issue1578269@psf.upfronthosting.co.za> Jason R. Coombs added the comment: This latest patch (26) only merges the latest changes from the repo. ---------- Added file: http://bugs.python.org/file16761/windows symlink draft 26.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 03:42:34 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Apr 2010 01:42:34 +0000 Subject: [issue8287] python-gdb.py triggers compile errors on FreeBSD and Solaris In-Reply-To: <1270205780.23.0.00384755916779.issue8287@psf.upfronthosting.co.za> Message-ID: <1270431754.03.0.52709441453.issue8287@psf.upfronthosting.co.za> R. David Murray added the comment: Committed in r79778. We'll see how the buildbots fare. ---------- stage: patch review -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 05:16:40 2010 From: report at bugs.python.org (Meador Inge) Date: Mon, 05 Apr 2010 03:16:40 +0000 Subject: [issue8300] Allow struct.pack to handle objects with an __index__ method. In-Reply-To: <1270295507.67.0.95768179333.issue8300@psf.upfronthosting.co.za> Message-ID: <1270437400.75.0.0591464392098.issue8300@psf.upfronthosting.co.za> Meador Inge added the comment: Looks good to me. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 06:07:24 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 05 Apr 2010 04:07:24 +0000 Subject: [issue8218] Fix typos and phrasing in the Web servers howto In-Reply-To: <1269394991.51.0.861768873468.issue8218@psf.upfronthosting.co.za> Message-ID: <1270440444.56.0.42114251486.issue8218@psf.upfronthosting.co.za> Ezio Melotti added the comment: Fixed in r79781 (trunk), r79782 (release26-maint), r79783 (py3k) and r79784 (release31-maint). Thanks to all! ---------- resolution: accepted -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 07:37:00 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Mon, 05 Apr 2010 05:37:00 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270445820.91.0.379499304974.issue7978@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: > What kind of signals can be received in real-life? We use SIGUSR1 to reopen log files after rotation. sighandler works just fine, but after that Paste crashes. I suppose that implementing silent syscall restart at select.select() level is a bad idea (explanation is given already), but some helper like untilConcludes in socket module might be useful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 09:47:47 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 05 Apr 2010 07:47:47 +0000 Subject: [issue8300] Allow struct.pack to handle objects with an __index__ method. In-Reply-To: <1270295507.67.0.95768179333.issue8300@psf.upfronthosting.co.za> Message-ID: <1270453667.49.0.184910643614.issue8300@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 11:38:46 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 05 Apr 2010 09:38:46 +0000 Subject: [issue4683] urllib2.HTTPDigestAuthHandler fails on third hostname? In-Reply-To: <1229523259.96.0.571468029932.issue4683@psf.upfronthosting.co.za> Message-ID: <1270460326.87.0.431864765847.issue4683@psf.upfronthosting.co.za> Georg Brandl added the comment: Ping? ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 11:43:01 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 05 Apr 2010 09:43:01 +0000 Subject: [issue4683] urllib2.HTTPDigestAuthHandler fails on third hostname? In-Reply-To: <1229523259.96.0.571468029932.issue4683@psf.upfronthosting.co.za> Message-ID: <1270460581.6.0.567532686338.issue4683@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Okay, This vaguely got out of my mind. Shall come with the tests for HTTPAuthDigest. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 12:35:59 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 05 Apr 2010 10:35:59 +0000 Subject: [issue5198] Strange DeprecationWarning behaviour in module struct In-Reply-To: <1234250088.94.0.680929615779.issue5198@psf.upfronthosting.co.za> Message-ID: <1270463759.31.0.733169920999.issue5198@psf.upfronthosting.co.za> Georg Brandl added the comment: Both examples now give consistent behavior independent of byteorder in trunk: packing floats with "H" works, packing bytes out of range with "B" raises. Closing as "out of date". ---------- nosy: +georg.brandl resolution: -> out of date status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 12:56:29 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 05 Apr 2010 10:56:29 +0000 Subject: [issue8313] message in unittest tracebacks In-Reply-To: <1270464989.56.0.215414826495.issue8313@psf.upfronthosting.co.za> Message-ID: <1270464989.56.0.215414826495.issue8313@psf.upfronthosting.co.za> New submission from Michael Foord : >>> import unittest >>> class Foo(unittest.TestCase): ... def test_fffd(self): self.assertEqual(u'\ufffd', u'\ufffd\ufffd') ... >>> unittest.main(exit=False) F ====================================================================== FAIL: test_fffd (__main__.Foo) ---------------------------------------------------------------------- Traceback (most recent call last): File "", line 2, in test_fffd AssertionError: ---------------------------------------------------------------------- Ran 1 test in 0.001s The problem with creating unicode tracebacks is that they could fail when being output on terminals not capable of showing the full range of unicode characters (the default terminal on Windows is CP1252). This can already happen with Unicode messages that aren't part of the traceback. Detecting the 'unprintable' message before calling into traceback and replacing it with the repr of the unicode is one possibility. ---------- assignee: michael.foord components: Library (Lib) messages: 102368 nosy: ezio.melotti, michael.foord severity: normal status: open title: message in unittest tracebacks type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 13:44:35 2010 From: report at bugs.python.org (nik) Date: Mon, 05 Apr 2010 11:44:35 +0000 Subject: [issue6869] Embedded python crashed on 4th run, if "ctypes" is used In-Reply-To: <1252485075.59.0.965228056128.issue6869@psf.upfronthosting.co.za> Message-ID: <1270467875.54.0.89260289644.issue6869@psf.upfronthosting.co.za> nik added the comment: I can confirm that the patch fix this issue. I adapted the patch (variable names changed): 5523a5524 > Py_INCREF(&Struct_Type); 5529a5531 > Py_INCREF(&Union_Type); 5535a5538 > Py_INCREF(&Pointer_Type); 5541a5545 > Py_INCREF(&Array_Type); 5547a5552 > Py_INCREF(&Simple_Type); 5553a5559 > Py_INCREF(&CFuncPtr_Type); Platform: Linux (kubuntu 9.10 x64) Python: 2.6.4-0ubuntu3 ---------- nosy: +nik.lutz at gmail.com _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 13:48:09 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 05 Apr 2010 11:48:09 +0000 Subject: [issue7721] Code in xrange documentation does not work In-Reply-To: <1263678962.32.0.0144056263369.issue7721@psf.upfronthosting.co.za> Message-ID: <1270468089.95.0.50694996838.issue7721@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in release26-maint r79796. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 13:59:43 2010 From: report at bugs.python.org (Georg Brandl) Date: Mon, 05 Apr 2010 11:59:43 +0000 Subject: [issue7490] IGNORE_EXCEPTION_DETAIL should ignore the module name In-Reply-To: <1260702702.76.0.177643280777.issue7490@psf.upfronthosting.co.za> Message-ID: <1270468783.38.0.503395689756.issue7490@psf.upfronthosting.co.za> Changes by Georg Brandl : ---------- nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 14:18:05 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Apr 2010 12:18:05 +0000 Subject: [issue8314] test_ctypes fails in test_ulonglong on sparc buildbots In-Reply-To: <1270469885.55.0.752027246289.issue8314@psf.upfronthosting.co.za> Message-ID: <1270469885.55.0.752027246289.issue8314@psf.upfronthosting.co.za> New submission from R. David Murray : ====================================================================== FAIL: test_ulonglong (ctypes.test.test_callbacks.Callbacks) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home2/buildbot/slave/trunk.loewis-sun/build/Lib/ctypes/test/test_callbacks.py", line 68, in test_ulonglong self.check_type(c_ulonglong, 42) File "/home2/buildbot/slave/trunk.loewis-sun/build/Lib/ctypes/test/test_callbacks.py", line 31, in check_type self.assertEqual(result, arg) AssertionError: 0L != 42 ---------- components: Tests keywords: buildbot messages: 102371 nosy: r.david.murray, theller priority: normal severity: normal stage: needs patch status: open title: test_ctypes fails in test_ulonglong on sparc buildbots type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 14:19:00 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Apr 2010 12:19:00 +0000 Subject: [issue8314] test_ctypes fails in test_ulonglong on sparc buildbots In-Reply-To: <1270469885.55.0.752027246289.issue8314@psf.upfronthosting.co.za> Message-ID: <1270469940.98.0.607889442643.issue8314@psf.upfronthosting.co.za> R. David Murray added the comment: The ubuntu and debian sparc buildbots show the same failure, none of the other buildbots do. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 14:20:51 2010 From: report at bugs.python.org (Florent Xicluna) Date: Mon, 05 Apr 2010 12:20:51 +0000 Subject: [issue8314] test_ctypes fails in test_ulonglong on sparc buildbots In-Reply-To: <1270469885.55.0.752027246289.issue8314@psf.upfronthosting.co.za> Message-ID: <1270470051.38.0.544810205237.issue8314@psf.upfronthosting.co.za> Florent Xicluna added the comment: This bug is already reported here: http://bugs.python.org/issue8142#msg101134 ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 15:33:15 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Mon, 05 Apr 2010 13:33:15 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270474395.96.0.831694181659.issue8108@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 16:36:05 2010 From: report at bugs.python.org (Thouis (Ray) Jones) Date: Mon, 05 Apr 2010 14:36:05 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1266353325.38.0.278549753357.issue7946@psf.upfronthosting.co.za> Message-ID: <1270478165.79.0.287587150241.issue7946@psf.upfronthosting.co.za> Changes by Thouis (Ray) Jones : ---------- nosy: +thouis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 16:45:12 2010 From: report at bugs.python.org (Irmen de Jong) Date: Mon, 05 Apr 2010 14:45:12 +0000 Subject: [issue1103213] Adding the missing socket.recvall() method Message-ID: <1270478712.04.0.919863957336.issue1103213@psf.upfronthosting.co.za> Irmen de Jong added the comment: Ok I think I've got the code and doc changes ready. I added a recvall and a recvall_into method to the socket module. Any partially received data in case of errors is returned to the application as part of the args for a new exception, socket.partialdataerror. Still need to work on some unit tests for these new methods. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 17:04:37 2010 From: report at bugs.python.org (Irmen de Jong) Date: Mon, 05 Apr 2010 15:04:37 +0000 Subject: [issue1103213] Adding the missing socket.recvall() method Message-ID: <1270479877.5.0.11461121984.issue1103213@psf.upfronthosting.co.za> Changes by Irmen de Jong : Removed file: http://bugs.python.org/file6439/patch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 17:07:01 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 05 Apr 2010 15:07:01 +0000 Subject: [issue1220212] os.kill on windows Message-ID: <1270480021.33.0.353487513041.issue1220212@psf.upfronthosting.co.za> anatoly techtonik added the comment: FAQ should be updated http://www.python.org/doc/faq/windows/#how-do-i-emulate-os-kill-in-windows ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 17:07:48 2010 From: report at bugs.python.org (Irmen de Jong) Date: Mon, 05 Apr 2010 15:07:48 +0000 Subject: [issue1103213] Adding the missing socket.recvall() method Message-ID: <1270480068.56.0.982893668521.issue1103213@psf.upfronthosting.co.za> Changes by Irmen de Jong : Added file: http://bugs.python.org/file16762/socketmodulepatch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 17:08:25 2010 From: report at bugs.python.org (Irmen de Jong) Date: Mon, 05 Apr 2010 15:08:25 +0000 Subject: [issue1103213] Adding the missing socket.recvall() method Message-ID: <1270480105.03.0.916279246159.issue1103213@psf.upfronthosting.co.za> Changes by Irmen de Jong : Added file: http://bugs.python.org/file16763/libpatch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 17:09:00 2010 From: report at bugs.python.org (Irmen de Jong) Date: Mon, 05 Apr 2010 15:09:00 +0000 Subject: [issue1103213] Adding the missing socket.recvall() method Message-ID: <1270480140.81.0.14719674637.issue1103213@psf.upfronthosting.co.za> Changes by Irmen de Jong : Added file: http://bugs.python.org/file16764/docpatch.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 17:20:42 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 05 Apr 2010 15:20:42 +0000 Subject: [issue7964] "-m pdb" SyntaxError for "\r\n" formatted py files In-Reply-To: <1266583937.16.0.516750395183.issue7964@psf.upfronthosting.co.za> Message-ID: <1270480842.23.0.820418476068.issue7964@psf.upfronthosting.co.za> Jason R. Coombs added the comment: Is there a reason this didn't get reviewed for the 3.1.2 release? What steps need to be taken to see that it makes it into a 3.1.3 release? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 17:36:33 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Mon, 05 Apr 2010 15:36:33 +0000 Subject: [issue8315] ./python -m unittest test.test_importlib doesn't work In-Reply-To: <1270481793.28.0.468676978723.issue8315@psf.upfronthosting.co.za> Message-ID: <1270481793.28.0.468676978723.issue8315@psf.upfronthosting.co.za> New submission from Barry A. Warsaw : Actually, ./python -m unittest test.test_email doesn't work either and those are two cases where the Lib/test module just forwards to the package's own test suite, so maybe that's the problem. ---------- assignee: michael.foord components: Library (Lib) messages: 102377 nosy: barry, michael.foord severity: normal status: open title: ./python -m unittest test.test_importlib doesn't work versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 17:37:36 2010 From: report at bugs.python.org (David Andrzejewski) Date: Mon, 05 Apr 2010 15:37:36 +0000 Subject: [issue5103] ssl.SSLSocket timeout not working correctly when remote end is hanging In-Reply-To: <1233269067.88.0.11384047057.issue5103@psf.upfronthosting.co.za> Message-ID: <1270481856.22.0.732198248885.issue5103@psf.upfronthosting.co.za> Changes by David Andrzejewski : ---------- nosy: +dandrzejewski _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 17:37:41 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 05 Apr 2010 15:37:41 +0000 Subject: [issue7583] doctest should normalize tabs when comparing output In-Reply-To: <1261932632.12.0.972907709846.issue7583@psf.upfronthosting.co.za> Message-ID: <1270481861.06.0.456560236082.issue7583@psf.upfronthosting.co.za> anatoly techtonik added the comment: Could you be more specific about why users should not be allowed to use tabs in docstrings. An example use case/user story would help me a lot. I've made a precondition to check tab existence before expanding tabs for performance reasons. The indentation of output prior to tab expansion is necessary to correctly format output and show result when test fails. I agree to close this bug as "won't fix" if we can clear the confusion by describing the situation in more detail and providing examples. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 17:38:28 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 05 Apr 2010 15:38:28 +0000 Subject: [issue1220212] os.kill on windows Message-ID: <1270481908.83.0.51875815754.issue1220212@psf.upfronthosting.co.za> Brian Curtin added the comment: How about something like this patch? ---------- Added file: http://bugs.python.org/file16765/faq_update.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 17:44:33 2010 From: report at bugs.python.org (Andy Buckley) Date: Mon, 05 Apr 2010 15:44:33 +0000 Subject: [issue4256] optparse: provide a simple way to get a programmatically useful list of options In-Reply-To: <1225729854.98.0.852900527881.issue4256@psf.upfronthosting.co.za> Message-ID: <1270482273.26.0.710488603838.issue4256@psf.upfronthosting.co.za> Andy Buckley added the comment: Thanks for the pointers to both of these... I wasn't aware of either. I see argparse has been recently approved for Python stdlib inclusion, too: http://www.python.org/dev/peps/pep-0389/ Congratulations! As far as I can tell, genzshcomp is parsing the output of the help command to reverse-engineer what the allowed flags should be. Assuming that only one space occurs between the arg and its metavar, this should work 99% or the time... I'm not sure if there is any attempt to be clever when the formatting is ambiguous. But given that the opt parser already contains the structured information, life can be made easier by writing out a more readily parseable format. Here's an example bash parser function and its usage, for a further-simplified form of the above format where each arg (long or short) gets a line of its own and the arguments are indicated by a separate word as in the current output: Example input: $ foo --help-options #OPTPARSE_FORMAT 0 --version -h --help -r REGEXP --regexp REGEXP -s N --start N -e M --end M -f FILE --file FILE and the parser/completion functions: function _optparse_getargs() { local opts cur prev COMPREPLY=() cur="${COMP_WORDS[COMP_CWORD]}" prev="${COMP_WORDS[COMP_CWORD-1]}" PREVIFS=$IFS IFS=$'\n' for line in `$1 --help-options | egrep '^-'`; do opt=`echo $line | sed 's/^\(-[^ ]\+\).*$/\1/'` argeq=`echo $line | sed 's/^--[^ ]\+ \([A-Za-z0-9]*\)$/=/'` if [[ $argeq != "=" ]]; then argeq=""; fi opts="$opts $opt$argeq"; done IFS=$PREVIFS unset PREVIFS opts=`echo $opts | sed -e 's/^ *//' -e 's/ *$//'` if [[ ${cur} == -* ]] ; then COMPREPLY=( $(compgen -W "${opts}" -- ${cur}) ) if test -n "$COMPREPLY"; then return 0 fi fi return 0 } function _foo() { _optparse_getargs foo return 0 } complete -F _foo -o default foo ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 17:54:59 2010 From: report at bugs.python.org (David Andrzejewski) Date: Mon, 05 Apr 2010 15:54:59 +0000 Subject: [issue5103] ssl.SSLSocket timeout not working correctly when remote end is hanging In-Reply-To: <1233269067.88.0.11384047057.issue5103@psf.upfronthosting.co.za> Message-ID: <1270482899.1.0.918794899061.issue5103@psf.upfronthosting.co.za> David Andrzejewski added the comment: I believe this issue may be responsible for causing a very long hang in my application. Here's an example of it hanging for 30 minutes. Yes - minutes. [UI] 2010-04-03 11:33:34,209 DEBUG: Communicating with GUI on 127.0.0.1:9095 - timeout 10 seconds [UI] 2010-04-03 12:03:16,118 ERROR: Error in send_gui_command()! Traceback (most recent call last): File "javaui.pyc", line 72, in send_message File "client.pyc", line 506, in send_message_with_params File "client.pyc", line 230, in call File "client.pyc", line 94, in do_request File "httplib.pyc", line 1100, in connect File "ssl.pyc", line 350, in wrap_socket File "ssl.pyc", line 118, in __init__ File "ssl.pyc", line 293, in do_handshake error: [Errno 10053] An established connection was aborted by the software in your host machine This is Python 2.6.4 on Windows. (This particular time it happened on a 32-bit Server 2008 system). My guess is that after that 30 minute time period, Windows is seeing that the connection is hung and it's just aborting it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 18:01:50 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Mon, 05 Apr 2010 16:01:50 +0000 Subject: [issue1103213] Adding the missing socket.recvall() method Message-ID: <1270483310.18.0.765479731048.issue1103213@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Just a couple comments: * If MSG_WAITALL is defined and a signal interrupts recv, will a string shorter than requested will be returned by sock_recvall? * Since MSG_WAITALL is already exposed to Python (when the underlying platform provides it), I wonder if this could all be implemented more simply in pure Python. Can you elaborate on the motivation to use C? Someone should do another review when there are unit tests. ---------- nosy: +exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 18:10:34 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 05 Apr 2010 16:10:34 +0000 Subject: [issue8316] test_gdb is susceptible to tty width settings In-Reply-To: <1270483834.31.0.175074168079.issue8316@psf.upfronthosting.co.za> Message-ID: <1270483834.31.0.175074168079.issue8316@psf.upfronthosting.co.za> New submission from Dave Malcolm : test_gdb's get_gdb_repr carves up a gdb backtrace to try to extract how gdb representated the data. When connected to a tty, gdb will insert additional newlines and spaces based on the width of the tty (internally it has a wrap_here() function to do this), so the test turned out to be somewhat susceptible to whitespace and tty configuration. I'm attaching a patch against trunk which I believe fixes this. I've tested it with various tty widths (from 5 columns wide through to 235 columns wide), and redirecting to a file, and all tests pass. [Seen on buildbot on this run: http://www.python.org/dev/buildbot/builders/sparc%20Ubuntu%20trunk/builds/37/steps/test/logs/stdio and I believe this was the cause of all of four of the five failures there. The remaining one "test_corrupt_tp_name" seems to be a different issue] ---------- assignee: r.david.murray files: fix-test_gdb-whitespace-issues.txt keywords: buildbot messages: 102383 nosy: dmalcolm, r.david.murray severity: normal stage: patch review status: open title: test_gdb is susceptible to tty width settings versions: Python 2.7 Added file: http://bugs.python.org/file16766/fix-test_gdb-whitespace-issues.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 18:32:15 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Apr 2010 16:32:15 +0000 Subject: [issue8316] test_gdb is susceptible to tty width settings In-Reply-To: <1270483834.31.0.175074168079.issue8316@psf.upfronthosting.co.za> Message-ID: <1270485135.48.0.047344914358.issue8316@psf.upfronthosting.co.za> R. David Murray added the comment: Committed in r79803. I changed the assert_ to an if not m/fail, since assert_ is deprecated and I think the if makes it clearer than the assert_ what it is that is being checked. ---------- components: +Tests priority: -> normal resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 19:15:57 2010 From: report at bugs.python.org (anatoly techtonik) Date: Mon, 05 Apr 2010 17:15:57 +0000 Subject: [issue1220212] os.kill on windows In-Reply-To: <1270481908.83.0.51875815754.issue1220212@psf.upfronthosting.co.za> Message-ID: anatoly techtonik added the comment: Seems good to me, even though I'd rewrite some parts like this: - Prior to Python 2.7 and 3.2, to terminate a process, you can use ctypes:: + Prior to Python 2.7 and 3.2, you can use linksomehow:`ctypes` to terminate a process:: ... In newer Python versions :func:`os.kill` works on Windows with the additional feature of being able to send CTRL+C and CTRL+BREAK to console subprocesses that understand these signals. ... -- anatoly t. On Mon, Apr 5, 2010 at 6:38 PM, Brian Curtin wrote: > > Brian Curtin added the comment: > > How about something like this patch? > > ---------- > Added file: http://bugs.python.org/file16765/faq_update.diff > > _______________________________________ > Python tracker > > _______________________________________ > ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 19:24:20 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 05 Apr 2010 17:24:20 +0000 Subject: [issue8317] test_tarfile fails intermittently on Windows In-Reply-To: <1270488260.7.0.624220930721.issue8317@psf.upfronthosting.co.za> Message-ID: <1270488260.7.0.624220930721.issue8317@psf.upfronthosting.co.za> New submission from Jason R. Coombs : Using Windows 7 32-bit, and /branches/py3k at 79802. When I run the test_tarfile from the regrtest script, often the first run will succeed and subsequent runs will fail (though sometimes a first run will fail and rarely a subsequent run will succeed). It appears to be a timing issue. The output from a failed attempt is included below. Passing -v to the regrtest script prevents the failure from occurring. Also disabling test_extract_hardlink test prevents the failure from occurring in most cases. I found that enabling pdb and setting a trace in test_extract_hardlink prevented the error from occurring. I also attempted closing the tarfile explicitly (including in a finally block) and putting time.sleep(1) at the beginning or end of that test, but that seemed to have no effect. I am beginning to suspect that this problem is related to an indexer or malware scanner on the system checking the file after it's created, causing it to be locked at the time it's scheduled to be deleted. PS C:\Users\jaraco\projects\public\python-core-3.x-svn> pcbuild\python .\lib\test\regrtest.py test_tarfile test_tarfile test test_tarfile crashed -- : [Error 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\jaraco\\projects\\public\\python-core-3.x-svn\\build\\test_python_5196\\@test_5196_tmp\\testtar.tar.gz' 'test_tarfile' left behind directory '@test_5196_tmp' and it couldn't be removed: [Error 32] The process cannot access the file because it is being used by another process: '@test_5196_tmp\\testtar.tar.gz' 1 test failed: test_tarfile Traceback (most recent call last): File "C:\Users\jaraco\projects\public\python-core-3.x-svn\lib\test\support.py", line 400, in temp_cwd yield os.getcwd() File ".\lib\test\regrtest.py", line 1473, in main() File ".\lib\test\regrtest.py", line 687, in main sys.exit(len(bad) > 0 or interrupted) SystemExit: True During handling of the above exception, another exception occurred: Traceback (most recent call last): File ".\lib\test\regrtest.py", line 1473, in main() File "C:\Users\jaraco\projects\public\python-core-3.x-svn\lib\contextlib.py", line 35, in __exit__ self.gen.throw(type, value, traceback) File "C:\Users\jaraco\projects\public\python-core-3.x-svn\lib\test\support.py", line 404, in temp_cwd rmtree(name) File "C:\Users\jaraco\projects\public\python-core-3.x-svn\lib\test\support.py", line 184, in rmtree shutil.rmtree(path) File "C:\Users\jaraco\projects\public\python-core-3.x-svn\lib\shutil.py", line 251, in rmtree rmtree(fullname, ignore_errors, onerror) File "C:\Users\jaraco\projects\public\python-core-3.x-svn\lib\shutil.py", line 256, in rmtree onerror(os.remove, fullname, sys.exc_info()) File "C:\Users\jaraco\projects\public\python-core-3.x-svn\lib\shutil.py", line 254, in rmtree os.remove(fullname) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'C:\\Users\\jaraco\\projects\\public\\python-core-3.x-svn\\build\\test_python_5196\\@test_5196_tmp\\testtar.tar.gz' ---------- components: Tests messages: 102386 nosy: jaraco severity: normal status: open title: test_tarfile fails intermittently on Windows versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 19:24:54 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 05 Apr 2010 17:24:54 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270488294.69.0.771201841077.issue1578269@psf.upfronthosting.co.za> Jason R. Coombs added the comment: My initial troubleshooting indicated to me that the intermittent test_tarfile problem exists independent of the symlink patch, so it was not relevant to this issue. I've tried to do some more thorough troubleshooting, and this continues to be my finding, and somewhat consistent with Brian's finding. I've created issue8317 to track the trouble with test_tarfile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 19:33:44 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 05 Apr 2010 17:33:44 +0000 Subject: [issue8317] test_tarfile fails intermittently on Windows In-Reply-To: <1270488260.7.0.624220930721.issue8317@psf.upfronthosting.co.za> Message-ID: <1270488824.41.0.546753943592.issue8317@psf.upfronthosting.co.za> Brian Curtin added the comment: So far I've only seen this with os.symlink from #1578269 applied, but I will try more runs on a vanilla py3k to see if I can catch it. ---------- components: +Windows nosy: +brian.curtin stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 19:40:28 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Mon, 05 Apr 2010 17:40:28 +0000 Subject: [issue8317] test_tarfile fails intermittently on Windows In-Reply-To: <1270488824.41.0.546753943592.issue8317@psf.upfronthosting.co.za> Message-ID: <7A7DF54C-12BE-4525-83C2-5FD9730A1534@jaraco.com> Jason R. Coombs added the comment: > To be clear, all of my tests were without any patches applied. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 19:42:02 2010 From: report at bugs.python.org (Tres Seaver) Date: Mon, 05 Apr 2010 17:42:02 +0000 Subject: [issue8318] Deprecation of multifile inappropriate or incomplete In-Reply-To: <1270489322.03.0.368739706632.issue8318@psf.upfronthosting.co.za> Message-ID: <1270489322.03.0.368739706632.issue8318@psf.upfronthosting.co.za> New submission from Tres Seaver : Import of the multifile module emits a DeprecationWarning, but the warning is either incomplete: - The documentation[1] states that the 'email' module is to be preferred, but doesn't describe what APIs should be used from that module. - In fact, the 'email' module doesn't appear to provide an equivalent API to the 'multifile' module. or perhaps inappropriate, as not all handling of 'multipart' MIME is email related (e.g., processing HTTP form POSTs which include file uploads). At a minimum, the docs for 'multifile' should include examples showing the "preferred" way to implement its own native examples using the'email' module's APIs. [1] http://docs.python.org/library/multifile.html ---------- components: Library (Lib) messages: 102390 nosy: barry, tseaver severity: normal status: open title: Deprecation of multifile inappropriate or incomplete versions: Python 2.5, Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 19:58:23 2010 From: report at bugs.python.org (Irmen de Jong) Date: Mon, 05 Apr 2010 17:58:23 +0000 Subject: [issue1103213] Adding the missing socket.recvall() method Message-ID: <1270490303.5.0.971826588172.issue1103213@psf.upfronthosting.co.za> Irmen de Jong added the comment: Currently if MSG_WAITALL is defined, recvall() just calls recv() internally with the extra flag. Maybe that isn't the smartest thing to do because it duplicates recv's behavior on errors. Which is: release the data and raise an error. Would it be nicer to have recvall() release the data and raise an error, or to let it return the partial data? Either way, I think the behavior should be the same regardless of MSG_WAITALL being available. This is not yet the case. Why C: this started out by making the (very) old patch that I once wrote for socketmodule.c up to date with the current codebase, and taking Martin's comments into account. The old patch was small and straightforward. Unfortunately the new one turned out bigger and more complex than I thought. For instance I'm not particularly happy with the way recvall returns the partial data on fail. It uses a new exception for that but the code has some trickery to replace the socket.error exception that is initially raised. I'm not sure if my code is the right way to do this, it needs some review. I do think that putting it into the exception object is the only safe way of returning it to the application, unless the semantics on error are changed as mentioned above. Maybe it could be made simpler then. In any case, it probably is a good idea to see if a pure python solution (perhaps just some additions to Lib/socket.py?) would be better. Will put some effort into this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 20:08:55 2010 From: report at bugs.python.org (Winfried Plappert) Date: Mon, 05 Apr 2010 18:08:55 +0000 Subject: [issue8319] HTMLparser does not handle call to handle_data when a tag contains nor data. In-Reply-To: <1270490935.7.0.673554223896.issue8319@psf.upfronthosting.co.za> Message-ID: <1270490935.7.0.673554223896.issue8319@psf.upfronthosting.co.za> New submission from Winfried Plappert : When parsing HTML and having a string along the lines of , a call to handle_data is not issued between handle_starttag and handle_endtag, but afterwards. The problem is in HTMLparser.goahead, where the position i and j are calculated. The code reads if i < j: self.handle_data(rawdata[i:j]) but it should be if i <= j: self.handle_data(rawdata[i:j]) If there is data between and , everything works fine. I just checked the trunk of 2.6, this occurs in line 142 of Lib/HTMLParser.py. The size of HTMLParser.py is 13407 bytes, and is dated 'Feb 26 19:25'. ---------- components: Library (Lib) messages: 102392 nosy: wplappert severity: normal status: open title: HTMLparser does not handle call to handle_data when a tag contains nor data. type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 20:13:36 2010 From: report at bugs.python.org (Irmen de Jong) Date: Mon, 05 Apr 2010 18:13:36 +0000 Subject: [issue8320] docs on socket.recv_into doesn't mention the return value In-Reply-To: <1270491216.65.0.230513280348.issue8320@psf.upfronthosting.co.za> Message-ID: <1270491216.65.0.230513280348.issue8320@psf.upfronthosting.co.za> New submission from Irmen de Jong : Doc/library/socket.rst doesn't mention the return value for recv_into. Adding a simple "Returns the number of bytes received." should fix this. (note that recvfrom_into does mention its return value) ---------- assignee: georg.brandl components: Documentation keywords: easy messages: 102393 nosy: georg.brandl, irmen severity: normal status: open title: docs on socket.recv_into doesn't mention the return value type: feature request versions: Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 20:25:40 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 05 Apr 2010 18:25:40 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270491940.54.0.0683316125037.issue8108@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Yes, it's the _sslobj.shutdow() call: File "test_ftplib.py", line 332, in handle_close self.socket = self.socket.unwrap() File "/usr/local/lib/python2.7/ssl.py", line 258, in unwrap s = self._sslobj.shutdown() error: [Errno 0] Error Since it's not clear to me where exactly this comes from, whether it's from the Python C binding or OpenSSL itself, I tried to put some debugging printf() calls in Modules/_ssl.c, but it seems that after installing OpenSSL 0.9.8m I'm no longer able to compile Python 2.7 from sorces. This is what I get when I run ./configure; make: gcc -pthread -fPIC -fno-strict-aliasing -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -I/usr/local/include -I/home/giampaolo/svn/python-2.7/Include -I/home/giampaolo/svn/python-2.7 -c /home/giampaolo/svn/python-2.7/Modules/_ssl.c -o build/temp.linux-i686-2.7/home/giampaolo/svn/python-2.7/Modules/_ssl.o gcc -pthread -shared build/temp.linux-i686-2.7/home/giampaolo/svn/python-2.7/Modules/_ssl.o -L/usr/local/lib -lssl -lcrypto -o build/lib.linux-i686-2.7/_ssl.so *** WARNING: renaming "_ssl" since importing it failed: build/lib.linux-i686-2.7/_ssl.so: undefined symbol: inflate ---------- nosy: -jcea versions: +Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 20:28:47 2010 From: report at bugs.python.org (Florent Xicluna) Date: Mon, 05 Apr 2010 18:28:47 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270492127.9.0.734169375855.issue8108@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +jcea _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 20:28:49 2010 From: report at bugs.python.org (Winfried Plappert) Date: Mon, 05 Apr 2010 18:28:49 +0000 Subject: [issue8319] HTMLparser does not handle call to handle_data when a tag contains no data. In-Reply-To: <1270490935.7.0.673554223896.issue8319@psf.upfronthosting.co.za> Message-ID: <1270492129.06.0.599785961954.issue8319@psf.upfronthosting.co.za> Changes by Winfried Plappert : ---------- title: HTMLparser does not handle call to handle_data when a tag contains nor data. -> HTMLparser does not handle call to handle_data when a tag contains no data. _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 20:30:55 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Apr 2010 18:30:55 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1270491940.54.0.0683316125037.issue8108@psf.upfronthosting.co.za> Message-ID: <1270492372.3446.0.camel@localhost> Antoine Pitrou added the comment: > Since it's not clear to me where exactly this comes from, whether it's > from the Python C binding or OpenSSL itself, I tried to put some > debugging printf() calls in Modules/_ssl.c, but it seems that after > installing OpenSSL 0.9.8m I'm no longer able to compile Python 2.7 > from sorces. Have you tried `make distclean`? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 20:37:06 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 05 Apr 2010 18:37:06 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270492626.35.0.503042416152.issue8108@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: No I haven't, but I tried just now and I get the same error. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 21:21:07 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Apr 2010 19:21:07 +0000 Subject: [issue8318] Deprecation of multifile inappropriate or incomplete In-Reply-To: <1270489322.03.0.368739706632.issue8318@psf.upfronthosting.co.za> Message-ID: <1270495267.44.0.807333659995.issue8318@psf.upfronthosting.co.za> R. David Murray added the comment: It's not inappropriate, since the facilities *in* the email package are supposed to support other MIME use cases (such as HTML). That it isn't clear how to convert is certainly a doc bug at the very least. However, I wouldn't be entirely surprised to find that there are things you can do with multifile that you can't (yet) do with the facilities from the email package. If so, these will most likely be considered bugs in the email package. (Now, whether or not 'email' is an appropriate package name for this bundle of facilities is a different question, and not one I'm going to address :) ---------- nosy: +r.david.murray priority: -> normal stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 21:24:27 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Apr 2010 19:24:27 +0000 Subject: [issue8319] HTMLparser does not handle call to handle_data when a tag contains no data. In-Reply-To: <1270490935.7.0.673554223896.issue8319@psf.upfronthosting.co.za> Message-ID: <1270495467.04.0.550319997263.issue8319@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- keywords: +easy nosy: +orsenthil priority: -> normal stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 21:28:18 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Apr 2010 19:28:18 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1270492626.35.0.503042416152.issue8108@psf.upfronthosting.co.za> Message-ID: <1270495815.3446.11.camel@localhost> Antoine Pitrou added the comment: > No I haven't, but I tried just now and I get the same error. I think "inflate" is a function exported by the zlib. Perhaps you can add "-lz" to the linking flags. (Googling hints that OpenSSL can depend on the zlib if compression is enabled) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 21:42:38 2010 From: report at bugs.python.org (Tres Seaver) Date: Mon, 05 Apr 2010 19:42:38 +0000 Subject: [issue8318] Deprecation of multifile inappropriate or incomplete In-Reply-To: <1270489322.03.0.368739706632.issue8318@psf.upfronthosting.co.za> Message-ID: <1270496558.8.0.376238955365.issue8318@psf.upfronthosting.co.za> Tres Seaver added the comment: > [T]here [may be] things you can do with multifile that you can't (yet) > do with the facilities from the email package. If so, these will most > likely be considered bugs in the email package. Surely the presence of such a feature would make the deprecation premature. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 21:46:46 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 05 Apr 2010 19:46:46 +0000 Subject: [issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone In-Reply-To: <1236845917.79.0.765415316549.issue5479@psf.upfronthosting.co.za> Message-ID: <1270496806.52.0.498722922143.issue5479@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hello Small documentation question: Does the expression ?total ordering? have established usage in maths or computer science? Its meaning is not obvious to the non-maths person that I am. Regards ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 21:48:40 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 05 Apr 2010 19:48:40 +0000 Subject: [issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone In-Reply-To: <1236845917.79.0.765415316549.issue5479@psf.upfronthosting.co.za> Message-ID: <1270496920.14.0.0835037902134.issue5479@psf.upfronthosting.co.za> Mark Dickinson added the comment: Yes, it's a standard mathematics term. http://en.wikipedia.org/wiki/Total_order ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 21:48:56 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 05 Apr 2010 19:48:56 +0000 Subject: [issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone In-Reply-To: <1236845917.79.0.765415316549.issue5479@psf.upfronthosting.co.za> Message-ID: <1270496936.13.0.537980722036.issue5479@psf.upfronthosting.co.za> Raymond Hettinger added the comment: http://en.wikipedia.org/wiki/Total_order ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 21:53:58 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 05 Apr 2010 19:53:58 +0000 Subject: [issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone In-Reply-To: <1236845917.79.0.765415316549.issue5479@psf.upfronthosting.co.za> Message-ID: <1270497238.45.0.268130556423.issue5479@psf.upfronthosting.co.za> ?ric Araujo added the comment: Thanks for the link. Please include it in the future doc if you judge it useful for a large number of users. I?m still wondering if ?total_ordering? is the best name for a decorator that fills the blanks to provide total ordering. Regards ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 22:03:35 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Apr 2010 20:03:35 +0000 Subject: [issue8318] Deprecation of multifile inappropriate or incomplete In-Reply-To: <1270489322.03.0.368739706632.issue8318@psf.upfronthosting.co.za> Message-ID: <1270497815.88.0.91659552956.issue8318@psf.upfronthosting.co.za> R. David Murray added the comment: Depending on the feature, I might agree with that, but I wasn't involved in that decision. If email only supports something structured with proper MIME headers and multifile is more general (which I *think* is the case, but I haven't actually tried to run any tests to confirm it), does that mean we should have kept multifile in py3? I'm inclined to say no. Should we make email support the more general case? I'll at least keep it in the back of my mind as I/we work on email6. Multifile is still there in 2.7, at the moment. I presume you have a use case for the multifile module. Could you do me a favor and add that use case the set of use cases in the email wiki? (http://wiki.python.org/moin/Email%20SIG/UseCases). It would be a good idea to mention there that email is supposed to supersede multifile. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 22:04:03 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 05 Apr 2010 20:04:03 +0000 Subject: [issue8287] python-gdb.py triggers compile errors on FreeBSD and Solaris In-Reply-To: <1270205780.23.0.00384755916779.issue8287@psf.upfronthosting.co.za> Message-ID: <1270497843.4.0.948945993449.issue8287@psf.upfronthosting.co.za> R. David Murray added the comment: The buildbots seem happy. ---------- resolution: -> fixed stage: commit review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 22:42:55 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Apr 2010 20:42:55 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270500175.51.0.74783261026.issue8321@psf.upfronthosting.co.za> Message-ID: <1270500175.51.0.74783261026.issue8321@psf.upfronthosting.co.za> New submission from Antoine Pitrou : This patch gives access to the OpenSSL version the _ssl module is linked against, through three attributes: one gives the raw integer, another the decoded 5-tuple of ints, the last one the version string as returned by OpenSSL. ---------- components: Library (Lib) files: sslversion.patch keywords: patch messages: 102406 nosy: benjamin.peterson, flox, giampaolo.rodola, janssen, pitrou priority: normal severity: normal stage: patch review status: open title: Give access to openssl version number type: feature request versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file16767/sslversion.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 22:43:18 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 05 Apr 2010 20:43:18 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270500198.36.0.685367035418.issue8108@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: As suggested in this thread: http://mirt.net/pipermail/stunnel-users/2005-July/000661.html ...I made the following change to the Makefile: - LIBS= -lpthread -ldl -lutil + LIBS= -lpthread -ldl -lutil -lz That made the error change as follows: running build_ext INFO: Can't locate Tcl/Tk libs and/or headers Python build finished, but the necessary bits to build these modules were not found: _bsddb _curses _curses_panel _sqlite3 _tkinter bsddb185 bz2 dbm gdbm readline sunaudiodev ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 22:44:03 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Apr 2010 20:44:03 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270500175.51.0.74783261026.issue8321@psf.upfronthosting.co.za> Message-ID: <1270500243.38.0.763599644048.issue8321@psf.upfronthosting.co.za> Antoine Pitrou added the comment: (note: tested with OpenSSL 0.9.8k and 1.0.0) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 22:45:36 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Apr 2010 20:45:36 +0000 Subject: [issue8322] test_ssl failures with OpenSSL 1.0.0 In-Reply-To: <1270500336.1.0.699742916544.issue8322@psf.upfronthosting.co.za> Message-ID: <1270500336.1.0.699742916544.issue8322@psf.upfronthosting.co.za> New submission from Antoine Pitrou : When I compile and link against a local build of OpenSSL 1.0.0 (vanilla), I get the following errors in test_ssl: ====================================================================== ERROR: testProtocolSSL2 (test.test_ssl.ThreadedTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/cpython/newssl/Lib/test/test_ssl.py", line 869, in testProtocolSSL2 tryProtocolCombo(ssl.PROTOCOL_SSLv2, ssl.PROTOCOL_SSLv23, True) File "/home/antoine/cpython/newssl/Lib/test/test_ssl.py", line 736, in tryProtocolCombo CERTFILE, CERTFILE, client_protocol, chatty=False) File "/home/antoine/cpython/newssl/Lib/test/test_ssl.py", line 688, in serverParamsTest raise test_support.TestFailed("Unexpected exception: " + str(x)) TestFailed: Unexpected exception: [Errno 104] Connection reset by peer ====================================================================== ERROR: testProtocolSSL3 (test.test_ssl.ThreadedTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/cpython/newssl/Lib/test/test_ssl.py", line 903, in testProtocolSSL3 tryProtocolCombo(ssl.PROTOCOL_SSLv3, ssl.PROTOCOL_SSLv23, False) File "/home/antoine/cpython/newssl/Lib/test/test_ssl.py", line 745, in tryProtocolCombo ssl.get_protocol_name(server_protocol))) TestFailed: Client protocol SSLv23 succeeded with server protocol SSLv3! ====================================================================== ERROR: testProtocolTLS1 (test.test_ssl.ThreadedTests) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/cpython/newssl/Lib/test/test_ssl.py", line 914, in testProtocolTLS1 tryProtocolCombo(ssl.PROTOCOL_TLSv1, ssl.PROTOCOL_SSLv23, False) File "/home/antoine/cpython/newssl/Lib/test/test_ssl.py", line 745, in tryProtocolCombo ssl.get_protocol_name(server_protocol))) TestFailed: Client protocol SSLv23 succeeded with server protocol TLSv1! ---------- components: Library (Lib) messages: 102409 nosy: flox, giampaolo.rodola, janssen, pitrou priority: normal severity: normal stage: needs patch status: open title: test_ssl failures with OpenSSL 1.0.0 type: behavior versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 22:46:53 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Apr 2010 20:46:53 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270500413.66.0.732627370583.issue8108@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I've tried to build against OpenSSL 1.0.0, and I get further failures in test_ssl. Since I don't know whether they are related, I've created a separate issue for them: issue8322 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 22:46:57 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 05 Apr 2010 20:46:57 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270500175.51.0.74783261026.issue8321@psf.upfronthosting.co.za> Message-ID: <1270500417.52.0.0197670986945.issue8321@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Can you please add documentation as well? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 22:48:54 2010 From: report at bugs.python.org (David W. Lambert) Date: Mon, 05 Apr 2010 20:48:54 +0000 Subject: [issue5479] Add an easy way to provide total ordering now that __cmp__ is deprecated/gone In-Reply-To: <1270496806.52.0.498722922143.issue5479@psf.upfronthosting.co.za> Message-ID: <1270500530.4142.42.camel@lambertdw> David W. Lambert added the comment: http://en.wikipedia.org/wiki/Total_order For pair of items from a set, (that's the total) if a <= b and b <= c then a <= c (part of the order) if a <= b and b <= a then a compares the same as b, a == b, (the other part of the order) On Mon, 2010-04-05 at 19:46 +0000, ?ric Araujo wrote: > ?ric Araujo added the comment: > > Hello > > Small documentation question: Does the expression ?total ordering? have established usage in maths or computer science? Its meaning is not obvious to the non-maths person that I am. > > Regards > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 23:10:26 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Apr 2010 21:10:26 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270500175.51.0.74783261026.issue8321@psf.upfronthosting.co.za> Message-ID: <1270501826.84.0.772222411059.issue8321@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file16767/sslversion.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 23:10:55 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Apr 2010 21:10:55 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270500175.51.0.74783261026.issue8321@psf.upfronthosting.co.za> Message-ID: <1270501855.15.0.931517846673.issue8321@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New patch with doc. ---------- Added file: http://bugs.python.org/file16768/sslversion.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 23:11:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Apr 2010 21:11:57 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270500175.51.0.74783261026.issue8321@psf.upfronthosting.co.za> Message-ID: <1270501917.7.0.318126513639.issue8321@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file16768/sslversion.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 23:12:16 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Apr 2010 21:12:16 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270500175.51.0.74783261026.issue8321@psf.upfronthosting.co.za> Message-ID: <1270501936.31.0.698567216466.issue8321@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file16769/sslversion.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 23:19:59 2010 From: report at bugs.python.org (Winfried Plappert) Date: Mon, 05 Apr 2010 21:19:59 +0000 Subject: [issue8319] HTMLparser does not handle call to handle_data when a tag contains no data. In-Reply-To: <1270490935.7.0.673554223896.issue8319@psf.upfronthosting.co.za> Message-ID: <1270502399.97.0.656192351373.issue8319@psf.upfronthosting.co.za> Winfried Plappert added the comment: The same code can be found in the 3.1 distribution. ---------- versions: +Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 23:20:57 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 05 Apr 2010 21:20:57 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270500175.51.0.74783261026.issue8321@psf.upfronthosting.co.za> Message-ID: <1270502457.95.0.158541517212.issue8321@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: I was about to open a request for this. Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 23:33:11 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Mon, 05 Apr 2010 21:33:11 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270503191.08.0.129234495336.issue8299@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Sorry, what I meant with the "original problem" was the phenomenon observed by Antoine (IIRC) that the same CPU thread tends to hog the gil, even when releaseing it in ceval.c. What I have been looking at up to now is chiefly IO performance using David's iotest.py, and improving the poor performance of IO. IO will not suffer as badly on windows because the IO thread will get its fair slice of execution time. Promted by you, I added this bit of code to the iotest.py: spins = 0 laststat = 0 def spin(): global spins, laststat task,args = task_pidigits() while True: r= task(*args) spins += 1 t = time.clock() if t-laststat > 1: print spins/(t-laststat) spins = 0 laststat = t You are right, however that cpu throughput of multiple cpu bound thread suffers. And in fact, on windows, it appears to suffer the least using the LEGACY_GIL implementation. This is, I conjecture, because there are far fewer context switches (because relinqushing the GIL fails). My conjecture is that context switches between threads on two cores are so expensive as to dramatically affect performance. Normal multithreaded programs don't suffer from this because the threads are kept busy. But in our case, we are stopping one thread on one core, and starting another on a separate core, and this causes latency. Now, I've improved my patch somewhat. First off, I fixed some minor errors in the PRIORITY_GIL implementation. But more importantly, I added something called FIFOCOND. It is a condition variable that guarantees the FIFO property. This was prompted by my observation that even Windows' Semaphore doesn't do that, rather the windows scheduler may allow the currently executing thread to jump ahead in the semaphore queue. The FIFOCOND condition variable fixes that using explicit scheduling, and is intended as a diagnostic tool. (Antoine, your comment from 13:04 about "roundrobin" inasfar as that we don't know anything about the condition variable behaviour. I was assuming FIFO behaviour for the sake of argument, and I thought I? put it in to the comments that we assume a general 'fairness' there. Put in the FIFOCOND and you will have that fairness guaranteed.) At any rate, I believe my patch provides a useful platform for further experimentation. 1) Factoring out the gil as a separate type of lock (which it must be) 2) allowing for different implementation of the GIL 3) shoring up the Condition variable implementation on Windows 4) Providing a FIFOCOND_T type to enforce a particular scheduling order, and demonstrating how we can be explicit about thread scheduling. I have already demonstrated that using the PRIORITY_GIL method fixes the problem with IO threads in the presence of CPU bound threads. Your iotest.py script is perfect for this, using 2 worker threads. On windows, the problem with IO wasn't so grave as I have explained (windows by default works as the ROUNDROBIN_GIL implementation, not the LEGACY_GIL mode used on pthreads). The PRIORITY_GIL solution is particularly effective with multicore on Windows, but it also improves IO throughput if cpu affinity of the server is fixed to one CPU, i.e. on singlecore. I have no fix for CPU bound threads, and I honestly don't think such a fix exists, except by causing switches to happen far less frequently, e.g. by raising the checkinterval, and so mitigating the problem (which is what the new gil in py3k does with its timeout implementation) But the IO fix for pthreads To summarise then: 1) The GIL has two problems on multicore machines a) performance of CPU threads goes down b) performance of IO in the presence of CPU threads is abysmal, but not on Windows 2) We can fix problem b) on pthreads with the ROUNDROBIN_GIL implementation. 3) We can improve IO performance in the presence of CPU threads on pthreads and Windows using the PRIORITY_GIL implementation, even to become faster than on a single core. 4) We cannot do anything about decreased performance of co-operatively switching CPU threads on multicore except switching less frequently. But this is quite feasible now with the PRIORITY_GIL implementation because it can request an immediate gil drop when IO is ready. So raising the checkinterval will not affect IO performance in a negative way. Please have a look at the latest patch with IO thread performance in mind. It is currently configured to enable the PRIORITY_GIL implementation without the FIFOCOND on windows and pthreads. ---------- Added file: http://bugs.python.org/file16770/gil2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 23:46:21 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Apr 2010 21:46:21 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270500175.51.0.74783261026.issue8321@psf.upfronthosting.co.za> Message-ID: <1270503981.77.0.295419545556.issue8321@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed, with Benjamin's permission, in r79812 (trunk) and r79813 (py3k). ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 23:55:10 2010 From: report at bugs.python.org (Florent Xicluna) Date: Mon, 05 Apr 2010 21:55:10 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270504510.08.0.984892509853.issue8299@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 5 23:57:18 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 05 Apr 2010 21:57:18 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270500175.51.0.74783261026.issue8321@psf.upfronthosting.co.za> Message-ID: <1270504638.15.0.362581309407.issue8321@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: >>> import ssl Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/ssl.py", line 62, in from _ssl import OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_INFO, OPENSSL_VERSION ImportError: cannot import name OPENSSL_VERSION_NUMBER Just in case it's my fault, here's what I've done before importing ssl module: > svn up Updated to revision 79814. > make distclean ... > ./configure ; make ; make install ... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 00:05:39 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Apr 2010 22:05:39 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270504638.15.0.362581309407.issue8321@psf.upfronthosting.co.za> Message-ID: <1270505256.3446.18.camel@localhost> Antoine Pitrou added the comment: > >>> import ssl > Traceback (most recent call last): > File "", line 1, in > File "/usr/local/lib/python2.7/ssl.py", line 62, in > from _ssl import OPENSSL_VERSION_NUMBER, OPENSSL_VERSION_INFO, OPENSSL_VERSION > ImportError: cannot import name OPENSSL_VERSION_NUMBER This looks rather unlikely. Can you type "import _ssl" and then check _ssl.__file__ to see if it's the one that's just been compiled? Or did compilation fail? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 00:15:15 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 05 Apr 2010 22:15:15 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270500175.51.0.74783261026.issue8321@psf.upfronthosting.co.za> Message-ID: <1270505715.24.0.99512587151.issue8321@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: The ./configure -> make -> make install process went fine, or at least, I think so, as it completed without reporting errors or exiting. ...But maybe I'm doing something wrong as just a little while ago I was modifying _ssl.c but wasn't able to see those changes applied. So I'm gonna ask: when I modify *.c files, do I have to do something else other than "./configure; make; make install" in order to see the changes applied? Anyway, here's what you asked: root at ubuntu:/home/giampaolo/svn/python-2.7# python Python 2.7a4+ (trunk:79814, Apr 5 2010, 23:53:01) [GCC 4.4.1] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import _ssl >>> _ssl >>> _ssl.__file__ '/usr/local/lib/python2.7/lib-dynload/_ssl.so' >>> ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 00:21:45 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Apr 2010 22:21:45 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270505715.24.0.99512587151.issue8321@psf.upfronthosting.co.za> Message-ID: <1270506222.3446.23.camel@localhost> Antoine Pitrou added the comment: > So I'm gonna ask: when I modify *.c files, do I have to do something > else other than "./configure; make; make install" in order to see the > changes applied? No. If you run the Python binary from the SVN checkout directory (rather than from an installation), _ssl should come from the build subdirectory, not from /usr/local/lib. Example here: $ pwd /home/antoine/cpython/newssl $ ./python -c "import _ssl; print _ssl.__file__" /home/antoine/cpython/newssl/build/lib.linux-x86_64-2.7/_ssl.so If _ssl is coming from "/usr/local/lib/...", it means that something modifies your sys.path so as to put that path before the path to the just built extension modules. I can't really investigate this point for you, but try using "python -E" instead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 00:29:50 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 05 Apr 2010 22:29:50 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270505715.24.0.99512587151.issue8321@psf.upfronthosting.co.za> Message-ID: <1270506708.3446.25.camel@localhost> Antoine Pitrou added the comment: > So I'm gonna ask: when I modify *.c files, do I have to do something > else other than "./configure; make; make install" in order to see the > changes applied? Oh, sorry, I had overlooked the "make install" bit. Well then I don't know. But you can run the interpreter without installing :-) (just "./python") And check the output of "make" after you have touched Modules/_ssl.c ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 00:45:18 2010 From: report at bugs.python.org (Robin Schoonover) Date: Mon, 05 Apr 2010 22:45:18 +0000 Subject: [issue8323] multiprocessing.Queue ignores pickle restrictions in .put() In-Reply-To: <1270507518.5.0.340159262485.issue8323@psf.upfronthosting.co.za> Message-ID: <1270507518.5.0.340159262485.issue8323@psf.upfronthosting.co.za> New submission from Robin Schoonover : The multiprocessing module's version of the Queue class, which causes objects to be pickled for process to process transfer, ignores pickle restrictions when objects are added to the queue. Example code (buffer isn't pickleable): from multiprocessing import Queue q = Queue() q.put(buffer("this is a buffer")) print(q.get()) It results in an exception, which is expected, but the exception is confusing, after the problem has already occurred, and if I were actually using multiple processes, not in the process that tried to send an unsendable object: Traceback (most recent call last): File "mppkbuffer.py", line 5, in print(q.get()) File "/usr/lib/python2.6/multiprocessing/queues.py", line 91, in get res = self._recv() TypeError: buffer() takes at least 1 argument (0 given) Expected result would be a thrown exception when we attempt to put the object into the queue using .put(), NOT when we attempt pull it out of the queue using .get(), when it gets unpickled. Basically, while pickle fails when it tries to dump, Queue succeeds the dump (somehow) and fails to load. I have tested with python 2.6.4 and 2.7a4. 3.1 doesn't appear to have this bug (but it does have a different one which I will report later). ---------- components: Library (Lib) messages: 102423 nosy: rschoon severity: normal status: open title: multiprocessing.Queue ignores pickle restrictions in .put() type: behavior versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 00:52:08 2010 From: report at bugs.python.org (Robin Schoonover) Date: Mon, 05 Apr 2010 22:52:08 +0000 Subject: [issue8323] multiprocessing.Queue ignores pickle restrictions in .put() In-Reply-To: <1270507518.5.0.340159262485.issue8323@psf.upfronthosting.co.za> Message-ID: <1270507928.01.0.484372545683.issue8323@psf.upfronthosting.co.za> Robin Schoonover added the comment: Since these sort of buffer objects don't exist in 3.x (so far as I know), I came up with a different way to test in 3.x (basically, trying to pickle bound or unbound methods). It turns out that using this method to test it in 2.6 seems to fail where it should (in .put()), so if there's some sort of object that isn't pickleable in the same way as buffer that exists in 3.x, it should be tested to see if this specific problem is actually confined to 2.6 or not. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 00:53:58 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 05 Apr 2010 22:53:58 +0000 Subject: [issue8323] multiprocessing.Queue ignores pickle restrictions in .put() In-Reply-To: <1270507518.5.0.340159262485.issue8323@psf.upfronthosting.co.za> Message-ID: <1270508038.79.0.702311380445.issue8323@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- assignee: -> jnoller nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 00:56:28 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 05 Apr 2010 22:56:28 +0000 Subject: [issue8321] Give access to openssl version number In-Reply-To: <1270500175.51.0.74783261026.issue8321@psf.upfronthosting.co.za> Message-ID: <1270508188.08.0.45722319069.issue8321@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: You were right: make output had an error involving ssl I didn't notice. My bad. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 01:19:34 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 05 Apr 2010 23:19:34 +0000 Subject: [issue8324] add a test command In-Reply-To: <1270509574.31.0.218772255625.issue8324@psf.upfronthosting.co.za> Message-ID: <1270509574.31.0.218772255625.issue8324@psf.upfronthosting.co.za> New submission from Tarek Ziad? : Add a test command in distutils, ala setuptools ---------- assignee: tarek components: Distutils2 keywords: gsoc messages: 102426 nosy: tarek priority: normal severity: normal status: open title: add a test command type: feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 01:31:30 2010 From: report at bugs.python.org (Michael Foord) Date: Mon, 05 Apr 2010 23:31:30 +0000 Subject: [issue8324] add a distutils test command In-Reply-To: <1270509574.31.0.218772255625.issue8324@psf.upfronthosting.co.za> Message-ID: <1270510290.24.0.229163440627.issue8324@psf.upfronthosting.co.za> Michael Foord added the comment: Should default to test discovery if no arguments are supplied. Valid arguments: "testrunner", "tests" or "testsuite". Default testrunner is unittest of course. "tests" / "testsuite" to be of the form: "package.module.suitename" (or just "package.module"). ---------- nosy: +michael.foord title: add a test command -> add a distutils test command _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 01:45:22 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Mon, 05 Apr 2010 23:45:22 +0000 Subject: [issue8324] add a distutils test command In-Reply-To: <1270509574.31.0.218772255625.issue8324@psf.upfronthosting.co.za> Message-ID: <1270511122.51.0.799790046887.issue8324@psf.upfronthosting.co.za> Changes by Giampaolo Rodola' : ---------- nosy: +giampaolo.rodola _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 02:44:59 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 06 Apr 2010 00:44:59 +0000 Subject: [issue7026] test_urllib: unsetting missing 'env' variable In-Reply-To: <1254358150.75.0.46389883722.issue7026@psf.upfronthosting.co.za> Message-ID: <1270514699.16.0.0434375413417.issue7026@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Sridhar, I am unable to reproduce this bug in the 3.x (py3k and release31-maint) on 64 bit linux. I glance at the code to see any underpinnings for this RuntimeError and could not find any at the place the exception occurred. Is it anyway related to other buildout issue you had mentioned? Can you provide the steps to reproduce? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 04:22:17 2010 From: report at bugs.python.org (Tres Seaver) Date: Tue, 06 Apr 2010 02:22:17 +0000 Subject: [issue8318] Deprecation of multifile inappropriate or incomplete In-Reply-To: <1270489322.03.0.368739706632.issue8318@psf.upfronthosting.co.za> Message-ID: <1270520537.56.0.551705979337.issue8318@psf.upfronthosting.co.za> Tres Seaver added the comment: > Could you do me a favor and add that use case the set of use cases in > the email wiki? Done. The code in Zope which still uses 'multifile' is in the tests for HTTP 'Range' support: http://svn.zope.org/*checkout*/Zope/trunk/src/OFS/tests/testRanges.py?content-type=text%2Fplain ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 05:01:14 2010 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 06 Apr 2010 03:01:14 +0000 Subject: [issue8319] HTMLparser does not handle call to handle_data when a tag contains no data. In-Reply-To: <1270490935.7.0.673554223896.issue8319@psf.upfronthosting.co.za> Message-ID: <1270522874.65.0.713824755239.issue8319@psf.upfronthosting.co.za> Winfried Plappert added the comment: Here is a test program (shannon_data.py), some sample data (Shannon-2010.0.02-extract.html) and two output files (correct.out and wrong.out). ---------- Added file: http://bugs.python.org/file16771/shannon_data.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 05:01:47 2010 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 06 Apr 2010 03:01:47 +0000 Subject: [issue8319] HTMLparser does not handle call to handle_data when a tag contains no data. In-Reply-To: <1270490935.7.0.673554223896.issue8319@psf.upfronthosting.co.za> Message-ID: <1270522907.02.0.962383771763.issue8319@psf.upfronthosting.co.za> Changes by Winfried Plappert : Added file: http://bugs.python.org/file16772/Shannon-2010.0.02-extract.html _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 05:02:33 2010 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 06 Apr 2010 03:02:33 +0000 Subject: [issue8319] HTMLparser does not handle call to handle_data when a tag contains no data. In-Reply-To: <1270490935.7.0.673554223896.issue8319@psf.upfronthosting.co.za> Message-ID: <1270522953.93.0.437305218137.issue8319@psf.upfronthosting.co.za> Changes by Winfried Plappert : Added file: http://bugs.python.org/file16773/correct.out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 05:03:24 2010 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 06 Apr 2010 03:03:24 +0000 Subject: [issue8319] HTMLparser does not handle call to handle_data when a tag contains no data. In-Reply-To: <1270490935.7.0.673554223896.issue8319@psf.upfronthosting.co.za> Message-ID: <1270523004.27.0.330760707662.issue8319@psf.upfronthosting.co.za> Changes by Winfried Plappert : Added file: http://bugs.python.org/file16774/wrong.out _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 05:12:43 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 06 Apr 2010 03:12:43 +0000 Subject: [issue8317] test_tarfile fails intermittently on Windows In-Reply-To: <1270488260.7.0.624220930721.issue8317@psf.upfronthosting.co.za> Message-ID: <1270523563.13.0.20886279973.issue8317@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I've tried reproducing this on a clean system and have thusfar been unable to. I'll try to eliminate variables on the failing system and perhaps this will elicit some information about what's causing the intermittent failures with the symlink patch. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 05:21:29 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 06 Apr 2010 03:21:29 +0000 Subject: [issue8262] bad wording in error message attempting to start a Thread twice In-Reply-To: <1269925782.78.0.466554273109.issue8262@psf.upfronthosting.co.za> Message-ID: <1270524089.2.0.362541413744.issue8262@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Yes, the proposed wording is more suitable in the scenarios when the error is encountered. Also saw there is already a test (test_start_thread_again), which covers this. There is no harm in changing the wording. ---------- assignee: -> orsenthil nosy: +orsenthil resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 05:21:36 2010 From: report at bugs.python.org (Winfried Plappert) Date: Tue, 06 Apr 2010 03:21:36 +0000 Subject: [issue8319] HTMLparser does not handle call to handle_data when a tag contains no data. In-Reply-To: <1270490935.7.0.673554223896.issue8319@psf.upfronthosting.co.za> Message-ID: <1270524096.05.0.741623226848.issue8319@psf.upfronthosting.co.za> Winfried Plappert added the comment: in short the correct output should be 2/4/2010;6.3;11.1;0.8;6.5;;7.8;-5 versus 2/4/2010;6.3;11.1;0.8;6.5;7.8;-5 which implies that one element is missing in the output stream :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 05:36:49 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 06 Apr 2010 03:36:49 +0000 Subject: [issue8262] bad wording in error message attempting to start a Thread twice In-Reply-To: <1269925782.78.0.466554273109.issue8262@psf.upfronthosting.co.za> Message-ID: <1270525009.63.0.0512691860221.issue8262@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Fixed in r79817, r79819 and r79821. Thanks for the report and the patch, Gabriel. ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 06:13:14 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Tue, 06 Apr 2010 04:13:14 +0000 Subject: [issue8317] test_tarfile fails intermittently on Windows In-Reply-To: <1270488260.7.0.624220930721.issue8317@psf.upfronthosting.co.za> Message-ID: <1270527194.7.0.376422259074.issue8317@psf.upfronthosting.co.za> Jason R. Coombs added the comment: After grabbing a clean checkout, I'm unable to reproduce this problem where I was seeing it earlier, so I suspect the problem is in fact related to one or more lingering patches that were applied to the source. Please close this ticket as invalid. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 06:24:36 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 06 Apr 2010 04:24:36 +0000 Subject: [issue8317] test_tarfile fails intermittently on Windows In-Reply-To: <1270488260.7.0.624220930721.issue8317@psf.upfronthosting.co.za> Message-ID: <1270527876.19.0.456901952018.issue8317@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- resolution: -> invalid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 06:29:53 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 06 Apr 2010 04:29:53 +0000 Subject: [issue8319] HTMLparser does not handle call to handle_data when a tag contains no data. In-Reply-To: <1270490935.7.0.673554223896.issue8319@psf.upfronthosting.co.za> Message-ID: <1270528193.02.0.496419720867.issue8319@psf.upfronthosting.co.za> Senthil Kumaran added the comment: But changing the HTMLParser.goahead's way to treating tags from if i < j: self.handle_data(rawdata[i:j]) TO if i <= j: self.handle_data(rawdata[i:j] is not the correct way to deal with this problem. Theoretically, whatever it is doing seems correct. As there is no data, don't call handle_data. I can understand your testcase, and I think there is some other way to handle the test you are mentioning. If you change the above line, many of the existing tests may fail, so that *may not be* way to go. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 07:08:14 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Tue, 06 Apr 2010 05:08:14 +0000 Subject: [issue8280] urllib2 passes fragment identifier to server In-Reply-To: <1270138113.06.0.589316518246.issue8280@psf.upfronthosting.co.za> Message-ID: <1270530494.04.0.851213030754.issue8280@psf.upfronthosting.co.za> Changes by Senthil Kumaran : ---------- assignee: -> orsenthil resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 09:54:48 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 06 Apr 2010 07:54:48 +0000 Subject: [issue6090] zipfile DeprecationWarning Python 2.5/2.6 In-Reply-To: <1243011059.87.0.0917631314165.issue6090@psf.upfronthosting.co.za> Message-ID: <1270540488.19.0.361649738794.issue6090@psf.upfronthosting.co.za> anatoly techtonik added the comment: This code is broken in 2.7alpha4 - it doesn't add file at all. Traceback (most recent call last): File "test.py", line 5, in new.writestr(zi,'fgh') File "C:\~env\Python27\lib\zipfile.py", line 1099, in writestr self.fp.write(zinfo.FileHeader()) File "C:\~env\Python27\lib\zipfile.py", line 342, in FileHeader len(filename), len(extra)) struct.error: ushort format requires 0 <= number <= USHRT_MAX ---------- components: +Library (Lib) -Extension Modules nosy: +techtonik title: zipfile DeprecationWarning Python 2.6.2 -> zipfile DeprecationWarning Python 2.5/2.6 versions: +Python 2.5, Python 2.7 Added file: http://bugs.python.org/file16775/test6090.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 10:17:42 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 06 Apr 2010 08:17:42 +0000 Subject: [issue6090] zipfile DeprecationWarning Python 2.5/2.6 In-Reply-To: <1243011059.87.0.0917631314165.issue6090@psf.upfronthosting.co.za> Message-ID: <1270541862.18.0.729518353573.issue6090@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti priority: -> normal stage: -> needs patch type: -> behavior versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 10:18:38 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 06 Apr 2010 08:18:38 +0000 Subject: [issue8320] docs on socket.recv_into doesn't mention the return value In-Reply-To: <1270491216.65.0.230513280348.issue8320@psf.upfronthosting.co.za> Message-ID: <1270541918.13.0.224346552365.issue8320@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r79822. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 10:41:12 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 06 Apr 2010 08:41:12 +0000 Subject: [issue2824] zipfile to handle duplicate files in archive In-Reply-To: <1210537070.35.0.0613996133193.issue2824@psf.upfronthosting.co.za> Message-ID: <1270543272.46.0.488956220131.issue2824@psf.upfronthosting.co.za> anatoly techtonik added the comment: Still an issue for Python 2.7 ---------- versions: +Python 2.7 Added file: http://bugs.python.org/file16776/test2824.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 10:57:36 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 06 Apr 2010 08:57:36 +0000 Subject: [issue8322] test_ssl failures with OpenSSL 1.0.0 In-Reply-To: <1270500336.1.0.699742916544.issue8322@psf.upfronthosting.co.za> Message-ID: <1270544256.1.0.783316136627.issue8322@psf.upfronthosting.co.za> STINNER Victor added the comment: Extract of SSL_CTX_new manual page: SSLv23_method(void), SSLv23_server_method(void), SSLv23_client_method(void) A TLS/SSL connection established with these methods will understand the SSLv2, SSLv3, and TLSv1 protocol. A client will send out SSLv2 client hello messages and will indicate that it also understands SSLv3 and TLSv1. A server will understand SSLv2, SSLv3, and TLSv1 client hello messages. This is the best choice when compatibility is a concern. I don't think that "Client protocol SSLv23 succeeded with server protocol SSLv3" or "Client protocol SSLv23 succeeded with server protocol TLSv1" are errors. ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 11:05:25 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 09:05:25 +0000 Subject: [issue8322] test_ssl failures with OpenSSL 1.0.0 In-Reply-To: <1270500336.1.0.699742916544.issue8322@psf.upfronthosting.co.za> Message-ID: <1270544725.38.0.467763027631.issue8322@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It begs the question of why the tests succeed with previous OpenSSL versions. The only possibly relevant entry I could find in the OpenSSL changelog (but I'm not an expert) is the following: *) If no SSLv2 ciphers are used don't use an SSLv2 compatible client hello: this allows the use of compression and extensions. Change default cipher string to remove SSLv2 ciphersuites. This effectively avoids ancient SSLv2 by default unless an application cipher string requests it. [Steve Henson] ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 11:10:32 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 06 Apr 2010 09:10:32 +0000 Subject: [issue2228] Imaplib speedup patch In-Reply-To: <1204580526.67.0.16390655339.issue2228@psf.upfronthosting.co.za> Message-ID: <1270545032.34.0.754082143181.issue2228@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- components: +Library (Lib) type: resource usage -> performance versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 11:24:20 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Apr 2010 09:24:20 +0000 Subject: [issue7772] test_py3kwarn fails when running the whole test suite In-Reply-To: <1264358547.08.0.209937802024.issue7772@psf.upfronthosting.co.za> Message-ID: <1270545860.69.0.624280320768.issue7772@psf.upfronthosting.co.za> Mark Dickinson added the comment: I very much appreciate flox's efforts here, but IMO we really need some more robust solution to the problem of (testing + global warning state). See also issue 4180. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 11:35:14 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 06 Apr 2010 09:35:14 +0000 Subject: [issue8325] improve regrtest command line help In-Reply-To: <1270546514.38.0.076876301482.issue8325@psf.upfronthosting.co.za> Message-ID: <1270546514.38.0.076876301482.issue8325@psf.upfronthosting.co.za> New submission from anatoly techtonik : regrtest command line help can be greatly improved to encourage users run tests. ---------- components: Tests messages: 102443 nosy: techtonik severity: normal status: open title: improve regrtest command line help versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 11:39:25 2010 From: report at bugs.python.org (Eric Smith) Date: Tue, 06 Apr 2010 09:39:25 +0000 Subject: [issue8325] improve regrtest command line help In-Reply-To: <1270546514.38.0.076876301482.issue8325@psf.upfronthosting.co.za> Message-ID: <1270546765.34.0.394333342052.issue8325@psf.upfronthosting.co.za> Eric Smith added the comment: Any suggestions for what these changes would be? ---------- nosy: +eric.smith stage: -> needs patch type: -> feature request versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 11:44:21 2010 From: report at bugs.python.org (Yaniv Aknin) Date: Tue, 06 Apr 2010 09:44:21 +0000 Subject: [issue7834] socket.connect() no longer works with AF_BLUETOOTH L2CAP sockets In-Reply-To: <1265069614.13.0.295096684445.issue7834@psf.upfronthosting.co.za> Message-ID: <1270547061.18.0.150807745455.issue7834@psf.upfronthosting.co.za> Yaniv Aknin added the comment: I wouldn't mind producing the patch, if Mathew is OK with this. ---------- nosy: +Yaniv.Aknin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 11:56:17 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 06 Apr 2010 09:56:17 +0000 Subject: [issue8322] test_ssl failures with OpenSSL 1.0.0 In-Reply-To: <1270500336.1.0.699742916544.issue8322@psf.upfronthosting.co.za> Message-ID: <1270547777.09.0.698236476988.issue8322@psf.upfronthosting.co.za> STINNER Victor added the comment: All errors concern SSLv23 at server side, and another protocol at client side (SSLv23 for client and server works as expected). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 12:29:51 2010 From: report at bugs.python.org (David Coconut) Date: Tue, 06 Apr 2010 10:29:51 +0000 Subject: [issue8326] Cannot import name SemLock In-Reply-To: <1270549791.67.0.929964356468.issue8326@psf.upfronthosting.co.za> Message-ID: <1270549791.67.0.929964356468.issue8326@psf.upfronthosting.co.za> New submission from David Coconut : Operating system: Ubuntu 10.04 Lucid Lynx (Beta) This worked with Python 3.1 on 9.10 Karmic Koala. The same error appears on two separate installations of Lucid. Issue 3770 does not seem to be relevant here. Traceback (most recent call last): File "/usr/lib/python3.1/multiprocessing/synchronize.py", line 28, in from _multiprocessing import SemLock ImportError: cannot import name SemLock During handling of the above exception, another exception occurred: Traceback (most recent call last): File "main.py", line 16, in q = JoinableQueue() File "/usr/lib/python3.1/multiprocessing/__init__.py", line 218, in JoinableQueue from multiprocessing.queues import JoinableQueue File "/usr/lib/python3.1/multiprocessing/queues.py", line 22, in from multiprocessing.synchronize import Lock, BoundedSemaphore, Semaphore, Condition File "/usr/lib/python3.1/multiprocessing/synchronize.py", line 33, in " function, see issue 3770.") ImportError: This platform lacks a functioning sem_open implementation, therefore, the required synchronization primitives needed will not function, see issue 3770. ---------- messages: 102447 nosy: coconutrb severity: normal status: open title: Cannot import name SemLock type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 12:36:15 2010 From: report at bugs.python.org (anatoly techtonik) Date: Tue, 06 Apr 2010 10:36:15 +0000 Subject: [issue8325] improve regrtest command line help In-Reply-To: <1270546514.38.0.076876301482.issue8325@psf.upfronthosting.co.za> Message-ID: <1270550175.61.0.211254153705.issue8325@psf.upfronthosting.co.za> anatoly techtonik added the comment: This should be enough for now. Is HG diff against trunk ok? ---------- keywords: +patch versions: +Python 2.6 Added file: http://bugs.python.org/file16777/8325.improve-regrtest-help.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 12:45:43 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 10:45:43 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270550743.62.0.183437786159.issue8108@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, here is a patch fixing all test_ftplib failures (tested with openssl 0.9.8k and 1.0.0). There are a couple of fixes here: - a workaround for the strange SSL_shutdown() error return, also witnessed by LightHTTPd users (see URL in comments) - an auto-retry for SSLSocket.unwrap() in blocking mode - a bizarre issue in test_ftplib where DTPHandler.handle_close() gets called many times in a test (test_data_connection) I think the SSL_shutdown() issue should be checked on the OpenSSL mailing-list. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 12:46:05 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 10:46:05 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270550765.89.0.272398299182.issue8108@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file16778/newssl.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 13:05:36 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 06 Apr 2010 11:05:36 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270551936.79.0.470749857386.issue8108@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: def handle_error(self): - raise + # Ignore errors while closing, because the remote end could have + # abruptly shut down the TCP connection while we are still + # waiting for SSL shutdown to finish. + if not self._ssl_closing: + raise I don't like this. I should have said that I think my original patch is wrong as it attempts to shutdown() the SSL layer in asyncore's close() method. I think that I should have done that in handle_close() instead of close() because the two methods are called in different circumstances and have different meanings: - handle_close() is supposed to be called when the connection is a about to be closed "in a clean way" (for example: the other end properly finished to transmit all the data). - close() may be called in different situations, also when the connection gets closed abruptly. In this case we should avoid to shutdown() the SSL layer as we might be dealing with a "dead" connection. The right thing to do in this case is just close() the socket without doing anything else. IMHO, what we should try to avoid to do here is silently ignoring any error condition as you did in handle_error() method. What happens if you move the SSL shutdown() call in handle_close() method and leave handle_error() unchanged? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 13:11:16 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 11:11:16 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1270551936.79.0.470749857386.issue8108@psf.upfronthosting.co.za> Message-ID: <1270552393.3518.19.camel@localhost> Antoine Pitrou added the comment: > What happens if you move the SSL shutdown() call in handle_close() > method and leave handle_error() unchanged? I get occasional crashes such as the following: Exception in thread Thread-60: Traceback (most recent call last): File "/home/antoine/cpython/newssl/Lib/threading.py", line 530, in __bootstrap_inner self.run() File "/home/antoine/cpython/newssl/Lib/test/test_ftplib.py", line 229, in run asyncore.loop(timeout=0.1, count=1) File "/home/antoine/cpython/newssl/Lib/asyncore.py", line 211, in loop poll_fun(timeout, map) File "/home/antoine/cpython/newssl/Lib/asyncore.py", line 154, in poll write(obj) File "/home/antoine/cpython/newssl/Lib/asyncore.py", line 88, in write obj.handle_error() File "/home/antoine/cpython/newssl/Lib/asyncore.py", line 84, in write obj.handle_write_event() File "/home/antoine/cpython/newssl/Lib/test/test_ftplib.py", line 313, in handle_write_event super(SSLConnection, self).handle_write_event() File "/home/antoine/cpython/newssl/Lib/asyncore.py", line 440, in handle_write_event self.handle_write() File "/home/antoine/cpython/newssl/Lib/asynchat.py", line 174, in handle_write self.initiate_send() File "/home/antoine/cpython/newssl/Lib/asynchat.py", line 215, in initiate_send self.handle_close() File "/home/antoine/cpython/newssl/Lib/test/test_ftplib.py", line 352, in handle_close self._do_ssl_shutdown() File "/home/antoine/cpython/newssl/Lib/test/test_ftplib.py", line 290, in _do_ssl_shutdown self.socket.unwrap() File "/home/antoine/cpython/newssl/Lib/ssl.py", line 264, in unwrap s = self._sslobj.shutdown() error: [Errno 32] Broken pipe ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 13:15:11 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 11:15:11 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1270552393.3518.19.camel@localhost> Message-ID: <1270552628.3518.21.camel@localhost> Antoine Pitrou added the comment: By the way, this "broken pipe" error could be due to the fact that the FTP_TLS client never tries to call unwrap() on its SSL socket. Perhaps the close() method should be overriden? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 13:20:41 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Tue, 06 Apr 2010 11:20:41 +0000 Subject: [issue1572968] release GIL while doing I/O operations in the mmap module Message-ID: <1270552841.96.0.0746486216743.issue1572968@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: As soon as you're dealing with files (not anonymous mapping), you can get the same type of latency than when using open/read/write... While it's probably not worth the trouble to release the GIL for every operation involving mmaped-files, there are a couple places where it should be considered, for example: Modules/mmapmodule.c:new_mmap_object #ifdef HAVE_FSTAT # ifdef __VMS /* on OpenVMS we must ensure that all bytes are written to the file */ if (fd != -1) { fsync(fd); } # endif fsync() can take up to a couple seconds, so we should probably allow threads here (this is done only on VMS). Another place worth looking at is when using msync(), like in mmap_object_dealloc(): if (m_obj->data!=NULL) { msync(m_obj->data, m_obj->size, MS_SYNC); munmap(m_obj->data, m_obj->size); } or in mmap_flush_method(): if (-1 == msync(self->data + offset, size, MS_SYNC)) { PyErr_SetFromErrno(mmap_module_error); return NULL; } msycn too can take quite a long time to complete. I can write a patch if someone's willing to review it. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 13:24:44 2010 From: report at bugs.python.org (Eric Smith) Date: Tue, 06 Apr 2010 11:24:44 +0000 Subject: [issue8325] improve regrtest command line help In-Reply-To: <1270546514.38.0.076876301482.issue8325@psf.upfronthosting.co.za> Message-ID: <1270553084.91.0.243131198032.issue8325@psf.upfronthosting.co.za> Eric Smith added the comment: That diff format looks fine to me. I'll review the content of your changes in the next day or so. ---------- keywords: +easy, needs review priority: -> normal stage: needs patch -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 13:39:28 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 11:39:28 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270553968.02.0.913671675079.issue8108@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Here is a new patch. It doesn't change handle_error() but instead ignores abruptly closed sockets when doing the SSL shutdown. The underlying problem seems to be an asyncore limitation: close() can be called after an error such as EPIPE or ECONNABORTED, but asyncore doesn't give us any way to know in advance. ---------- Added file: http://bugs.python.org/file16779/newssl2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 13:40:33 2010 From: report at bugs.python.org (Zubin Mithra) Date: Tue, 06 Apr 2010 11:40:33 +0000 Subject: [issue8312] Add post/pre hooks for distutils commands In-Reply-To: <1270418101.32.0.698965190272.issue8312@psf.upfronthosting.co.za> Message-ID: <1270554033.19.0.632172718891.issue8312@psf.upfronthosting.co.za> Changes by Zubin Mithra : ---------- nosy: +zubin71 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 13:41:29 2010 From: report at bugs.python.org (Zubin Mithra) Date: Tue, 06 Apr 2010 11:41:29 +0000 Subject: [issue8324] add a distutils test command In-Reply-To: <1270509574.31.0.218772255625.issue8324@psf.upfronthosting.co.za> Message-ID: <1270554089.89.0.0445543121455.issue8324@psf.upfronthosting.co.za> Changes by Zubin Mithra : ---------- nosy: +zubin71 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 13:43:11 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 06 Apr 2010 11:43:11 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270554191.85.0.178087480902.issue8108@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > By the way, this "broken pipe" error could be due to the fact that the > FTP_TLS client never tries to call unwrap() on its SSL socket. Perhaps > the close() method should be overriden? ftplib.FTP_TLS class already calls unwrap() but only when closing a "secured" *data* connection. This is never done for the *control* connection as the examples shown in RFC-4217 do that only when dealing with the CCC command which is intended to switch the control connection back to clear text. Since ftplib.py does not implement the CCC command I would avoid to override its close() method. As for our test server we are currently shutting down the SSL layer for both connections (control and data) so this might be the cause of EPIPE. At this proposal I suggest to move the shutdown() call from SSLConnection.handle_close() to DummyTLS_DTPHandler.handle_close() and see what happens. If EPIPE keeps being raised then I would investigate on what EPIPE means in terms of OpenSSL itself. It might mean that the socket is supposed to be closed in which case it's perfectly legitimate. I'd have a few questions: > a workaround for the strange SSL_shutdown() error return, also > witnessed by LightHTTPd users (see URL in comments) What happens now? I mean... what do we get instead of socket.error: 0? > an auto-retry for SSLSocket.unwrap() in blocking mode Wasn't SSL_MODE_AUTO_RETRY option applied in issue 8222 supposed to already do that for us? > I think the SSL_shutdown() issue should be checked on the OpenSSL > mailing-list. If socket.error: 0 comes from OpenSSL then yes. I was suspecting something like this. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 13:54:32 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 11:54:32 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270554872.54.0.713163544355.issue8108@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > As for our test server we are currently shutting down the SSL layer for > both connections (control and data) so this might be the cause of EPIPE. I don't understand your reasoning. These are separate connections, closing one shouldn't affect the other. > At this proposal I suggest to move the shutdown() call from > SSLConnection.handle_close() to DummyTLS_DTPHandler.handle_close() and > see what happens. What happens is that you are taking shortcuts with SSL since you aren't trying to do a proper shutdown :) If you really think this is a good idea, feel free to give it a try. But please see newssl2.patch as well. (of course this is only a test server but AFAIU you would like to make it right) > What happens now? I mean... what do we get instead of socket.error: 0? A normal successful return. > Wasn't SSL_MODE_AUTO_RETRY option applied in issue 8222 supposed to > already do that for us? SSL_MODE_AUTO_RETRY deals with SSL negotiation. SSL_shutdown() has its own separate semantics, which have changed *even in blocking mode*. If I disable auto-retry I get failures such as: ====================================================================== ERROR: test_storbinary (test.test_ftplib.TestTLS_FTPClassMixin) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/cpython/newssl/Lib/test/test_ftplib.py", line 505, in test_storbinary self.client.storbinary('stor', f) File "/home/antoine/cpython/newssl/Lib/ftplib.py", line 727, in storbinary conn.unwrap() File "/home/antoine/cpython/newssl/Lib/ssl.py", line 264, in unwrap s = self._sslobj.shutdown() SSLError: [Errno 2] _ssl.c:1374: The operation did not complete (read) (note how "the operation did not complete" seems to mean that the socket is non-blocking, but the error is happening with the regular blocking FTP client) ---------- versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 14:00:15 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 06 Apr 2010 12:00:15 +0000 Subject: [issue8326] Cannot import name SemLock In-Reply-To: <1270549791.67.0.929964356468.issue8326@psf.upfronthosting.co.za> Message-ID: <1270555215.04.0.824423787071.issue8326@psf.upfronthosting.co.za> R. David Murray added the comment: Why do you think issue 3770 is not relevant? It looks from the traceback like the built version of multiprocessing decided that sem_open wasn't functional. So this sounds like a lucid packaging problem to me. ---------- components: +Extension Modules nosy: +r.david.murray priority: -> normal type: crash -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 14:23:15 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Tue, 06 Apr 2010 12:23:15 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270556595.45.0.70363335826.issue8108@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: > I don't understand your reasoning. These are separate connections, > closing one shouldn't affect the other. I meant another thing. I was talking about the fact that the test server attempts to shutdown() both control and data connections while the client only shutdown() the latter one. Maybe that's why you get EPIPE. > If you really think this is a good idea, feel free to give it a try. I whish but I'm having serious setup problems problems because I attempted to install different OpenSSL versions and now I'm no longer able to compile Python. Anyway, I'll give another try later today. =) > But please see newssl2.patch as well. - ftplib.FTP_TLS.quit: I wouldn't call unwrap() here as RFC-4217 does that only when dealing with CCC command which is not implemented by ftplib.py. - I'd be for calling _do_ssl_shutdown() from handle_close() instead of from close() (reasons explained in my previous message) - If EPIPE is still raised I'd try to move the shutdown() code from SSLConnection.handle_close() to DummyTLS_DTPHandler.handle_close(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 14:23:51 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 06 Apr 2010 12:23:51 +0000 Subject: [issue8326] Cannot import name SemLock on Ubuntu lucid In-Reply-To: <1270549791.67.0.929964356468.issue8326@psf.upfronthosting.co.za> Message-ID: <1270556631.3.0.15166817951.issue8326@psf.upfronthosting.co.za> R. David Murray added the comment: I'm guessing Matthias might have some insight into this on the Ubuntu side. so I'm adding him as nosy. I'm thinking this isn't a Python problem, but I could be wrong. ---------- nosy: +doko title: Cannot import name SemLock -> Cannot import name SemLock on Ubuntu lucid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 14:33:55 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 06 Apr 2010 12:33:55 +0000 Subject: [issue6090] zipfile DeprecationWarning Python in 2.6, failure in 2.7 In-Reply-To: <1243011059.87.0.0917631314165.issue6090@psf.upfronthosting.co.za> Message-ID: <1270557235.81.0.781446731005.issue6090@psf.upfronthosting.co.za> R. David Murray added the comment: Making the stage test needed, since we need to get the test into the test suite as a unit test. ---------- nosy: +r.david.murray stage: needs patch -> test needed title: zipfile DeprecationWarning Python 2.5/2.6 -> zipfile DeprecationWarning Python in 2.6, failure in 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 15:10:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 13:10:57 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1270556595.45.0.70363335826.issue8108@psf.upfronthosting.co.za> Message-ID: <1270559574.3518.25.camel@localhost> Antoine Pitrou added the comment: > - ftplib.FTP_TLS.quit: I wouldn't call unwrap() here as RFC-4217 does > that only when dealing with CCC command which is not implemented by > ftplib.py. Ok. > - I'd be for calling _do_ssl_shutdown() from handle_close() instead of > from close() (reasons explained in my previous message) This provokes test failures such as: ====================================================================== ERROR: test_dir (test.test_ftplib.TestTLS_FTPClassMixin) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/cpython/newssl/Lib/test/test_ftplib.py", line 537, in test_dir self.client.dir(lambda x: l.append(x)) File "/home/antoine/cpython/newssl/Lib/ftplib.py", line 511, in dir self.retrlines(cmd, func) File "/home/antoine/cpython/newssl/Lib/ftplib.py", line 714, in retrlines return self.voidresp() File "/home/antoine/cpython/newssl/Lib/ftplib.py", line 224, in voidresp resp = self.getresp() File "/home/antoine/cpython/newssl/Lib/ftplib.py", line 210, in getresp resp = self.getmultiline() File "/home/antoine/cpython/newssl/Lib/ftplib.py", line 196, in getmultiline line = self.getline() File "/home/antoine/cpython/newssl/Lib/ftplib.py", line 183, in getline line = self.file.readline() File "/home/antoine/cpython/newssl/Lib/socket.py", line 445, in readline data = self._sock.recv(self._rbufsize) File "/home/antoine/cpython/newssl/Lib/ssl.py", line 98, in self.recv = lambda buflen=1024, flags=0: SSLSocket.recv(self, buflen, flags) File "/home/antoine/cpython/newssl/Lib/ssl.py", line 217, in recv return self.read(buflen) File "/home/antoine/cpython/newssl/Lib/ssl.py", line 138, in read return self._sslobj.read(len) SSLError: The read operation timed out I have already tested quite a bunch of possibilities (handle_close or close, silencing EPIPE or not...) > - If EPIPE is still raised I'd try to move the shutdown() code from > SSLConnection.handle_close() to DummyTLS_DTPHandler.handle_close(). This only makes the server less respectful of the protocol... I think it is fine to silence EPIPE and friends during SSL shutdown since, as I've said, asyncore will call handle_close() when the remote ends has closed the TCP connection. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 15:14:45 2010 From: report at bugs.python.org (Ray.Allen) Date: Tue, 06 Apr 2010 13:14:45 +0000 Subject: [issue8297] AttributeError message text should include module name In-Reply-To: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> Message-ID: <1270559685.06.0.466778820975.issue8297@psf.upfronthosting.co.za> Ray.Allen added the comment: This patch makes the AttributeError message generated from getting attributes from module object more helpful, that is, print the module name. Now the error message is: module object 'mod_name' has no attribute 'xxx' Instead of: 'module' object has no attribute 'xxx' In this patch, I add a function PyObject_GenericFindAttr(), which is almost the same as PyObject_GenericGetAttr(), except that return NULL instead of setting the exception, and make PyObject_GenericGetAttr() call this function and setting exception in the case of NULL return value. Through this, each type can custom its own AttributeError message, while using the uniform process of getting the attribute in PyObject_GenericFindAttr(). For example, PyModuleType's tp_getattro is set to a new function PyModule_GetAttr(), which calls the PyObject_GenericFindAttr() can set the customed AttributeError message. Besides, I think the super object's AttributeError message should also be improved, but I didn't include that in the patch. I don't know weather it is suitable. ---------- keywords: +patch Added file: http://bugs.python.org/file16780/issue_8297.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 15:17:03 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 13:17:03 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270559823.5.0.507654514546.issue8108@psf.upfronthosting.co.za> Antoine Pitrou added the comment: New patch without the quit() method change. ---------- Added file: http://bugs.python.org/file16781/newssl3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 15:56:06 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 13:56:06 +0000 Subject: [issue1572968] release GIL while doing I/O operations in the mmap module Message-ID: <1270562166.2.0.25123646283.issue1572968@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This shouldn't really care about VMS here. As for the rest, feel free to propose a patch :) Please note that most non-trivial system calls, such as ftruncate(), mremap(), even mmap() itself, deserve to be enclosed in Py_BEGIN_ALLOW_THREADS/Py_END_ALLOW_THREADS pairs. However, you'll have to be careful that the internal state of the mmap object remains consistent, such that using it from several threads doesn't crash the interpreter. (you can even add multi-threaded unit tests if you want to be sure of this) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 15:58:18 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 13:58:18 +0000 Subject: [issue1572968] release GIL while doing I/O operations in the mmap module In-Reply-To: <1270562166.2.0.25123646283.issue1572968@psf.upfronthosting.co.za> Message-ID: <1270562416.3518.40.camel@localhost> Antoine Pitrou added the comment: > This shouldn't really care about VMS here. Correction: /we/ shouldn't really care about VMS here. And the reason being, of course, that we have neither developers nor known testers under VMS. (we don't even know if the current trunk builds there or not) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 16:09:09 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 06 Apr 2010 14:09:09 +0000 Subject: [issue1572968] release GIL while doing I/O operations in the mmap module Message-ID: <1270562949.66.0.545737248339.issue1572968@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 16:20:47 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 06 Apr 2010 14:20:47 +0000 Subject: [issue8188] Unified hash for numeric types. In-Reply-To: <1269117270.13.0.417099891076.issue8188@psf.upfronthosting.co.za> Message-ID: <1270563647.28.0.584516670779.issue8188@psf.upfronthosting.co.za> Stefan Krah added the comment: I've finished reviewing the patch and I think it's quite ready to be applied. The documentation in stdtypes.rst says that P = 2**61-1 on 64-bit machines. This should be changed to reflect the fact that actually sizeof long is the deciding factor. I attach a patch that also fixes the typo pointed out by Christophe Simonis. ---------- Added file: http://bugs.python.org/file16782/doc_stdtypes.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 16:32:57 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 14:32:57 +0000 Subject: [issue6090] zipfile DeprecationWarning Python in 2.6, failure in 2.7 In-Reply-To: <1243011059.87.0.0917631314165.issue6090@psf.upfronthosting.co.za> Message-ID: <1270564377.33.0.76274045441.issue6090@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- priority: normal -> critical _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 16:34:05 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Apr 2010 14:34:05 +0000 Subject: [issue8257] Decimal constructor to accept float In-Reply-To: <1269817941.42.0.43725007158.issue8257@psf.upfronthosting.co.za> Message-ID: <1270564445.05.0.0432675517416.issue8257@psf.upfronthosting.co.za> Mark Dickinson added the comment: The decimal changes were implemented by Raymond in r79609 (trunk) and r79602 (py3k). For the fractions module changes, see issue 8294. ---------- assignee: mark.dickinson -> resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 16:50:15 2010 From: report at bugs.python.org (Arfrever Frehtes Taifersar Arahesis) Date: Tue, 06 Apr 2010 14:50:15 +0000 Subject: [issue8322] test_ssl failures with OpenSSL 1.0.0 In-Reply-To: <1270500336.1.0.699742916544.issue8322@psf.upfronthosting.co.za> Message-ID: <1270565415.07.0.0693746515565.issue8322@psf.upfronthosting.co.za> Changes by Arfrever Frehtes Taifersar Arahesis : ---------- nosy: +Arfrever _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 17:23:17 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Apr 2010 15:23:17 +0000 Subject: [issue5198] Strange DeprecationWarning behaviour in module struct In-Reply-To: <1234250088.94.0.680929615779.issue5198@psf.upfronthosting.co.za> Message-ID: <1270567397.26.0.7551967059.issue5198@psf.upfronthosting.co.za> Mark Dickinson added the comment: The wrong location for the DeprecationWarnings was also fixed in trunk in r78690. I've backported the fix to release26-maint in r79834. I don't dare mess further with the warnings in a bugfix release; as Georg points out, the issues are fixed in trunk. BTW, one of the 2.6 issues (again fixed in trunk) that wasn't mentioned above is that some packs produce *two* overflow-related warnings: >>> import struct >>> struct.pack(' _______________________________________ From report at bugs.python.org Tue Apr 6 17:45:57 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Apr 2010 15:45:57 +0000 Subject: [issue8014] Setting a T_INT attribute raises internal error In-Reply-To: <1267031901.2.0.324094054626.issue8014@psf.upfronthosting.co.za> Message-ID: <1270568757.35.0.336259603097.issue8014@psf.upfronthosting.co.za> Mark Dickinson added the comment: Backported to 3.1 in r79838. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 18:08:36 2010 From: report at bugs.python.org (David Andrzejewski) Date: Tue, 06 Apr 2010 16:08:36 +0000 Subject: [issue8293] HTTPSConnection.close() does not immediately close the connection. In-Reply-To: <1270234708.91.0.197021276581.issue8293@psf.upfronthosting.co.za> Message-ID: <1270570116.31.0.150490188659.issue8293@psf.upfronthosting.co.za> David Andrzejewski added the comment: Now, it turns out that if you send the HTTP "Connection: close" header, the connection does close at the end (because the server closes it). Still, it seems like this should behave the same regardless of whether it's HTTPConnection or HTTPSConnection. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 18:17:01 2010 From: report at bugs.python.org (Mathew Martineau) Date: Tue, 06 Apr 2010 16:17:01 +0000 Subject: [issue7834] socket.connect() no longer works with AF_BLUETOOTH L2CAP sockets In-Reply-To: <1265069614.13.0.295096684445.issue7834@psf.upfronthosting.co.za> Message-ID: <1270570621.82.0.112658354879.issue7834@psf.upfronthosting.co.za> Mathew Martineau added the comment: Yaniv - Please proceed! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 18:26:59 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Apr 2010 16:26:59 +0000 Subject: [issue8259] left shift operator doesn't accepts long as second argument In-Reply-To: <1269865762.04.0.794045726086.issue8259@psf.upfronthosting.co.za> Message-ID: <1270571219.49.0.848847805706.issue8259@psf.upfronthosting.co.za> Mark Dickinson added the comment: Patch that unoutrages Python attached: it allows shift counts of up to sys.maxsize in both left shift and right shift. I don't have a test for this, since the only tests I can think of (e.g. actually doing 1 << (2**31)) require > 270Mb of RAM, and that may be too much for some of the buildbots. (We could add a 'largemem' special resource to regrtest, I suppose, but it doesn't seem worth the effort just for this.) This patch doesn't solve the OPs problem, though. The PyLong code *could* be modified to accept larger shift counts (e.g., up to 8*PY_SSIZE_T_MAX; beyond this you'll get a MemoryError anyway), but this seems like a significant effort for little gain. It might make more sense for right shifting, though. Anyway, I'd definitely call that a feature request. ---------- assignee: -> mark.dickinson keywords: +patch Added file: http://bugs.python.org/file16783/no_outrage.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 18:33:45 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 16:33:45 +0000 Subject: [issue7834] socket.connect() no longer works with AF_BLUETOOTH L2CAP sockets In-Reply-To: <1265069614.13.0.295096684445.issue7834@psf.upfronthosting.co.za> Message-ID: <1270571625.58.0.24413074308.issue7834@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, even better if you find a way of having unit tests for bluetooth sockets. Is there some kind of "dummy" device which gives predictable results (? la /dev/zero, for example)? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 18:53:58 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Apr 2010 16:53:58 +0000 Subject: [issue8259] left shift operator doesn't accepts long as second argument In-Reply-To: <1269865762.04.0.794045726086.issue8259@psf.upfronthosting.co.za> Message-ID: <1270572838.77.0.034766063462.issue8259@psf.upfronthosting.co.za> Mark Dickinson added the comment: Patch applied in r79843 (and added forgotten Misc/NEWS entry in r79844); merged to py3k in r79845. ---------- assignee: mark.dickinson -> type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 19:12:29 2010 From: report at bugs.python.org (Mike Kelly) Date: Tue, 06 Apr 2010 17:12:29 +0000 Subject: [issue8193] test_zlib fails with zlib 1.2.4 In-Reply-To: <1269198769.55.0.843831175079.issue8193@psf.upfronthosting.co.za> Message-ID: <1270573949.4.0.0984064615848.issue8193@psf.upfronthosting.co.za> Changes by Mike Kelly : ---------- nosy: +pioto _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 19:12:30 2010 From: report at bugs.python.org (Pascal Chambon) Date: Tue, 06 Apr 2010 17:12:30 +0000 Subject: [issue1553375] Add traceback.print_full_exception() Message-ID: <1270573950.98.0.00321614826329.issue1553375@psf.upfronthosting.co.za> Pascal Chambon added the comment: What's the status of this (imo quite useful) new traceback function ? Shall I provide some help ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 19:21:06 2010 From: report at bugs.python.org (Pascal Chambon) Date: Tue, 06 Apr 2010 17:21:06 +0000 Subject: [issue8327] unintuitive behaviour of logging message propagation In-Reply-To: <1270574466.45.0.74894426001.issue8327@psf.upfronthosting.co.za> Message-ID: <1270574466.45.0.74894426001.issue8327@psf.upfronthosting.co.za> New submission from Pascal Chambon : Hello Crawling into the logging module, I've just discovered its behaviour was actually far from the one I expected, in a consequent gap that the documentation had left. I thought that depending on the "propagate" parameter of each logger, a message would always try to propagate up the logger hierarchy, and that if that message matched the level of a logger (as well as the global disable() level), then this message would be tested against each handler of that logger. But it's not at all the way it is : actually, only the level of the "entrance" logger is checked ; if the message is blocked by it, it's the end, parent loggers will never hear about it (even thoiugh they might have a lower level set). On the contrary, if that entrance logger accepts the message, then ALL handlers from the hierarchy are snet the message, without caring about the own level of their related logger. That's really not the behaviour I would have expected, considering the global_disable > logger_level > handler_level precedence that the doc implicitly showed. Are there rationales behind this that I'm lacking ? So I'd advocate either (if possible) a patching of the logging system, to reflect that semantic ; or the adding of comprehensive paragraphs to teh doc, to explain what the exact relationship between levels and propagation attribuets are. Just tell me if a patch is conceivable B-) ---------- components: Library (Lib) messages: 102477 nosy: pakal severity: normal status: open title: unintuitive behaviour of logging message propagation versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 19:27:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 17:27:31 +0000 Subject: [issue8193] test_zlib fails with zlib 1.2.4 In-Reply-To: <1269198769.55.0.843831175079.issue8193@psf.upfronthosting.co.za> Message-ID: <1270574851.55.0.173805217466.issue8193@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Committed in r79848 (trunk), r79849 (py3k), r79850 (2.6), r79851 (3.1). Thank you! ---------- resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 20:19:49 2010 From: report at bugs.python.org (Eric Smith) Date: Tue, 06 Apr 2010 18:19:49 +0000 Subject: [issue8327] unintuitive behaviour of logging message propagation In-Reply-To: <1270574466.45.0.74894426001.issue8327@psf.upfronthosting.co.za> Message-ID: <1270577989.08.0.476664922323.issue8327@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 20:21:43 2010 From: report at bugs.python.org (Andrey Vlasovskikh) Date: Tue, 06 Apr 2010 18:21:43 +0000 Subject: [issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt In-Reply-To: <1270265835.83.0.251816264221.issue8296@psf.upfronthosting.co.za> Message-ID: <1270578103.44.0.541590143208.issue8296@psf.upfronthosting.co.za> Andrey Vlasovskikh added the comment: Despite of several workarounds available on the Web, the problem persists. Almost any exception that is rised in `worker` function while putting or getting tasks from queues result in Pool hang up. Currently, `worker` is only aware of Exception descendants rised inside of the map function parameter. I've written a unit test that checks if KeyboardInterrupts are handled normally. The source code may be included in `Lib/test/test_multiprocessing.py`. ---------- Added file: http://bugs.python.org/file16784/test_map_keyboard_interrput.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 20:23:24 2010 From: report at bugs.python.org (Andrey Vlasovskikh) Date: Tue, 06 Apr 2010 18:23:24 +0000 Subject: [issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt In-Reply-To: <1270265835.83.0.251816264221.issue8296@psf.upfronthosting.co.za> Message-ID: <1270578204.2.0.575199530361.issue8296@psf.upfronthosting.co.za> Changes by Andrey Vlasovskikh : Removed file: http://bugs.python.org/file16743/test_pool_keyboardinterrupt.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 20:24:39 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Apr 2010 18:24:39 +0000 Subject: [issue8259] left shift operator doesn't accepts long as second argument In-Reply-To: <1269865762.04.0.794045726086.issue8259@psf.upfronthosting.co.za> Message-ID: <1270578279.54.0.796846272642.issue8259@psf.upfronthosting.co.za> Mark Dickinson added the comment: By the way, this has nothing to do with int versus long (unless I'm misunderstanding the original issue); it's simply that large shift counts cause an OverflowError. I've added a note about this to the docs in r79852. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 20:32:05 2010 From: report at bugs.python.org (Andrey Vlasovskikh) Date: Tue, 06 Apr 2010 18:32:05 +0000 Subject: [issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt In-Reply-To: <1270265835.83.0.251816264221.issue8296@psf.upfronthosting.co.za> Message-ID: <1270578725.55.0.0278281659748.issue8296@psf.upfronthosting.co.za> Andrey Vlasovskikh added the comment: Here is a patch that fixes this problem. Basically, it catches all the BaseExceptions that could happen during: a) getting a task from the `inqueue`, b) calling a user function, c) putting a task into the `outqueue`. The exception handler puts the exception to the `outqueue`. It can be cleanly applied on top of revision 78790. ---------- keywords: +patch Added file: http://bugs.python.org/file16785/fix-sigint.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 20:38:29 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 06 Apr 2010 18:38:29 +0000 Subject: [issue8328] longobject.c: silence warnings (Visual Studio) In-Reply-To: <1270579109.17.0.48402121763.issue8328@psf.upfronthosting.co.za> Message-ID: <1270579109.17.0.48402121763.issue8328@psf.upfronthosting.co.za> New submission from Stefan Krah : Mark, are you ok with silencing these conversion warnings? ---------- components: Build files: longobject_vs_warnings_py3k.patch keywords: patch messages: 102482 nosy: mark.dickinson, skrah severity: normal status: open title: longobject.c: silence warnings (Visual Studio) type: feature request versions: Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file16786/longobject_vs_warnings_py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 20:38:54 2010 From: report at bugs.python.org (Stefan Krah) Date: Tue, 06 Apr 2010 18:38:54 +0000 Subject: [issue8328] longobject.c: silence warnings (Visual Studio) In-Reply-To: <1270579109.17.0.48402121763.issue8328@psf.upfronthosting.co.za> Message-ID: <1270579134.97.0.498140070295.issue8328@psf.upfronthosting.co.za> Changes by Stefan Krah : Added file: http://bugs.python.org/file16787/longobject_vs_warnings_trunk.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 20:52:34 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Apr 2010 18:52:34 +0000 Subject: [issue8328] longobject.c: silence warnings (Visual Studio) In-Reply-To: <1270579109.17.0.48402121763.issue8328@psf.upfronthosting.co.za> Message-ID: <1270579954.55.0.706161570457.issue8328@psf.upfronthosting.co.za> Mark Dickinson added the comment: These all look fine to me. Please apply! ---------- assignee: -> skrah resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 21:00:23 2010 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 06 Apr 2010 19:00:23 +0000 Subject: [issue8327] unintuitive behaviour of logging message propagation In-Reply-To: <1270574466.45.0.74894426001.issue8327@psf.upfronthosting.co.za> Message-ID: <1270580423.28.0.67606833154.issue8327@psf.upfronthosting.co.za> Vinay Sajip added the comment: Please see the following link for a rationale of the logging package's design: http://plumberjack.blogspot.com/2009/09/python-logging-101.html No patch to the logging system's code is planned, as it is working according to its design. The documentation will be gradually attended to as time allows, and patches will be considered. ---------- assignee: -> vinay.sajip components: +Documentation -Library (Lib) nosy: +vinay.sajip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 21:02:39 2010 From: report at bugs.python.org (Valerio Turturici) Date: Tue, 06 Apr 2010 19:02:39 +0000 Subject: [issue8193] test_zlib fails with zlib 1.2.4 In-Reply-To: <1269198769.55.0.843831175079.issue8193@psf.upfronthosting.co.za> Message-ID: <1270580559.62.0.13493093621.issue8193@psf.upfronthosting.co.za> Valerio Turturici added the comment: Thanks to you! This was my first patch, i'm very happy to contribute :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 21:26:11 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Apr 2010 19:26:11 +0000 Subject: [issue7947] Documentation of math.pow, math.hypot, and complex.__abs__ In-Reply-To: <1266360101.13.0.863363643677.issue7947@psf.upfronthosting.co.za> Message-ID: <1270581971.84.0.483759412857.issue7947@psf.upfronthosting.co.za> Mark Dickinson added the comment: Proposed update to math docs. ---------- keywords: +patch Added file: http://bugs.python.org/file16788/math_docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 21:39:39 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 06 Apr 2010 19:39:39 +0000 Subject: [issue7947] Documentation of math.pow, math.hypot, and complex.__abs__ In-Reply-To: <1266360101.13.0.863363643677.issue7947@psf.upfronthosting.co.za> Message-ID: <1270582779.06.0.0802042923091.issue7947@psf.upfronthosting.co.za> Georg Brandl added the comment: Looks good to me. Is it intentional that the paragraph about signaling NaNs is gone completely? And is it intentional that you changed behavior -> behaviour? :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 21:41:03 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Apr 2010 19:41:03 +0000 Subject: [issue7947] Documentation of math.pow, math.hypot, and complex.__abs__ In-Reply-To: <1266360101.13.0.863363643677.issue7947@psf.upfronthosting.co.za> Message-ID: <1270582863.56.0.165919587036.issue7947@psf.upfronthosting.co.za> Mark Dickinson added the comment: Thanks, Georg. Yes and No. Yes: Perhaps I should say something about signaling nans, but what was there was just nonsense. No: I'll drop the 'u' from behaviour, for the sake of consistency. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 21:48:50 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 06 Apr 2010 19:48:50 +0000 Subject: [issue7947] Documentation of math.pow, math.hypot, and complex.__abs__ In-Reply-To: <1266360101.13.0.863363643677.issue7947@psf.upfronthosting.co.za> Message-ID: <1270583330.81.0.198225781208.issue7947@psf.upfronthosting.co.za> Georg Brandl added the comment: You don't need to :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 21:56:48 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Apr 2010 19:56:48 +0000 Subject: [issue7947] Documentation of math.pow, math.hypot, and complex.__abs__ In-Reply-To: <1266360101.13.0.863363643677.issue7947@psf.upfronthosting.co.za> Message-ID: <1270583808.24.0.375085951226.issue7947@psf.upfronthosting.co.za> Mark Dickinson added the comment: Too late! Committed in r79858 (trunk) through r79861 (release31-maint). I added a couple of sentences about signaling nans. Thanks for reviewing! ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 22:15:55 2010 From: report at bugs.python.org (Georg Brandl) Date: Tue, 06 Apr 2010 20:15:55 +0000 Subject: [issue7947] Documentation of math.pow, math.hypot, and complex.__abs__ In-Reply-To: <1266360101.13.0.863363643677.issue7947@psf.upfronthosting.co.za> Message-ID: <1270584955.46.0.476972137457.issue7947@psf.upfronthosting.co.za> Georg Brandl added the comment: You didn't give me the chance to review the new sentences! Now I have to tell you that there is now "NaN", "*NaN*" and "nan" which looks inconsistent... :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 22:19:35 2010 From: report at bugs.python.org (Shashwat Anand) Date: Tue, 06 Apr 2010 20:19:35 +0000 Subject: [issue7472] email.encoders.encode_7or8bit(): typo "iso-2202". "iso-2022" is correct. In-Reply-To: <1260466982.74.0.0519719914389.issue7472@psf.upfronthosting.co.za> Message-ID: <1270585175.25.0.800144897782.issue7472@psf.upfronthosting.co.za> Shashwat Anand added the comment: I am submitting the patch as suggested by Yukihiro ---------- keywords: +patch nosy: +l0nwlf Added file: http://bugs.python.org/file16789/encoders.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 22:35:08 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 06 Apr 2010 20:35:08 +0000 Subject: [issue8296] multiprocessing.Pool hangs when issuing KeyboardInterrupt In-Reply-To: <1270265835.83.0.251816264221.issue8296@psf.upfronthosting.co.za> Message-ID: <1270586108.94.0.572320110577.issue8296@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 22:46:00 2010 From: report at bugs.python.org (R. David Murray) Date: Tue, 06 Apr 2010 20:46:00 +0000 Subject: [issue7472] email.encoders.encode_7or8bit(): typo "iso-2202". "iso-2022" is correct. In-Reply-To: <1260466982.74.0.0519719914389.issue7472@psf.upfronthosting.co.za> Message-ID: <1270586760.54.0.821945684934.issue7472@psf.upfronthosting.co.za> R. David Murray added the comment: Well, as I said, I think it would be better to delete the conditional instead. (That is, that fixing the typo is more likely to lead to a bug). ---------- assignee: barry -> r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 23:10:33 2010 From: report at bugs.python.org (Chris Grebeldinger) Date: Tue, 06 Apr 2010 21:10:33 +0000 Subject: [issue1303434] Please include pdb with windows distribution Message-ID: <1270588233.45.0.301334297931.issue1303434@psf.upfronthosting.co.za> Chris Grebeldinger added the comment: Hi Martin, As an aside to the request, is the pdb for the python dll currently available anywhere? ---------- nosy: +cgrebeld _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 23:16:50 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Tue, 06 Apr 2010 21:16:50 +0000 Subject: [issue2643] mmap_object_dealloc does not call FlushViewOfFile on windows In-Reply-To: <1208363341.7.0.215523027719.issue2643@psf.upfronthosting.co.za> Message-ID: <1270588610.56.0.923045983615.issue2643@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: I don't think that calling msync() or FlushViewOfFile() when closing the mmap object or deallocating it is a good idea. sync()ing dirtied pages to disk is very expensive, blocks the process for a long time, and the OS does a much better job at it (it can be done asynchronously, sync()ing can be grouped, re-ordered, etc). For example, it took around 7 seconds to msync() a mmap-filed of 300Mb in a quick test I've done. Furthermore, we don't do this for regular files: when a file object is closed or deallocated, we don't call fsync(), and the documentation makes it clear: os.fsync(fd) Force write of file with filedescriptor fd to disk. On Unix, this calls the native fsync() function; on Windows, the MS _commit() function. If you?re starting with a Python file object f, first do f.flush(), and then do os.fsync(f.fileno()), to ensure that all internal buffers associated with f are written to disk. Availability: Unix, and Windows starting in 2.2.3. The reason is the same: fsync(), like msync(), is not usually what you want, because of latencies and performance penalties it incurs. Any application requiring the data to be actually written to disk _must_ call fsync() for file objects, and call the flush() method of mmap objects (which is done just for that reason). So, for performance and consistency with files, I'd suggest to remove calls to msync() and FlushViewOfFile() from close() and dealloc(). If agreed, I can submit the patch. > A test could explicitly close a dirtied mmaped file and then open() > it to check that everything was written, no? The problem is that when you open() your file, you'll read the data from cache. You have no way to read the data directly from disk (well, there may be, but are higly non portable, like O_DIRECT file or raw IO). The only check that can be done is tracing the process and checking that msync() is indeed called. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 23:19:39 2010 From: report at bugs.python.org (Mike Kent) Date: Tue, 06 Apr 2010 21:19:39 +0000 Subject: [issue8329] select.select() can return lists with identical id()'s In-Reply-To: <1270588778.99.0.319971832918.issue8329@psf.upfronthosting.co.za> Message-ID: <1270588778.99.0.319971832918.issue8329@psf.upfronthosting.co.za> New submission from Mike Kent : If select.select() returns two or more empty lists, these empty lists will all refer to the same list; that is, they will have identical id()'s. If you then have reason to alter one of the returned empty lists, you are altering all of the returned empty lists. This can result in some significant debugging time spent, and curse words uttered. I encountered this in Python 2.5.4, but have not yet verified it on a more recent version. Searching through the Issue Tracker showed nothing similar. ---------- components: Library (Lib) messages: 102496 nosy: mrmakent severity: normal status: open title: select.select() can return lists with identical id()'s versions: Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 23:20:05 2010 From: report at bugs.python.org (Mike Kent) Date: Tue, 06 Apr 2010 21:20:05 +0000 Subject: [issue8329] select.select() can return lists with identical id()'s In-Reply-To: <1270588778.99.0.319971832918.issue8329@psf.upfronthosting.co.za> Message-ID: <1270588805.78.0.467665743984.issue8329@psf.upfronthosting.co.za> Changes by Mike Kent : ---------- type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 23:25:34 2010 From: report at bugs.python.org (Kelda) Date: Tue, 06 Apr 2010 21:25:34 +0000 Subject: [issue4570] Bad example in set tutorial In-Reply-To: <1228612211.41.0.0899785129664.issue4570@psf.upfronthosting.co.za> Message-ID: <1270589134.94.0.464069789427.issue4570@psf.upfronthosting.co.za> Kelda added the comment: Replaced unused variable assignment with a call to set() for illustrative purposes. ---------- keywords: +patch nosy: +autometa Added file: http://bugs.python.org/file16790/datastructures.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 6 23:50:40 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Tue, 06 Apr 2010 21:50:40 +0000 Subject: [issue8329] select.select() can return lists with identical id()'s In-Reply-To: <1270588778.99.0.319971832918.issue8329@psf.upfronthosting.co.za> Message-ID: <1270590640.96.0.142703609385.issue8329@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r79867. ---------- nosy: +benjamin.peterson resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 00:21:45 2010 From: report at bugs.python.org (Mark Dickinson) Date: Tue, 06 Apr 2010 22:21:45 +0000 Subject: [issue7947] Documentation of math.pow, math.hypot, and complex.__abs__ In-Reply-To: <1266360101.13.0.863363643677.issue7947@psf.upfronthosting.co.za> Message-ID: <1270592505.63.0.417285034518.issue7947@psf.upfronthosting.co.za> Mark Dickinson added the comment: Rats. nan->NaN in r79871 through r79874. Then I reread your message... *NaN* -> Nan in r79875 (trunk); will merge to other branches tomorrow when my brain might be working again. ---------- status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 00:22:18 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 06 Apr 2010 22:22:18 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270592538.55.0.790564762224.issue8299@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I just did some profiling. I?m using visual studio team edition which has some fancy built in profiling. I decided to compare the performance of the iotest.py script with two cpu threads, running for 10 seconds with processor affinity enabled and disabled. I added this code to the script: if affinity: import ctypes i = ctypes.c_int() i.value = 1 ctypes.windll.kernel32.SetProcessAffinityMask(-1, 1) Regular instruction counter sampling showed no differences. There were no indications of excessive time being used in the GIL or any strangeness with the locking primitives. So, I decided to sample on cpu performance counters. Following up on my conjecture from yesterday, that this was due to inefficiencies in switching between cpus, I settled on sampling the instruction fetch stall cycles from the instruction fetch unit. I sample every 1000000 stalls. I get interesting results. With affinity: Functions Causing Most Work Name Samples % _PyObject_Call 403 99,02 _PyEval_EvalFrameEx 402 98,77 _PyEval_EvalCodeEx 402 98,77 _PyEval_CallObjectWithKeywords 400 98,28 call_function 395 97,05 affinity off: Functions Causing Most Work Name Samples % _PyEval_EvalFrameEx 1.937 99,28 _PyEval_EvalCodeEx 1.937 99,28 _PyEval_CallObjectWithKeywords 1.936 99,23 _PyObject_Call 1.936 99,23 _threadstartex 1.934 99,13 When we run on both cores, we get four times as many L1 instruction cache hits! So, what appears to be happening is that each time that a switch occurs the L1 instruction cache for each core must be repopulated with the python evaluation loop, it having been evacuated on that core during the hiatus. Note that for this effect to kick in we need a large piece of code excercising the cache, such as the evaluation loop. Earlier today, I wrote a simple (python free) C program to do similar testing, using a GIL, and found no performance degradation due to multi core, but that program only had a very simple "work" function. So, this confirms my hypothesis: The downgrading of the performance of python cpu bound threads on multicore machines stems from the shuttling about of the python evaluation loop between the instruction caches of the individual cores. How best to combat this? I'll do some experiments on Windows. Perhaps we can identify cpu-bound threads and group them on a single core. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 00:33:06 2010 From: report at bugs.python.org (Vinay Sajip) Date: Tue, 06 Apr 2010 22:33:06 +0000 Subject: [issue8327] unintuitive behaviour of logging message propagation In-Reply-To: <1270574466.45.0.74894426001.issue8327@psf.upfronthosting.co.za> Message-ID: <1270593186.92.0.642745422197.issue8327@psf.upfronthosting.co.za> Vinay Sajip added the comment: Documentation updated (r79876). ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 00:35:16 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 06 Apr 2010 22:35:16 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270592538.55.0.790564762224.issue8299@psf.upfronthosting.co.za> Message-ID: <1270593434.3518.62.camel@localhost> Antoine Pitrou added the comment: [...] > _PyObject_Call 403 99,02 [...] > affinity off: > Functions Causing Most Work > Name Samples % [...] > _PyObject_Call 1.936 99,23 [...] > _threadstartex 1.934 99,13 > > When we run on both cores, we get four times as many L1 instruction cache hits! You mean we get 4x the number of cache /misses/, right? This analysis is gratuitous if you can't evaluate/measure/calculate the actual cost (in proportion of total elapsed or CPU time) of the instruction cache misses. Perhaps it is actually negligible and the slowdown is caused by something else. > How best to combat this? I'll do some experiments on Windows. > Perhaps we can identify cpu-bound threads and group them on a single > core. IMHO, the OS should handle this. I don't think ad-hoc platform-specific CPU affinity tweaks belong in the Python core. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 00:47:54 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 06 Apr 2010 22:47:54 +0000 Subject: [issue8324] add a distutils test command In-Reply-To: <1270509574.31.0.218772255625.issue8324@psf.upfronthosting.co.za> Message-ID: <1270594074.45.0.641834032672.issue8324@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 00:48:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 06 Apr 2010 22:48:08 +0000 Subject: [issue8312] Add post/pre hooks for distutils commands In-Reply-To: <1270418101.32.0.698965190272.issue8312@psf.upfronthosting.co.za> Message-ID: <1270594088.09.0.402279605736.issue8312@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 00:56:47 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Tue, 06 Apr 2010 22:56:47 +0000 Subject: [issue1303434] Please include pdb with windows distribution In-Reply-To: <1270588233.45.0.301334297931.issue1303434@psf.upfronthosting.co.za> Message-ID: <4BBBBC2C.4010509@v.loewis.de> Martin v. L?wis added the comment: > As an aside to the request, is the pdb for the python dll currently available anywhere? Only on my hard disk, and then only for the very last release. The status of the issue is the same as in 2006: without patches, nothing will happen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 01:03:19 2010 From: report at bugs.python.org (Philip Jenvey) Date: Tue, 06 Apr 2010 23:03:19 +0000 Subject: [issue7301] Add environment variable $PYTHONWARNINGS In-Reply-To: <1257865531.11.0.841786263832.issue7301@psf.upfronthosting.co.za> Message-ID: <1270594999.71.0.641653257571.issue7301@psf.upfronthosting.co.za> Philip Jenvey added the comment: Looks good to me. Updated patch with a couple whitespace changes ---------- Added file: http://bugs.python.org/file16791/issue7301-2.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 01:14:52 2010 From: report at bugs.python.org (Barry A. Warsaw) Date: Tue, 06 Apr 2010 23:14:52 +0000 Subject: [issue7301] Add environment variable $PYTHONWARNINGS In-Reply-To: <1257865531.11.0.841786263832.issue7301@psf.upfronthosting.co.za> Message-ID: <1270595692.51.0.934237944061.issue7301@psf.upfronthosting.co.za> Barry A. Warsaw added the comment: Patch looks good to me too. Do any of you have commit privileges? If so, please commit this. If not assign the issue to me and I'll do it. ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 01:53:10 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Tue, 06 Apr 2010 23:53:10 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270597990.96.0.191599968356.issue8299@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: The counter is "stall cycles". During the 10 second run on my 2.4Ghz cpu, we had instruction cache miss stalls for 2 billion cycles (2000 samples of 1000000 cycles per sample). That does account for around 10% of the availible cpu. I'm observing something like 20% slowdown, though, so there are probably other causes. Profiling another counter, "instruction fetches", I see this, for a "fast run": Functions Causing Most Work Name Samples % Unknown Frame(s) 10.733 99,49 and for a slow run: Functions Causing Most Work Name Samples % Unknown Frame(s) 8.056 99,48 This shows a 20% drop in fetched instructions in the interval (five seconds this time). Ideally, we should see 12000 samples in the fast case (2.4 ghz, 5s) but we see 10000 due to what cache misses there are in this case. The cache misses in the "slow" case causes effective instruction fetches to drop by 20% on top of that. I think that this is proof positive that the slowdown is due to instruction cache misses, at least on this dual core intel machine that I am using. As for "the OS should handle this", I agree. But it doesn't. We are doing something unusual: Convoying two (or more) threads allowing only one to run at a time. The OS scheduler isn't built for that. It can only assume that there will be some parallel execution and so it thinks that it is best to put the two sequential threads on different cpus. But it is wrong, so the cost associated with cache misses outweighs the benefit of running on another core (zero, in our case). So, the OS won't handle it, no matter how hard we wish that it would. It is us that know how these gridlocked threads behave, and we do so much better than any OS scheduler can guess. So, rather than beat our heads against the rock, I'm going to try to come up with a useful heuristic as to when to switch cores, and when not. It would be useful as a diagnostic tool, if nothing more. Ok, so we have established two things, I think: 1) the poor response of IO threads in the presence of CPU threads on thread_pthreads.h implementations (on multicore) is because of greedy gil wait semantics in the current gil. It's easily fixable by using the implementation ROUNDROBIN_GIL implementation I've shown. 2) The poor performance of competing CPU threads on multicore machines is due to the instruction cache behaviour of non-overlapping thread execution on different cores. We can fix 1) easily, even with a much less invasive patch than the ones I have put in here. I'm a bit surprised at the apparent disinterest in such an obvious bug / fix. As for 2), well, see above. Nothing we can do, really, except identify those cases where we are releasing GIL just to yield (one case, actually, ceval.c) and try to instruct the OS not to switch cores in that case. I'll see what I can come up with. Cheers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 02:08:21 2010 From: report at bugs.python.org (David Beazley) Date: Wed, 07 Apr 2010 00:08:21 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270598901.29.0.167972116991.issue8299@psf.upfronthosting.co.za> David Beazley added the comment: The analysis of instruction cache behavior is interesting---I could definitely see that coming into play given the heavy penalty that one sees going to multiple cores (it's a side effect in addition everything else that goes wrong such as a huge increase in the number of system calls). I will only point out that messing around with processor affinities is going to be problematic. There are C/C++ extensions to Python that intentionally release the GIL and want to run fully multithreaded across as many cores as might be available. Setting a processor affinities is going to be the exact opposite of what you want for code like that. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 02:11:58 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 07 Apr 2010 00:11:58 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270597990.96.0.191599968356.issue8299@psf.upfronthosting.co.za> Message-ID: <1270599234.3518.65.camel@localhost> Antoine Pitrou added the comment: > The counter is "stall cycles". > During the 10 second run on my 2.4Ghz cpu, we had instruction cache > miss stalls for 2 billion cycles (2000 samples of 1000000 cycles per > sample). That does account for around 10% of the availible cpu. Ok, thanks. > 2) The poor performance of competing CPU threads on multicore machines > is due to the instruction cache behaviour of non-overlapping thread > execution on different cores. Have you tried your measurement approach with ccbench? > We can fix 1) easily, even with a much less invasive patch than the > ones I have put in here. I'm a bit surprised at the apparent > disinterest in such an obvious bug / fix. As already said, it's too late for 2.7. And the fix in 3.2 is most probably better. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 02:45:26 2010 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 07 Apr 2010 00:45:26 +0000 Subject: [issue8330] Failures seen in test_gdb on buildbots In-Reply-To: <1270601126.21.0.71359722213.issue8330@psf.upfronthosting.co.za> Message-ID: <1270601126.21.0.71359722213.issue8330@psf.upfronthosting.co.za> New submission from Dave Malcolm : http://www.python.org/dev/buildbot/trunk/builders/alpha%20Debian%20trunk/builds/52/steps/test/logs/stdio shows some failures in test_gdb: ====================================================================== FAIL: test_corrupt_ob_type (test.test_gdb.PrettyPrintTests) Ensure that a PyObject* with a corrupt ob_type is handled gracefully ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_gdb.py", line 361, in test_corrupt_ob_type 'set op->ob_type=0xDEADBEEF') File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_gdb.py", line 341, in assertSane (gdb_repr, gdb_output)) AssertionError: Unexpected gdb representation: '< at remote 0x1202cf5a8>' Breakpoint 1 at 0x12007a9e8: file Objects/object.c, line 330. [Thread debugging using libthread_db enabled] Breakpoint 1, PyObject_Print (op=42, fp=0x200002f87b0, flags=1) at Objects/object.c:330 330 return internal_print(op, fp, flags, 0); #0 PyObject_Print (op=< at remote 0x1202cf5a8>, fp=0x200002f87b0, flags=1) at Objects/object.c:330 #1 0x000000012003eaa0 in file_PyObject_Print (op=< at remote 0x1202cf5a8>, f= 0x20000326280, flags=1) at Objects/fileobject.c:110 #2 0x0000000120045bc8 in PyFile_WriteObject (v=< at remote 0x1202cf5a8>, f= , flags=1) at Objects/fileobject.c:2470 #3 0x000000012010bb90 in PyEval_EvalFrameEx (f= Frame 0x1203a0ba0, for file , line 1, in (), throwflag=0) at Python/ceval.c:1769 #4 0x00000001201134bc in PyEval_EvalCodeEx (co=0x120305880, globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253 #5 0x0000000120107294 in PyEval_EvalCode (co=0x120305880, globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}) at Python/ceval.c:666 #6 0x0000000120152e08 in run_mod (mod=0x12038b848, filename= 0x12021cf00 "", globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, flags=0x11f48b4d8, arena=0x1203406b0) at Python/pythonrun.c:1340 #7 0x0000000120152c2c in PyRun_StringFlags (str=0x1202b2010 "print 42\n", start=257, globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, flags=0x11f48b4d8) at Python/pythonrun.c:1303 #8 0x0000000120150f50 in PyRun_SimpleStringFlags (command= 0x1202b2010 "print 42\n", flags=0x11f48b4d8) at Python/pythonrun.c:962 #9 0x00000001200185a0 in Py_Main (argc=4, argv=0x11f48b6b8) at Modules/main.c:525 #10 0x0000000120016e88 in main (argc=4, argv=0x11f48b6b8) at ./Modules/python.c:23 ====================================================================== FAIL: test_corrupt_tp_name (test.test_gdb.PrettyPrintTests) Ensure that a PyObject* with a type with corrupt tp_name is handled ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_gdb.py", line 372, in test_corrupt_tp_name 'set op->ob_type->tp_name=0xDEADBEEF') File "/home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_gdb.py", line 341, in assertSane (gdb_repr, gdb_output)) AssertionError: Unexpected gdb representation: '42' Breakpoint 1 at 0x12007a9e8: file Objects/object.c, line 330. [Thread debugging using libthread_db enabled] Breakpoint 1, PyObject_Print (op=42, fp=0x200002f87b0, flags=1) at Objects/object.c:330 330 return internal_print(op, fp, flags, 0); #0 PyObject_Print (op=42, fp=0x200002f87b0, flags=1) at Objects/object.c:330 #1 0x000000012003eaa0 in file_PyObject_Print (op=42, f=0x20000326280, flags=1) at Objects/fileobject.c:110 #2 0x0000000120045bc8 in PyFile_WriteObject (v=42, f= , flags=1) at Objects/fileobject.c:2470 #3 0x000000012010bb90 in PyEval_EvalFrameEx (f= Frame 0x1203a0ba0, for file , line 1, in (), throwflag=0) at Python/ceval.c:1769 #4 0x00000001201134bc in PyEval_EvalCodeEx (co=0x120305880, globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253 #5 0x0000000120107294 in PyEval_EvalCode (co=0x120305880, globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}) at Python/ceval.c:666 #6 0x0000000120152e08 in run_mod (mod=0x12038b848, filename= 0x12021cf00 "", globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, flags=0x11f4174d8, arena=0x1203406b0) at Python/pythonrun.c:1340 #7 0x0000000120152c2c in PyRun_StringFlags (str=0x1202b2010 "print 42\n", start=257, globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, flags=0x11f4174d8) at Python/pythonrun.c:1303 #8 0x0000000120150f50 in PyRun_SimpleStringFlags (command= 0x1202b2010 "print 42\n", flags=0x11f4174d8) at Python/pythonrun.c:962 #9 0x00000001200185a0 in Py_Main (argc=4, argv=0x11f4176b8) at Modules/main.c:525 #10 0x0000000120016e88 in main (argc=4, argv=0x11f4176b8) at ./Modules/python.c:23 ---------------------------------------------------------------------- Ran 31 tests in 27.624s FAILED (failures=2) ---------- assignee: dmalcolm keywords: buildbot messages: 102509 nosy: dmalcolm severity: normal status: open title: Failures seen in test_gdb on buildbots versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 03:36:32 2010 From: report at bugs.python.org (Shashwat Anand) Date: Wed, 07 Apr 2010 01:36:32 +0000 Subject: [issue8331] a documentation grammar fix in logging module In-Reply-To: <1270604192.13.0.509346290398.issue8331@psf.upfronthosting.co.za> Message-ID: <1270604192.13.0.509346290398.issue8331@psf.upfronthosting.co.za> New submission from Shashwat Anand : Just fixed some grammatical error in the docs of logging module. ---------- assignee: georg.brandl components: Documentation files: logging.patch keywords: patch messages: 102510 nosy: georg.brandl, l0nwlf, vinay.sajip severity: normal status: open title: a documentation grammar fix in logging module versions: Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file16792/logging.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 04:28:09 2010 From: report at bugs.python.org (Shashwat Anand) Date: Wed, 07 Apr 2010 02:28:09 +0000 Subject: [issue4487] Add utf8 alias for email charsets In-Reply-To: <1228223832.43.0.0399583143577.issue4487@psf.upfronthosting.co.za> Message-ID: <1270607289.08.0.13851016906.issue4487@psf.upfronthosting.co.za> Shashwat Anand added the comment: I tested it on python 2.5, 2.6, 2.7 trunk and 3.2 varying msg.set_charset(x) with x = 'utf8' and 'utf-8' Here are the results. Apparantly python 2.x had issue with Test case and 3.2 passed but I guess it is unrelated with the issue. 07:35:40 l0nwlf-MBP:~ $ python2.5 Python 2.5.4 (r254:67916, Jul 7 2009, 23:51:24) [GCC 4.2.1 (Apple Inc. build 5646)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from email.MIMEText import MIMEText >>> msg = MIMEText(u'\u043a\u0438\u0440\u0438\u043b\u0438\u0446\u0430') >>> msg.set_charset('utf8') >>> print msg.as_string() Traceback (most recent call last): File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/email/message.py", line 131, in as_string g.flatten(self, unixfrom=unixfrom) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/email/generator.py", line 84, in flatten self._write(msg) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/email/generator.py", line 109, in _write self._dispatch(msg) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/email/generator.py", line 135, in _dispatch meth(msg) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/email/generator.py", line 178, in _handle_text self._fp.write(payload) UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-7: ordinal not in range(128) >>> msg.set_charset('utf-8') >>> print msg.as_string() Traceback (most recent call last): File "", line 1, in File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/email/message.py", line 131, in as_string g.flatten(self, unixfrom=unixfrom) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/email/generator.py", line 84, in flatten self._write(msg) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/email/generator.py", line 109, in _write self._dispatch(msg) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/email/generator.py", line 135, in _dispatch meth(msg) File "/System/Library/Frameworks/Python.framework/Versions/2.5/lib/python2.5/email/generator.py", line 178, in _handle_text self._fp.write(payload) UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-7: ordinal not in range(128) 07:36:17 l0nwlf-MBP:~ $ python2.6 Python 2.6.5 (r265:79063, Apr 6 2010, 21:34:21) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from email.MIMEText import MIMEText >>> msg = MIMEText(u'\u043a\u0438\u0440\u0438\u043b\u0438\u0446\u0430') >>> msg.set_charset('utf8') >>> print msg.as_string() Traceback (most recent call last): File "", line 1, in File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/email/message.py", line 135, in as_string g.flatten(self, unixfrom=unixfrom) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/email/generator.py", line 84, in flatten self._write(msg) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/email/generator.py", line 109, in _write self._dispatch(msg) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/email/generator.py", line 135, in _dispatch meth(msg) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/email/generator.py", line 178, in _handle_text self._fp.write(payload) UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-7: ordinal not in range(128) >>> msg.set_charset('utf-8') >>> print msg.as_string() Traceback (most recent call last): File "", line 1, in File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/email/message.py", line 135, in as_string g.flatten(self, unixfrom=unixfrom) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/email/generator.py", line 84, in flatten self._write(msg) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/email/generator.py", line 109, in _write self._dispatch(msg) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/email/generator.py", line 135, in _dispatch meth(msg) File "/opt/local/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/email/generator.py", line 178, in _handle_text self._fp.write(payload) UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-7: ordinal not in range(128) 07:36:37 l0nwlf-MBP:~ $ python2.7 Python 2.7a4+ (trunk:78750, Mar 7 2010, 08:09:00) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from email.MIMEText import MIMEText >>> msg = MIMEText(u'\u043a\u0438\u0440\u0438\u043b\u0438\u0446\u0430') >>> msg.set_charset('utf8') >>> print msg.as_string() Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/email/message.py", line 135, in as_string g.flatten(self, unixfrom=unixfrom) File "/usr/local/lib/python2.7/email/generator.py", line 83, in flatten self._write(msg) File "/usr/local/lib/python2.7/email/generator.py", line 108, in _write self._dispatch(msg) File "/usr/local/lib/python2.7/email/generator.py", line 134, in _dispatch meth(msg) File "/usr/local/lib/python2.7/email/generator.py", line 180, in _handle_text self._fp.write(payload) UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-7: ordinal not in range(128) >>> msg.set_charset('utf-8') >>> print msg.as_string() Traceback (most recent call last): File "", line 1, in File "/usr/local/lib/python2.7/email/message.py", line 135, in as_string g.flatten(self, unixfrom=unixfrom) File "/usr/local/lib/python2.7/email/generator.py", line 83, in flatten self._write(msg) File "/usr/local/lib/python2.7/email/generator.py", line 108, in _write self._dispatch(msg) File "/usr/local/lib/python2.7/email/generator.py", line 134, in _dispatch meth(msg) File "/usr/local/lib/python2.7/email/generator.py", line 180, in _handle_text self._fp.write(payload) UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-7: ordinal not in range(128) 07:37:06 l0nwlf-MBP:~ $ python3.2 Python 3.2a0 (py3k:79532, Apr 1 2010, 01:48:52) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> from email.mime.text import MIMEText >>> msg = MIMEText('\u043a\u0438\u0440\u0438\u043b\u0438\u0446\u0430') >>> msg.set_charset('utf8') >>> print (msg.as_string()) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf8" ???????? >>> msg.set_charset('utf-8') >>> print (msg.as_string()) MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset="utf-8" ???????? The aliasing of 'utf-8' into 'utf8' and may be 'utf_8' seems reasonable IMO however Test Case fails. ---------- nosy: +l0nwlf type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 04:31:20 2010 From: report at bugs.python.org (John Marter) Date: Wed, 07 Apr 2010 02:31:20 +0000 Subject: [issue4570] Bad example in set tutorial In-Reply-To: <1228612211.41.0.0899785129664.issue4570@psf.upfronthosting.co.za> Message-ID: <1270607480.93.0.205760456006.issue4570@psf.upfronthosting.co.za> John Marter added the comment: You may want to add another space before the comment, otherwise it will be the only one not aligned with the others. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 04:50:44 2010 From: report at bugs.python.org (Shashwat Anand) Date: Wed, 07 Apr 2010 02:50:44 +0000 Subject: [issue4570] Bad example in set tutorial In-Reply-To: <1228612211.41.0.0899785129664.issue4570@psf.upfronthosting.co.za> Message-ID: <1270608644.21.0.146307537478.issue4570@psf.upfronthosting.co.za> Shashwat Anand added the comment: I guess giving fruit, the set of unique fruit a different name makes it more clear. Comments alignment fixed. >>> basket = {'apple', 'orange', 'apple', 'pear', 'orange', 'banana'} >>> print(basket) {'orange', 'bananna', 'pear', 'apple'} >>> fruit = ['apple', 'orange', 'apple', 'pear', 'orange', 'banana'] >>> uniquefruit = set(fruit) # create a set without duplicates >>> uniquefruit {'orange', 'pear', 'apple', 'banana'} ---------- nosy: +l0nwlf Added file: http://bugs.python.org/file16793/datastructure.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 04:54:09 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 07 Apr 2010 02:54:09 +0000 Subject: [issue8331] a documentation grammar fix in logging module In-Reply-To: <1270604192.13.0.509346290398.issue8331@psf.upfronthosting.co.za> Message-ID: <1270608849.11.0.472129138961.issue8331@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- assignee: georg.brandl -> ezio.melotti nosy: +ezio.melotti priority: -> normal resolution: -> accepted stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 04:54:33 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 07 Apr 2010 02:54:33 +0000 Subject: [issue8297] AttributeError message text should include module name In-Reply-To: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> Message-ID: <1270608873.62.0.792005051874.issue8297@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Great -- thanks a lot for taking a stab at this! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 06:06:26 2010 From: report at bugs.python.org (Philip Jenvey) Date: Wed, 07 Apr 2010 04:06:26 +0000 Subject: [issue7301] Add environment variable $PYTHONWARNINGS In-Reply-To: <1257865531.11.0.841786263832.issue7301@psf.upfronthosting.co.za> Message-ID: <1270613186.02.0.374693851223.issue7301@psf.upfronthosting.co.za> Philip Jenvey added the comment: applied in r79878 - r79881, thanks! ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 06:08:15 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 07 Apr 2010 04:08:15 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270613295.64.0.798054515776.issue8271@psf.upfronthosting.co.za> Ezio Melotti added the comment: The patch was causing a failure in test_codeccallbacks, issue8271v4 fixes the test. (The failing test in test_codeccallbacks was testing that registering error handlers works, using a function that replaced "\xc0\x80" with "\x00". Since now "\xc0" is an invalid start byte regardless of what follows, the function is now receiving only "\xc0" instead of "\xc0\x80" so I had to change the test.) ---------- keywords: +needs review Added file: http://bugs.python.org/file16794/issue8271v4.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 06:51:09 2010 From: report at bugs.python.org (Kelda) Date: Wed, 07 Apr 2010 04:51:09 +0000 Subject: [issue4570] Bad example in set tutorial In-Reply-To: <1228612211.41.0.0899785129664.issue4570@psf.upfronthosting.co.za> Message-ID: <1270615869.37.0.327229408451.issue4570@psf.upfronthosting.co.za> Kelda added the comment: I think this change fits well with the rest of the example without having to rework things. Spacing fixed. ---------- Added file: http://bugs.python.org/file16795/datastructures.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 07:15:30 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 07 Apr 2010 05:15:30 +0000 Subject: [issue8297] AttributeError message text should include module name In-Reply-To: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> Message-ID: <1270617330.45.0.841454113161.issue8297@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 07:57:08 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 07 Apr 2010 05:57:08 +0000 Subject: [issue4570] Bad example in set tutorial In-Reply-To: <1228612211.41.0.0899785129664.issue4570@psf.upfronthosting.co.za> Message-ID: <1270619828.83.0.746196263131.issue4570@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I'll get to this soon. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 08:02:28 2010 From: report at bugs.python.org (Kelda) Date: Wed, 07 Apr 2010 06:02:28 +0000 Subject: [issue4570] Bad example in set tutorial In-Reply-To: <1228612211.41.0.0899785129664.issue4570@psf.upfronthosting.co.za> Message-ID: <1270620148.73.0.154705218024.issue4570@psf.upfronthosting.co.za> Changes by Kelda : Removed file: http://bugs.python.org/file16790/datastructures.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 08:08:37 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 07 Apr 2010 06:08:37 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1270620517.38.0.669385926946.issue7559@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Rietveld link: http://codereview.appspot.com/810044/show This patch changes unittest.TestLoader.loadTestsFromName() so that ImportErrors will bubble up when importing from a module with a bad import statement. Before the method raised an AttributeError. The unit test code is taken from a patch by Salman Haq. The patch also includes code adapted from http://twistedmatrix.com . (This is my first patch, so any guidance is greatly appreciated. Thanks.) ---------- Added file: http://bugs.python.org/file16796/_patch-7559-3.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 08:31:03 2010 From: report at bugs.python.org (Philip Jenvey) Date: Wed, 07 Apr 2010 06:31:03 +0000 Subject: [issue7301] Add environment variable $PYTHONWARNINGS In-Reply-To: <1257865531.11.0.841786263832.issue7301@psf.upfronthosting.co.za> Message-ID: <1270621863.85.0.170850257659.issue7301@psf.upfronthosting.co.za> Philip Jenvey added the comment: I committed a somewhat different version of this patch to py3k to handle the warn options now calling for wchars, but this needs more work. Some of the buildbots are unhappy Seems like the py3k version either needs to fully decode the env values to a unicode obj via the file system encoding (which I doubt is initialized at this point)/surrogateescape, or use something along the lines of char2wchar in python.c ---------- assignee: -> pjenvey resolution: fixed -> accepted status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 10:05:48 2010 From: report at bugs.python.org (Pascal Chambon) Date: Wed, 07 Apr 2010 08:05:48 +0000 Subject: [issue8327] unintuitive behaviour of logging message propagation In-Reply-To: <1270574466.45.0.74894426001.issue8327@psf.upfronthosting.co.za> Message-ID: <1270627548.54.0.330947626887.issue8327@psf.upfronthosting.co.za> Pascal Chambon added the comment: Thanks for the doc patch, if you don't mind I'd just add the paragraph below too, to clarify the fact that logger levels are only "entry points" levels, ignored he rest of the time. There might be slight redundancies with the rest of the (long) documentation, but it's all benefit imo. B-) "In addition to any handlers directly associated with a logger, *all handlers associated with all ancestors of the logger* are called to dispatch the message (unless the *propagate* flag for a logger is set to a false value, at which point the passing to ancestor handlers stops). Note that in this process, the level of ancestor loggers is never considered : only their *propagate* attribute and the levels of their loggers canimpact the treatment on the message being dispatched. The level of a logger is thus only acting as an *entry point barrier*, only able to stop the whole dispatch of a message that enters the system through it." ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 10:37:37 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Wed, 07 Apr 2010 08:37:37 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270305802.77.0.0073241346145.issue8271@psf.upfronthosting.co.za> Message-ID: <4BBC4451.7030704@egenix.com> Marc-Andre Lemburg added the comment: STINNER Victor wrote: > > STINNER Victor added the comment: > >> I also found out that, according to RFC 3629, surrogates >> are considered invalid and they can't be encoded/decoded, >> but the UTF-8 codec actually does it. > > Python2 does, but Python3 raises an error. > > Python 2.7a4+ (trunk:79675, Apr 3 2010, 16:11:36) >>>> u"\uDC80".encode("utf8") > '\xed\xb2\x80' > > Python 3.2a0 (py3k:79441, Mar 26 2010, 13:04:55) >>>> "\uDC80".encode("utf8") > UnicodeEncodeError: 'utf-8' codec can't encode character '\udc80' in position 0: surrogates not allowed > > Deny encoding surrogates (in utf8) causes a lot of crashs in Python3, because most functions calling suppose that _PyUnicode_AsString() does never fail: see #6687 (and #8195 and a lot of other crashs). It's not a good idea to change it in Python 2.7, because it would require a huge work and we are close to the first beta of 2.7. I wonder how that change got into the 3.x branch - I would certainly not have approved it for the reasons given further up on this ticket. I think we should revert that change for Python 3.2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 11:02:04 2010 From: report at bugs.python.org (STINNER Victor) Date: Wed, 07 Apr 2010 09:02:04 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <4BBC4451.7030704@egenix.com> Message-ID: <201004071101.56629.victor.stinner@haypocalc.com> STINNER Victor added the comment: > >> I also found out that, according to RFC 3629, surrogates > >> are considered invalid and they can't be encoded/decoded, > >> but the UTF-8 codec actually does it. > > > > Python2 does, but Python3 raises an error. > > (...) > > I wonder how that change got into the 3.x branch - I would certainly > not have approved it for the reasons given further up on this ticket. > > I think we should revert that change for Python 3.2. See r72208 and issue #3672. pitrou wrote "We could fix it for 3.1, and perhaps leave 2.7 unchanged if some people rely on this (for whatever reason)." ---------- title: str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 -> str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 11:19:18 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 07 Apr 2010 09:19:18 +0000 Subject: [issue8332] regrtest single TestClass/test_method In-Reply-To: <1270631958.05.0.652340331128.issue8332@psf.upfronthosting.co.za> Message-ID: <1270631958.05.0.652340331128.issue8332@psf.upfronthosting.co.za> New submission from anatoly techtonik : It would be convenient for debug to execute single test_method or TestClass. Running all tests in file can take a long time. ---------- components: Tests messages: 102524 nosy: techtonik severity: normal status: open title: regrtest single TestClass/test_method type: feature request versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 11:20:08 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 07 Apr 2010 09:20:08 +0000 Subject: [issue8332] regrtest single TestClass/test_method In-Reply-To: <1270631958.05.0.652340331128.issue8332@psf.upfronthosting.co.za> Message-ID: <1270632008.69.0.113904137308.issue8332@psf.upfronthosting.co.za> anatoly techtonik added the comment: regrtest [options] test_file.TestClass regrtest [options] test_file.test_method ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 11:41:01 2010 From: report at bugs.python.org (Michael Haubenwallner) Date: Wed, 07 Apr 2010 09:41:01 +0000 Subject: [issue4026] fcntl extension fails to build on AIX 6.1 In-Reply-To: <1223022763.11.0.245770368063.issue4026@psf.upfronthosting.co.za> Message-ID: <1270633261.76.0.621602363101.issue4026@psf.upfronthosting.co.za> Michael Haubenwallner added the comment: This very same problem happens (with Python-2.6.2) on AIX5.3 now too, after upgrading to: $ oslevel -s 5300-08-09-1013 Unlike before (comparing with old build logs), this AIX5.3 now provides flock() in and libbsd.a[shr.o] like AIX6.1. Interesting enough, /usr/lib/libbsd.a contains 32bit shared objects only, so -lbsd does not help in 64bit mode (don't know if python actually supports 64bit on AIX). I don't have an AIX6.1 to check this. Because of this, upgrading "checking for flock" from compile- to link-check (eventually trying -lbsd a second time) might help? ---------- nosy: +haubi _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 11:41:35 2010 From: report at bugs.python.org (Vinay Sajip) Date: Wed, 07 Apr 2010 09:41:35 +0000 Subject: [issue8331] a documentation grammar fix in logging module In-Reply-To: <1270604192.13.0.509346290398.issue8331@psf.upfronthosting.co.za> Message-ID: <1270633295.55.0.548509162837.issue8331@psf.upfronthosting.co.za> Vinay Sajip added the comment: Fix checked into trunk (r79888). ---------- resolution: accepted -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 11:43:58 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Apr 2010 09:43:58 +0000 Subject: [issue8314] test_ctypes fails in test_ulonglong on sparc buildbots In-Reply-To: <1270469885.55.0.752027246289.issue8314@psf.upfronthosting.co.za> Message-ID: <1270633438.69.0.610352349547.issue8314@psf.upfronthosting.co.za> Mark Dickinson added the comment: It's surprising that test_ulonglong fails, while test_longlong passes: can the Linux Sparc ABI really be treating these two types differently? Maybe more information could be gained by supplying a more interesting test value than 42---some 8-byte value with all bytes different, for example. In any case, this seems likely to be a libffi bug somewhere; maybe we could bring it up on the libffi mailing list. If we can translate the failing Python code into failing C code first that would probably increase the chances of getting a good answer. Without access to Sparc hardware, I don't see much other way of making progress here. ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 12:03:21 2010 From: report at bugs.python.org (Michael Haubenwallner) Date: Wed, 07 Apr 2010 10:03:21 +0000 Subject: [issue4026] fcntl extension fails to build on AIX 6.1 In-Reply-To: <1223022763.11.0.245770368063.issue4026@psf.upfronthosting.co.za> Message-ID: <1270634601.26.0.643704043368.issue4026@psf.upfronthosting.co.za> Michael Haubenwallner added the comment: Ohw, looking on another machine, being AIX5.3 TL6: $ oslevel -s 5300-06-00-0000 Here flock() is provided in libbsd.a(shr.o) (32bit only) too, but it isn't declared in any header-file. So that recent AIX5.3 patchset just adds the flock() declaration, not the function itself (is already there). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 12:14:40 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 07 Apr 2010 10:14:40 +0000 Subject: [issue7585] difflib should separate filename from timestamp with tab In-Reply-To: <1261947458.0.0.959368598145.issue7585@psf.upfronthosting.co.za> Message-ID: <1270635280.22.0.401098932856.issue7585@psf.upfronthosting.co.za> anatoly techtonik added the comment: Added unittest for tab with and without set filedate. Removed #7583 dependency with NORMALIZE_WHITESPACE. ---------- Added file: http://bugs.python.org/file16797/issue7585.difflib-tab-unittest.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 13:00:06 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 07 Apr 2010 11:00:06 +0000 Subject: [issue8314] test_ctypes fails in test_ulonglong on sparc buildbots In-Reply-To: <1270469885.55.0.752027246289.issue8314@psf.upfronthosting.co.za> Message-ID: <1270638006.23.0.0326084084616.issue8314@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I have just studied the issue in detail; v8.S is indeed missing support for unsigned long long. Here is a patch. ---------- keywords: +patch nosy: +loewis Added file: http://bugs.python.org/file16798/sparc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 13:03:08 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 07 Apr 2010 11:03:08 +0000 Subject: [issue8314] test_ctypes fails in test_ulonglong on sparc buildbots In-Reply-To: <1270469885.55.0.752027246289.issue8314@psf.upfronthosting.co.za> Message-ID: <1270638188.5.0.712721666024.issue8314@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Committed as r79892. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 13:12:25 2010 From: report at bugs.python.org (Yaniv Aknin) Date: Wed, 07 Apr 2010 11:12:25 +0000 Subject: [issue7834] socket.connect() no longer works with AF_BLUETOOTH L2CAP sockets In-Reply-To: <1265069614.13.0.295096684445.issue7834@psf.upfronthosting.co.za> Message-ID: <1270638745.39.0.285599375504.issue7834@psf.upfronthosting.co.za> Yaniv Aknin added the comment: I've zero experience with programming bluetooth (to be honest, I only tackled this bug because I'm learning how to contribute to Python and it seemed ultra-easy), so I'm not an authoritative source on whether such a 'loopback' test is possible. On #bluez in freenode I was told that generally no, there is no 'localhost' for BT sockets, and that a while ago there was a bluetooth emulation tool called 'hciemu' which is no longer maintained. I'm attaching the patch (it's just a oneliner), it passes regression though obviously isn't really tested by it... I suggest Mathew will try the patch out and see if it helps; we can decide how to proceed from there. ---------- keywords: +patch Added file: http://bugs.python.org/file16799/zero_l2cap_addr_struct.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 13:14:24 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 07 Apr 2010 11:14:24 +0000 Subject: [issue6090] zipfile DeprecationWarning Python in 2.6, failure in 2.7 In-Reply-To: <1243011059.87.0.0917631314165.issue6090@psf.upfronthosting.co.za> Message-ID: <1270638864.86.0.704189945534.issue6090@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is not a bug in the code, but in the application. You are passing a date before 1980; this is not supported in zipfiles. Try passing 1980 instead of 1. I think the error message could be better, though; it should probably be a ValueError. Reducing the priority to normal. ---------- nosy: +loewis priority: critical -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 13:49:44 2010 From: report at bugs.python.org (Cyril) Date: Wed, 07 Apr 2010 11:49:44 +0000 Subject: [issue8240] ssl.SSLSocket.write may fail on non-blocking sockets In-Reply-To: <1269617434.76.0.650979265578.issue8240@psf.upfronthosting.co.za> Message-ID: <1270640984.59.0.492457226876.issue8240@psf.upfronthosting.co.za> Cyril added the comment: Here is a patch that implements SSLSocket.get_mode/set_mode, with the SSL_MODE_ENABLE_PARTIAL_WRITE and SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER constants defined in the ssl module. The patch contains a test case and documentation. It's made against trunk 44327 and also applies nicely with --fuzz=3 on a 2.6.5. There are no compatibility issues as no specific mode is set by default. It's up to the application to call SSLSocket.set_mode before use. I've tested my own use case with a set_mode(SSL_MODE_ACCEPT_MOVING_WRITE_BUFFER), it works nicely. ---------- Added file: http://bugs.python.org/file16800/ssl_mode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 15:08:53 2010 From: report at bugs.python.org (Yaniv Aknin) Date: Wed, 07 Apr 2010 13:08:53 +0000 Subject: [issue6610] Subprocess descriptor debacle In-Reply-To: <1249000024.51.0.280381658662.issue6610@psf.upfronthosting.co.za> Message-ID: <1270645733.92.0.808253019629.issue6610@psf.upfronthosting.co.za> Yaniv Aknin added the comment: It seems to me that subprocess is protected against this flaw. Python 2.x has a pure-Python implementation of the child logic (which is susceptible to an unrelated issue). Python 3.x has a C implementation which falls back to pure-Python if the former is not available. Both implementations test explicitly that they're not closing standard file descriptors after the dup2() call in the child. It is my understanding that test is sufficient, I couldn't reproduce the bug in Python, and thus I think this issue should be closed. All that said, there was no coverage in subprocess' test for this particular case (spawning a coprocess when the standard fds closed). I'm attaching a patch which adds a testcase to cover it. ---------- keywords: +patch nosy: +Yaniv.Aknin Added file: http://bugs.python.org/file16801/test_subprocess_with_standard_fds_closed.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 15:09:51 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 07 Apr 2010 13:09:51 +0000 Subject: [issue8271] str.decode('utf8', 'replace') -- conformance with Unicode 5.2.0 In-Reply-To: <1270002492.52.0.790856673013.issue8271@psf.upfronthosting.co.za> Message-ID: <1270645791.98.0.67959669276.issue8271@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 15:12:01 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Wed, 07 Apr 2010 13:12:01 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270645921.22.0.26576557249.issue2810@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: I just found a one line example of the problem: >>> EnumValue(HKEY_PERFORMANCE_DATA, 0) Traceback (most recent call last): File "", line 1, in WindowsError: [Error 234] More data is available Other functions are also affected: >>> QueryValueEx(HKEY_PERFORMANCE_DATA, None) Traceback (most recent call last): File "", line 1, in WindowsError: [Error 234] More data is available In a nutshell, the Python implementation of these functions works like this: 1) Query the API for the length of the value 2) Allocate a buffer of that size 3) Query the API for the value However, the API functions called in step #1 are not guaranteed to be accurate. It works *most* of the time, but if step #3 returns ERROR_MORE_DATA then we need to dynamically grow the buffer and try again until the data fits. I'll have a patch (with test cases) ready later today. ---------- versions: +Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 15:18:36 2010 From: report at bugs.python.org (anatoly techtonik) Date: Wed, 07 Apr 2010 13:18:36 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270646316.12.0.121079877852.issue2810@psf.upfronthosting.co.za> anatoly techtonik added the comment: Great analysis! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 15:34:37 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 07 Apr 2010 13:34:37 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> New submission from Stefan Krah : On Windows/amd64, I get loads of pickling errors in test_multiprocessing. Type 1 error: Traceback (most recent call last): File "", line 1, in File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 347, in main self = load(from_parent) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 1378, in load return Unpickler(file).load() File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 858, in load dispatch[key](self) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 880, in load_eof raise EOFError EOFError Type 2 error: ====================================================================== ERROR: test_fork (__main__.WithManagerTestQueue) ---------------------------------------------------------------------- Traceback (most recent call last): File "..\..\Lib\test\test_multiprocessing.py", line 485, in test_fork p.start() File "C:\Users\stefan\svn\trunk\lib\multiprocessing\process.py", line 104, in start self._popen = Popen(self) File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 244, in __init__ dump(process_obj, to_child, HIGHEST_PROTOCOL) File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 167, in dump ForkingPickler(file, protocol).dump(obj) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 224, in dump self.save(obj) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save self.save_reduce(obj=obj, *rv) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 419, in save_reduce save(state) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 649, in save_dict self._batch_setitems(obj.iteritems()) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 681, in _batch_setitems save(v) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 40, in dispatcher self.save_reduce(obj=obj, *rv) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 401, in save_reduce save(args) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 548, in save_tuple save(element) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save self.save_reduce(obj=obj, *rv) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 419, in save_reduce save(state) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 649, in save_dict self._batch_setitems(obj.iteritems()) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 681, in _batch_setitems save(v) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save self.save_reduce(obj=obj, *rv) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 419, in save_reduce save(state) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 649, in save_dict self._batch_setitems(obj.iteritems()) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 681, in _batch_setitems save(v) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save self.save_reduce(obj=obj, *rv) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 396, in save_reduce save(cls) File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save f(self, obj) # Call unbound method with explicit self File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 748, in save_global (obj, module, name)) PicklingError: Can't pickle : it's not found as cStringIO.StringO ---------- components: Library (Lib) messages: 102539 nosy: skrah priority: high severity: normal stage: needs patch status: open title: test_multiprocessing: pickling failures type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 15:50:15 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 07 Apr 2010 13:50:15 +0000 Subject: [issue8328] longobject.c: silence warnings (Visual Studio) In-Reply-To: <1270579109.17.0.48402121763.issue8328@psf.upfronthosting.co.za> Message-ID: <1270648215.07.0.65748192632.issue8328@psf.upfronthosting.co.za> Stefan Krah added the comment: Committed in trunk (r79885), py3k (r79886) and release31-maint (r79891). Thanks for the review! ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 16:01:21 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 07 Apr 2010 14:01:21 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270648881.98.0.330657955923.issue2810@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- assignee: -> brian.curtin priority: -> normal stage: -> needs patch versions: -Python 2.4, Python 2.5, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 16:05:23 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 07 Apr 2010 14:05:23 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270649123.73.0.672967632526.issue2810@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- assignee: brian.curtin -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 16:25:41 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 07 Apr 2010 14:25:41 +0000 Subject: [issue3672] Ill-formed surrogates not treated as errors during encoding/decoding In-Reply-To: <1219615011.7.0.279537729369.issue3672@psf.upfronthosting.co.za> Message-ID: <1270650341.19.0.714713765841.issue3672@psf.upfronthosting.co.za> Changes by Ezio Melotti : _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 16:41:18 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Wed, 07 Apr 2010 14:41:18 +0000 Subject: [issue8240] ssl.SSLSocket.write may fail on non-blocking sockets In-Reply-To: <1269617434.76.0.650979265578.issue8240@psf.upfronthosting.co.za> Message-ID: <1270651278.53.0.0888030394429.issue8240@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The patch adds a new feature, which makes it unsuitable for 2.6. I guess it could be applied to the 2.7 trunk, although a beta is being released and I'm not sure new features are really welcome afterwards. This one is really small and non-controversial, though, so I'd advocate accepting it. The patch itself looks good. ---------- nosy: +benjamin.peterson stage: test needed -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 16:48:11 2010 From: report at bugs.python.org (Tim Golden) Date: Wed, 07 Apr 2010 14:48:11 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <4BBC9B22.2090305@timgolden.me.uk> Tim Golden added the comment: Seeing the same thing on 32-bit WinXP on x86 On 07/04/2010 14:34, Stefan Krah wrote: > > New submission from Stefan Krah: > > On Windows/amd64, I get loads of pickling errors in test_multiprocessing. > > Type 1 error: > > Traceback (most recent call last): > File "", line 1, in > File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 347, in main > self = load(from_parent) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 1378, in load > return Unpickler(file).load() > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 858, in load > dispatch[key](self) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 880, in load_eof > raise EOFError > EOFError > > > Type 2 error: > > ====================================================================== > ERROR: test_fork (__main__.WithManagerTestQueue) > ---------------------------------------------------------------------- > Traceback (most recent call last): > File "..\..\Lib\test\test_multiprocessing.py", line 485, in test_fork > p.start() > File "C:\Users\stefan\svn\trunk\lib\multiprocessing\process.py", line 104, in start > self._popen = Popen(self) > File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 244, in __init__ > dump(process_obj, to_child, HIGHEST_PROTOCOL) > File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 167, in dump > ForkingPickler(file, protocol).dump(obj) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 224, in dump > self.save(obj) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save > self.save_reduce(obj=obj, *rv) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 419, in save_reduce > save(state) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save > f(self, obj) # Call unbound method with explicit self > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 649, in save_dict > self._batch_setitems(obj.iteritems()) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 681, in _batch_setitems > save(v) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save > f(self, obj) # Call unbound method with explicit self > File "C:\Users\stefan\svn\trunk\lib\multiprocessing\forking.py", line 40, in dispatcher > self.save_reduce(obj=obj, *rv) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 401, in save_reduce > save(args) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save > f(self, obj) # Call unbound method with explicit self > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 548, in save_tuple > save(element) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save > self.save_reduce(obj=obj, *rv) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 419, in save_reduce > save(state) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save > f(self, obj) # Call unbound method with explicit self > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 649, in save_dict > self._batch_setitems(obj.iteritems()) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 681, in _batch_setitems > save(v) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save > self.save_reduce(obj=obj, *rv) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 419, in save_reduce > save(state) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save > f(self, obj) # Call unbound method with explicit self > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 649, in save_dict > self._batch_setitems(obj.iteritems()) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 681, in _batch_setitems > save(v) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 331, in save > self.save_reduce(obj=obj, *rv) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 396, in save_reduce > save(cls) > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 286, in save > f(self, obj) # Call unbound method with explicit self > File "C:\Users\stefan\svn\trunk\lib\pickle.py", line 748, in save_global > (obj, module, name)) > PicklingError: Can't pickle: it's not found as cStringIO.StringO > > ---------- > components: Library (Lib) > messages: 102539 > nosy: skrah > priority: high > severity: normal > stage: needs patch > status: open > title: test_multiprocessing: pickling failures > type: behavior > versions: Python 2.7 > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/mail%40timgolden.me.uk ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 17:52:25 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Wed, 07 Apr 2010 15:52:25 +0000 Subject: [issue8334] winreg.QueryValue should return bytes, not unicode In-Reply-To: <1270655545.35.0.413426657032.issue8334@psf.upfronthosting.co.za> Message-ID: <1270655545.35.0.413426657032.issue8334@psf.upfronthosting.co.za> New submission from Daniel Stutzbach : The Windows RegQueryValue function returns a registry value without returning the corresponding type information (e.g., REG_SZ for string, REG_BINARY for binary data, REG_DWORD for a 32-bit number, etc.). The corresponding wrapper winreg.QueryValue currently calls PyUnicode_FromUnicode on the return data, which is fine if the type happens to be REG_SZ, but gibberish for anything else. Since the format of data is unknown, it should return a bytes object rather than a unicode object. If the user wants a REG_SZ converted to the unicode type automatically, than can use winreg.QueryValueEx instead. QueryValueEx wraps RegQueryValueEx which *does* return the type information of the underlying value. QueryValueEx uses the type information to convert to an appropriate Python type if possible (or returns a bytes object for unsupported types). ---------- components: Library (Lib), Windows messages: 102543 nosy: stutzbach severity: normal status: open title: winreg.QueryValue should return bytes, not unicode type: behavior versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 17:56:51 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 07 Apr 2010 15:56:51 +0000 Subject: [issue8334] winreg.QueryValue should return bytes, not unicode In-Reply-To: <1270655545.35.0.413426657032.issue8334@psf.upfronthosting.co.za> Message-ID: <1270655811.05.0.141963797193.issue8334@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- components: +Extension Modules -Library (Lib) nosy: +brian.curtin priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 17:59:29 2010 From: report at bugs.python.org (Jasmit) Date: Wed, 07 Apr 2010 15:59:29 +0000 Subject: [issue8275] callback function on win64 results in bad behavior. mem corruption? In-Reply-To: <1270061625.47.0.601780173179.issue8275@psf.upfronthosting.co.za> Message-ID: <1270655969.46.0.481386060108.issue8275@psf.upfronthosting.co.za> Jasmit added the comment: I was able to fix the issue by modifying and re-compiling ctypes project in Visual Studio 2008. The following properties were modified: Release: configuration Properties->C/C++->Optimization->Optimization: Disabled(/Od) configuration Properties->C/C++->Optimization->Enable Intrinsic Functions: No ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 18:27:37 2010 From: report at bugs.python.org (Eric Smith) Date: Wed, 07 Apr 2010 16:27:37 +0000 Subject: [issue8334] winreg.QueryValue should return bytes, not unicode In-Reply-To: <1270655545.35.0.413426657032.issue8334@psf.upfronthosting.co.za> Message-ID: <1270657657.56.0.418251587857.issue8334@psf.upfronthosting.co.za> Changes by Eric Smith : ---------- nosy: +eric.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 18:33:38 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Wed, 07 Apr 2010 16:33:38 +0000 Subject: [issue8334] winreg.QueryValue should return bytes, not unicode In-Reply-To: <1270655545.35.0.413426657032.issue8334@psf.upfronthosting.co.za> Message-ID: <1270658018.06.0.105751189509.issue8334@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: Jumped the gun here. RegQueryValue returns ERROR_DATA_INVALID if the value isn't a string, so converting to Unicode is OK. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 18:42:50 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Wed, 07 Apr 2010 16:42:50 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270658570.31.0.232674752681.issue2810@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : Added file: http://bugs.python.org/file16802/winreg_test.pach _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 18:43:07 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Wed, 07 Apr 2010 16:43:07 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270658587.82.0.524550968836.issue2810@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : ---------- keywords: +patch Added file: http://bugs.python.org/file16803/winreg.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 18:43:29 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Wed, 07 Apr 2010 16:43:29 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270658609.13.0.635801372875.issue2810@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : Removed file: http://bugs.python.org/file16728/more_data_is_available.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 18:43:33 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Wed, 07 Apr 2010 16:43:33 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270658613.83.0.613102356525.issue2810@psf.upfronthosting.co.za> Changes by Daniel Stutzbach : Removed file: http://bugs.python.org/file16729/more_data_is_available2.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 18:43:54 2010 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 07 Apr 2010 16:43:54 +0000 Subject: [issue8330] Failures seen in test_gdb on buildbots In-Reply-To: <1270601126.21.0.71359722213.issue8330@psf.upfronthosting.co.za> Message-ID: <1270658634.63.0.206332809787.issue8330@psf.upfronthosting.co.za> Dave Malcolm added the comment: There's also a deprecation warning in that log: /home/doko/buildarea/trunk.klose-debian-alpha/build/Lib/test/test_gdb.py:229: DeprecationWarning: BaseException.message has been deprecated as of Python 2.6 if e.message != 'unichr() arg not in range(0x10000) (narrow Python build)': I'm attaching a fix for this; tested with -Wd and it works. This doesn't yet address the other two failures. ---------- keywords: +patch stage: -> patch review Added file: http://bugs.python.org/file16804/fix-test_gdb-deprection-warning.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 18:44:38 2010 From: report at bugs.python.org (Daniel Stutzbach) Date: Wed, 07 Apr 2010 16:44:38 +0000 Subject: [issue2810] _winreg.EnumValue fails when the registry data includes multibyte unicode characters In-Reply-To: <1210441054.55.0.264831714691.issue2810@psf.upfronthosting.co.za> Message-ID: <1270658678.97.0.891753967013.issue2810@psf.upfronthosting.co.za> Daniel Stutzbach added the comment: I've uploaded two patches (against trunk): one to add test cases that demonstrate this bug and another to fix the bug. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 18:48:21 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 07 Apr 2010 16:48:21 +0000 Subject: [issue7472] email.encoders.encode_7or8bit(): typo "iso-2202". "iso-2022" is correct. In-Reply-To: <1260466982.74.0.0519719914389.issue7472@psf.upfronthosting.co.za> Message-ID: <1270658901.02.0.0608988979044.issue7472@psf.upfronthosting.co.za> R. David Murray added the comment: After tracing the code further I now understand what the original patch is doing, and yes the spelling correction is the correct fix. (The issue is that there are two different encodings involved: the input encoding in which the body is encoded when encode_7or8 bit is called, and the 'output' encoding that will be used to render the message when it is serialized to bytes. In the case of iso-2022, it is used as the output encoding for at least one input encoding that is an eight bit encoding. iso-2022 is pretty much the *only* encoding that appears as an output encoding different from the input encoding.) Applying the patch will have to wait until the branch unfreezes. I also think that I will not apply it to 2.6, since it is not fixing a bug that anyone has reported as breaking their code, but does represent a behavior change. Since we have proven in the course of analyzing this that the code is untested, perhaps someone would like to write some unit tests for it? ---------- priority: normal -> low resolution: -> accepted versions: -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 19:26:14 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 07 Apr 2010 17:26:14 +0000 Subject: [issue8297] AttributeError message text should include module name In-Reply-To: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> Message-ID: <1270661174.26.0.469754003196.issue8297@psf.upfronthosting.co.za> R. David Murray added the comment: This is a feature request, so it only applies to unreleased versions. It'll be up to Benjamin whether it can go into 2.7, if the change is approved, since 2.7 is now technically in feature freeze. The patch also needs unit tests. I do like the idea of making the error messages more specific. I have not reviewed the patch itself. ---------- components: +Interpreter Core -Library (Lib) nosy: +r.david.murray stage: needs patch -> test needed versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 19:46:50 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 07 Apr 2010 17:46:50 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1270662410.36.0.73322276792.issue7559@psf.upfronthosting.co.za> R. David Murray added the comment: The unit test passes on trunk for me without the fix applied. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 19:53:29 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 07 Apr 2010 17:53:29 +0000 Subject: [issue7585] difflib should separate filename from timestamp with tab In-Reply-To: <1261947458.0.0.959368598145.issue7585@psf.upfronthosting.co.za> Message-ID: <1270662809.55.0.115253746713.issue7585@psf.upfronthosting.co.za> R. David Murray added the comment: Great, thanks. I'll check this in when the branch is unfrozen. ---------- dependencies: -doctest should normalize tabs when comparing output _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 19:54:02 2010 From: report at bugs.python.org (jan matejek) Date: Wed, 07 Apr 2010 17:54:02 +0000 Subject: [issue8335] distutils test_build_ext's test_get_outputs fails in bootstrap environment In-Reply-To: <1270662842.61.0.49246293202.issue8335@psf.upfronthosting.co.za> Message-ID: <1270662842.61.0.49246293202.issue8335@psf.upfronthosting.co.za> New submission from jan matejek : when running testsuite in a clean environment without pre-installed system python, test_distutils fail in test_build_ext, test_get_outputs: /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lpython2.6 LinkError: command 'gcc' failed with exit status 1 full traceback is below. this is most likely caused by change in r72637: http://svn.python.org/view/python/branches/release26-maint/Lib/distutils/tests/test_build_ext.py?r1=72637&r2=72636&pathrev=72637 this changes compiler's working directory, so that it can no longer find libpython2.6.so with "-L." (related to issue 6022 - the comments there point it out) not sure about proper fix - personally, i don't care much about leaving one more file in builddir, whereas i do care about tests passing in clean env, so for SUSE i'm reverting r72637 full traceback: test_distutils /usr/lib64/gcc/x86_64-suse-linux/4.5/../../../../x86_64-suse-linux/bin/ld: cannot find -lpython2.6 collect2: ld returned 1 exit status test test_distutils failed -- Traceback (most recent call last): File "/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/tests/test_build_ext.py", line 261, in test_get_outputs cmd.run() File "/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/command/build_ext.py", line 340, in run self.build_extensions() File "/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/command/build_ext.py", line 449, in build_extensions self.build_extension(ext) File "/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/command/build_ext.py", line 531, in build_extension target_lang=language) File "/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/ccompiler.py", line 769, in link_shared_object extra_preargs, extra_postargs, build_temp, target_lang) File "/usr/src/packages/BUILD/Python-2.6.5/Lib/distutils/unixccompiler.py", line 259, in link raise LinkError, msg LinkError: command 'gcc' failed with exit status 1 ---------- assignee: tarek components: Distutils messages: 102552 nosy: matejcik, tarek severity: normal status: open title: distutils test_build_ext's test_get_outputs fails in bootstrap environment type: compile error versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 19:54:32 2010 From: report at bugs.python.org (jan matejek) Date: Wed, 07 Apr 2010 17:54:32 +0000 Subject: [issue6022] test_distutils leaves a 'foo' file behind in the cwd In-Reply-To: <1242320757.03.0.676564730728.issue6022@psf.upfronthosting.co.za> Message-ID: <1270662872.36.0.888918472462.issue6022@psf.upfronthosting.co.za> jan matejek added the comment: see issue 8335 ---------- nosy: +matejcik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 19:55:47 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Wed, 07 Apr 2010 17:55:47 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1270662947.26.0.569255914567.issue7559@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks, David. Sorry about that. The test probably requires one additional level of nesting so that "parts_copy" is not False: + if not parts_copy or not module_not_found: raise ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 20:00:43 2010 From: report at bugs.python.org (R. David Murray) Date: Wed, 07 Apr 2010 18:00:43 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <1270663243.08.0.121694375653.issue8333@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +jnoller _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 20:05:31 2010 From: report at bugs.python.org (Jesse Noller) Date: Wed, 07 Apr 2010 18:05:31 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <1270663531.83.0.0891884610861.issue8333@psf.upfronthosting.co.za> Jesse Noller added the comment: When did this problem start? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 20:54:54 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 07 Apr 2010 18:54:54 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <1270666494.44.0.118940355311.issue8333@psf.upfronthosting.co.za> Stefan Krah added the comment: It was introduced in r79623, and the attached patch makes the problem go away. I would be happy to apply it, but I perhaps you and Michael could analyze if there are unwanted dependencies between multiprocessing and unittest. ---------- nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 20:55:08 2010 From: report at bugs.python.org (Stefan Krah) Date: Wed, 07 Apr 2010 18:55:08 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <1270666508.3.0.239955341661.issue8333@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- keywords: +patch Added file: http://bugs.python.org/file16805/issue8333.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 21:09:54 2010 From: report at bugs.python.org (Krauzi) Date: Wed, 07 Apr 2010 19:09:54 +0000 Subject: [issue8336] PyObject_CallObject - Not "reference-count-neutral" In-Reply-To: <1270667394.03.0.256734130503.issue8336@psf.upfronthosting.co.za> Message-ID: <1270667394.03.0.256734130503.issue8336@psf.upfronthosting.co.za> New submission from Krauzi : In the docs there is written: "PyObject_CallObject() is ?reference-count-neutral? with respect to its arguments." This is not correct. Its only reference-count neutral if the call was SUCCESSFUL otherwise the argument is INCREFED! Can anyone confirm this? Cheers Krauzi. ---------- assignee: georg.brandl components: Documentation messages: 102557 nosy: Krauzi, georg.brandl severity: normal status: open title: PyObject_CallObject - Not "reference-count-neutral" versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 21:10:35 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 07 Apr 2010 19:10:35 +0000 Subject: [issue8337] test_gdb fails on Sparc Ubuntu In-Reply-To: <1270667435.08.0.757406826173.issue8337@psf.upfronthosting.co.za> Message-ID: <1270667435.08.0.757406826173.issue8337@psf.upfronthosting.co.za> New submission from Martin v. L?wis : test_gdb fails on Sparc-Ubuntu, e.g. http://www.python.org/dev/buildbot/trunk/builders/sparc%20Ubuntu%20trunk/builds/45/steps/test/logs/stdio test test_gdb failed -- Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-ubuntu-sparc/build/Lib/test/test_gdb.py", line 372, in test_corrupt_tp_name 'set op->ob_type->tp_name=0xDEADBEEF') File "/home/pybot/buildarea/trunk.klose-ubuntu-sparc/build/Lib/test/test_gdb.py", line 341, in assertSane (gdb_repr, gdb_output)) AssertionError: Unexpected gdb representation: '42' Breakpoint 1 at 0x876a8: file Objects/object.c, line 330. [Thread debugging using libthread_db enabled] Breakpoint 1, PyObject_Print (op=42, fp=0x70300d38, flags=1) at Objects/object.c:330 330 return internal_print(op, fp, flags, 0); #0 PyObject_Print (op=42, fp=0x70300d38, flags=1) at Objects/object.c:330 #1 0x000492f8 in file_PyObject_Print (op=42, f=0x70336098, flags=1) at Objects/fileobject.c:110 #2 0x00050774 in PyFile_WriteObject (v=42, f=, flags=1) at Objects/fileobject.c:2470 #3 0x00120d98 in PyEval_EvalFrameEx (f= Frame 0x2ab788, for file , line 1, in (), throwflag=0) at Python/ceval.c:1769 #4 0x00129658 in PyEval_EvalCodeEx (co=0x70353c28, globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=0x0) at Python/ceval.c:3253 #5 0x0011b99c in PyEval_EvalCode (co=0x70353c28, globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}) at Python/ceval.c:666 #6 0x0016c3c8 in run_mod (mod=0x2b1c38, filename=0x23d850 "", globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, flags=0xfff8d664, arena=0x2b69d0) at Python/pythonrun.c:1340 #7 0x0016c240 in PyRun_StringFlags (str=0x28c008 "print 42\n", start=257, globals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, locals= {'__builtins__': , '__name__': '__main__', '__doc__': None, '__package__': None}, flags=0xfff8d664) at Python/pythonrun.c:1303 #8 0x0016a494 in PyRun_SimpleStringFlags (command=0x28c008 "print 42\n", flags=0xfff8d664) at Python/pythonrun.c:962 #9 0x0002190c in Py_Main (argc=4, argv=0xfff8d7e4) at Modules/main.c:536 #10 0x0001fe88 in main (argc=4, argv=0xfff8d7e4) at ./Modules/python.c:23 Because of these ongoing failures, I'm completely disabling the gdb tests for now. ---------- assignee: dmalcolm keywords: buildbot messages: 102558 nosy: dmalcolm, loewis severity: normal status: open title: test_gdb fails on Sparc Ubuntu versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 21:11:59 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 07 Apr 2010 19:11:59 +0000 Subject: [issue8337] test_gdb fails on Sparc Ubuntu In-Reply-To: <1270667435.08.0.757406826173.issue8337@psf.upfronthosting.co.za> Message-ID: <1270667519.36.0.119763192675.issue8337@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Test disabled in r79896. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 21:14:50 2010 From: report at bugs.python.org (Ezio Melotti) Date: Wed, 07 Apr 2010 19:14:50 +0000 Subject: [issue8337] test_gdb fails on Sparc Ubuntu In-Reply-To: <1270667435.08.0.757406826173.issue8337@psf.upfronthosting.co.za> Message-ID: <1270667690.44.0.959465728032.issue8337@psf.upfronthosting.co.za> Ezio Melotti added the comment: See also #8330, same failure, different buildbot. Unless they need to be tracked separately I'll close this as duplicate ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 21:17:04 2010 From: report at bugs.python.org (Michael Foord) Date: Wed, 07 Apr 2010 19:17:04 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <1270667824.18.0.86931606089.issue8333@psf.upfronthosting.co.za> Michael Foord added the comment: I expect the unittest tests will fail with that patch applied however... No problem with switching to just using StringIO in unittest though - preferably with a comment as to why. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 21:28:40 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 07 Apr 2010 19:28:40 +0000 Subject: [issue8337] test_gdb fails on Sparc Ubuntu In-Reply-To: <1270667435.08.0.757406826173.issue8337@psf.upfronthosting.co.za> Message-ID: <1270668520.69.0.523731938078.issue8337@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- resolution: -> duplicate status: open -> closed superseder: -> Failures seen in test_gdb on buildbots _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 21:35:55 2010 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 07 Apr 2010 19:35:55 +0000 Subject: [issue8337] test_gdb fails on Sparc Ubuntu In-Reply-To: <1270667435.08.0.757406826173.issue8337@psf.upfronthosting.co.za> Message-ID: <1270668955.1.0.444613153008.issue8337@psf.upfronthosting.co.za> Dave Malcolm added the comment: ( #8330 has a patch for a DeprecationWarning ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 22:07:43 2010 From: report at bugs.python.org (Roumen Petrov) Date: Wed, 07 Apr 2010 20:07:43 +0000 Subject: [issue3871] cross and native build of python for mingw32 with distutils In-Reply-To: <1221433699.47.0.0165458312451.issue3871@psf.upfronthosting.co.za> Message-ID: <1270670863.04.0.923589650031.issue3871@psf.upfronthosting.co.za> Changes by Roumen Petrov : Added file: http://bugs.python.org/file16806/python-trunk-20100407-MINGW.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 22:48:45 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Wed, 07 Apr 2010 20:48:45 +0000 Subject: [issue8240] ssl.SSLSocket.write may fail on non-blocking sockets In-Reply-To: <1269617434.76.0.650979265578.issue8240@psf.upfronthosting.co.za> Message-ID: <1270673325.34.0.298821505348.issue8240@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Wouldn't it be nicer if mode was a property? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 22:51:03 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 07 Apr 2010 20:51:03 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <1270673463.43.0.800264190991.issue8333@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Perhaps we could run the multiprocessing tests unbuffered? ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 22:51:36 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 07 Apr 2010 20:51:36 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <1270673496.39.0.512091605292.issue8333@psf.upfronthosting.co.za> Martin v. L?wis added the comment: BTW, this is also causing all Windows buildbots to fail. ---------- keywords: +buildbot _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 22:52:52 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Wed, 07 Apr 2010 20:52:52 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <1270673572.26.0.640203263653.issue8333@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- priority: high -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 22:56:49 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Wed, 07 Apr 2010 20:56:49 +0000 Subject: [issue4484] struct: per item endianess specification In-Reply-To: <1228199205.8.0.509541493061.issue4484@psf.upfronthosting.co.za> Message-ID: <1270673809.74.0.176784460779.issue4484@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: I don't see any reasonale reason for mixing endianess inside a struct, and don't know of any real-life protocol using per-item endianess. Unless someone comes up with a good reason for doing so, and since no one else seems to be interested by this issue, I'd suggest to close it. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 23:06:02 2010 From: report at bugs.python.org (David W. Lambert) Date: Wed, 07 Apr 2010 21:06:02 +0000 Subject: [issue8338] Outdated information In-Reply-To: <1270674362.74.0.217445647634.issue8338@psf.upfronthosting.co.za> Message-ID: <1270674362.74.0.217445647634.issue8338@psf.upfronthosting.co.za> New submission from David W. Lambert : http://docs.python.org/py3k/library/multiprocessing.html Doc/library/multiprocessing.rst refers to "SimpleHTTPServer.HttpServer". The patch changes this to "SimpleHTTPRequestHandler" although you may prefer "http.server.SimpleHTTPRequestHandler" or, of course, something entirely different. Thanks, Dave. ---------- assignee: georg.brandl components: Documentation files: multiprocessing_docs.patch keywords: patch messages: 102567 nosy: LambertDW, georg.brandl severity: normal status: open title: Outdated information versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file16807/multiprocessing_docs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 23:39:47 2010 From: report at bugs.python.org (Mark Dickinson) Date: Wed, 07 Apr 2010 21:39:47 +0000 Subject: [issue4484] struct: per item endianess specification In-Reply-To: <1228199205.8.0.509541493061.issue4484@psf.upfronthosting.co.za> Message-ID: <1270676387.77.0.670070727513.issue4484@psf.upfronthosting.co.za> Mark Dickinson added the comment: I agree that this seems like something that would rarely be needed. If it's really necessary, it's possible to break up the format and do the packing/unpacking in fixed-endian pieces. ---------- nosy: +mark.dickinson resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Wed Apr 7 23:42:07 2010 From: report at bugs.python.org (Michael Glassford) Date: Wed, 07 Apr 2010 21:42:07 +0000 Subject: [issue8339] urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://' In-Reply-To: <1270676527.4.0.372149513422.issue8339@psf.upfronthosting.co.za> Message-ID: <1270676527.4.0.372149513422.issue8339@psf.upfronthosting.co.za> New submission from Michael Glassford : An unfortunate side-effect of this change: http://svn.python.org/view/python/branches/release26-maint/Lib/urlparse.py?r1=66717&r2=78235 which was made to fix this issue: http://bugs.python.org/issue7904 is that urlparse.urlunparse(urlparse.urlparse('x://')) now returns 'x:' instead of 'x://', and urlparse.urlunparse(urlparse.urlparse('x:///y')) now returns 'x:/y' instead of 'x:///y'. This behavior exists in at least Python 2.6 and 3.1, but not in 2.5. ---------- messages: 102569 nosy: Michael Glassford severity: normal status: open title: urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://' type: behavior versions: Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 00:06:37 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Wed, 07 Apr 2010 22:06:37 +0000 Subject: [issue4484] struct: per item endianess specification In-Reply-To: <1228199205.8.0.509541493061.issue4484@psf.upfronthosting.co.za> Message-ID: <1270677997.91.0.483910357426.issue4484@psf.upfronthosting.co.za> Raymond Hettinger added the comment: FWIW, I concur with Mark and Charles-Francois. ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 00:26:48 2010 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 07 Apr 2010 22:26:48 +0000 Subject: [issue8330] Failures seen in test_gdb on buildbots In-Reply-To: <1270601126.21.0.71359722213.issue8330@psf.upfronthosting.co.za> Message-ID: <1270679208.54.0.699407510938.issue8330@psf.upfronthosting.co.za> Dave Malcolm added the comment: Both of the failing tests use "set" inside gdb to try to corrupt the memory of the inferior process. I believe the issue here is that reading through 0xDEADBEEF within gdb on this machine isn't generating a RuntimeError; perhaps that _is_ a valid pointer in the address space of that process (or perhaps we're seeing another gdb-vs-gdb version difference aka issue #8279) Within PrettyPrintTests.test_corrupt_tp_name, such a situation leads to the use of tp_flags, and the presence of Py_TPFLAGS_INT_SUBCLASS leads to python-gdb.py using PyIntObject, and it correctly print "42", even after op->ob_type->tp_name now has a garbage value, whereas the test was expecting the fallback handler. Within PrettyPrintTests.test_corrupt_ob_type, it appears that we're using FakeRepr, and that ((PyTypeObject*)0xDEADBEEF->tp_name) within the process pointed at a NUL byte, when my code was expecting gdb to fail to read through ((PyTypeObject*)0xDEADBEEF->tp_name) with a RuntimeError. I'm attaching a patch which tries to generalize the expected output from these tests, so that they pass if the corruption in the inferior process doesn't manage to confuse gdb, and if 0xDEADBEEF happens to point at something unexpected. I tested this with PrettyPrintTests active (it continues to all pass on my machine), but commented it out when generating the patch. This also includes the fix for the DeprecationWarning mentioned in msg102546 ---------- Added file: http://bugs.python.org/file16808/fix-overfussy-gdb_text_corruption-tests-and-deprecation-warning.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 00:28:07 2010 From: report at bugs.python.org (Dave Malcolm) Date: Wed, 07 Apr 2010 22:28:07 +0000 Subject: [issue8337] test_gdb fails on Sparc Ubuntu In-Reply-To: <1270667435.08.0.757406826173.issue8337@psf.upfronthosting.co.za> Message-ID: <1270679287.25.0.584285834498.issue8337@psf.upfronthosting.co.za> Dave Malcolm added the comment: ( #8330 has a patch which may fix this ) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 00:49:52 2010 From: report at bugs.python.org (Michael Foord) Date: Wed, 07 Apr 2010 22:49:52 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <1270680592.84.0.39622583665.issue8333@psf.upfronthosting.co.za> Michael Foord added the comment: TestResult creates its StringIO buffers even if they aren't use. I can create them on first use and use StringIO.StringIO rather than cStringIO. Will fix now. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 00:56:11 2010 From: report at bugs.python.org (Michael Foord) Date: Wed, 07 Apr 2010 22:56:11 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <1270680971.65.0.32270395427.issue8333@psf.upfronthosting.co.za> Michael Foord added the comment: Although merely switching to StringIO may not be enough. TestResult objects keep a reference to sys.stdout when they are instantiated and you can't pickle that either. It is preferable for the reference to be taken at instantiation time rather than stored as a module level reference to be compatible with test runners (like regrtest) that *themselves* replace sys.stdout... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 00:59:27 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Wed, 07 Apr 2010 22:59:27 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270681167.18.0.85084256802.issue1578269@psf.upfronthosting.co.za> Jason R. Coombs added the comment: While trying to reproduce the transient test_tarfile errors, I found two more tests that appear to be failing when symlinks cannot be created, now skipped by patch 27. ---------- Added file: http://bugs.python.org/file16809/windows symlink draft 27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 01:22:59 2010 From: report at bugs.python.org (Brian Curtin) Date: Wed, 07 Apr 2010 23:22:59 +0000 Subject: [issue8340] bytearray undocumented on trunk In-Reply-To: <1270682579.64.0.491172746908.issue8340@psf.upfronthosting.co.za> Message-ID: <1270682579.64.0.491172746908.issue8340@psf.upfronthosting.co.za> New submission from Brian Curtin : It looks like the bytearray documentation wasn't backported when the bytearray code was. See Doc/library/functions.rst ---------- assignee: georg.brandl components: Documentation messages: 102576 nosy: brian.curtin, georg.brandl severity: normal stage: needs patch status: open title: bytearray undocumented on trunk type: behavior versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 01:31:28 2010 From: report at bugs.python.org (Michael Foord) Date: Wed, 07 Apr 2010 23:31:28 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <1270683088.03.0.400404772208.issue8333@psf.upfronthosting.co.za> Michael Foord added the comment: Changing unittest.TestResult to use StringIO instead of cStringIO isn't sufficient. regrtest.py also needs to use StringIO... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 02:02:09 2010 From: report at bugs.python.org (Yaniv Aknin) Date: Thu, 08 Apr 2010 00:02:09 +0000 Subject: [issue2824] zipfile to handle duplicate files in archive In-Reply-To: <1210537070.35.0.0613996133193.issue2824@psf.upfronthosting.co.za> Message-ID: <1270684929.35.0.195672652639.issue2824@psf.upfronthosting.co.za> Yaniv Aknin added the comment: This affect 3.x as well. Regardless of the exact version this will come out in, I think the only proper solution is one with which we eventually, maybe in two versions' time, end up with a behaviour that raises an exception upon double insertion. Also, we should leave some switch to allow double insertions (as someone may /want/ to create a peculiar file). If we agree that's a worthy end goal, let's see what deprecation path we take to get there. I feel PEP4/PEP5 cover more significant changes to the language/stdlib than this, but in their spirit I propose the following concrete solution: For the nearest possible version let's issue a DeprecationWarning when adding dual files and provide a global switch that will change the DeprecationWarning into raising a relevant exception instead. For the version after that, let's remove the DeprecationWarning warning altogether and choose one of these behaviours: (a) a global switch that will raise by default (b) a switch in ZipFile's __init__() that will raise by default (c) a switch in ZipFile's write() that will raise by default I vote for (c), but I think the delta between the options is small. If this is agreeable with the audience, I'll be happy to produce a patch against 2.7 and 3.2 that will provide the chosen behaviour, as well as change tests and documentation accordingly. I realize that time is of the essence if we want this included in 2.7, and I'll be happy to do the work in a timely manner, so if you're interested kindly let me know what you feel while the iron's hot. Either way, I'll be happy to see it in any future version. Regarding the behaviour brtzsnr observed, I think it's a separate bug. I'll try to reproduce this behaviour, and open a separate ticket if I manage to do so. blah. Small bug, many words! ---------- nosy: +Yaniv.Aknin versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 02:15:10 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 08 Apr 2010 00:15:10 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <1270685710.22.0.433681653286.issue8333@psf.upfronthosting.co.za> Michael Foord added the comment: I believe this issue to now be fixed on trunk. We can close this when the buildbots are passing again. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 02:19:47 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 08 Apr 2010 00:19:47 +0000 Subject: [issue8339] urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://' In-Reply-To: <1270676527.4.0.372149513422.issue8339@psf.upfronthosting.co.za> Message-ID: <1270685987.38.0.426933493807.issue8339@psf.upfronthosting.co.za> R. David Murray added the comment: To fix this, urlparse would have to differentiate between a null netloc and no netloc characters specified at all. This could be done by using None for one an '' for the other. I'm not sure that behavior change could be backported to 2.6, though. Did this issue actually cause a program failure for you in 2.6? If so the original patch might wind up getting classed as a regression for the 2.6 line. ---------- keywords: +easy nosy: +orsenthil, r.david.murray priority: -> normal stage: -> test needed versions: +Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 02:44:12 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 08 Apr 2010 00:44:12 +0000 Subject: [issue8333] test_multiprocessing: pickling failures In-Reply-To: <1270647276.97.0.3813963585.issue8333@psf.upfronthosting.co.za> Message-ID: <1270687452.39.0.993657849082.issue8333@psf.upfronthosting.co.za> Michael Foord added the comment: Green build on Windows XP, trunk. http://www.python.org/dev/buildbot/all/builders/x86%20XP-5%20trunk/builds/282 ---------- resolution: -> accepted stage: needs patch -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 03:12:12 2010 From: report at bugs.python.org (Philip Jenvey) Date: Thu, 08 Apr 2010 01:12:12 +0000 Subject: [issue7301] Add environment variable $PYTHONWARNINGS In-Reply-To: <1257865531.11.0.841786263832.issue7301@psf.upfronthosting.co.za> Message-ID: <1270689132.15.0.75061847533.issue7301@psf.upfronthosting.co.za> Philip Jenvey added the comment: Here's a patch for py3k using the same char2wchar as the argv decoder for posix, and better windows handling. Plus an additional nonascii value test. Patch is against r79980 for clarity ---------- Added file: http://bugs.python.org/file16810/issue7301-py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 03:18:03 2010 From: report at bugs.python.org (David W. Lambert) Date: Thu, 08 Apr 2010 01:18:03 +0000 Subject: [issue8341] sphinx bug? In-Reply-To: <1270689483.48.0.0642742972458.issue8341@psf.upfronthosting.co.za> Message-ID: <1270689483.48.0.0642742972458.issue8341@psf.upfronthosting.co.za> New submission from David W. Lambert : http://docs.python.org/py3k/library/multiprocessing.html Indentation is incorrect as displayed and copied from google chrome browser: from multiprocessing import Process def f(name): print('hello', name) if __name__ == '__main__': p = Process(target=f, args=('bob',)) p.start() p.join() ---------- assignee: georg.brandl components: Documentation messages: 102583 nosy: LambertDW, georg.brandl severity: normal status: open title: sphinx bug? versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 03:21:36 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 08 Apr 2010 01:21:36 +0000 Subject: [issue8342] Python fails to run if launched from NTFS symlink and DLL not in PATH In-Reply-To: <1270689696.22.0.100417980949.issue8342@psf.upfronthosting.co.za> Message-ID: <1270689696.22.0.100417980949.issue8342@psf.upfronthosting.co.za> New submission from Jason R. Coombs : While trying to work out a failing test_platform.PlatformTest.test_architecture_via_symlink, I found a more fundamental problem. In the build environment, python.exe depends on pythonXX.dll being in the same directory as sys.executable to load the interpreter. If Python is launched from an NTFS symlink, sys.executable may be located in a directory other than the DLL, and the interpreter fails to run (returning exit code 0xC0000135). This may be expected behavior, but it causes test_architecture_via_symlink to fail once Python becomes aware of symlinks in Windows (sans cygwin). It took me a while to track this down, so I wanted to be sure to document the behavior. ---------- components: Tests, Windows messages: 102584 nosy: jaraco severity: normal status: open title: Python fails to run if launched from NTFS symlink and DLL not in PATH versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 03:25:43 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 08 Apr 2010 01:25:43 +0000 Subject: [issue8342] Python fails to run if launched from NTFS symlink and DLL not in PATH In-Reply-To: <1270689696.22.0.100417980949.issue8342@psf.upfronthosting.co.za> Message-ID: <1270689943.31.0.142835475936.issue8342@psf.upfronthosting.co.za> Jason R. Coombs added the comment: This attached patch against the py3k branch adds a test that reproduces the described behavior. ---------- keywords: +patch Added file: http://bugs.python.org/file16811/reproduction as test.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 03:29:52 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 08 Apr 2010 01:29:52 +0000 Subject: [issue8342] Python fails to run if launched from NTFS symlink and DLL not in PATH In-Reply-To: <1270689696.22.0.100417980949.issue8342@psf.upfronthosting.co.za> Message-ID: <1270690192.31.0.578672676309.issue8342@psf.upfronthosting.co.za> Brian Curtin added the comment: I have this fixed locally in a version of your os.symlink patch. The solution is to add the directory sys.executable is from to os.environ["Path"], then that test should pass the custom environment when the subprocess is created. I meant to update you on the patch I was almost ready to check-in -- I'll send it in private. Overall, I don't believe there is an issue here so I'll close this. ---------- nosy: +brian.curtin resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 03:40:47 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 08 Apr 2010 01:40:47 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270690847.18.0.714562756005.issue1578269@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I've been fighting a failing test in test_platform (when test.support.can_symlink() is True). Turns out the problem is caused by the fact that the Python DLL cannot be resolved when the executable isn't in the same directory (which is the case when launched from a symlink). I've created issue8342 to track this behavior. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 03:41:24 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 08 Apr 2010 01:41:24 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270690884.75.0.946174320377.issue1578269@psf.upfronthosting.co.za> Changes by Jason R. Coombs : Removed file: http://bugs.python.org/file16196/windows symlink draft 25.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 03:41:32 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 08 Apr 2010 01:41:32 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270690892.55.0.62900924734.issue1578269@psf.upfronthosting.co.za> Changes by Jason R. Coombs : Removed file: http://bugs.python.org/file16761/windows symlink draft 26.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 03:51:07 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 08 Apr 2010 01:51:07 +0000 Subject: [issue8342] Python fails to run if launched from NTFS symlink and DLL not in PATH In-Reply-To: <1270690192.31.0.578672676309.issue8342@psf.upfronthosting.co.za> Message-ID: Jason R. Coombs added the comment: Thanks! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 04:35:34 2010 From: report at bugs.python.org (Michael Glassford) Date: Thu, 08 Apr 2010 02:35:34 +0000 Subject: [issue8339] urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://' In-Reply-To: <1270676527.4.0.372149513422.issue8339@psf.upfronthosting.co.za> Message-ID: <1270694134.07.0.615738590437.issue8339@psf.upfronthosting.co.za> Michael Glassford added the comment: It caused a minor issue with the Schemes extension for Mercurial: the output changed, which caused a unit test to fail. I'm pretty sure I have a Mercurial patch to fix that issue, however. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 05:59:12 2010 From: report at bugs.python.org (Matt Bond) Date: Thu, 08 Apr 2010 03:59:12 +0000 Subject: [issue8029] bug in 2to3 dealing with "print FOO, " followed by "sys.stdout.write('')" In-Reply-To: <1267312123.13.0.138693680363.issue8029@psf.upfronthosting.co.za> Message-ID: <1270699152.8.0.912606362726.issue8029@psf.upfronthosting.co.za> Matt Bond added the comment: I've attached a patch that fixes this particular idiom as well as a problem with the handling of bare 'print' statements. It also includes updated tests for these issues. ---------- keywords: +patch nosy: +zxaos Added file: http://bugs.python.org/file16812/fix8029.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 08:06:16 2010 From: report at bugs.python.org (Yaniv Aknin) Date: Thu, 08 Apr 2010 06:06:16 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270706776.75.0.748897622839.issue7978@psf.upfronthosting.co.za> Yaniv Aknin added the comment: First, let me cast my vote in favour of leaving select() itself alone, it's excessive to fix this issue with changing select(). Second, while exarkun's comments are accurate, I understand where pitrou is coming from. EINTR is not a pathological case, but it's not commonplace, either. I believe that on modern Unices (I tried Linux and OpenSolaris), the default handler for SIGCHLD will restart interrupted calls. By default, SIGUSR1 and most sane others, will kill the process anyway. So I can understand the purity of the argument that if a process sets a signal handler, it might just as well set SA_RESTART and be done with it. That said, Imagine I write a forking server with SocketServer which sets a signal handler for SIGCHLD, and I don't set SA_RESTART because I don't think I need to. I believe this is a valid real-world scenario where (a) I don't expect an EINTER-related exception to be raised from SocketServer, (b) SocketServer can actually do something about it, and (c) I doubt the old EINTR behaviour is relied upon by anyone (now I'm /certain/ someone relying on this will pop-up...). I think its a safer bet on behalf of SocketServer (and subprocess, etc) to use something like untilConcludes. If we agree so far, I believe that an implementation of untilConcludes *should* be added to stdlib ("signal.restartable_call", anyone?). If people agree, I'd be happy to produce the patch (trunk+py3k, doc+test). Other than SocketServer and subprocess, anything else that should use "untilConcludes"? Finally, to answer pitrou's second question, I'm pretty sure untilConcludes as presented will not hurt other signal handlers. The interrupt handler will be executed before returning to untilConcludes' loop and manually restarting the call, so KeyboardInterrupt (or anything else signalistic) will behave as expected. I'm attaching a toy 3.x program to play with select() and EINTR, I used it in writing this comment. Gee, it even has an OptionParser CLI to save you some commenting-out. ---------- nosy: +Yaniv.Aknin Added file: http://bugs.python.org/file16813/eintr_safety.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 08:28:56 2010 From: report at bugs.python.org (Gregory P. Smith) Date: Thu, 08 Apr 2010 06:28:56 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270708136.07.0.433572390462.issue7978@psf.upfronthosting.co.za> Gregory P. Smith added the comment: wrapping select in an eintr handler that loops like SocketServer_eintr.diff is fine. ---------- assignee: -> gregory.p.smith nosy: +gregory.p.smith _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 08:33:47 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 08 Apr 2010 06:33:47 +0000 Subject: [issue8341] sphinx bug? In-Reply-To: <1270689483.48.0.0642742972458.issue8341@psf.upfronthosting.co.za> Message-ID: <1270708427.39.0.800073793139.issue8341@psf.upfronthosting.co.za> Georg Brandl added the comment: It was a bug in the source file. Fixed in r79901. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 08:41:20 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Thu, 08 Apr 2010 06:41:20 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270708880.41.0.31039182903.issue7978@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: According to "man 7 signal" select must be explicitely restarted, regardless of the SA_RESTART flag. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 08:55:48 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 08 Apr 2010 06:55:48 +0000 Subject: [issue8292] Incorrect condition test in platform.py In-Reply-To: <1270226918.36.0.398729222231.issue8292@psf.upfronthosting.co.za> Message-ID: <1270709748.35.0.273690712209.issue8292@psf.upfronthosting.co.za> Ray.Allen added the comment: It seems that the "Lib/lib2to3/fixes/fix_filter.py" should have fixed all the "filter" problem in py3k, by adding a "list()" call to "filter()". It's werid this one still exists in standar library. Also I found other two problems with "filter" in standar library. They make condition tests on filter object, although the result is correct, but I think it's not proper. So I make a patch to fix these three problems. ---------- components: +Library (Lib) keywords: +patch nosy: +ysj.ray Added file: http://bugs.python.org/file16814/issue_8292.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 09:19:53 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Thu, 08 Apr 2010 07:19:53 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270711193.7.0.844595409132.issue7978@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: > If we agree so far, I believe that an implementation of untilConcludes *should* be added to stdlib ("signal.restartable_call", anyone?). Definitely, it's better to have this handler written once and correct than having various implementations scattered around libraries. > If people agree, I'd be happy to produce the patch (trunk+py3k, doc+test). Go ahead :-) > According to "man 7 signal" select must be explicitely restarted, regardless of the SA_RESTART flag. man sigaction states this: SA_RESTART Provide behaviour compatible with BSD signal semantics by making _certain_ system calls restartable across signals. Indeed: you can't really rely on SA_RESTART, since certain syscalls are not restartable, and this flag isn't really portable. select is even specific since the file descriptor sets can be modified, and the timeout too. That's why it's definitely better to take the EINTR-wrapper approach. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 09:33:19 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 08 Apr 2010 07:33:19 +0000 Subject: [issue8336] PyObject_CallObject - Not "reference-count-neutral" In-Reply-To: <1270667394.03.0.256734130503.issue8336@psf.upfronthosting.co.za> Message-ID: <1270711999.22.0.793886473799.issue8336@psf.upfronthosting.co.za> Ray.Allen added the comment: By looking into the source, I found PyObject_CallObject() is ?reference-count-neutral? even the call is FAILED, because it will always call Py_DECREF(arg) in the end and in case of exception. ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 09:46:09 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 08 Apr 2010 07:46:09 +0000 Subject: [issue8297] AttributeError message text should include module name In-Reply-To: <1270272607.93.0.943961280816.issue8297@psf.upfronthosting.co.za> Message-ID: <1270712769.53.0.194775966453.issue8297@psf.upfronthosting.co.za> Ray.Allen added the comment: The unittest of this patch. ---------- Added file: http://bugs.python.org/file16815/issue_8297_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 09:46:40 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Apr 2010 07:46:40 +0000 Subject: [issue8336] PyObject_CallObject - Not "reference-count-neutral" In-Reply-To: <1270667394.03.0.256734130503.issue8336@psf.upfronthosting.co.za> Message-ID: <1270712800.02.0.451132656807.issue8336@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Indeed, every function of the API is consistent in this aspect, success or failure should not make a difference in reference counts. Do you have an evidence of the contrary? Note that it's possible that because of the failure, some argument is stored in an exception (maybe indirectly, through the traceback which contains active frames and their local variables), which increases its reference count. Clearing the exception should release the reference. ---------- nosy: +amaury.forgeotdarc _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 09:51:55 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 08 Apr 2010 07:51:55 +0000 Subject: [issue2824] zipfile to handle duplicate files in archive In-Reply-To: <1210537070.35.0.0613996133193.issue2824@psf.upfronthosting.co.za> Message-ID: <1270713115.42.0.239677469321.issue2824@psf.upfronthosting.co.za> anatoly techtonik added the comment: On the second thought having a switch for a low-level zip format hacking is a good addition. It may also be used for in-place removals from .zip file by erasing directory entry. Otherwise remove operation will require repacking archive into temporary file, which is too high level and vulnerable to disk space/permission matters. So, I vote for: (b) a switch in ZipFile's __init__() that will raise by default and also because you'd need to modify write() and writestr(). class zipfile.ZipFile(file[, mode[, compression[, allowZip64, [low_level]]]]) """Added in version 2.7: If `low_level` compatibility switch is set (False by default), then ZipFile allows low level operations, such as adding two files with the same name without raising an exception. This is for compatibility with previous versions.""" BTW, allowZip64 would be nice to be aliased/deprecated in favor of allow_zip64 for consistency with other double word params in module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 10:00:56 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 08 Apr 2010 08:00:56 +0000 Subject: [issue3581] failures in test_uuid In-Reply-To: <1218991997.09.0.347137407735.issue3581@psf.upfronthosting.co.za> Message-ID: <1270713656.29.0.937131297408.issue3581@psf.upfronthosting.co.za> Stefan Krah added the comment: Confirmed on Windows 7 under qemu with a fresh trunk checkout. ---------- nosy: +skrah priority: low -> high versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 10:02:46 2010 From: report at bugs.python.org (Ray.Allen) Date: Thu, 08 Apr 2010 08:02:46 +0000 Subject: [issue8336] PyObject_CallObject - Not "reference-count-neutral" In-Reply-To: <1270667394.03.0.256734130503.issue8336@psf.upfronthosting.co.za> Message-ID: <1270713766.43.0.935214434859.issue8336@psf.upfronthosting.co.za> Ray.Allen added the comment: Yes. I think if the argument object's reference count is increased because of the exception traceback or other cases, it has nothing to do with the PyObject_CallObject itself. Both of the Py_INCREF(arg) and Py_DECREF(arg) will always run once through the PyObject_CallObject() call. The ?reference-count-neutral? means the code of PyObject_CallObject() itself can guarantee the "reference-count-neutral", but not include the callable called by PyObject_CallObject(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 10:36:53 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 08 Apr 2010 08:36:53 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1270715813.1.0.133672938365.issue7559@psf.upfronthosting.co.za> Chris Jerdonek added the comment: FYI, there seems to be a bug in the code cited above: http://twistedmatrix.com/trac/browser/trunk/twisted/python/reflect.py#L382 For example, _importAndCheckStack('package.subpackage.module') raises _NoModuleFound in the following scenario: package/subpackage/__init__.py: import no_exist when it should instead raise an ImportError from the buggy __init__.py. I now think there should be at least a few unit tests to cover this case and a couple similar permutations. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 10:52:12 2010 From: report at bugs.python.org (anatoly techtonik) Date: Thu, 08 Apr 2010 08:52:12 +0000 Subject: [issue8343] improve re parse error messages for named groups In-Reply-To: <1270716731.5.0.82696133579.issue8343@psf.upfronthosting.co.za> Message-ID: <1270716731.5.0.82696133579.issue8343@psf.upfronthosting.co.za> New submission from anatoly techtonik : sre_parse has some messages among repeated code sequences, but can be tweaked for user convenience ---------- components: Library (Lib) files: lib.re.improve-error-message.diff keywords: patch messages: 102604 nosy: techtonik severity: normal status: open title: improve re parse error messages for named groups versions: Python 2.6, Python 2.7 Added file: http://bugs.python.org/file16816/lib.re.improve-error-message.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 11:39:05 2010 From: report at bugs.python.org (Krauzi) Date: Thu, 08 Apr 2010 09:39:05 +0000 Subject: [issue8336] PyObject_CallObject - Not "reference-count-neutral" In-Reply-To: <1270667394.03.0.256734130503.issue8336@psf.upfronthosting.co.za> Message-ID: <1270719545.91.0.404947775524.issue8336@psf.upfronthosting.co.za> Krauzi added the comment: a i think i expressed the problem false. The problem is that the arg (which is a tuple here) is correctly decremented and thus the reference counts are OK. BUT: The objects INSIDE the tuple are NOT correctly decremented. This is the code i've used: C++ Program: http://www.copypastecode.com/26047/ Python Script imported by it: http://www.copypastecode.com/26051/ Now the results: With raise in python script: http://img251.imageshack.us/img251/997/witherror.jpg and with uncommented "raise": http://img256.imageshack.us/img256/2818/noerror.jpg Hope its now clear. Krauzi ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 11:40:56 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 08 Apr 2010 09:40:56 +0000 Subject: [issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit In-Reply-To: <1269292268.26.0.854483419941.issue8204@psf.upfronthosting.co.za> Message-ID: <1270719656.16.0.63484988556.issue8204@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I can reproduce the problem. The root cause is that the "event generate .nb " simply does not have any effect - neither through Python, nor through directly wish. Nor do any of the other keys that supposedly cycle through the notebook, when send through "event generate". Typing them directly works fine. Guilherme, any idea? ---------- assignee: -> gpolo nosy: +gpolo, loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 11:45:13 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 08 Apr 2010 09:45:13 +0000 Subject: [issue8344] test_tag_configure fails on FreeBSD In-Reply-To: <1270719913.05.0.699032461994.issue8344@psf.upfronthosting.co.za> Message-ID: <1270719913.05.0.699032461994.issue8344@psf.upfronthosting.co.za> New submission from Martin v. L?wis : The FreeBSD buildbot reports FAIL: test_tag_configure (test_ttk.test_widgets.TreeviewTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/home/db3l/buildarea/trunk.bolen-freebsd7/build/Lib/lib-tk/test/test_ttk/test_widgets.py", line 1116, in test_tag_configure 'blue') AssertionError: != 'blue' ---------- keywords: buildbot messages: 102607 nosy: loewis severity: normal status: open title: test_tag_configure fails on FreeBSD versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 11:48:07 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 08 Apr 2010 09:48:07 +0000 Subject: [issue3581] failures in test_uuid In-Reply-To: <1218991997.09.0.347137407735.issue3581@psf.upfronthosting.co.za> Message-ID: <1270720087.48.0.713638244226.issue3581@psf.upfronthosting.co.za> Stefan Krah added the comment: According to http://standards.ieee.org/regauth/groupmac/tutorial.html , the assertions in check_node are weeding out perfectly valid addresses: >>> node = 0x525400123456 >>> universal_local_bit = (node >> 40L) & 2 >>> universal_local_bit 2L This just means that the address is locally administered, but valid. Similarly, shouldn't an individual_group_bit of 1 should just mean multicast mode? See also: Issue 7650 ---------- keywords: +needs review, patch Added file: http://bugs.python.org/file16817/uuid_mac.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 11:48:11 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 08 Apr 2010 09:48:11 +0000 Subject: [issue8344] test_tag_configure fails on FreeBSD In-Reply-To: <1270719913.05.0.699032461994.issue8344@psf.upfronthosting.co.za> Message-ID: <1270720091.14.0.545640893448.issue8344@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Apparently, Tk returns a color object instead of a string in this version. Fixed in r79903. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 11:57:10 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Thu, 08 Apr 2010 09:57:10 +0000 Subject: [issue8336] PyObject_CallObject - Not "reference-count-neutral" In-Reply-To: <1270667394.03.0.256734130503.issue8336@psf.upfronthosting.co.za> Message-ID: <1270720630.47.0.854765621563.issue8336@psf.upfronthosting.co.za> Amaury Forgeot d'Arc added the comment: Yes, I think what I wrote above applies here: the string is stored in the "args" variable. When the exception is raised, the traceback contains the *live* frame objects, with position in the bytecode and all local variables. This allows post-mortem debugging, for example. Try calling PyErr_PrintEx(0) instead of PyErr_Print(), this should clear the exception state without storing it in sys.last_traceback, and the reference will decrease. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 12:04:42 2010 From: report at bugs.python.org (Georg Brandl) Date: Thu, 08 Apr 2010 10:04:42 +0000 Subject: [issue8336] PyObject_CallObject - Not "reference-count-neutral" In-Reply-To: <1270667394.03.0.256734130503.issue8336@psf.upfronthosting.co.za> Message-ID: <1270721082.59.0.760151784785.issue8336@psf.upfronthosting.co.za> Georg Brandl added the comment: I don't think this needs to be kept open. ---------- resolution: -> works for me status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 12:06:10 2010 From: report at bugs.python.org (Derk Drukker) Date: Thu, 08 Apr 2010 10:06:10 +0000 Subject: [issue8345] missing method MatchObject.groups in re module doc In-Reply-To: <1270721170.37.0.731757178416.issue8345@psf.upfronthosting.co.za> Message-ID: <1270721170.37.0.731757178416.issue8345@psf.upfronthosting.co.za> New submission from Derk Drukker : The method MatchObject.groups disappeared from Doc/library/re.rst in py3k branch r79434 after a merge. (trunk, release26-maint, and release31-maint are fine.) ---------- assignee: georg.brandl components: Documentation messages: 102612 nosy: drukker, georg.brandl severity: normal status: open title: missing method MatchObject.groups in re module doc versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 12:21:38 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 08 Apr 2010 10:21:38 +0000 Subject: [issue7650] test_uuid is invalid In-Reply-To: <1262828995.4.0.365764114727.issue7650@psf.upfronthosting.co.za> Message-ID: <1270722098.31.0.352388019747.issue7650@psf.upfronthosting.co.za> Stefan Krah added the comment: The multicast bit is the least significant bit of the first octet. Could you check if the patch for http://bugs.python.org/issue3581 fixes your problem? ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 12:56:00 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 08 Apr 2010 10:56:00 +0000 Subject: [issue1481] test_uuid is warning about unreliable functions In-Reply-To: <1195633068.63.0.82173012127.issue1481@psf.upfronthosting.co.za> Message-ID: <1270724160.46.0.669188274317.issue1481@psf.upfronthosting.co.za> Stefan Krah added the comment: Still fails with trunk on OpenBSD. The error is more ctypes related though: _uuid_generate_time isn't set. ====================================================================== ERROR: test_unixdll_getnode (__main__.TestUUID) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib/test/test_uuid.py", line 332, in test_unixdll_getnode self.check_node(uuid._unixdll_getnode(), 'unixdll') File "/home/stefan/svn/trunk/Lib/uuid.py", line 429, in _unixdll_getnode _uuid_generate_time(_buffer) TypeError: 'NoneType' object is not callable ---------------------------------------------------------------------- ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 14:09:15 2010 From: report at bugs.python.org (Firat Ozgul) Date: Thu, 08 Apr 2010 12:09:15 +0000 Subject: [issue8346] Old Version Name in Interactive Mode In-Reply-To: <1270728555.35.0.913114676338.issue8346@psf.upfronthosting.co.za> Message-ID: <1270728555.35.0.913114676338.issue8346@psf.upfronthosting.co.za> New submission from Firat Ozgul : In Python 2.7a4 tutorial, under section "2.1 Invoking the Interpreter" set path command is "set path=%path%;C:\python26". Also under section "2.1.2 Interactive Mode" python command is shown to give "Python 2.6 (#1, Feb 28 2007, 00:02:06)" ---------- assignee: georg.brandl components: Documentation messages: 102615 nosy: georg.brandl, istihza severity: normal status: open title: Old Version Name in Interactive Mode versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 14:55:39 2010 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 08 Apr 2010 12:55:39 +0000 Subject: [issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit In-Reply-To: <1270719656.16.0.63484988556.issue8204@psf.upfronthosting.co.za> Message-ID: Guilherme Polo added the comment: > Martin v. L??wis added the comment: > > I can reproduce the problem. The root cause is that the "event generate .nb " simply does not have any effect - neither through Python, nor through directly wish. Nor do any of the other keys that supposedly cycle through the notebook, when send through "event generate". Typing them directly works fine. > Could it be caused because the notebook is not focused at the correct time ? Here in OSX (finally I have one of these) I had to add self.nb.focus() before that event_generate. The attached patch is for trunk. ---------- keywords: +patch Added file: http://bugs.python.org/file16818/p1.diff _______________________________________ Python tracker _______________________________________ -------------- next part -------------- Index: Lib/lib-tk/test/test_ttk/test_widgets.py =================================================================== --- Lib/lib-tk/test/test_ttk/test_widgets.py (revision 79905) +++ Lib/lib-tk/test/test_ttk/test_widgets.py (working copy) @@ -704,6 +704,7 @@ self.nb.select(0) support.simulate_mouse_click(self.nb, 5, 5) + self.nb.focus() self.nb.event_generate('') self.assertEqual(self.nb.select(), str(self.child2)) self.nb.event_generate('') From report at bugs.python.org Thu Apr 8 15:08:04 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 08 Apr 2010 13:08:04 +0000 Subject: [issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit In-Reply-To: Message-ID: <4BBDD530.7090100@v.loewis.de> Martin v. L?wis added the comment: > Could it be caused because the notebook is not focused at the correct > time ? Here in OSX (finally I have one of these) I had to add > self.nb.focus() before that event_generate. No, that doesn't help. The event still gets lost. In particular, running ttk::notebook .nb .nb add [label .nb.l1 -text hello] -text a .nb add [label .nb.l2 -text world] -text b pack .nb focus .nb puts [.nb select] event generate .nb puts [.nb select] in wish prints ".nb.l1" twice; pressing the right key at the end of the script does cycle properly, though. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 15:56:22 2010 From: report at bugs.python.org (Brian Curtin) Date: Thu, 08 Apr 2010 13:56:22 +0000 Subject: [issue8345] missing method MatchObject.groups in re module doc In-Reply-To: <1270721170.37.0.731757178416.issue8345@psf.upfronthosting.co.za> Message-ID: <1270734982.53.0.0489775418294.issue8345@psf.upfronthosting.co.za> Brian Curtin added the comment: Thanks for reporting this. Fixed in r79906. ---------- assignee: georg.brandl -> brian.curtin nosy: +brian.curtin -georg.brandl priority: -> normal resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 16:38:25 2010 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 08 Apr 2010 14:38:25 +0000 Subject: [issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit In-Reply-To: <4BBDD530.7090100@v.loewis.de> Message-ID: Guilherme Polo added the comment: When I run that alone I get the same effect, maybe there is something else contributing to the previous result I saw. focus_force did solve when testing it alone, and I think it is ok to use focus_force when testing at least. Here is the sample I tried: import ttk import Tkinter as tk nb = ttk.Notebook() nb.add(tk.Label(text='hi'), text='a') nb.add(tk.Label(text='there'), text='b') nb.pack() nb.wait_visibility() nb.focus_force() print nb.select() nb.event_generate('') print nb.select() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 16:40:45 2010 From: report at bugs.python.org (Guilherme Polo) Date: Thu, 08 Apr 2010 14:40:45 +0000 Subject: [issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit In-Reply-To: <1269292268.26.0.854483419941.issue8204@psf.upfronthosting.co.za> Message-ID: <1270737645.33.0.570679957384.issue8204@psf.upfronthosting.co.za> Changes by Guilherme Polo : Removed file: http://bugs.python.org/file16818/p1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 16:44:08 2010 From: report at bugs.python.org (Jeroen Ruigrok van der Werven) Date: Thu, 08 Apr 2010 14:44:08 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1270737848.45.0.201370366749.issue2876@psf.upfronthosting.co.za> Jeroen Ruigrok van der Werven added the comment: What's the consensus on this? I ask since I actually ran into code today that uses DictMixin and as such wasn't converted by the 2to3 tool. ---------- nosy: +asmodai _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 17:28:53 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 08 Apr 2010 15:28:53 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1270740533.54.0.0648045268296.issue7559@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Four failing unit tests (context code can use clean-up). ---------- Added file: http://bugs.python.org/file16819/_patch-7559-4-unittests.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 17:35:11 2010 From: report at bugs.python.org (Tim Lesher) Date: Thu, 08 Apr 2010 15:35:11 +0000 Subject: [issue8070] Infinite loop in PyRun_InteractiveLoopFlags() if PyRun_InteractiveOneFlags() raises an error In-Reply-To: <1267793425.09.0.566406511799.issue8070@psf.upfronthosting.co.za> Message-ID: <1270740911.07.0.163247798403.issue8070@psf.upfronthosting.co.za> Tim Lesher added the comment: I just hit this one myself, and was about to write a bug and patch. On reviewing the patch: 1. This really has the same issue as the original code: it detects one of a few known return values, and will infinitely loop on an unexpected return value. It would be better to explicitly check for 0 (continue), E_EOF (exit normally), and any other result (exit abnormally). 2. I don't think you want to unconditionally call PyErr_Print(), because you don't know for sure that an exception is set. 3. Returning 0 from PyRun_InteractiveLoopFlags() when an error occurs is a behavior change, which makes its documentation incorrect (meaning there should also be a doc patch). But to be honest, I don't think it's correct to return 0 in this case. It seems better to return the actual error code (which also requires a doc patch) If you don't have time to update the patch, let me know and I'll put one together. ---------- nosy: +tlesher _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 17:36:42 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 Apr 2010 15:36:42 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1270741002.72.0.367545447411.issue2876@psf.upfronthosting.co.za> Raymond Hettinger added the comment: UserDict.DictMixin needs to convert to collections.MutableMapping ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 17:51:30 2010 From: report at bugs.python.org (Dave Malcolm) Date: Thu, 08 Apr 2010 15:51:30 +0000 Subject: [issue8330] Failures seen in test_gdb on buildbots In-Reply-To: <1270601126.21.0.71359722213.issue8330@psf.upfronthosting.co.za> Message-ID: <1270741890.42.0.113969905538.issue8330@psf.upfronthosting.co.za> Changes by Dave Malcolm : ---------- nosy: +loewis _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 17:53:18 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 08 Apr 2010 15:53:18 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1270741998.79.0.86397946869.issue2876@psf.upfronthosting.co.za> R. David Murray added the comment: Converting DictMixin to collections.MutableMapping is not necessarily a complete solution. MutableMapping does not provide all the methods that DictMixin does. See for example the problems encountered in issue 7975. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 18:26:18 2010 From: report at bugs.python.org (Thomas Heller) Date: Thu, 08 Apr 2010 16:26:18 +0000 Subject: [issue8314] test_ctypes fails in test_ulonglong on sparc buildbots In-Reply-To: <1270638006.23.0.0326084084616.issue8314@psf.upfronthosting.co.za> Message-ID: <4BBE03A3.70606@ctypes.org> Thomas Heller added the comment: Martin, you should probably post your patch to upstream libffi. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 18:26:27 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 08 Apr 2010 16:26:27 +0000 Subject: [issue3581] failures in test_uuid In-Reply-To: <1218991997.09.0.347137407735.issue3581@psf.upfronthosting.co.za> Message-ID: <1270743987.13.0.908631962421.issue3581@psf.upfronthosting.co.za> Stefan Krah added the comment: The new patch test_uuid.patch fixes issue 7650, issue 1481 and this one. I've applied it to py3k-cdecimal in r79905 and test_uuid is passed on all buildbots (I did not test on ARM and one FreeBSD bot is still hanging in test_subprocess). Additionally, the patch works on Windows-qemu (this issue) and OpenBSD-qemu. Changes: 1. check_node accepts addresses with universal_local_bit set to 1. These addresses are valid (like the qemu one). 2. check_node accepts addresses with the multicast bit set to 1. These addresses are used for valid random addresses per the RFC and uuid.getnode() itself actually may return such a random address. 3. On some platforms, _uuid_generate_time can't be set, so _unixdll_getnode fails with a TypeError. This exception is now caught. 4. With these changes, there appear to be no more failures, so all tests are enabled again. Could this go into trunk, since the tests actually fail needlessly on qemu setups? ---------- Added file: http://bugs.python.org/file16820/test_uuid.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 18:28:57 2010 From: report at bugs.python.org (Stefan Krah) Date: Thu, 08 Apr 2010 16:28:57 +0000 Subject: [issue1481] test_uuid is warning about unreliable functions In-Reply-To: <1195633068.63.0.82173012127.issue1481@psf.upfronthosting.co.za> Message-ID: <1270744137.9.0.811387757357.issue1481@psf.upfronthosting.co.za> Stefan Krah added the comment: With test_uuid.patch from issue 3581 (related) no warnings can be seen on the buildbots. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 18:48:28 2010 From: report at bugs.python.org (Austin English) Date: Thu, 08 Apr 2010 16:48:28 +0000 Subject: [issue7650] test_uuid is invalid In-Reply-To: <1262828995.4.0.365764114727.issue7650@psf.upfronthosting.co.za> Message-ID: <1270745308.27.0.537238153455.issue7650@psf.upfronthosting.co.za> Austin English added the comment: >From Juan Lang, who originally pointed out the bug: My only comment is that the message is now misleading: - individual_group_bit = (node >> 40L) & 1 - universal_local_bit = (node >> 40L) & 2 message = "%012x doesn't look like a real MAC address" % node - self.assertEqual(individual_group_bit, 0, message) - self.assertEqual(universal_local_bit, 0, message) self.assertNotEqual(node, 0, message) self.assertNotEqual(node, 0xffffffffffffL, message) The test no longer checks for the uuid being a MAC address or not. Ideally it would be reworded to be less confusing, or perhaps the code could check the various "flavors" of uuids, and check that a generated uuid conforms to one of them. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 19:05:33 2010 From: report at bugs.python.org (Martin) Date: Thu, 08 Apr 2010 17:05:33 +0000 Subject: [issue8347] string capitalize erroneously lower-case any non-first letters In-Reply-To: <1270746333.31.0.107951036323.issue8347@psf.upfronthosting.co.za> Message-ID: <1270746333.31.0.107951036323.issue8347@psf.upfronthosting.co.za> New submission from Martin : When the following is run: s='the Los Angeles Symphony'; s.capitalize(); it displays 'The los angeles symphony' instead of 'The Los Angeles Symphony' the str.capitalize() should only deal with the first letter, not lower-case the rest of the letters. The manual correctly describes this, but the actual behavior is not consistent with this description. ---------- components: None messages: 102629 nosy: famart severity: normal status: open title: string capitalize erroneously lower-case any non-first letters type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 19:14:43 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 08 Apr 2010 17:14:43 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270746883.86.0.678716930683.issue1578269@psf.upfronthosting.co.za> Jason R. Coombs added the comment: This patch includes a routine that adds the directory of the python executable to the path before attempting to run a symlinked executable (in test_platform). ---------- Added file: http://bugs.python.org/file16821/windows symlink draft 28.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 19:20:38 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 08 Apr 2010 17:20:38 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270747238.83.0.0105538286892.issue1578269@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch has now missed the window for 2.7, so backporting it won't be necessary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 19:26:06 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Apr 2010 17:26:06 +0000 Subject: [issue3581] failures in test_uuid In-Reply-To: <1218991997.09.0.347137407735.issue3581@psf.upfronthosting.co.za> Message-ID: <1270747566.25.0.450189098046.issue3581@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I trust you on the investigation. > Could this go into trunk, since the tests actually fail needlessly > on qemu setups? Yes, but after the beta: http://mail.python.org/pipermail/python-dev/2010-April/099132.html ---------- assignee: -> skrah resolution: -> accepted stage: -> commit review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 19:33:42 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 08 Apr 2010 17:33:42 +0000 Subject: [issue8348] test_urllib2net fails because of bad URL In-Reply-To: <1270748022.01.0.642764123246.issue8348@psf.upfronthosting.co.za> Message-ID: <1270748022.01.0.642764123246.issue8348@psf.upfronthosting.co.za> New submission from Martin v. L?wis : Recently, test_urllib2net started failing ====================================================================== ERROR: test_ftp_basic (test.test_urllib2net.TimeoutTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/pybot/buildarea/trunk.klose-ubuntu-sparc/build/Lib/test/test_urllib2net.py", line 227, in test_ftp_basic u = _urlopen_with_retry(self.FTP_HOST) File "/home/pybot/buildarea/trunk.klose-ubuntu-sparc/build/Lib/test/test_urllib2net.py", line 24, in wrapped return _retry_thrice(func, exc, *args, **kwargs) File "/home/pybot/buildarea/trunk.klose-ubuntu-sparc/build/Lib/test/test_urllib2net.py", line 20, in _retry_thrice raise last_exc URLError: Apparently, the directory /pub/mirror/gnu does not exist anymore. ---------- messages: 102633 nosy: doko, loewis severity: normal status: open title: test_urllib2net fails because of bad URL _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 19:39:28 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 08 Apr 2010 17:39:28 +0000 Subject: [issue8204] test_ttk_guionly assertion error on 3.x linux 64-bit In-Reply-To: <1269292268.26.0.854483419941.issue8204@psf.upfronthosting.co.za> Message-ID: <1270748368.48.0.858375661959.issue8204@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Thanks for the advice. I managed to fix this (for me) in r79907; I had to force focus before every single event :-( ---------- keywords: +buildbot resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 19:41:33 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 08 Apr 2010 17:41:33 +0000 Subject: [issue8348] test_urllib2net fails because of bad URL In-Reply-To: <1270748022.01.0.642764123246.issue8348@psf.upfronthosting.co.za> Message-ID: <1270748493.38.0.135884860977.issue8348@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I changed the URL in r79908. ---------- keywords: +buildbot resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 19:44:13 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Thu, 08 Apr 2010 17:44:13 +0000 Subject: [issue3081] Py_(X)SETREF macros In-Reply-To: <1213211633.2.0.340935924246.issue3081@psf.upfronthosting.co.za> Message-ID: <1270748653.28.0.684725271699.issue3081@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: The name suggests a different behavior to me - I assumed it would set the reference count to a specific value. Maybe this is the kind of thing Raymond had in mind when he said "The mnemonic doesn't work for me". ---------- nosy: +exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 19:45:29 2010 From: report at bugs.python.org (Philip Jenvey) Date: Thu, 08 Apr 2010 17:45:29 +0000 Subject: [issue8347] string capitalize erroneously lower-case any non-first letters In-Reply-To: <1270746333.31.0.107951036323.issue8347@psf.upfronthosting.co.za> Message-ID: <1270748729.3.0.30025854593.issue8347@psf.upfronthosting.co.za> Philip Jenvey added the comment: S.capitalize() -> string Return a copy of the string S with only its first character capitalized. You've misunderstood the docs, only the first character is indeed capitalized. You want string.capwords instead ---------- nosy: +pjenvey resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 20:05:42 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Thu, 08 Apr 2010 18:05:42 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1270749942.06.0.90676201685.issue7559@psf.upfronthosting.co.za> Chris Jerdonek added the comment: The new unit tests pass with this patch (minor clean-up still needed). ---------- Added file: http://bugs.python.org/file16822/_patch-7559-5.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 20:24:46 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Apr 2010 18:24:46 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270751086.33.0.540322631102.issue8108@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I raised the "errno 0" issue on the openssl mailing-list, and I had a nice response by Darryl Miles here: http://www.mail-archive.com/openssl-users at openssl.org/msg60710.html The bottom line is that any "socket error" return from unwrap(), that is any "SSL_ERROR_SYSCALL" return from SSL_shutdown(), means that the socket is closed (abruptly or not). In this case, we can't do anything except ignore the error in test_ftplib. We should also remove the special casing hack in _ssl.c, even though a socket error with "errno 0" isn't particularly informative. Here is a new patch. ---------- Added file: http://bugs.python.org/file16823/newssl4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 21:04:10 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 08 Apr 2010 19:04:10 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270753450.98.0.919897087095.issue1578269@psf.upfronthosting.co.za> Jason R. Coombs added the comment: In the last patch, I addressed test_platform running a test under a symlinked Python. I then found the same error resulting from essentially the same code in test_sysconfig. So I refactored those methods into a generator method in test.support. This is patch 29. ---------- Added file: http://bugs.python.org/file16824/windows symlink draft 28.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 21:06:17 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 08 Apr 2010 19:06:17 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270753577.13.0.0664254621646.issue1578269@psf.upfronthosting.co.za> Changes by Jason R. Coombs : Added file: http://bugs.python.org/file16825/windows symlink draft 29.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 21:06:24 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 08 Apr 2010 19:06:24 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270753584.49.0.271862096027.issue1578269@psf.upfronthosting.co.za> Changes by Jason R. Coombs : Removed file: http://bugs.python.org/file16809/windows symlink draft 27.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 21:06:30 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 08 Apr 2010 19:06:30 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270753590.54.0.016971822482.issue1578269@psf.upfronthosting.co.za> Changes by Jason R. Coombs : Removed file: http://bugs.python.org/file16821/windows symlink draft 28.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 21:06:37 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Thu, 08 Apr 2010 19:06:37 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270753597.73.0.703730460195.issue1578269@psf.upfronthosting.co.za> Changes by Jason R. Coombs : Removed file: http://bugs.python.org/file16824/windows symlink draft 28.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 22:15:14 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Apr 2010 20:15:14 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270757714.55.0.481463036937.issue8108@psf.upfronthosting.co.za> Antoine Pitrou added the comment: My analysis of SSL_shutdown() was missing something: timeout sockets are really non-blocking sockets in disguise. I guess it's never too late to notice. OpenSSL doesn't know about the timeout, so we have to do it ourselves. Ironically, the infrastructure is already in place in _ssl.c, and used for read() and write() methods. So here is a new patch, taking this into account. ---------- Added file: http://bugs.python.org/file16826/newssl5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 22:21:03 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Thu, 08 Apr 2010 20:21:03 +0000 Subject: [issue2643] mmap_object_dealloc does not call FlushViewOfFile on windows In-Reply-To: <1208363341.7.0.215523027719.issue2643@psf.upfronthosting.co.za> Message-ID: <1270758063.69.0.503818505594.issue2643@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: Alright, the current behaviour is quite strange: we don't call msync() when closing the object, we just unmap() it: mmap_close_method(mmap_object *self, PyObject *unused) { [...] #ifdef UNIX if (0 <= self->fd) (void) close(self->fd); self->fd = -1; if (self->data != NULL) { munmap(self->data, self->size); self->data = NULL; } #endif [...] } But we set self->data to NULL to avoid calling munmap() a second time when deallocating the object: static void mmap_object_dealloc(mmap_object *m_obj) { [ ... ] #ifdef UNIX if (m_obj->fd >= 0) (void) close(m_obj->fd); if (m_obj->data!=NULL) { msync(m_obj->data, m_obj->size, MS_SYNC); munmap(m_obj->data, m_obj->size); } #endif /* UNIX */ [ ...] } So, if the object has been closed properly before being deallocated, msync() is _not_ called. But, if we don't close the object, then msync() is called. The attached test script shows the _huge_ performance impact of msync: when only close() is called (no msync()): $ ./python /home/cf/test_mmap.py 0.35829615593 when both flush() and close() are called (msync() called): $ ./python /home/cf/test_mmap.py 4.95999493599 when neither is called, relying on the deallocation (msync() called): $ ./python /home/cf/test_mmap.py 4.8811671257 And a strace leaves no doubt (called 10 times in a loop) : mmap2(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1, 0) = 0xb80b1000 <0.000019> write(1, "4.12167286873\n"..., 144.12167286873 ) = 14 <0.000012> close(3) = 0 <0.000010> munmap(0xb80b2000, 4096) = 0 <0.000023> rt_sigaction(SIGINT, {SIG_DFL}, {0x811d630, [], 0}, 8) = 0 <0.000011> close(5) = 0 <0.004889> msync(0xb69f9000, 10000000, MS_SYNC) = 0 <0.584054> munmap(0xb69f9000, 10000000) = 0 <0.000433> See how expensive msync() is, and this is just for a 10MB file. So the attached patch (mmap_msync.diff) removes the call to msync from mmap_object_dealloc(). Since UnmapViewOfFile() is only called inside flush() method, nothing to remove for MS Windows. Here's the result of the same test script with the patch: when only close() is called (no msync()): $ ./python /home/cf/test_mmap.py 0.370584011078 when both flush() and close() are called (msync() called): $ ./python /home/cf/test_mmap.py 4.97467517853 when neither is called, relying on the deallocation (msync() not called): $ ./python /home/cf/test_mmap.py 0.390102148056 So we only get msync() latency when the user explicitely calls flush(). ---------- Added file: http://bugs.python.org/file16827/mmap_msync.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 22:21:33 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Thu, 08 Apr 2010 20:21:33 +0000 Subject: [issue2643] mmap_object_dealloc does not call FlushViewOfFile on windows In-Reply-To: <1208363341.7.0.215523027719.issue2643@psf.upfronthosting.co.za> Message-ID: <1270758093.94.0.538987328934.issue2643@psf.upfronthosting.co.za> Changes by Charles-Francois Natali : Added file: http://bugs.python.org/file16828/test_mmap.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 22:28:21 2010 From: report at bugs.python.org (R. David Murray) Date: Thu, 08 Apr 2010 20:28:21 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1270758501.34.0.5188532463.issue7559@psf.upfronthosting.co.za> R. David Murray added the comment: Thank you very much for those tests. I think you can simplify them a bit. For example, you can use assertRaises. You also might be able to use the test_support.temp_cwd context manager in your context manager, even though you don't need the cwd part. I've attached an alternate, simpler patch to fix this bug, based on a similar fix I did in pydoc. The disadvantage of my patch is that it contains a hardcoding of the name of the function doing the import. I think this is acceptable given the much greater simplicity of my patch. I may be missing some subtlety, though, that the twisted folks know about. Or perhaps people will just find the hardcoding itself objectionable. ---------- Added file: http://bugs.python.org/file16829/alternate_import_fix.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 22:35:29 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Apr 2010 20:35:29 +0000 Subject: [issue2643] mmap_object_dealloc does not call FlushViewOfFile on windows In-Reply-To: <1208363341.7.0.215523027719.issue2643@psf.upfronthosting.co.za> Message-ID: <1270758929.42.0.507094899865.issue2643@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +akuchling, exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 22:37:10 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Thu, 08 Apr 2010 20:37:10 +0000 Subject: [issue3081] Py_(X)SETREF macros In-Reply-To: <1213211633.2.0.340935924246.issue3081@psf.upfronthosting.co.za> Message-ID: <1270759030.94.0.625000288192.issue3081@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Py_ASSIGN could be a better name, but given the enthusiasm generated by this proposal, I think we might just as well close the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 23:03:06 2010 From: report at bugs.python.org (Mark Dickinson) Date: Thu, 08 Apr 2010 21:03:06 +0000 Subject: [issue3081] Py_(X)SETREF macros In-Reply-To: <1213211633.2.0.340935924246.issue3081@psf.upfronthosting.co.za> Message-ID: <1270760586.94.0.654979580484.issue3081@psf.upfronthosting.co.za> Mark Dickinson added the comment: I agree with Raymond about the Py_INCREF. I could see more uses for this macro without the Py_INCREF, especially for things like in-place arithmetic operations. The following pattern appears a lot in code like Objects/longobject.c: Old code: /* add one to x */ temp = PyNumber_Add(x, one); Py_DECREF(x); x = temp; if (x == NULL) return NULL; With a non-INCREF version of Py_SETREF: /* add one to x */ Py_SETREF(x, PyNumber_Add(x, one)); if (x == NULL) return NULL; ---------- nosy: +mark.dickinson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 23:18:04 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Thu, 08 Apr 2010 21:18:04 +0000 Subject: [issue3081] Py_(X)SETREF macros In-Reply-To: <1213211633.2.0.340935924246.issue3081@psf.upfronthosting.co.za> Message-ID: <1270761484.29.0.812750485497.issue3081@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- resolution: -> rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 23:37:23 2010 From: report at bugs.python.org (Dan Brandow) Date: Thu, 08 Apr 2010 21:37:23 +0000 Subject: [issue8349] os.environ.get returns incorrect data In-Reply-To: <1270762643.12.0.684015717592.issue8349@psf.upfronthosting.co.za> Message-ID: <1270762643.12.0.684015717592.issue8349@psf.upfronthosting.co.za> New submission from Dan Brandow : I have a Windows 7 64 bit machine, which means it has a few different environment variables concerning the program files location: PROGRAMFILES=C:\Program Files (x86) ProgramFiles(x86)=C:\Program Files (x86) Note that both env variables have "(x86)" at the end. When I do an os.environ.get I get the following results: Python 2.6.5 (r265:79096, Mar 19 2010, 18:02:59) [MSC v.1500 64 bit (AMD64)] on win32 >>> import os >>> print os.environ.get('ProgramFiles(x86)') C:\Program Files (x86) >>> print os.environ.get('PROGRAMFILES') C:\Program Files >>> print os.environ.get('ProgramFiles') C:\Program Files >>> Note the missing "(x86)" on the last two test cases. I tried it on the 64-bit version of 2.5.4 as well: Python 2.5.4 (r254:67916, Dec 23 2008, 15:19:34) [MSC v.1400 64 bit (AMD64)] on win32 >>> import os >>> print os.environ.get('ProgramFiles(x86)') C:\Program Files (x86) >>> print os.environ.get('PROGRAMFILES') C:\Program Files >>> print os.environ.get('ProgramFiles') C:\Program Files >>> Same result. So I tried the 32-bit version of 2.5.4: Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 >>> import os >>> print os.environ.get('ProgramFiles(x86)') C:\Program Files (x86) >>> print os.environ.get('PROGRAMFILES') C:\Program Files (x86) >>> print os.environ.get('ProgramFiles') C:\Program Files (x86) >>> ...which gave the correct strings... ---------- components: Extension Modules messages: 102646 nosy: dbrandow severity: normal status: open title: os.environ.get returns incorrect data versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Thu Apr 8 23:43:58 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Thu, 08 Apr 2010 21:43:58 +0000 Subject: [issue8349] os.environ.get returns incorrect data In-Reply-To: <1270762643.12.0.684015717592.issue8349@psf.upfronthosting.co.za> Message-ID: <1270763038.33.0.0377095626599.issue8349@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is the correct result. The value of the environment variables depends on whether a 32-bit or a 64-bit process is looking at them, see http://msdn.microsoft.com/en-us/library/aa384274%28VS.85%29.aspx ---------- nosy: +loewis resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 00:02:39 2010 From: report at bugs.python.org (Todd Whiteman) Date: Thu, 08 Apr 2010 22:02:39 +0000 Subject: [issue8350] os.mkdir doc comment is incorrect In-Reply-To: <1270764159.26.0.287104770145.issue8350@psf.upfronthosting.co.za> Message-ID: <1270764159.26.0.287104770145.issue8350@psf.upfronthosting.co.za> New submission from Todd Whiteman : The doc command for os.mkdir is incorrect (at least for posix). It specifies that there is an optional mode keyword, but it's not a keyword argument, see below: >>> import os >>> help(os.mkdir) mkdir(...) mkdir(path [, mode=0777]) Create a directory. >>> os.mkdir("/tmp/1", mode=777) Traceback (most recent call last): File "", line 1, in TypeError: mkdir() takes no keyword arguments Suggest the following doc comment change: mkdir(...) mkdir(path [, mode]) Create a directory. Mode defaults to 0777 if not specified. ---------- assignee: georg.brandl components: Documentation messages: 102648 nosy: georg.brandl, twhitema severity: normal status: open title: os.mkdir doc comment is incorrect versions: Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 00:08:04 2010 From: report at bugs.python.org (Nir Aides) Date: Thu, 08 Apr 2010 22:08:04 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1266353325.38.0.278549753357.issue7946@psf.upfronthosting.co.za> Message-ID: <1270764484.93.0.725864284322.issue7946@psf.upfronthosting.co.za> Changes by Nir Aides : Removed file: http://bugs.python.org/file16710/bfs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 00:08:34 2010 From: report at bugs.python.org (Nir Aides) Date: Thu, 08 Apr 2010 22:08:34 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1266353325.38.0.278549753357.issue7946@psf.upfronthosting.co.za> Message-ID: <1270764514.21.0.334120697063.issue7946@psf.upfronthosting.co.za> Nir Aides added the comment: Uploaded an update. ---------- Added file: http://bugs.python.org/file16830/bfs.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 00:57:31 2010 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 08 Apr 2010 22:57:31 +0000 Subject: [issue6650] sre_parse contains a confusing generic error message In-Reply-To: <1249492479.55.0.250174703511.issue6650@psf.upfronthosting.co.za> Message-ID: <1270767451.43.0.383881091359.issue6650@psf.upfronthosting.co.za> Daniel Diniz added the comment: Thanks for the patch, LGTM assuming we don't need a test for this. Do you think the vague message could be less cryptic for users that didn't want lookbehind (or don't know what it is)? ---------- nosy: +ajaksu2 priority: -> low stage: -> patch review versions: -Python 2.4, Python 2.5, Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 00:59:19 2010 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 08 Apr 2010 22:59:19 +0000 Subject: [issue6700] inspect.getsource() returns incorrect source lines In-Reply-To: <1250223562.74.0.274098839265.issue6700@psf.upfronthosting.co.za> Message-ID: <1270767559.12.0.747892936413.issue6700@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed in trunk and py3k. Also affects inspect.getsourcelines. ---------- nosy: +ajaksu2 priority: -> normal stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 01:21:10 2010 From: report at bugs.python.org (Daniel Diniz) Date: Thu, 08 Apr 2010 23:21:10 +0000 Subject: [issue6878] outdated docstring in tkinter.Canvas.coords In-Reply-To: <1252603508.57.0.591042976978.issue6878@psf.upfronthosting.co.za> Message-ID: <1270768870.03.0.599029833163.issue6878@psf.upfronthosting.co.za> Daniel Diniz added the comment: I think the obvious code fix of list(map()) is less likely to cause surprises than updating the docstring to the new map in 3.x. ---------- keywords: +easy nosy: +ajaksu2 priority: -> low stage: -> needs patch type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 01:36:44 2010 From: report at bugs.python.org (Floris Bruynooghe) Date: Thu, 08 Apr 2010 23:36:44 +0000 Subject: [issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual() In-Reply-To: <1270769804.42.0.714910786313.issue8351@psf.upfronthosting.co.za> Message-ID: <1270769804.42.0.714910786313.issue8351@psf.upfronthosting.co.za> New submission from Floris Bruynooghe : This patch adds the ability to suppress large diffs in the failure message of TestCase.assertSequenceEqual(). The maximum size of the diff is customisable as an new keyword parameter with hopefully a sensible default. ---------- components: Library (Lib) files: case_seq.diff keywords: patch messages: 102653 nosy: flub severity: normal status: open title: Suppress large diffs in unitttest.TestCase.assertSequenceEqual() type: feature request versions: Python 3.3 Added file: http://bugs.python.org/file16831/case_seq.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 01:55:21 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 08 Apr 2010 23:55:21 +0000 Subject: [issue3984] python interpreter import dependency with disutils/util In-Reply-To: <1222595903.95.0.266625430762.issue3984@psf.upfronthosting.co.za> Message-ID: <1270770921.9.0.817774459928.issue3984@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 01:57:20 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 08 Apr 2010 23:57:20 +0000 Subject: [issue4843] make distutils use shutil In-Reply-To: <1231156704.22.0.372262791608.issue4843@psf.upfronthosting.co.za> Message-ID: <1270771040.97.0.682057691781.issue4843@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 01:57:32 2010 From: report at bugs.python.org (Michael Foord) Date: Thu, 08 Apr 2010 23:57:32 +0000 Subject: [issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual() In-Reply-To: <1270769804.42.0.714910786313.issue8351@psf.upfronthosting.co.za> Message-ID: <1270771052.74.0.464832973388.issue8351@psf.upfronthosting.co.za> Changes by Michael Foord : ---------- assignee: -> michael.foord nosy: +michael.foord _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 01:59:26 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Thu, 08 Apr 2010 23:59:26 +0000 Subject: [issue5187] distutils upload should prompt for the user/password too In-Reply-To: <1234128468.86.0.0554273106388.issue5187@psf.upfronthosting.co.za> Message-ID: <1270771166.08.0.964875273602.issue5187@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:00:14 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 00:00:14 +0000 Subject: [issue1004696] translate Windows cr-lf when installing scripts on Linux Message-ID: <1270771214.71.0.862772880291.issue1004696@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:01:56 2010 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 09 Apr 2010 00:01:56 +0000 Subject: [issue7007] Tiny inconsistency in the orthography of "url encoded" in the doc of urllib.parse In-Reply-To: <1254071339.25.0.500752949705.issue7007@psf.upfronthosting.co.za> Message-ID: <1270771316.66.0.202575525149.issue7007@psf.upfronthosting.co.za> Daniel Diniz added the comment: Hits from py3k: Doc/library/urllib.rst:239: Convert a mapping object or a sequence of two-element tuples to a "url-encoded" Doc/library/urllib.rst:263: Convert the path component *path* from an encoded URL to the local syntax for a Doc/library/urlparse.rst:112: values in URL encoded queries should be treated as blank strings. A true value Doc/library/urlparse.rst:135: values in URL encoded queries should be treated as blank strings. A true value Doc/library/logging.rst:2347: Sends the record to the Web server as an URL-encoded dictionary. Lib/logging/handlers.py:1021: Send the record to the Web server as an URL-encoded dictionary Lib/cgi.py:135: URL encoded forms should be treated as blank strings. Lib/cgi.py:414: URL encoded forms should be treated as blank strings. Lib/urlparse.py:297: qs: URL-encoded query string to be parsed Lib/urlparse.py:300: URL encoded queries should be treated as blank strings. Lib/urlparse.py:323: qs: URL-encoded query string to be parsed Lib/urlparse.py:326: URL encoded queries should be treated as blank strings. A ---------- assignee: -> georg.brandl components: +Documentation keywords: +easy nosy: +ajaksu2, georg.brandl priority: -> low stage: -> needs patch type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:03:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 00:03:36 +0000 Subject: [issue1109659] distutils argument parsing is bogus Message-ID: <1270771416.35.0.837050585604.issue1109659@psf.upfronthosting.co.za> ?ric Araujo added the comment: ?Global option? could be understood as ?option that can be given to any command?, i.e. ?egg spam -d? == ?egg -d spam?. Is it feasible to support such and equivalence, too difficult or not desirable? Regards ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:04:34 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 00:04:34 +0000 Subject: [issue7677] distutils, better error message for setup.py upload -sign without identity. In-Reply-To: <1263223354.89.0.290474495181.issue7677@psf.upfronthosting.co.za> Message-ID: <1270771474.15.0.395509262034.issue7677@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:08:29 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 00:08:29 +0000 Subject: [issue6142] Distutils doesn't remove .pyc files In-Reply-To: <1243612271.53.0.396822187567.issue6142@psf.upfronthosting.co.za> Message-ID: <1270771709.09.0.622375348781.issue6142@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hello So, is this bug ?add a distclean command? now? Regards ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:16:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 00:16:40 +0000 Subject: [issue4908] adding a get_metadata in distutils In-Reply-To: <1231609506.29.0.511902396455.issue4908@psf.upfronthosting.co.za> Message-ID: <1270772200.52.0.677897920966.issue4908@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:18:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 00:18:16 +0000 Subject: [issue6860] Inconsistent naming of custom command in setup.py help output In-Reply-To: <1252372114.27.0.565813299947.issue6860@psf.upfronthosting.co.za> Message-ID: <1270772296.19.0.575957341062.issue6860@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:21:53 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 00:21:53 +0000 Subject: [issue793069] Add --remove-source option Message-ID: <1270772513.58.0.406405381818.issue793069@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:22:16 2010 From: report at bugs.python.org (James) Date: Fri, 09 Apr 2010 00:22:16 +0000 Subject: [issue6142] Distutils doesn't remove .pyc files In-Reply-To: <1243612271.53.0.396822187567.issue6142@psf.upfronthosting.co.za> Message-ID: <1270772536.31.0.233138727002.issue6142@psf.upfronthosting.co.za> James added the comment: i'm fine with that and willing to contribute patches, however i would feel better if whoever upstream was, was more supportive of the idea. someone let me know. a thought: - it's true (as mentioned) that distclean isn't necessarily directly related to distributing python scripts, however (in my mind anyways) i see distutils as a replacement for common things we do in makefiles. so as a result if we did this we could get rid of makefiles and provide useful "action" targets such as distclean, test, etc... 100% pure python if needed... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:23:48 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 00:23:48 +0000 Subject: [issue6555] distutils config file should have the same name on both platforms and all scopes In-Reply-To: <1248379635.87.0.00387112145543.issue6555@psf.upfronthosting.co.za> Message-ID: <1270772628.96.0.809663140052.issue6555@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:24:23 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 00:24:23 +0000 Subject: [issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build In-Reply-To: <1242995950.24.0.540152639281.issue6087@psf.upfronthosting.co.za> Message-ID: <1270772663.56.0.49734381973.issue6087@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:26:52 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 00:26:52 +0000 Subject: [issue3992] removed custom log from distutils In-Reply-To: <1222645256.9.0.167855735394.issue3992@psf.upfronthosting.co.za> Message-ID: <1270772812.9.0.828896371457.issue3992@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:27:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 00:27:17 +0000 Subject: [issue5747] knowing the parent command In-Reply-To: <1239635801.31.0.779200404785.issue5747@psf.upfronthosting.co.za> Message-ID: <1270772837.73.0.240487898384.issue5747@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:27:49 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Apr 2010 00:27:49 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270772869.4.0.460579766317.issue1578269@psf.upfronthosting.co.za> Jason R. Coombs added the comment: With patch 29, I believe all patch-related test failures are corrected. The remaining failures in some modules (namely test_tarfile, test_glob, test_mailbox, test_warnings) can be demonstrated to occur in unpatched builds. Since some failures are transient, I created repeat_test, which I used to demonstrate that test_glob, test_tarfile, and test_mailbox will fail on a clean build. Additionally, I'm including test output for 32- and 64-bit builds on the unpatched build, the patched build running under administrator, and the patched build running under guest. The test output was generated in an automated fashion to guarantee a clean build. The build process can be found by easy_installing jaraco.develop==1.1.1 and running test-python-symlink-patch.py (VS9, GNU patch, and svn required). ---------- Added file: http://bugs.python.org/file16832/repeat_test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:28:07 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Apr 2010 00:28:07 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270772887.15.0.00781744101993.issue1578269@psf.upfronthosting.co.za> Changes by Jason R. Coombs : Added file: http://bugs.python.org/file16833/admin results - no patch.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:28:17 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Apr 2010 00:28:17 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270772897.94.0.0116575101158.issue1578269@psf.upfronthosting.co.za> Changes by Jason R. Coombs : Added file: http://bugs.python.org/file16834/admin results - patch 29.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:28:28 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Apr 2010 00:28:28 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270772908.36.0.475270640164.issue1578269@psf.upfronthosting.co.za> Changes by Jason R. Coombs : Added file: http://bugs.python.org/file16835/guest results - patch 29.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:28:36 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Apr 2010 00:28:36 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270772916.13.0.984413465642.issue1578269@psf.upfronthosting.co.za> Changes by Jason R. Coombs : Removed file: http://bugs.python.org/file16202/guest results.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:28:41 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Apr 2010 00:28:41 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270772921.26.0.250535392536.issue1578269@psf.upfronthosting.co.za> Changes by Jason R. Coombs : Removed file: http://bugs.python.org/file16203/admin results.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:44:45 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Apr 2010 00:44:45 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270773885.21.0.866280491207.issue7978@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I think the wrapper approach is a good one. Now remains to decide whether it should stay private to socketserver or be exposed as a generic method (for example in the "os" module as proposed). By the way, adding a patch would be nice, too. I'm not sure it what form it should be done; perhaps register a signal handler and trigger the signal from a sub-thread while the main thread is iterating in a select loop? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:44:52 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Apr 2010 00:44:52 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270773892.66.0.566379145626.issue7978@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, I think the wrapper approach is a good one. Now remains to decide whether it should stay private to socketserver or be exposed as a generic method (for example in the "os" module as proposed). By the way, adding a test would be nice, too. I'm not sure it what form it should be done; perhaps register a signal handler and trigger the signal from a sub-thread while the main thread is iterating in a select loop? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:44:58 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Apr 2010 00:44:58 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270773898.64.0.820862711192.issue7978@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 02:52:53 2010 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 09 Apr 2010 00:52:53 +0000 Subject: [issue7163] IDLE suppresses sys.stdout.write() return value In-Reply-To: <1255819083.11.0.568760312973.issue7163@psf.upfronthosting.co.za> Message-ID: <1270774373.34.0.172334009991.issue7163@psf.upfronthosting.co.za> Daniel Diniz added the comment: sys.stdout is a idlelib.rpc.RPCProxy in IDLE. It calls Idlelib.PyShell.PseudoFile.write -> .PyShell.write -> .OutputWindow.OutputWindow.write -> .Percolator.Percolator.insert -> ... I suppose we could mimic the return value patching PseudoFile.write (for educational purposes?). ---------- nosy: +ajaksu2 priority: -> normal type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:11:38 2010 From: report at bugs.python.org (Matthias Klose) Date: Fri, 09 Apr 2010 01:11:38 +0000 Subject: [issue8352] imp.find_module of a .py ending dir causes glibc double free crash In-Reply-To: <1270775498.57.0.166335853456.issue8352@psf.upfronthosting.co.za> Message-ID: <1270775498.57.0.166335853456.issue8352@psf.upfronthosting.co.za> New submission from Matthias Klose : [forwarded from http://bugs.debian.org/577005] seen with 2.5.5, 2.6.5 and 2.7alpha4: The imp.find_module function causes a glibc double free or corruption if it would be invoked with a directory with a ".py" ending. It can be reproduced with: mkdir bla.py; python -c 'import imp; imp.find_module("bla", ["."])' This causes bpython to crash after the first input char if such a directory exist. stacktrace with 2.6.5: (gdb) bt #0 0x00355906 in *__GI_raise (sig=6) at ../nptl/sysdeps/unix/sysv/linux/raise.c:64 #1 0x00358e05 in *__GI_abort () at abort.c:88 #2 0x0038c78d in __libc_message (do_abort=2, fmt=0x453088 "*** glibc detected *** %s: %s: 0x%s ***\n") at ../sysdeps/unix/sysv/linux/libc_fatal.c:173 #3 0x00396905 in malloc_printerr (action=2, str=0x453230 "double free or corruption (!prev)", ptr= 0x83004e0) at malloc.c:6239 #4 0x003981a3 in _int_free (av=0x46f3c0, p=0x83004d8) at malloc.c:4772 #5 0x0039b22d in *__GI___libc_free (mem=0x83004e0) at malloc.c:3738 #6 0x00386b55 in _IO_new_fclose (fp=0x83004e0) at iofclose.c:88 #7 0x08116efc in call_find_module (name=0xb7f52a54 "bla", path=['.']) at ../Python/import.c:2844 #8 0x08117011 in imp_find_module (self=, args=('bla', ['.'])) at ../Python/import.c:2865 #9 0x081b1755 in PyCFunction_Call (func=, arg= ('bla', ['.']), kw=) at ../Objects/methodobject.c:81 #10 0x080fbf03 in call_function (pp_stack=0xbffff3cc, oparg=2) at ../Python/ceval.c:3750 #11 0x080f75ac in PyEval_EvalFrameEx (f=File , line 1, in (), throwflag=0) at ../Python/ceval.c:2412 #12 0x080f9c48 in PyEval_EvalCodeEx (co=0xb7fe6da8, globals= {'__builtins__': , '__name__': '__main__', '__package__': None, '__doc__': None, 'imp': }, locals= {'__builtins__': , '__name__': '__main__', '__package__': None, '__doc__': None, 'imp': }, args=0x0, argcount=0, kws=0x0, kwcount=0, defs=0x0, defcount=0, closure=) at ../Python/ceval.c:3000 #13 0x080efd6b in PyEval_EvalCode (co=0xb7fe6da8, globals= {'__builtins__': , '__name__': '__main__', '__package__': None, '__doc__': None, 'imp': }, locals= {'__builtins__': , '__name__': '__main__', '__package__': None, '__doc__': None, 'imp': }) at ../Python/ceval.c:541 #14 0x0812376c in run_mod (mod=0x83565c0, filename=0x81ef6b1 "", globals= {'__builtins__': , '__name__': '__main__', '__package__': None, '__doc__': None, 'imp': }, locals= {'__builtins__': , '__name__': '__main__', '__package__': None, '__doc__': None, 'imp': }, flags=0xbffff6c0, arena=0x82f5700) at ../Python/pythonrun.c:1339 #15 0x08123640 in PyRun_StringFlags (str=0x82e5008 "import imp; imp.find_module(\"bla\", [\".\"])\n", start=257, globals= {'__builtins__': , '__name__': '__main__', '__package__': None, '__doc__': None, 'imp': }, locals= {'__builtins__': , '__name__': '__main__', '__package__': None, '__doc__': None, 'imp': }, flags=0xbffff6c0) at ../Python/pythonrun.c:1302 #16 0x081223e9 in PyRun_SimpleStringFlags (command= 0x82e5008 "import imp; imp.find_module(\"bla\", [\".\"])\n", flags=0xbffff6c0) at ../Python/pythonrun.c:961 #17 0x0805e3f6 in Py_Main (argc=3, argv=0xbffff7b4) at ../Modules/main.c:521 #18 0x0805d51f in main (argc=3, argv=0xbffff7b4) at ../Modules/python.c:23 ---------- components: Interpreter Core messages: 102662 nosy: doko severity: normal status: open title: imp.find_module of a .py ending dir causes glibc double free crash versions: Python 2.5, Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:12:42 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Apr 2010 01:12:42 +0000 Subject: [issue1578269] Add os.symlink() and os.path.islink() support for Windows Message-ID: <1270775562.98.0.658739060155.issue1578269@psf.upfronthosting.co.za> Jason R. Coombs added the comment: It seems issue7443 discusses the cause of the transient failures. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:13:20 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Apr 2010 01:13:20 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <1260026404.41.0.635406889881.issue7443@psf.upfronthosting.co.za> Message-ID: <1270775600.68.0.287054478256.issue7443@psf.upfronthosting.co.za> Changes by Jason R. Coombs : ---------- nosy: +jaraco _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:22:54 2010 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 09 Apr 2010 01:22:54 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1270776174.48.0.797549506522.issue7370@psf.upfronthosting.co.za> Daniel Diniz added the comment: Thanks for the patch. Per issue 2849, use of rfc822 should be gone from the stdlib. Please re-open if you disagree. ---------- nosy: +ajaksu2 priority: -> normal resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:28:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 01:28:05 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1270776485.94.0.866797405936.issue7370@psf.upfronthosting.co.za> ?ric Araujo added the comment: Following the last link on #2859, I?ve found that ?rfc822.formatdate(time)? can be changed to ?email.utils.formatdate(time, usegmt=True)?. I?ll make a real diff in a few days if noone beats me to it. Regards ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:37:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 01:37:49 +0000 Subject: [issue1649329] gettext.py incompatible with eggs Message-ID: <1270777069.41.0.804904229918.issue1649329@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:39:23 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 01:39:23 +0000 Subject: [issue5411] add xz compression support to distutils In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1270777163.23.0.612089195097.issue5411@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:39:43 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 01:39:43 +0000 Subject: [issue3985] removed string module from distutils [patch] In-Reply-To: <1222597888.29.0.260615260643.issue3985@psf.upfronthosting.co.za> Message-ID: <1270777183.06.0.0173670586599.issue3985@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:40:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 01:40:49 +0000 Subject: [issue4151] Separate build dir broken In-Reply-To: <1224522256.17.0.820973690454.issue4151@psf.upfronthosting.co.za> Message-ID: <1270777249.58.0.69877419652.issue4151@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:44:19 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 01:44:19 +0000 Subject: [issue976869] Stripping script extensions with distutils Message-ID: <1270777459.51.0.553524002789.issue976869@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:44:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 01:44:30 +0000 Subject: [issue870479] Scripts need platform-dependent handling Message-ID: <1270777470.74.0.838311344646.issue870479@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:49:04 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Apr 2010 01:49:04 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1270777744.39.0.596821423437.issue7370@psf.upfronthosting.co.za> R. David Murray added the comment: The issue is not invalid. The code duplication should be removed, but using the email module as ?ric suggests. Reopening. ---------- nosy: +r.david.murray resolution: invalid -> stage: committed/rejected -> test needed status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:49:23 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Apr 2010 01:49:23 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1270777763.35.0.0800391819823.issue7370@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:49:58 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Apr 2010 01:49:58 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1270777798.23.0.77864208894.issue7370@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- title: patch: BaseHTTPServer reinventing rfc822 -> patch: BaseHTTPServer reinventing rfc822 date formatting _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 03:53:46 2010 From: report at bugs.python.org (Yaroslav Halchenko) Date: Fri, 09 Apr 2010 01:53:46 +0000 Subject: [issue7897] Support parametrized tests in unittest In-Reply-To: <1265768482.24.0.694001982317.issue7897@psf.upfronthosting.co.za> Message-ID: <1270778026.43.0.929569734308.issue7897@psf.upfronthosting.co.za> Yaroslav Halchenko added the comment: In PyMVPA we have our little decorator as an alternative to Fernando's generators, and which is closer, I think, to what Michael was wishing for: @sweepargs http://github.com/yarikoptic/PyMVPA/blob/master/mvpa/testing/sweepargs.py NB it has some minor PyMVPA specificity which could be easily wiped out, and since it was at most 4 eyes looking at it and it bears "evolutionary" changes, it is far from being the cleanest/best piece of code, BUT: * it is very easy to use, just decorate a test method/function and give an argument which to vary within the function call, e.g smth like @sweepargs(arg=range(5)) def test_sweepargs_demo(arg): ok_(arg < 5) ok_(arg < 3) ok_(arg < 2) For nose/unittest it would still look like a single test * if failures occur, sweepargs groups failures by the type/location of the failures and spits out a backtrace for one of failures + summary (instead of detailed backtraces for each failure) specifying which arguments lead to what error... here is the output for example above: $> nosetests -s test_sweepargs_demo.py F ====================================================================== FAIL: mvpa.tests.test_sweepargs_demo.test_sweepargs_demo ---------------------------------------------------------------------- Traceback (most recent call last): File "/usr/lib/pymodules/python2.5/nose/case.py", line 183, in runTest self.test(*self.arg) File "/usr/lib/pymodules/python2.5/nose/util.py", line 630, in newfunc return func(*arg, **kw) File "/home/yoh/proj/pymvpa/pymvpa/mvpa/tests/test_sweepargs_demo.py", line 11, in test_sweepargs_demo ok_(arg < 2) File "/usr/lib/pymodules/python2.5/nose/tools.py", line 25, in ok_ assert expr, msg AssertionError: Different scenarios lead to failures of unittest test_sweepargs_demo (specific tracebacks are below): File "/home/yoh/proj/pymvpa/pymvpa/mvpa/tests/test_sweepargs_demo.py", line 10, in test_sweepargs_demo ok_(arg < 3) File "/usr/lib/pymodules/python2.5/nose/tools.py", line 25, in ok_ assert expr, msg on arg=3 arg=4 File "/home/yoh/proj/pymvpa/pymvpa/mvpa/tests/test_sweepargs_demo.py", line 11, in test_sweepargs_demo ok_(arg < 2) File "/usr/lib/pymodules/python2.5/nose/tools.py", line 25, in ok_ assert expr, msg on arg=2 ---------------------------------------------------------------------- Ran 1 test in 0.003s FAILED (failures=1) * obviousely multiple decorators could be attached to the same test, to test on all combinations of more than 1 argument but output atm is a bit cryptic ;-) ---------- nosy: +Yaroslav.Halchenko _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 04:00:06 2010 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 09 Apr 2010 02:00:06 +0000 Subject: [issue7425] [PATCH] Improve the robustness of "pydoc -k" in the face of broken modules In-Reply-To: <1259786972.24.0.35920903506.issue7425@psf.upfronthosting.co.za> Message-ID: <1270778406.3.0.0351758332869.issue7425@psf.upfronthosting.co.za> Daniel Diniz added the comment: Nice improvement. This would also solve the "help(), modules" brokenness, right? ---------- nosy: +ajaksu2 priority: -> normal stage: -> test needed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 04:01:11 2010 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 09 Apr 2010 02:01:11 +0000 Subject: [issue7378] unexpected truncation of traceback In-Reply-To: <1258970662.35.0.76558630095.issue7378@psf.upfronthosting.co.za> Message-ID: <1270778471.4.0.89309213184.issue7378@psf.upfronthosting.co.za> Daniel Diniz added the comment: Patch still applies to py3k, not applying cleanly to trunk anymore. Tests pass with patch on py3k. ---------- nosy: +ajaksu2 priority: -> normal stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 04:25:37 2010 From: report at bugs.python.org (=?utf-8?b?SmVzw7pzIENlYSBBdmnDs24=?=) Date: Fri, 09 Apr 2010 02:25:37 +0000 Subject: [issue8156] pybsddb 4.8.4 integration In-Reply-To: <1268745144.38.0.358803942523.issue8156@psf.upfronthosting.co.za> Message-ID: <1270779937.39.0.386791358135.issue8156@psf.upfronthosting.co.za> Changes by Jes?s Cea Avi?n : ---------- resolution: -> accepted status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 04:43:21 2010 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 09 Apr 2010 02:43:21 +0000 Subject: [issue7584] datetime.rfcformat() for Date and Time on the Internet In-Reply-To: <1261941488.23.0.907898109437.issue7584@psf.upfronthosting.co.za> Message-ID: <1270781001.55.0.151956637367.issue7584@psf.upfronthosting.co.za> Daniel Diniz added the comment: It looks like feed generators need this feature[1]. See also issue 5207 and a current implementation[2]. [1] http://validator.w3.org/feed/docs/error/InvalidRFC3339Date.html [2] http://code.google.com/p/formattime/ ---------- keywords: +easy nosy: +ajaksu2 priority: -> normal stage: -> needs patch type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 04:48:15 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 02:48:15 +0000 Subject: [issue7584] datetime.rfcformat() for Date and Time on the Internet In-Reply-To: <1261941488.23.0.907898109437.issue7584@psf.upfronthosting.co.za> Message-ID: <1270781295.01.0.27762666651.issue7584@psf.upfronthosting.co.za> ?ric Araujo added the comment: Note that the Atom format requires a subset of RFC 3339 (which is in turn a subset of ISO 8601 if I remember correctly, and is the same as the W3C Datetime Format): https://www.tools.ietf.org/html/rfc4287#section-3.3 Summary: Atom requires using an uppercase T between date and time (the RFC permits lower and upper case), and using an uppercase Z for UTC timezone, not ?-00:00?. Regards ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 04:50:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 02:50:12 +0000 Subject: [issue7584] datetime.rfcformat() for Date and Time on the Internet In-Reply-To: <1261941488.23.0.907898109437.issue7584@psf.upfronthosting.co.za> Message-ID: <1270781412.42.0.854151111222.issue7584@psf.upfronthosting.co.za> ?ric Araujo added the comment: Should have checked before speaking. RFC?3339 is a subset of W3CDTF, as said on Daniel?s first link. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 04:51:16 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 02:51:16 +0000 Subject: [issue5207] extend strftime/strptime format for RFC3339 and RFC2822 In-Reply-To: <1234285622.79.0.0309055191852.issue5207@psf.upfronthosting.co.za> Message-ID: <1270781476.15.0.980267888125.issue5207@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 05:13:49 2010 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 09 Apr 2010 03:13:49 +0000 Subject: [issue7865] io close() swallowing exceptions In-Reply-To: <1265459228.25.0.91197617162.issue7865@psf.upfronthosting.co.za> Message-ID: <1270782829.38.0.276435369008.issue7865@psf.upfronthosting.co.za> Daniel Diniz added the comment: Wouldn't this break code that currently works? ---------- nosy: +ajaksu2 priority: -> low stage: -> needs patch type: -> behavior versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 05:15:54 2010 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 09 Apr 2010 03:15:54 +0000 Subject: [issue7842] py_compile.compile SyntaxError output In-Reply-To: <1265151004.56.0.531784942224.issue7842@psf.upfronthosting.co.za> Message-ID: <1270782954.61.0.892889811525.issue7842@psf.upfronthosting.co.za> Daniel Diniz added the comment: Change went into py3k without tests, do we want them? If so, please update Stage to "test needed". ---------- nosy: +ajaksu2 priority: -> normal stage: -> patch review _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 05:36:19 2010 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 09 Apr 2010 03:36:19 +0000 Subject: [issue7943] Memory leak due to circular references in ssl.SSLSocket In-Reply-To: <1266341912.31.0.218071173939.issue7943@psf.upfronthosting.co.za> Message-ID: <1270784179.04.0.134332485377.issue7943@psf.upfronthosting.co.za> Changes by Daniel Diniz : ---------- priority: -> normal stage: -> test needed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 05:45:13 2010 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 09 Apr 2010 03:45:13 +0000 Subject: [issue7927] SSL socket is not closed properly In-Reply-To: <1266146726.16.0.222413736354.issue7927@psf.upfronthosting.co.za> Message-ID: <1270784713.21.0.904288167686.issue7927@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on trunk. ---------- nosy: +ajaksu2 priority: -> normal stage: -> test needed versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 06:07:40 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Apr 2010 04:07:40 +0000 Subject: [issue7132] Regexp: capturing groups in repetitions In-Reply-To: <1255550896.44.0.457470031322.issue7132@psf.upfronthosting.co.za> Message-ID: <1270786060.94.0.0267836527597.issue7132@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- status: open -> languishing _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 06:09:30 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Apr 2010 04:09:30 +0000 Subject: [issue5207] extend strftime/strptime format for RFC3339 and RFC2822 In-Reply-To: <1234285622.79.0.0309055191852.issue5207@psf.upfronthosting.co.za> Message-ID: <1270786170.67.0.272561407873.issue5207@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 06:10:23 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Apr 2010 04:10:23 +0000 Subject: [issue7378] unexpected truncation of traceback In-Reply-To: <1258970662.35.0.76558630095.issue7378@psf.upfronthosting.co.za> Message-ID: <1270786223.91.0.224242390291.issue7378@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 06:12:13 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Apr 2010 04:12:13 +0000 Subject: [issue8352] imp.find_module of a .py ending dir causes glibc double free crash In-Reply-To: <1270775498.57.0.166335853456.issue8352@psf.upfronthosting.co.za> Message-ID: <1270786333.08.0.757607935924.issue8352@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +brett.cannon, ncoghlan priority: -> high stage: -> test needed type: -> crash versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 06:16:50 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Apr 2010 04:16:50 +0000 Subject: [issue3985] removed string module from distutils [patch] In-Reply-To: <1222597888.29.0.260615260643.issue3985@psf.upfronthosting.co.za> Message-ID: <1270786610.44.0.242213939667.issue3985@psf.upfronthosting.co.za> Ezio Melotti added the comment: Patch looks good. There's only a missing space before the for in: + self.metadata.platforms = [kw.strip() + for kw in platformlist.split(',')] ---------- nosy: +ezio.melotti resolution: -> accepted stage: -> patch review versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 06:18:56 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Apr 2010 04:18:56 +0000 Subject: [issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual() In-Reply-To: <1270769804.42.0.714910786313.issue8351@psf.upfronthosting.co.za> Message-ID: <1270786736.97.0.147495961807.issue8351@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti priority: -> normal stage: -> patch review versions: +Python 3.2 -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 06:19:24 2010 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 09 Apr 2010 04:19:24 +0000 Subject: [issue4007] make clean fails to delete .a and .so.X.Y files In-Reply-To: <1222865558.69.0.211492206559.issue4007@psf.upfronthosting.co.za> Message-ID: <1270786764.01.0.393081015154.issue4007@psf.upfronthosting.co.za> Daniel Diniz added the comment: Skip, was there a patch here? I can't find it in the bug lists, so I think we both missed it? Pinging Martin in case the tracker ate the patch :) ---------- nosy: +ajaksu2, loewis stage: -> needs patch versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 06:49:53 2010 From: report at bugs.python.org (Daniel Diniz) Date: Fri, 09 Apr 2010 04:49:53 +0000 Subject: [issue8026] strftime bug when timedelta is negative In-Reply-To: <1267206102.75.0.187323607292.issue8026@psf.upfronthosting.co.za> Message-ID: <1270788593.99.0.313702226522.issue8026@psf.upfronthosting.co.za> Daniel Diniz added the comment: Confirmed on trunk, needs a simpler repro :) ---------- components: +Library (Lib) -None nosy: +ajaksu2 priority: -> normal stage: -> test needed versions: +Python 2.6, Python 2.7 -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 06:55:33 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Apr 2010 04:55:33 +0000 Subject: [issue8351] Suppress large diffs in unitttest.TestCase.assertSequenceEqual() In-Reply-To: <1270769804.42.0.714910786313.issue8351@psf.upfronthosting.co.za> Message-ID: <1270788933.19.0.747951110611.issue8351@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- versions: +Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 07:46:12 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 09 Apr 2010 05:46:12 +0000 Subject: [issue4007] make clean fails to delete .a and .so.X.Y files In-Reply-To: <1222865558.69.0.211492206559.issue4007@psf.upfronthosting.co.za> Message-ID: <1270791972.75.0.250402145498.issue4007@psf.upfronthosting.co.za> Martin v. L?wis added the comment: If it did eat the patch, we would have lost it by now: there is nothing in the history that shows that a file was attached at some point. More likely, Skip forgot to attach it when submitting this report. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 07:57:16 2010 From: report at bugs.python.org (Vetoshkin Nikita) Date: Fri, 09 Apr 2010 05:57:16 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270792636.08.0.543052944303.issue7978@psf.upfronthosting.co.za> Vetoshkin Nikita added the comment: I vote for making a global wrapper. As neologix pointed - many other modules can be (or are) affected. Futher found bugs could be fixed using that global wrapper. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 07:57:25 2010 From: report at bugs.python.org (Chris Ward) Date: Fri, 09 Apr 2010 05:57:25 +0000 Subject: [issue8353] Negative exponentiation behaving oddly in python shell In-Reply-To: <1270792645.79.0.439452519354.issue8353@psf.upfronthosting.co.za> Message-ID: <1270792645.79.0.439452519354.issue8353@psf.upfronthosting.co.za> New submission from Chris Ward : When using exponentiation interactively in the python shell, it returns all negative results when a negative number is the input. For example: -4 ** 2 will return -16 -4 ** 2 should evaluate as -4 * -4, which correctly returns 16 This does not occur when using the 'Run Module' feature of IDLE and the exponentiation is processed from the module, it only seems to occur when directly typed into the interactive prompt. I couldn't find anything to suggest this is expected behavior. Using pow() from the prompt returns the correct result, so it only happens in this one situation. Obviously this is low priority since it only affects the prompt and there's a working alternative, but I figured I'd report it anyways. :) ---------- components: IDLE messages: 102681 nosy: CWardUSC severity: normal status: open title: Negative exponentiation behaving oddly in python shell type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 08:16:04 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Fri, 09 Apr 2010 06:16:04 +0000 Subject: [issue8353] Negative exponentiation behaving oddly in python shell In-Reply-To: <1270792645.79.0.439452519354.issue8353@psf.upfronthosting.co.za> Message-ID: <1270793764.36.0.984480056116.issue8353@psf.upfronthosting.co.za> Martin v. L?wis added the comment: This is expected behavior. The power operator binds with higher precedence than the unary minus: http://docs.python.org/reference/expressions.html#unary-arithmetic-and-bitwise-operations Therefore, your term is interpreted as -(4 ** 2) As for "it only affects the prompt": I can't reproduce that. If I put print(-4**2) in a script and run that, it still prints -16 for me. ---------- nosy: +loewis resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 08:21:20 2010 From: report at bugs.python.org (Shashwat Anand) Date: Fri, 09 Apr 2010 06:21:20 +0000 Subject: [issue8350] os.mkdir doc comment is incorrect In-Reply-To: <1270764159.26.0.287104770145.issue8350@psf.upfronthosting.co.za> Message-ID: <1270794080.85.0.84353756568.issue8350@psf.upfronthosting.co.za> Shashwat Anand added the comment: Tested on trunk. 11:46:02 l0nwlf-MBP:python-svn $ ./python.exe Python 2.7a4+ (trunk:79888M, Apr 9 2010, 11:41:22) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import posix >>> posix.mkdir('1') >>> posix.mkdir('2', 000) >>> posix.mkdir('3', mode=000) Traceback (most recent call last): File "", line 1, in TypeError: mkdir() takes no keyword arguments >>> import os >>> os.mkdir('4', 777) >>> os.mkdir('5', mode=777) Traceback (most recent call last): File "", line 1, in TypeError: mkdir() takes no keyword arguments >>> The two options to fix this are: 1. Patch python-svn/Modules/posixmodule.c to take the keyword arguments. 2. Modify the PyDoc in posixmodule.c as Todd suggested. I had attached a patch which solves the issue using solution '2'. Also I observed that os.makedirs() have no such issue even though it uses os.mkdir() because it uses 'mkdir(name, mode)' to call mkdir. ---------- keywords: +patch nosy: +l0nwlf versions: +Python 2.7 Added file: http://bugs.python.org/file16836/posixmodule.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 08:38:58 2010 From: report at bugs.python.org (Chris Ward) Date: Fri, 09 Apr 2010 06:38:58 +0000 Subject: [issue8353] Negative exponentiation behaving oddly in python shell In-Reply-To: <1270792645.79.0.439452519354.issue8353@psf.upfronthosting.co.za> Message-ID: <1270795138.5.0.491667471389.issue8353@psf.upfronthosting.co.za> Chris Ward added the comment: Thanks for clearing that up and pointing me in the right direction. I should have tested print first. The assumption was based on the evaluation of (-4) ** 2 within an expression, which does return correctly. I hadn't made the distinction that the parentheses made it evaluate differently by containing the unary. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 08:40:59 2010 From: report at bugs.python.org (Tim Golden) Date: Fri, 09 Apr 2010 06:40:59 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <1260026404.41.0.635406889881.issue7443@psf.upfronthosting.co.za> Message-ID: <1270795259.05.0.144570638769.issue7443@psf.upfronthosting.co.za> Tim Golden added the comment: This is basically a rerun of this discussion a couple of years ago: http://mail.python.org/pipermail/python-dev/2008-April/078333.html The problem certainly still happens against trunk -- I have a semi-aggressive test-harness which can cause it to reproduce pretty much on-demand. I proposed an approach here: http://mail.python.org/pipermail/python-dev/2008-April/078339.html but when I started digging into test_support it all got a bit hairy because -- naturally -- test.support.unlink is used in a *lot* of places. In short, there's still a problem to be fixed. I believe that a rename-unlink dance would solve it, but only at the cost of affecting a lot of tests. ---------- nosy: +tim.golden _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 08:46:46 2010 From: report at bugs.python.org (Shashwat Anand) Date: Fri, 09 Apr 2010 06:46:46 +0000 Subject: [issue4007] make clean fails to delete .a and .so.X.Y files In-Reply-To: <1222865558.69.0.211492206559.issue4007@psf.upfronthosting.co.za> Message-ID: <1270795606.36.0.775059123845.issue4007@psf.upfronthosting.co.za> Shashwat Anand added the comment: skip.montanaro forgot to attached the patch obviously, however the issue is trivial but there i.e. the presence of libpython.a file. ---------- nosy: +l0nwlf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 08:50:32 2010 From: report at bugs.python.org (Shashwat Anand) Date: Fri, 09 Apr 2010 06:50:32 +0000 Subject: [issue8352] imp.find_module of a .py ending dir causes glibc double free crash In-Reply-To: <1270775498.57.0.166335853456.issue8352@psf.upfronthosting.co.za> Message-ID: <1270795832.67.0.0345922829225.issue8352@psf.upfronthosting.co.za> Shashwat Anand added the comment: mkdir bla.py; python -c 'import imp; imp.find_module("bla", ["."])' This causes bpython to crash after the first input char if such a directory exist. I am sure you do not mean 'bpython intepretor' here. ---------- nosy: +l0nwlf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 08:50:37 2010 From: report at bugs.python.org (Andrew Bennetts) Date: Fri, 09 Apr 2010 06:50:37 +0000 Subject: [issue8354] siginterrupt with flag=False is reset when signal received In-Reply-To: <1270795837.87.0.683673992087.issue8354@psf.upfronthosting.co.za> Message-ID: <1270795837.87.0.683673992087.issue8354@psf.upfronthosting.co.za> New submission from Andrew Bennetts : The effect of signal.siginterrupt(somesig, False) is reset the first time a that signal is received. This is not the documented behaviour, and I do not think this is a desireable behaviour. It renders siginterrupt effectively useless at providing the robustness against EINTR it is intended to provide. Attached is a fairly simple program to show this using SIGWINCH: run it in a resizeable terminal, and resize it twice. Notice that on the second terminal resize (i.e. the second SIGWINCH signal) the program crashes with an EINTR from the os.read. A partial workaround for the problem is to call signal.siginterrupt(somesig, False) again inside your signal handler, but it's very fragile. It depends on Python getting a chance to run the Python function registered by the signal.signal call, but this is not guaranteed. If there's frequent IO, that workaround might suffice. For the sig-test.py example attached to this bug, it doesn't (try it). The cause seems to be that signal_handler in signalmodule.c unconditionally does PyOS_setsig(sig_num, signal_handler) [except for SIGCHLD], which unconditionally invokes siginterrupt(sig, 1). A possible fix would be to add a 'int siginterrupt_flag;' to the Handlers array, and arrange for that value to be passed instead of the hard-coded 1. Another might be to not call PyOS_setsig from signal_handler at all -- I'm not sure why it is trying to reinstall itself, but perhaps there's some issue there I'm not aware of. ---------- components: Library (Lib) files: sig-test.py messages: 102688 nosy: spiv severity: normal status: open title: siginterrupt with flag=False is reset when signal received type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file16837/sig-test.py _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 08:54:13 2010 From: report at bugs.python.org (Darryl Miles) Date: Fri, 09 Apr 2010 06:54:13 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270796053.85.0.939298077881.issue8108@psf.upfronthosting.co.za> Darryl Miles added the comment: In order to build Python with a specific version of OpenSSL followed the CYGWIN instructions and edited Modules/Setup to make it read (note - I added "-L$(SSL)" into the linker options too, since by default on CentOS 5.4 i386 OpenSSL build in static library mode ala ../openssl-1.0.0/libssl.a) : SSL=../openssl-1.0.0 _ssl _ssl.c \ -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ -L$(SSL)/lib -L$(SSL) -lssl -lcrypto It is not clear to me what Python's goals are: * To be backward compatible, in which case I don't know your historical use of SSL_shutdown(). * To be a thin-layer (1:1) over OpenSSL, so that "power users" can harness the full potential of OpenSSL if they are willing to understand the finer points. * To provide a full-featured Python API. * To provide a Python API that is easy to use within the Python paradigm. These goals may not be convergent. ---------- nosy: +dlmiles Added file: http://bugs.python.org/file16838/python_ssl.c.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 09:01:07 2010 From: report at bugs.python.org (Andrew Bennetts) Date: Fri, 09 Apr 2010 07:01:07 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270796467.95.0.917907967609.issue7978@psf.upfronthosting.co.za> Andrew Bennetts added the comment: Note that a trivial untilConcludes isn't correct for select if a timeout was passed. If a select(..., 60) was interrupted after 59 seconds, you probably want to restart it with a timeout of 1 second, not 60. The SocketServer_eintr.diff patch has this flaw. ---------- nosy: +spiv _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 09:15:58 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 09 Apr 2010 07:15:58 +0000 Subject: [issue8352] imp.find_module of a .py ending dir causes glibc double free crash In-Reply-To: <1270775498.57.0.166335853456.issue8352@psf.upfronthosting.co.za> Message-ID: <1270797358.79.0.379743886148.issue8352@psf.upfronthosting.co.za> Senthil Kumaran added the comment: No, that is not bpython interpreter. The a crash report on "python interpreter" observed with imp module when a directory ends with .py. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 09:36:50 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 09 Apr 2010 07:36:50 +0000 Subject: [issue3985] removed string module from distutils [patch] In-Reply-To: <1222597888.29.0.260615260643.issue3985@psf.upfronthosting.co.za> Message-ID: <1270798610.04.0.17513048105.issue3985@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Distutils is now frozen. Moving it to Distutils2 ---------- components: +Distutils2 -Distutils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 09:44:48 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 09 Apr 2010 07:44:48 +0000 Subject: [issue5411] add xz compression support to distutils In-Reply-To: <1236081386.1.0.884971889723.issue5411@psf.upfronthosting.co.za> Message-ID: <1270799088.66.0.178290442318.issue5411@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- components: +Distutils2 -Distutils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 09:45:26 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 09 Apr 2010 07:45:26 +0000 Subject: [issue870479] Scripts need platform-dependent handling Message-ID: <1270799126.82.0.654121952771.issue870479@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- components: +Distutils2 -Distutils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 09:46:06 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 09 Apr 2010 07:46:06 +0000 Subject: [issue976869] Stripping script extensions with distutils Message-ID: <1270799166.18.0.586958029249.issue976869@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- components: +Distutils2 -Distutils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 09:57:27 2010 From: report at bugs.python.org (Florent Xicluna) Date: Fri, 09 Apr 2010 07:57:27 +0000 Subject: [issue8352] imp.find_module of a .py ending dir causes glibc double free crash In-Reply-To: <1270775498.57.0.166335853456.issue8352@psf.upfronthosting.co.za> Message-ID: <1270799847.52.0.776819219234.issue8352@psf.upfronthosting.co.za> Florent Xicluna added the comment: It looks like a duplicate of #7732. ---------- nosy: +flox resolution: -> duplicate status: open -> closed superseder: -> imp.find_module crashes Python if there exists a directory named "__init__.py" _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 09:59:58 2010 From: report at bugs.python.org (Florent Xicluna) Date: Fri, 09 Apr 2010 07:59:58 +0000 Subject: [issue7732] imp.find_module crashes Python if there exists a directory named "__init__.py" In-Reply-To: <1263816426.99.0.320342241745.issue7732@psf.upfronthosting.co.za> Message-ID: <1270799998.11.0.0262520900298.issue7732@psf.upfronthosting.co.za> Florent Xicluna added the comment: see also http://bugs.python.org/issue8352#msg102662 ---------- nosy: +doko, l0nwlf, ncoghlan, orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 10:06:02 2010 From: report at bugs.python.org (Nicolas Dumazet) Date: Fri, 09 Apr 2010 08:06:02 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1270800362.78.0.762614839919.issue6715@psf.upfronthosting.co.za> Changes by Nicolas Dumazet : ---------- nosy: +nicdumz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 10:09:42 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 09 Apr 2010 08:09:42 +0000 Subject: [issue7732] imp.find_module crashes Python if there exists a directory named "__init__.py" In-Reply-To: <1263816426.99.0.320342241745.issue7732@psf.upfronthosting.co.za> Message-ID: <1270800582.6.0.925622560082.issue7732@psf.upfronthosting.co.za> Nick Coghlan added the comment: I can reproduce this locally. I believe it is relevant that a simple "import crash" (with crash.py as the directory) doesn't cause a problem - there must be something higher in the import machinery which avoids the issue. ---------- assignee: -> ncoghlan _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 10:11:35 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 09 Apr 2010 08:11:35 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <1260026404.41.0.635406889881.issue7443@psf.upfronthosting.co.za> Message-ID: <1270800695.72.0.626647694584.issue7443@psf.upfronthosting.co.za> anatoly techtonik added the comment: It is unlikely that it will go further then discussion unless this bug can be reliably reproduced to be debugged. If not testcase when at least Process Monitor log would be helpful. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 10:16:00 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 09 Apr 2010 08:16:00 +0000 Subject: [issue4908] Implement PEP 376 In-Reply-To: <1231609506.29.0.511902396455.issue4908@psf.upfronthosting.co.za> Message-ID: <1270800960.99.0.410317911433.issue4908@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Work done in pkgutil, in the Distutils2 project, see PEP 376 for API names. ---------- components: +Distutils2 -Distutils title: adding a get_metadata in distutils -> Implement PEP 376 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 10:34:49 2010 From: report at bugs.python.org (Tim Golden) Date: Fri, 09 Apr 2010 08:34:49 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <1270800695.72.0.626647694584.issue7443@psf.upfronthosting.co.za> Message-ID: <4BBEE6A3.9070001@timgolden.me.uk> Tim Golden added the comment: In one window run the attached script (assumes you have pywin32 installed) with a parameter of the directory the TESTFN file will end up in. Then run, eg, test_zipfile in another window. For me: c:\temp> watch_dir.py C:\work_in_progress\make-snapshots\trunk\python\Lib C:\work_in_progress\make-snapshots\trunk\python\Lib> ..\pcbuild\python.exe -m test.test_zipfile Obviously, you'd have to change the path to be wherever you're running the test suite from. The watch_dir script sits there looking for file activity, then takes and releases a delete-share handle on the file. It's enough to disrupt certain tests (such as test_zipfile) pretty much every time. Other tests are affected less, or only the first few times. Not sure why, but it's certainly enough to reproduce the general effect of TortoiseSVN or indexer or virus checker. ---------- Added file: http://bugs.python.org/file16839/watch_dir.py _______________________________________ Python tracker _______________________________________ -------------- next part -------------- import os, sys import winerror import win32file import win32con if __name__ == '__main__': path_to_watch = sys.argv[1] hDir = win32file.CreateFile ( path_to_watch, 1, # FILE_LIST_DIRECTORY win32con.FILE_SHARE_READ | win32con.FILE_SHARE_WRITE, None, win32con.OPEN_EXISTING, win32con.FILE_FLAG_BACKUP_SEMANTICS, None ) print "=> Watching", path_to_watch watching = set () handles = [] try: while 1: results = win32file.ReadDirectoryChangesW ( hDir, 1024, True, win32con.FILE_NOTIFY_CHANGE_FILE_NAME, None, None ) for action, filename in results: filename = os.path.join (path_to_watch, filename) if action == 1 and filename not in watching: try: handle = win32file.CreateFile ( filename, 0, win32file.FILE_SHARE_DELETE, None, win32file.OPEN_EXISTING, 0, 0 ) handles.append (handle) except win32file.error, (errno, module, message): if errno == winerror.ERROR_SHARING_VIOLATION: print ".. Can't hold", repr (filename) else: print ".. Problem with %r: %s" % (filename, message) else: watching.add (filename) print ".. Holding", repr (filename) handle.Close () handles.remove (handle) watching.discard (filename) print ".. Released", repr (filename) finally: for handle in handles: handle.Close () hDir.Close () From report at bugs.python.org Fri Apr 9 10:36:19 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 09 Apr 2010 08:36:19 +0000 Subject: [issue7732] imp.find_module crashes Python if there exists a directory named "__init__.py" In-Reply-To: <1263816426.99.0.320342241745.issue7732@psf.upfronthosting.co.za> Message-ID: <1270802179.95.0.442450527752.issue7732@psf.upfronthosting.co.za> Nick Coghlan added the comment: Ah, OK - the problem is confined solely to the wrapper for the Python imp module function. The normal import machinery doesn't go through the wrapper and hence doesn't have the problem. The PyFile_FromFile logic is a little convoluted, but Florent's patch looks correct. Currently, if the dircheck call in fill_file_fields fails, the function returns NULL, but leaves the file object populated (included its f_fp field). The Py_DECREF call then implicitly closes the file, resulting in a double close when call_find_module does the same thing manually. One other thing that is a little dubious in this code is the lack of error checking on the conversion of mode to a string object in fill_file_fields. That's fine for file_init (where mode came from a Python string object in the first place), but not valid for PyFile_FromFile (where mode is passed in as a char * instance). ---------- assignee: ncoghlan -> flox _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 10:47:21 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 09 Apr 2010 08:47:21 +0000 Subject: [issue7584] datetime.rfcformat() for Date and Time on the Internet In-Reply-To: <1261941488.23.0.907898109437.issue7584@psf.upfronthosting.co.za> Message-ID: <1270802841.47.0.724139867237.issue7584@psf.upfronthosting.co.za> anatoly techtonik added the comment: Atom spec - http://www.atomenabled.org/developers/syndication/atom-format-spec.php#date.constructs ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 10:54:25 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 09 Apr 2010 08:54:25 +0000 Subject: [issue8355] diff.py produce unified format by default In-Reply-To: <1270803265.38.0.592538535243.issue8355@psf.upfronthosting.co.za> Message-ID: <1270803265.38.0.592538535243.issue8355@psf.upfronthosting.co.za> New submission from anatoly techtonik : Script/diff.py default context diff format is outdated. It makes sense to produce unified diff by default. ---------- components: Demos and Tools messages: 102701 nosy: techtonik severity: normal status: open title: diff.py produce unified format by default versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 10:55:31 2010 From: report at bugs.python.org (Nick Coghlan) Date: Fri, 09 Apr 2010 08:55:31 +0000 Subject: [issue7732] imp.find_module crashes Python if there exists a directory named "__init__.py" In-Reply-To: <1263816426.99.0.320342241745.issue7732@psf.upfronthosting.co.za> Message-ID: <1270803331.92.0.985671327492.issue7732@psf.upfronthosting.co.za> Nick Coghlan added the comment: An interesting part of this story is *why* it doesn't crash in Py3k (despite explicitly closing the file descriptor in the same way as 2.x closes the C file pointer). The reason is that PyFile_FromFd (the closest Py3k equivalent to PyFile_FromFile) will sometimes leave the file descriptor open, even if closefd is True. Specifically, this will happen if the raw file IO object fails to be created. Any subsequent failure while opening the file (e.g. while creating the line buffering or text wrapper) will trigger the same double close bug as occurs in 2.x. io_open needs to be fixed so this behaviour is consistent: if creation of the raw file IO object fails and closefd is True, io_open should close the file descriptor so that the behaviour on error is consistent. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 10:59:15 2010 From: report at bugs.python.org (Ray.Allen) Date: Fri, 09 Apr 2010 08:59:15 +0000 Subject: [issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build In-Reply-To: <1242995950.24.0.540152639281.issue6087@psf.upfronthosting.co.za> Message-ID: <1270803555.2.0.27385024472.issue6087@psf.upfronthosting.co.za> Ray.Allen added the comment: Yes, I agree with you, this may be a bug? Seemingly, the sysconfig.get_python_lib() should act just like the get_python_inc() function, return "[prefix]/lib/python[version]" in case of "python_build" flag is False, and "[prefix]/Lib" in case of "python_build" flag is True. ---------- nosy: +ysj.ray versions: +Python 3.2 -Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 11:00:06 2010 From: report at bugs.python.org (Ray.Allen) Date: Fri, 09 Apr 2010 09:00:06 +0000 Subject: [issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build In-Reply-To: <1242995950.24.0.540152639281.issue6087@psf.upfronthosting.co.za> Message-ID: <1270803606.47.0.286775203911.issue6087@psf.upfronthosting.co.za> Changes by Ray.Allen : ---------- versions: +Python 2.7 -Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 11:00:28 2010 From: report at bugs.python.org (Ray.Allen) Date: Fri, 09 Apr 2010 09:00:28 +0000 Subject: [issue6087] distutils.sysconfig.get_python_lib gives surprising result when used with a Python build In-Reply-To: <1242995950.24.0.540152639281.issue6087@psf.upfronthosting.co.za> Message-ID: <1270803628.23.0.867144282008.issue6087@psf.upfronthosting.co.za> Changes by Ray.Allen : ---------- versions: +Python 2.6, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 11:16:23 2010 From: report at bugs.python.org (Florent Xicluna) Date: Fri, 09 Apr 2010 09:16:23 +0000 Subject: [issue7732] imp.find_module crashes Python if there exists a directory named "__init__.py" In-Reply-To: <1263816426.99.0.320342241745.issue7732@psf.upfronthosting.co.za> Message-ID: <1270804583.47.0.0959212385754.issue7732@psf.upfronthosting.co.za> Changes by Florent Xicluna : ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 11:21:30 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 09 Apr 2010 09:21:30 +0000 Subject: [issue8355] diff.py produce unified format by default In-Reply-To: <1270803265.38.0.592538535243.issue8355@psf.upfronthosting.co.za> Message-ID: <1270804890.33.0.443064399172.issue8355@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- keywords: +patch Added file: http://bugs.python.org/file16840/8355.diff-py-unified-by-default.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 11:24:33 2010 From: report at bugs.python.org (Yaniv Aknin) Date: Fri, 09 Apr 2010 09:24:33 +0000 Subject: [issue7978] SocketServer doesn't handle syscall interruption In-Reply-To: <1266779695.23.0.617672066685.issue7978@psf.upfronthosting.co.za> Message-ID: <1270805073.9.0.649869061952.issue7978@psf.upfronthosting.co.za> Yaniv Aknin added the comment: pitrou, re. test code: I actually started with the test code, so that part is done. I opted to use a forked SocketServer rather than threads. I'm not an expert on the low-level details of a multi-threaded process receiving threads, but it seems to me like there's a chicken and egg issue here: suppose we have threadA (blocking on select()) and threadB (managing the test and doing something like os.kill(os.getpid(), SIGFOO). I think by definition the thread running when the signal is received is threadB (since it sent the signal), and I'm not sure threadA will be interrupted properly that way (threads are sneaky, now aren't they). So I cleaned up test_socketserver.py a bit, split it to a base test case and concrete test cases, and added a separate test case which uses os.fork() rather than threads and tests that way. The attached patch is against recent py3k and includes both neologix's patch (adapted to py3k) and the added test code. If this looks good, I'll easily backport it to 2.x/trunk. spiv, re. handling timeout in select: You're very right, and I'm not sure how we should handle it if we want to take the "untilConcludes" code that is currently shared between subprocess.py and socketserver.py and move it outside. For subprocess' and socketserver's specific cases, the naive implementation which doesn't handle timeouts is OK, because they don't use the timeout parameter anyway. Moving it outside warrants more discussion. Remember this isn't just about select() - it's a general user-space-restarter for any of the myriad of "slow" system calls that might be interrupted. There is some tension between elegance and even feasibility of correct implementation vs. the wrapper hiding functionality of some of these system calls. You could argue that if the user of the wrapper is unhappy about the lost functionality, they can make their own wrapper. Unless we can reach a resolution quickly, my gut feeling is that the current patch should be applied as-is and this issue be closed. A new issue along the lines of "Extract duplicate interruption-restart code to a relevant module and review stdlib for unprotected select() calls" should be opened instead. Your thoughts? ---------- Added file: http://bugs.python.org/file16841/socketserver_eintr_py3k.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 11:40:05 2010 From: report at bugs.python.org (Torne Wuff) Date: Fri, 09 Apr 2010 09:40:05 +0000 Subject: [issue6650] sre_parse contains a confusing generic error message In-Reply-To: <1249492479.55.0.250174703511.issue6650@psf.upfronthosting.co.za> Message-ID: <1270806005.3.0.813319868982.issue6650@psf.upfronthosting.co.za> Torne Wuff added the comment: I suspect a better message could be invented, but I'm not sure what :) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 13:00:44 2010 From: report at bugs.python.org (Martin Zimmermann) Date: Fri, 09 Apr 2010 11:00:44 +0000 Subject: [issue8356] SyntaxError: integer assignment with leading zeros (only 8 and 9) In-Reply-To: <1270810844.03.0.603411749549.issue8356@psf.upfronthosting.co.za> Message-ID: <1270810844.03.0.603411749549.issue8356@psf.upfronthosting.co.za> New submission from Martin Zimmermann : try this: x = (05, 06, 07) y = (08, 09, 019) you will get SyntaxError: invalid token. (also in python 2.5.2) ---------- components: Interpreter Core messages: 102706 nosy: posativ severity: normal status: open title: SyntaxError: integer assignment with leading zeros (only 8 and 9) versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 13:03:40 2010 From: report at bugs.python.org (Ezio Melotti) Date: Fri, 09 Apr 2010 11:03:40 +0000 Subject: [issue8356] SyntaxError: integer assignment with leading zeros (only 8 and 9) In-Reply-To: <1270810844.03.0.603411749549.issue8356@psf.upfronthosting.co.za> Message-ID: <1270811020.53.0.70554546671.issue8356@psf.upfronthosting.co.za> Ezio Melotti added the comment: The leading 0 is used to indicate octal numbers, and 8 and 9 are not valid octal digits. ---------- nosy: +ezio.melotti resolution: -> invalid stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 13:15:11 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 09 Apr 2010 11:15:11 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1270811711.12.0.671670010696.issue7559@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for your suggestions on the test code. I will do that. It seems like the hard-coded approach would be more brittle. For example, if someone wants to replace __import__ with their own, e.g. old__import__ = __builtins__.__import__ def __my_logging_import(*args, **kwargs): print "Importing %s..." % args[0] # module name return old__import__(*args, **kwargs) __builtins__.__import__ = __my_logging_import Then the stack traces would be different: File "/Users/chris_g4/dev/Python/trunk/Lib/unittest/loader.py", line 92, in loadTestsFromName module = __import__('.'.join(parts_copy)) File "unittests.py", line 8, in __my_logging_import return old__import__(*args, **kwargs) ImportError: No module named sdasfasfasdf This causes the unit tests not to pass. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 13:21:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 11:21:59 +0000 Subject: [issue8356] SyntaxError: integer assignment with leading zeros (only 8 and 9) In-Reply-To: <1270810844.03.0.603411749549.issue8356@psf.upfronthosting.co.za> Message-ID: <1270812119.47.0.202743779044.issue8356@psf.upfronthosting.co.za> ?ric Araujo added the comment: Duly documented here: http://docs.python.org/reference/lexical_analysis.html#numeric-literals Regards ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 14:00:46 2010 From: report at bugs.python.org (Pascal Chambon) Date: Fri, 09 Apr 2010 12:00:46 +0000 Subject: [issue7865] io close() swallowing exceptions In-Reply-To: <1265459228.25.0.91197617162.issue7865@psf.upfronthosting.co.za> Message-ID: <1270814446.97.0.73966619146.issue7865@psf.upfronthosting.co.za> Pascal Chambon added the comment: Well, it would break code which currently ignores that it fails, so it's more a benefit than a loss for programmers imo. I doubt the impact will be important though, because the io module is still quite recent, and furthermore errors on the last flush are quite unlikely to happen if previous ones succeeded (except "disk full", I don't see any reason for this to happen). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 14:17:54 2010 From: report at bugs.python.org (Skip Montanaro) Date: Fri, 09 Apr 2010 12:17:54 +0000 Subject: [issue4007] make clean fails to delete .a and .so.X.Y files In-Reply-To: <1270791972.75.0.250402145498.issue4007@psf.upfronthosting.co.za> Message-ID: <19391.3816.141797.342184@montanaro.dyndns.org> Skip Montanaro added the comment: Martin> If it did eat the patch, we would have lost it by now: there is Martin> nothing in the history that shows that a file was attached at Martin> some point. More likely, Skip forgot to attach it when Martin> submitting this report. Yeah, I must have just forgotten to attach it. At one point I'm pretty sure I had something in my sandbox, but have nothing now. Removing .a files is pretty straightforward. Removing .so.X.Y files is a little more cumbersome because globbing isn't perfect. This (only lightly tested) patch should be good enough though: Index: Makefile.pre.in =================================================================== --- Makefile.pre.in (revision 79207) +++ Makefile.pre.in (working copy) @@ -1156,8 +1156,9 @@ find $(srcdir) -name '*.py[co]' -exec rm -f {} ';' clean: pycremoval - find . -name '*.o' -exec rm -f {} ';' + find . -name '*.[oa]' -exec rm -f {} ';' find . -name '*.s[ol]' -exec rm -f {} ';' + find . -name '*.so.[0-9]*.[0-9]*' -exec rm -f {} ';' find build -name 'fficonfig.h' -exec rm -f {} ';' || true find build -name 'fficonfig.py' -exec rm -f {} ';' || true -rm -f Lib/lib2to3/*Grammar*.pickle even though the second addition would also match files like Margaret.so.9a.1g4 Skip ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 14:21:01 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 09 Apr 2010 12:21:01 +0000 Subject: [issue3581] failures in test_uuid In-Reply-To: <1218991997.09.0.347137407735.issue3581@psf.upfronthosting.co.za> Message-ID: <1270815661.36.0.371830041379.issue3581@psf.upfronthosting.co.za> Stefan Krah added the comment: 5. uuid.getnode() can fall back to creating a random 48 bit number and so can _windll_getnode() (by using UuidCreateSequential). Therefore, in unlucky cases 0xffffffffffff can be generated and the assert in check_node() will fail. check_node() is beginning to look quite pointless... ---------- Added file: http://bugs.python.org/file16842/test_uuid2.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 14:34:18 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Apr 2010 12:34:18 +0000 Subject: [issue8350] os.mkdir doc comment is incorrect In-Reply-To: <1270764159.26.0.287104770145.issue8350@psf.upfronthosting.co.za> Message-ID: <1270816458.9.0.923243737085.issue8350@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The docstring looks right to me. "mode=0777" doesn't mean it takes a keyword argument, only that this argument has a default value. You might want to fix posixmodule to accept keyword arguments, but it should probably be done for all functions then. An mkdir-specific patch would have little point IMO (after all it takes only two args, there's hardly any risk of confusion). ---------- nosy: +loewis, pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 14:35:45 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 12:35:45 +0000 Subject: [issue8350] os.mkdir doc comment is incorrect In-Reply-To: <1270764159.26.0.287104770145.issue8350@psf.upfronthosting.co.za> Message-ID: <1270816545.34.0.133065864697.issue8350@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hello This is a recurrent problem with Python functions implemented in C. Since introspection is not possible, developers have to use the first line of the docstring to write the signature, including default arguments. With your patch, people can?t rely on IDE tooltips that display introspected signature + first line of docstring anymore. The ideal right fix would be for C functions to support introspection, e.g. with PEP 362. Regards ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 14:37:32 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Apr 2010 12:37:32 +0000 Subject: [issue7865] io close() swallowing exceptions In-Reply-To: <1265459228.25.0.91197617162.issue7865@psf.upfronthosting.co.za> Message-ID: <1270816652.22.0.903712581427.issue7865@psf.upfronthosting.co.za> Antoine Pitrou added the comment: You're right that silencing IO errors is bad. Patch welcome. ---------- nosy: +amaury.forgeotdarc, pitrou priority: low -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 14:38:29 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Apr 2010 12:38:29 +0000 Subject: [issue8354] siginterrupt with flag=False is reset when signal received In-Reply-To: <1270795837.87.0.683673992087.issue8354@psf.upfronthosting.co.za> Message-ID: <1270816709.73.0.624714859388.issue8354@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +exarkun _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 14:40:27 2010 From: report at bugs.python.org (Shashwat Anand) Date: Fri, 09 Apr 2010 12:40:27 +0000 Subject: [issue8350] os.mkdir doc comment is incorrect In-Reply-To: <1270764159.26.0.287104770145.issue8350@psf.upfronthosting.co.za> Message-ID: <1270816827.69.0.60906379783.issue8350@psf.upfronthosting.co.za> Shashwat Anand added the comment: The ideal right fix would be for C functions to support introspection - Agreed, but then it will be needed to do so in quite a number of C codes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 14:47:37 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 12:47:37 +0000 Subject: [issue8350] os.mkdir doc comment is incorrect In-Reply-To: <1270764159.26.0.287104770145.issue8350@psf.upfronthosting.co.za> Message-ID: <1270817257.59.0.061984126483.issue8350@psf.upfronthosting.co.za> ?ric Araujo added the comment: A more attainable fix would be a way to mark up positional-only arguments that have a default value. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 14:59:59 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 09 Apr 2010 12:59:59 +0000 Subject: [issue3581] failures in test_uuid In-Reply-To: <1218991997.09.0.347137407735.issue3581@psf.upfronthosting.co.za> Message-ID: <1270817999.37.0.0580516442983.issue3581@psf.upfronthosting.co.za> Stefan Krah added the comment: I do not understand the semantics of uuid.getnode(). Per the docs it's supposed to return a hardware address. This would reasonably make it a UUID version 1. But then the random fallback should be a 47 bit number as per http://www.ietf.org/rfc/rfc4122.txt section 4.5. The docs for UuidCreateSequential don't say if the random fallback is a random version 1 UUID. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 15:01:44 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Fri, 09 Apr 2010 13:01:44 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1270818104.9.0.27972772549.issue7559@psf.upfronthosting.co.za> Chris Jerdonek added the comment: > I think you can simplify them a bit. For example, you can use assertRaises. Actually, assertRaises doesn't seem to permit checking error text. That may be one reason why try-except-else is being used instead throughout. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 15:05:34 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Apr 2010 13:05:34 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <1260026404.41.0.635406889881.issue7443@psf.upfronthosting.co.za> Message-ID: <1270818334.21.0.114788890224.issue7443@psf.upfronthosting.co.za> R. David Murray added the comment: If the problem with the fix is that lots of tests use test_support.unlink, then I don't see why the rename dance can't be implemented in test_support.unlink. (Possibly conditioned on whether or not the tests are running on a windows platform.) Dealing with unlink problems is why that method exists in the first place. There are probably places in the test suite that *don't* use test_support.unlink, though, so fixing test_support.unlink will not necessarily fix all of the problems. We'll have to fix those other tests (probably by using the new test_support.unlink) as we find them. An actual patch will need a test that doesn't rely on win32file (ctypes would be OK). It may be necessary to rename to a unique filename, too. (To be clear, I think a unit test that reproduces the problem by doing an open with FILE_SHARE_DELETE is fine, we don't need a test that reproduces the race condition itself. The windows experts will correct me if I'm wrong :) I'm changing the stage to patch needed because it seems to me that using a technique like rename that doesn't introduce additional delays into the test suite is to be preferred. ---------- nosy: +r.david.murray stage: patch review -> needs patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 15:07:44 2010 From: report at bugs.python.org (Nikolaus Rath) Date: Fri, 09 Apr 2010 13:07:44 +0000 Subject: [issue6715] xz compressor support In-Reply-To: <1250502444.31.0.107447392137.issue6715@psf.upfronthosting.co.za> Message-ID: <1270818464.75.0.966289930487.issue6715@psf.upfronthosting.co.za> Changes by Nikolaus Rath : ---------- nosy: +Nikratio _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 15:08:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Apr 2010 13:08:47 +0000 Subject: [issue3581] failures in test_uuid In-Reply-To: <1218991997.09.0.347137407735.issue3581@psf.upfronthosting.co.za> Message-ID: <1270818527.73.0.0766259563102.issue3581@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +nnorwitz, tim_one _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 16:14:55 2010 From: report at bugs.python.org (Yaniv Aknin) Date: Fri, 09 Apr 2010 14:14:55 +0000 Subject: [issue2824] zipfile to handle duplicate files in archive In-Reply-To: <1210537070.35.0.0613996133193.issue2824@psf.upfronthosting.co.za> Message-ID: <1270822495.7.0.355908378061.issue2824@psf.upfronthosting.co.za> Yaniv Aknin added the comment: Attached is the addition of the 'low_level' parameter to ZipFile. Included are the parameter, a global switch controlling whether the parameter will raise an Exception or trigger a DeprecationWarning (the latter, for now), updated tests and updated documents. I didn't run test_zipfile64, I can't say for sure it works but I have no reason to believe it doesn't. Changes are against py3k; let me know what you think, I'll backport to trunk. ---------- keywords: +patch Added file: http://bugs.python.org/file16843/low_level_zipfile.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 16:31:01 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 14:31:01 +0000 Subject: [issue1294032] Distutils writes keywords comma-separated Message-ID: <1270823461.5.0.241257474499.issue1294032@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hello Comma-separated values are a Good Thing?, because you can have one notion expressed with more than one ?word?, e.g. ?text processing?. Could we edit a PEP to reflect this or is it too late? Should someone start a discussion on a mailing list? Regards ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 16:32:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 14:32:10 +0000 Subject: [issue1294032] Distutils writes keywords comma-separated Message-ID: <1270823530.63.0.283393317917.issue1294032@psf.upfronthosting.co.za> ?ric Araujo added the comment: Forgot to add I suggest that someone with admin rights move this bug to Distutils2. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 17:15:17 2010 From: report at bugs.python.org (Tim Kersten) Date: Fri, 09 Apr 2010 15:15:17 +0000 Subject: [issue8357] distutils does not allow installation with --root and --prefix, and give's incorrect error message In-Reply-To: <1270826117.06.0.843410920049.issue8357@psf.upfronthosting.co.za> Message-ID: <1270826117.06.0.843410920049.issue8357@psf.upfronthosting.co.za> New submission from Tim Kersten : $ python setup.py install --root=/tmp/ --prefix=/usr running install error: must supply either home or prefix/exec-prefix -- not both I believe that this should work. --root and --prefix are, from what I can tell, two unrelated options. ---------- assignee: tarek components: Distutils messages: 102724 nosy: tarek, timkersten severity: normal status: open title: distutils does not allow installation with --root and --prefix, and give's incorrect error message type: behavior versions: Python 2.5, Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 17:16:15 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Fri, 09 Apr 2010 15:16:15 +0000 Subject: [issue8354] siginterrupt with flag=False is reset when signal received In-Reply-To: <1270795837.87.0.683673992087.issue8354@psf.upfronthosting.co.za> Message-ID: <1270826175.92.0.433922349878.issue8354@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: > The effect of signal.siginterrupt(somesig, False) is reset the first time a that signal is received. This is not the documented behaviour, and I do not think this is a desireable behaviour. It renders siginterrupt effectively useless at providing the robustness against EINTR it is intended to provide. Actually, siginterrupt shouldn't be used. The proper way is to use sigaction with SA_RESTART flag (and still, don't rely on SA_RESTART too much, certain syscalls are non restartable and this isn't realy portable). > Another might be to not call PyOS_setsig from signal_handler at all -- I'm not sure why it is trying to reinstall itself, but perhaps there's some issue there I'm not aware of. Because signal.signal might be implemented with sigaction() or signal() and the latter resets the default signal handler when the handler is called. This means that if your system doesn't support sigaction and and you don't reinstall it, then the handler will only get called the first time. However, reinstalling the signal handler contains a race, because if a second signal comes before you reinstall it, it's handled by the default handler. That's why sigaction is much better (and calling PyOS_setsig unecessary when sigaction is available). The problem you describe can happen with both sigaction and signal : sigaction: - you set your handler with signal.signal() - sigaction() is called, and by default syscalls are not restarted (SA_RESTART is false) - you call siginterrupt() with False, which juste reinstalls the handler with SA_RESTART to true - the first signal arrives: signal_handler() schedules the call of your handler, and calls PyOS_setsig() - PyOS_setsig() reinstalls your handler (again, it's neither a good idea nor necessary with sigaction) _without_ SA_RESTART - the second signal comes in - you get a EINTR, game over signal: - you set your handler with signal.signal() - signal() is called, and syscalls are not restarted by default - you call siginterrupt() with False, which juste reinstalls the handler with SA_RESTART to true - the first signal arrives: signal_handler() schedules the call of your handler, and calls PyOS_setsig() - PyOS_setsig() reinstalles your handler _without_ SA_RESTART (I think the flag is lost even before calling siginterrupt) - the second signal comes in - you get a EINTR, game over So the simple fix when sigaction is available is simply to not call PyOS_setsig() from signal_handler. When sigaction is not available, well, you have to recall that you want restartable syscalls, and call siginterrupt again with that value. But I think if the OS doesn't support sigaction, there's little chance it'll support siginterrupt. (1) I just found out that Windows doesn't have sigaction, but I don't know Window much, so if someone could confirm that it doesn't support siginterrupt, then the fix would simply be to not reinstall handler when sigaction is available. ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 17:31:30 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 09 Apr 2010 15:31:30 +0000 Subject: [issue8357] distutils does not allow installation with --root and --prefix, and give's incorrect error message In-Reply-To: <1270826117.06.0.843410920049.issue8357@psf.upfronthosting.co.za> Message-ID: <1270827090.0.0.88270027726.issue8357@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Those are mutually exclusive: --prefix : installation prefix --root: install everything relative to this alternate root directory root will install things into a completely alternate root and will use the existing installation scheme and make all paths relative to root. Whereas prefix allows you to define an alternate value for the installation sys.prefix. And supposes that this prefix is in your PYTHONPATH. IOW, having the two options makes it impossible for distutils to choose where to put some files. ---------- resolution: -> invalid versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 17:38:05 2010 From: report at bugs.python.org (Stefan Krah) Date: Fri, 09 Apr 2010 15:38:05 +0000 Subject: [issue3581] failures in test_uuid In-Reply-To: <1218991997.09.0.347137407735.issue3581@psf.upfronthosting.co.za> Message-ID: <1270827485.94.0.25021658174.issue3581@psf.upfronthosting.co.za> Stefan Krah added the comment: I reread http://www.ietf.org/rfc/rfc4122.txt and I'm pretty sure that if getnode() is supposed to return a hardware address, one of the following should be used: 1) If ifconfig etc. returns successfully, we are fine. 2) If uuid_generate_time() or UuidCreateSequential() are used to extract the node ID, we have to make sure that the returned UUID is in fact RFC_4122 and version 1. 3) The fallback node ID should be 47 bits according to section 4.5. I've got a new patch (getnode.patch) that takes care of these issues. ---------- keywords: -patch resolution: accepted -> Added file: http://bugs.python.org/file16844/getnode.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 17:52:06 2010 From: report at bugs.python.org (Tim Kersten) Date: Fri, 09 Apr 2010 15:52:06 +0000 Subject: [issue8357] distutils does not allow installation with --root and --prefix, and give's incorrect error message In-Reply-To: <1270826117.06.0.843410920049.issue8357@psf.upfronthosting.co.za> Message-ID: <1270828326.41.0.762041898668.issue8357@psf.upfronthosting.co.za> Tim Kersten added the comment: I fail to see how these are, or at least should be mutually exclusive. Upon reading your reply I would think that if one was to specify both a --prefix and --root that the prefix would be relative to the --root. i.e. --prefix changes the curront installation scheme as per usual i.e. --root specifies an alternative "root", but obeys the installation scheme in every other sense. i.e. (On linux) / => /path/to/alternative/root/ Any chance you could explain this further please? I'm having difficulties understanding why I'm wrong. ---------- versions: +Python 2.5, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 17:53:19 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 09 Apr 2010 15:53:19 +0000 Subject: [issue8355] diff.py produce unified format by default In-Reply-To: <1270803265.38.0.592538535243.issue8355@psf.upfronthosting.co.za> Message-ID: <1270828399.77.0.951802067258.issue8355@psf.upfronthosting.co.za> Eric Smith added the comment: This would be easier to review if the patch were generated with 'svn diff'. That said, it looks okay in concept to me, although I couldn't apply it and test without manually mucking with the patch. 2.6 is in bugfix mode, so it can't be changed there. I added 3.2, since it should probably agree with 2.7. What I can't answer is if this should actually be done. I don't know if anyone's relying on the current behavior. I do agree that unified diffs are more desirable. ---------- nosy: +eric.smith priority: -> low stage: -> patch review type: -> behavior versions: +Python 3.2 -Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 18:23:43 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 09 Apr 2010 16:23:43 +0000 Subject: [issue8357] distutils does not allow installation with --root and --prefix, and give's incorrect error message In-Reply-To: <1270826117.06.0.843410920049.issue8357@psf.upfronthosting.co.za> Message-ID: <1270830223.6.0.176175633171.issue8357@psf.upfronthosting.co.za> Tarek Ziad? added the comment: == prefix == With prefix, you need to make sure the target site-packages is in your PYTHONPATH: PYTHONPATH=/tmp/foo/lib/python2.6/site-packages/ python setup.py install --prefix=/tmp/foo And here, prefix is used as the base location, and the command uses the schemes defined for each platform. So stuff will be installed in /tmp/foo (bin/ , lib/python2.6, etc) == root == With root, you just need to provide a path: python setup.py install --root=/tmp/foo In this case, sys.prefix will be used relatively to root (location = root+sys.prefix), so for example, under Mac OS X, I have '/Library/Frameworks/Python.framework/Versions/2.6' for sys.prefix. So stuff will be installed under /tmp/foo/Library/Frameworks/Python.framework/Versions/2.6/ Since both options are used to define the base location, they are mutualy exclusive. That's how it works today. What are you trying to achieve exactly ? Btw: Please don't add Python 2.5 in the versions. Python 2.5 is not a target anymore. ---------- versions: -Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 18:46:11 2010 From: report at bugs.python.org (Darryl Miles) Date: Fri, 09 Apr 2010 16:46:11 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270831571.84.0.63486554196.issue8108@psf.upfronthosting.co.za> Darryl Miles added the comment: I've updated my attachment to the bug, if you read the old one please re-read the updated version (since some points in there were not accurate). With regards to the OpenSSL error return -1/ERROR_SYSCALL with errno==0 being observed, I shall respond into the OpenSSL mailing list with a fuller response. The man page SSL_get_error(3) does explain what getting a zero error means in relation to end-of-file at the BIO/TCP socket level. In light of the presumption by me that the problem was because one end did a syscall close(fd) this makes perfect sense in the context of your observation and OpenSSL appears to be working as documented. There is also code to print out the error in Python at Modules/_ssl.c method PySSL_SetError() so I'm not sure of the source of the funny looking error printing in relation to the ftpcli test case, consider it to be an error message formatting glitch. Now the issue I see here is that there are clearly 3 use cases Python should provide: * one-shot raw mode (don't enter the loop at all, as per newssl5.patch/my attachment, this is more or less what you already have in CVS, but I would remove the 2nd call to SSL_shutdown(), raw mode means exactly that; the caller is in charge of calling it again, thin layer for Python power users) [case-1] * perform IO sleep/wait as necessary until we observe SSL_shutdown()==0 (or better! so this will return if 0 or 1 is returned) [case-2] * perform IO sleep/wait as necessary until we observe SSL_shutdown()==1 [case-3] I presume you already have a way of handling the configuration of I/O timeouts as per Python's IO processing model (that is provided by some other API mechanism). The question is what is the best way to provide them (what is inline with the Python paradigm?) : * one method, keep existing named method, add new optional argument that can indicate all 3 modes of operation. Debate which of the 3 modes of operation is the default when the argument is not specified, case-1 seems to most backwardly compatible. [I am presuming python supports optional arguments] * new method, keep existing as-is (to cover case 1), implement case-2 and case-3 in the method which also take an argument for the user to specify which use case they want. >From this a patch should be straight-forward. Then we can look to see if the FTP client or server is doing anything wrong in light of having the building blocks in place to achieve any goal on top of OpenSSL. ---------- Added file: http://bugs.python.org/file16845/python_ssl_v2.c.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 18:46:20 2010 From: report at bugs.python.org (Darryl Miles) Date: Fri, 09 Apr 2010 16:46:20 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1270831580.33.0.0625451321558.issue8108@psf.upfronthosting.co.za> Changes by Darryl Miles : Removed file: http://bugs.python.org/file16838/python_ssl.c.txt _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 19:07:03 2010 From: report at bugs.python.org (Tim Kersten) Date: Fri, 09 Apr 2010 17:07:03 +0000 Subject: [issue8357] distutils does not allow installation with --root and --prefix, and give's incorrect error message In-Reply-To: <1270826117.06.0.843410920049.issue8357@psf.upfronthosting.co.za> Message-ID: <1270832823.07.0.795847639534.issue8357@psf.upfronthosting.co.za> Tim Kersten added the comment: Ok, this is embarrassing. :-/ $ python setup.py install --root=/tmp/ --prefix=/usr running install error: must supply either home or prefix/exec-prefix -- not both The above is not caused by specifying both --root and --prefix as I had assumed. It was my forgetting that I had specified the --home option in a setup.cfg file. I'm so sorry for wasting your time. Having removed the setup.cfg file and have tested it again and now it behaves exactly as I had anticipated. i.e. --prefix is relative to --root, so it is actually possible to specify both. In particular what this allows one to achieve is easiest shown by example: A) $ python setup.py install --prefix=/tmp/test1 B) $ python setup.py install --prefix=/usr/special --root=/tmp/test2 in A) it installs as such: /etc/mypythonapp.settings /tmp/test1/mypythonapp/... in B) it installs as such: /tmp/test2/etc/mypythonapp.settings /tmp/test2/usr/special/mypythonapp/... This bug can be closed. Again, my apologies and thank you for taking the time to help me sort it out. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 19:09:50 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Apr 2010 17:09:50 +0000 Subject: [issue8358] absolute_import future directive ignored by 2to3 In-Reply-To: <1270832990.09.0.0431237155361.issue8358@psf.upfronthosting.co.za> Message-ID: <1270832990.09.0.0431237155361.issue8358@psf.upfronthosting.co.za> New submission from Jason R. Coombs : I'm using Python 3.1.2 64-bit on Windows. I've found that even if "absolute_import" is imported from __future__, 2to3 will convert imports to be treated as relative. To demonstrate this behavior, I created a small package "abs_imp_test" (attached). abs_imp_test.__init__ is 0 bytes. abs_imp_test.string is a one-line file. foo = 'bar' abs_imp_test.main contains 4 lines: from __future__ import absolute_import import string assert not hasattr(string, 'foo'), 'fail' print("success") Put abs_imp_test package somewhere in the python path (just having it relative to current directory works). Note that the code is designed to be future-proof (using the future directive), so will run under Python 2.6 and Python 3.1 without errors. > python26\python -c "from abs_imp_test import main" success > python31\python -c "from abs_imp_test import main" success However, if I run 2to3 on main, it converts "import string" to "from . import string" which changes the fundamental meaning of the import and breaks the test. > 2to3 abs_import_test ... RefactoringTool: Files that were modified: RefactoringTool: abs_imp_test\main.py > python -c "from abs_imp_test import main" Traceback (most recent call last): File "", line 1, in File "abs_imp_test\main.py", line 4, in assert not hasattr(string, 'foo'), "fail" AssertionError: fail Is it possible that if the absolute_import future directive is present that the imports not be modified for relativity? ---------- components: 2to3 (2.x to 3.0 conversion tool) files: abs_imp_test.zip messages: 102733 nosy: jaraco severity: normal status: open title: absolute_import future directive ignored by 2to3 versions: Python 3.1 Added file: http://bugs.python.org/file16846/abs_imp_test.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 19:18:54 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Apr 2010 17:18:54 +0000 Subject: [issue8358] absolute_import future directive ignored by 2to3 In-Reply-To: <1270832990.09.0.0431237155361.issue8358@psf.upfronthosting.co.za> Message-ID: <1270833534.74.0.180875158702.issue8358@psf.upfronthosting.co.za> Jason R. Coombs added the comment: More importantly, is there a workaround for main.py that will work in Python 2, and in Python 3 after 2to3, that doesn't require any module renaming? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 19:42:11 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Fri, 09 Apr 2010 17:42:11 +0000 Subject: [issue8358] absolute_import future directive ignored by 2to3 In-Reply-To: <1270832990.09.0.0431237155361.issue8358@psf.upfronthosting.co.za> Message-ID: <1270834931.54.0.150904331286.issue8358@psf.upfronthosting.co.za> Jason R. Coombs added the comment: I found a workaround by excluding the "import" fixer that seems to work. For the example, > 2to3 -x import abs_imp_test The command still modifies main, but it only removes the __future__ directive and doesn't modify the imports. For my real-world package, which is using distutils, I added the following to get a build_py that will run 2to3: try: from distutils.command.build_py import build_py_2to3 as build_py # exclude some fixers that break already compatible code from lib2to3.refactor import get_fixers_from_package fixers = get_fixers_from_package('lib2to3.fixes') for skip_fixer in ['import']: fixers.remove('lib2to3.fixes.fix_' + skip_fixer) build_py.fixer_names = fixers except ImportError: from distutils.command.build_py import build_py This works because the entire package is already using absolute imports wherever they are relevant, so removing the import fixer is appropriate. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 19:54:24 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Apr 2010 17:54:24 +0000 Subject: [issue8355] diff.py produce unified format by default In-Reply-To: <1270803265.38.0.592538535243.issue8355@psf.upfronthosting.co.za> Message-ID: <1270835664.18.0.472316065853.issue8355@psf.upfronthosting.co.za> R. David Murray added the comment: For what it is worth, the unix 'diff' command does not produce unified format by default. It doesn't produce the format diff.py does by default either, though. Our normal policy is not to change an interface unless there's a strong reason. On the other hand, Tools probably don't need to be held to as high a standard as library code. I guess I'm +0 on this change. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 20:00:01 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Apr 2010 18:00:01 +0000 Subject: [issue8357] distutils does not allow installation with --root and --prefix, and give's incorrect error message In-Reply-To: <1270826117.06.0.843410920049.issue8357@psf.upfronthosting.co.za> Message-ID: <1270836001.09.0.00271634987765.issue8357@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 20:00:05 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 09 Apr 2010 18:00:05 +0000 Subject: [issue8339] urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://' In-Reply-To: <1270676527.4.0.372149513422.issue8339@psf.upfronthosting.co.za> Message-ID: <1270836005.61.0.0180087676177.issue8339@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Hello Michael, Looking a bit deeper into this issue, I don't see that 'x://' and 'x:///y' qualifies as valid URLS as per RFC 3986. (Well, urlparse has been not strictly conforming to it, but that is a different issue) If you look at the section 3. it states the following for validity. hier-part = "//" authority path-abempty / path-absolute / path-rootless / path-empty In those cases, I would assume that 'x://y', x:/y','x:/','/' as valid URLS, but not the two examples you mentioned. For the issue7904, we had just gone by the definition of RFC to make that minor change and it has resulted in this issue. I looked at the code to see if this can be addressed, but I see that your examples did not fit in as valid urls. Do you have any opinions on this? We can just the test_urlparse.py a little like below, and you might fix the break your code. def test_unparse_parse(self): - for u in ['Python', './Python','x-newscheme://foo.com/stuff']: + for u in ['Python', './Python','x-newscheme://foo.com/stuff','x://y','x:/y','x:/','/',]: self.assertEqual(urlparse.urlunsplit(urlparse.urlsplit(u)), u) self.assertEqual(urlparse.urlunparse(urlparse.urlparse(u)), u) ---------- assignee: -> orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 20:25:49 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Fri, 09 Apr 2010 18:25:49 +0000 Subject: [issue8357] Add a --show-installation-paths in the install command In-Reply-To: <1270826117.06.0.843410920049.issue8357@psf.upfronthosting.co.za> Message-ID: <1270837549.04.0.906426588231.issue8357@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Ooops you are right, I messed up too in my explanation, I mischecked the code. root and home are mutually exclusive, not root and prefix. In any case, all those options are making it really hard to understand. I'd like to make this story easier in distutils2, So I'll move this issue in there. Maybe we could have a --show-installation-paths option in install that displays the installation paths the install command will use, and from where the options were read from (and in particular from which .cfg files) ---------- components: +Distutils2 -Distutils resolution: invalid -> accepted status: closed -> open title: distutils does not allow installation with --root and --prefix, and give's incorrect error message -> Add a --show-installation-paths in the install command _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 20:35:32 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Fri, 09 Apr 2010 18:35:32 +0000 Subject: [issue7007] Tiny inconsistency in the orthography of "url encoded" in the doc of urllib.parse In-Reply-To: <1254071339.25.0.500752949705.issue7007@psf.upfronthosting.co.za> Message-ID: <1270838132.45.0.357267845114.issue7007@psf.upfronthosting.co.za> Senthil Kumaran added the comment: What is referred to as URL-encoded or URL encoded is technically 'percent-encoding'. Consistency would desirable and I think 'URL encoded' is okay. It involves a minor change in removing '-' in some places. Once trunk opens, I shall make those changes in the docs referenced here. ---------- assignee: georg.brandl -> orsenthil nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 21:25:47 2010 From: report at bugs.python.org (Fernando Perez) Date: Fri, 09 Apr 2010 19:25:47 +0000 Subject: [issue7897] Support parametrized tests in unittest In-Reply-To: <1265768482.24.0.694001982317.issue7897@psf.upfronthosting.co.za> Message-ID: <1270841147.26.0.0922503881651.issue7897@psf.upfronthosting.co.za> Fernando Perez added the comment: Hey Yarick, On Thu, Apr 8, 2010 at 18:53, Yaroslav Halchenko w= rote: > In PyMVPA we have our little decorator as an alternative to Fernando's ge= nerators, =A0and which is closer, I think, to what Michael was wishing for: > @sweepargs > > http://github.com/yarikoptic/PyMVPA/blob/master/mvpa/testing/sweepargs.py > > NB it has some minor PyMVPA specificity which could be easily wiped out, = and since it was at most 4 eyes looking at it and it bears "evolutionary" c= hanges, it is far from being the cleanest/best piece of code, BUT: > > * it is very easy to use, just decorate a test method/function and give a= n argument which to vary within the function call, e.g smth like > > @sweepargs(arg=3Drange(5)) > def test_sweepargs_demo(arg): > =A0 =A0ok_(arg < 5) > =A0 =A0ok_(arg < 3) > =A0 =A0ok_(arg < 2) > > For nose/unittest it would still look like a single test Thanks for the post; I obviously defer to Michael on the final decision, but I *really* would like a solution that reports an 'argument sweep' as multiple tests, not as one. They are truly multiple tests (since they can pass/fail independently), so I think they should be treated as such. On the other hand, your code does have nifty features that could be used as well, so perhaps the best of both can be used in the end. Cheers, f ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 21:42:25 2010 From: report at bugs.python.org (Yaroslav Halchenko) Date: Fri, 09 Apr 2010 19:42:25 +0000 Subject: [issue7897] Support parametrized tests in unittest In-Reply-To: <1265768482.24.0.694001982317.issue7897@psf.upfronthosting.co.za> Message-ID: <1270842145.86.0.675434701209.issue7897@psf.upfronthosting.co.za> Yaroslav Halchenko added the comment: Fernando, I agree... somewhat ;-) At some point (whenever everything works fine and no unittests fail) I wanted to merry sweepargs to nose and make it spit out a dot (or animate a spinning wheel ;)) for every passed unittest, so instead of 300 dots I got a picturesque field of thousands dots and Ss and also saw how many were skipped for some parametrizations. But I became "Not sure" of such feature since field became quite large and hard to "grasp" visually although it gave me better idea indeed of what was the total number of "testings" were done and skipped. So may be it would be helpful to separate notions of tests and testings and provide user ability to control the level of verbosity (1 -- tests, 2 -- testings, 3 -- verbose listing of testings (test(parametrization))) But I blessed sweepargs every time whenever something goes nuts and a test starts failing for (nearly) all parametrization at the same point. And that is where I really enjoy the concise summary. Also I observe that often an ERROR bug reveals itself through multiple tests. So, may be it would be worth developing a generic 'summary' output which would collect all tracebacks and then groups them by the location of the actual failure and tests/testings which hit it? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 21:56:19 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Fri, 09 Apr 2010 19:56:19 +0000 Subject: [issue8354] siginterrupt with flag=False is reset when signal received In-Reply-To: <1270795837.87.0.683673992087.issue8354@psf.upfronthosting.co.za> Message-ID: <1270842979.91.0.150766717262.issue8354@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: Attached are two patches: - test_signal_siginterrupt.diff is a patch for Lib/test/test_signal.py to check for this problem (more than one signal received after calling signal.siginterrupt()) before: $ ./python Lib/test/regrtest.py test_signal test_signal 1 test OK. after: $ ./python Lib/test/regrtest.py test_signal test_signal test test_signal failed -- Traceback (most recent call last): File "/home/cf/python/trunk/Lib/test/test_signal.py", line 299, in test_siginterrupt_off self.assertEquals(i, False) AssertionError: True != False 1 test failed: test_signal - signal_noreinstall.diff is a patch against Modules/signalmodule.c which modifies signal_handler() to call PyOS_setsig() only when sigaction is not available, since in that case the signal handler doesn't need to be reinstalled. This solves this problem, and also saves a call to sigaction every time a signal is received (even if its probably doesn't cost much). with patch and updated test: $ ./python Lib/test/regrtest.py test_signal test_signal 1 test OK. Of course, this also corrects the problem with sig-test.py, the terminal can be resized indefinitely. I also passed test_subprocess and test_socketserver just to be sure, but reviews are more than welcome. ---------- keywords: +patch Added file: http://bugs.python.org/file16847/test_signal_siginterrupt.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 21:56:23 2010 From: report at bugs.python.org (Tim Kersten) Date: Fri, 09 Apr 2010 19:56:23 +0000 Subject: [issue8357] Add a --show-installation-paths in the install command In-Reply-To: <1270826117.06.0.843410920049.issue8357@psf.upfronthosting.co.za> Message-ID: <1270842983.29.0.834680840764.issue8357@psf.upfronthosting.co.za> Tim Kersten added the comment: Such an option would be useful indeed. An idea, though perhaps it's overkill, would be to show the current values of the options causing problems, specifically if they come from a config file or environment variable. i.e. when setup.cfg contains home=/somewhere $ python setup.py install --prefix=/tmp running install error: must supply either home or prefix/exec-prefix -- not both setup.cfg: home=/somewhere ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 21:56:32 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 19:56:32 +0000 Subject: [issue7007] Tiny inconsistency in the orthography of "url encoded" in the doc of urllib.parse In-Reply-To: <1254071339.25.0.500752949705.issue7007@psf.upfronthosting.co.za> Message-ID: <1270842992.27.0.119846028221.issue7007@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hello. I?m not a native speaker, but I know that you need hyphens inside adjectives: URI-encoded, percent-encoded, built-in <0.2 wink>,?etc. I?m willing to produce a patch that changes ?URL-encoded? to ?percent-encoded?. Regards ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 21:56:55 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Fri, 09 Apr 2010 19:56:55 +0000 Subject: [issue8354] siginterrupt with flag=False is reset when signal received In-Reply-To: <1270795837.87.0.683673992087.issue8354@psf.upfronthosting.co.za> Message-ID: <1270843015.13.0.694261053774.issue8354@psf.upfronthosting.co.za> Changes by Charles-Francois Natali : Added file: http://bugs.python.org/file16848/signal_noreinstall.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 22:01:32 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 20:01:32 +0000 Subject: [issue8357] Add a --show-installation-paths in the install command In-Reply-To: <1270826117.06.0.843410920049.issue8357@psf.upfronthosting.co.za> Message-ID: <1270843292.9.0.890443728257.issue8357@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 22:07:26 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Apr 2010 20:07:26 +0000 Subject: [issue7927] SSL socket is not closed properly In-Reply-To: <1266146726.16.0.222413736354.issue7927@psf.upfronthosting.co.za> Message-ID: <1270843646.85.0.950463861215.issue7927@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> janssen nosy: +janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 22:07:37 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Apr 2010 20:07:37 +0000 Subject: [issue7943] Memory leak due to circular references in ssl.SSLSocket In-Reply-To: <1266341912.31.0.218071173939.issue7943@psf.upfronthosting.co.za> Message-ID: <1270843657.18.0.101320075675.issue7943@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- assignee: -> janssen nosy: +janssen _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 22:08:59 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Apr 2010 20:08:59 +0000 Subject: [issue7425] [PATCH] Improve the robustness of "pydoc -k" in the face of broken modules In-Reply-To: <1259786972.24.0.35920903506.issue7425@psf.upfronthosting.co.za> Message-ID: <1270843739.55.0.684019815354.issue7425@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Is it a dup of issue1785? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 22:12:52 2010 From: report at bugs.python.org (R. David Murray) Date: Fri, 09 Apr 2010 20:12:52 +0000 Subject: [issue8358] absolute_import future directive ignored by 2to3 In-Reply-To: <1270832990.09.0.0431237155361.issue8358@psf.upfronthosting.co.za> Message-ID: <1270843972.78.0.213436298748.issue8358@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 22:14:34 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Apr 2010 20:14:34 +0000 Subject: [issue8240] ssl.SSLSocket.write may fail on non-blocking sockets In-Reply-To: <1270673325.34.0.298821505348.issue8240@psf.upfronthosting.co.za> Message-ID: <1270844194.3435.66.camel@localhost> Antoine Pitrou added the comment: > Wouldn't it be nicer if mode was a property? Good point. I guess it would indeed... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 22:53:25 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 09 Apr 2010 20:53:25 +0000 Subject: [issue8355] diff.py produce unified format by default In-Reply-To: <1270803265.38.0.592538535243.issue8355@psf.upfronthosting.co.za> Message-ID: <1270846405.93.0.967583686861.issue8355@psf.upfronthosting.co.za> anatoly techtonik added the comment: Attached is 'svn diff'. Previous one was taken directly from Mercurial Queue, which is a pretty awesome thing to use. ---------- Added file: http://bugs.python.org/file16849/8355.diff-py-unified-by-default.svn.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 23:03:27 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 21:03:27 +0000 Subject: [issue8355] diff.py produce unified format by default In-Reply-To: <1270803265.38.0.592538535243.issue8355@psf.upfronthosting.co.za> Message-ID: <1270847007.5.0.349396949068.issue8355@psf.upfronthosting.co.za> ?ric Araujo added the comment: Some diff-emitting utilities only support unified format, but if diff.py is supposed to be a diff(1) replacement, changing default options seems bad. Eric, I think ?patch -p1 < file? would have done the trick, without manual mucking. Regards ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 23:12:14 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Fri, 09 Apr 2010 21:12:14 +0000 Subject: [issue8358] absolute_import future directive ignored by 2to3 In-Reply-To: <1270832990.09.0.0431237155361.issue8358@psf.upfronthosting.co.za> Message-ID: <1270847534.4.0.947902087038.issue8358@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r79917. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 23:19:51 2010 From: report at bugs.python.org (Fernando Perez) Date: Fri, 09 Apr 2010 21:19:51 +0000 Subject: [issue7897] Support parametrized tests in unittest In-Reply-To: <1265768482.24.0.694001982317.issue7897@psf.upfronthosting.co.za> Message-ID: <1270847991.24.0.339680255809.issue7897@psf.upfronthosting.co.za> Fernando Perez added the comment: Yarick: Yes, I do actually see the value of the summary view. When I have a parametric test that fails, I tend to just run nose with -x so it stops at the first error and with the --pdb options to study it, so I simply ignore all the other failures. To me, test failures are quite often like compiler error messages: if there's a lot of them, it's best to look only at the first few, fix those and try again, because the rest could be coming from the same cause. I don't know if Michael has plans/bandwidth to add the summary support as well, but I agree it would be very nice to have, just not at the expense of individual reporting. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 23:28:08 2010 From: report at bugs.python.org (Eric Smith) Date: Fri, 09 Apr 2010 21:28:08 +0000 Subject: [issue8355] diff.py produce unified format by default In-Reply-To: <1270803265.38.0.592538535243.issue8355@psf.upfronthosting.co.za> Message-ID: <1270848488.68.0.66093595085.issue8355@psf.upfronthosting.co.za> Eric Smith added the comment: I tried -p1 and it failed, but no matter. The contents were clear enough, and exactly how I would have changed the code. $ patch -p1 < 8355.diff-py-unified-by-default.diff patching file Tools/scripts/diff.py Hunk #1 FAILED at 13. Hunk #2 FAILED at 34. 2 out of 2 hunks FAILED -- saving rejects to file Tools/scripts/diff.py.rej The new patch worked for me. I'm -0 on this change, for what it's worth. It's probably all irrelevant, anyway. I can't imagine anyone actually generates their diffs with diff.py. As a useful demonstration of how difflib works, it does its job as it currently stands. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 23:33:57 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 09 Apr 2010 21:33:57 +0000 Subject: [issue8355] diff.py produce unified format by default In-Reply-To: <1270803265.38.0.592538535243.issue8355@psf.upfronthosting.co.za> Message-ID: <1270848837.74.0.280137388037.issue8355@psf.upfronthosting.co.za> anatoly techtonik added the comment: It is not a diff replacement. Its output, as David noted, is not a diff output format and can not be reliably parsed due to issue7585 and issue7582 combination. For being a diff replacement it will have to get rid of .py extension and gain a dozen of options. Such as --normal, -p, -w, -q, -r etc. Without these options diff.py can not be considered diff replacement. This script is more useful on its own, providing reasonable defaults for a cross-platform way of making patches for Python users. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 23:41:56 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Fri, 09 Apr 2010 21:41:56 +0000 Subject: [issue8355] diff.py produce unified format by default In-Reply-To: <1270803265.38.0.592538535243.issue8355@psf.upfronthosting.co.za> Message-ID: <1270849316.28.0.226220616756.issue8355@psf.upfronthosting.co.za> ?ric Araujo added the comment: Your use case and rationale make sense to me. I?d be +0.5 if I had a voice :) Regards ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 23:44:51 2010 From: report at bugs.python.org (Michael Foord) Date: Fri, 09 Apr 2010 21:44:51 +0000 Subject: [issue7897] Support parametrized tests in unittest In-Reply-To: <1265768482.24.0.694001982317.issue7897@psf.upfronthosting.co.za> Message-ID: <1270849491.85.0.800449711335.issue7897@psf.upfronthosting.co.za> Michael Foord added the comment: If we provide builtin support for parameterized tests it will have to report each test separately otherwise there is no point. You can already add support for running tests with multiple parameters yourself - the *only* advantage of building support into unittest (as I see it) is for better reporting of individual tests. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Fri Apr 9 23:46:42 2010 From: report at bugs.python.org (Brian Curtin) Date: Fri, 09 Apr 2010 21:46:42 +0000 Subject: [issue8355] diff.py produce unified format by default In-Reply-To: <1270803265.38.0.592538535243.issue8355@psf.upfronthosting.co.za> Message-ID: <1270849602.27.0.651918271406.issue8355@psf.upfronthosting.co.za> Brian Curtin added the comment: I'm with Eric, -0. I don't really think the change is necessary. ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 00:26:39 2010 From: report at bugs.python.org (Yaniv Aknin) Date: Fri, 09 Apr 2010 22:26:39 +0000 Subject: [issue6457] subprocess.Popen.communicate can lose data from output/error streams when broken input pipe occures In-Reply-To: <1247229365.37.0.486388451669.issue6457@psf.upfronthosting.co.za> Message-ID: <1270851999.5.0.10389593328.issue6457@psf.upfronthosting.co.za> Yaniv Aknin added the comment: I've updated the sample code to run with Python 3 and tested on Ubuntu 9.10 with and without setting subprocess._has_poll = False. As expected, when using poll() the sample runs correctly. When not using poll() the sample breaks (sometimes no data, sometimes some data; oddly, it seems the 'some data' variant appears only when I strace the process, probably because it slows things down). I suggest this be committed against 3.2 as well, but I don't know how these things are usually done; should I produce a separate patch which ports the latest patch currently posted in this thead against py3k? Or will this be done by whomever applies the patch? ---------- nosy: +Yaniv.Aknin versions: +Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 00:37:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Fri, 09 Apr 2010 22:37:01 +0000 Subject: [issue8322] test_ssl failures with OpenSSL 1.0.0 In-Reply-To: <1270500336.1.0.699742916544.issue8322@psf.upfronthosting.co.za> Message-ID: <1270852621.17.0.261570113194.issue8322@psf.upfronthosting.co.za> Antoine Pitrou added the comment: After some investigation, the error does occur because of the aforementioned changelog entry (SSLv2 weak ciphers are now disabled by default). To check it I just added the following line to newPySSLObject(): SSL_CTX_set_cipher_list(self->ctx, "ALL"); Of course this isn't desirable: we shouldn't blindly enable weak ciphers. Instead we could simply add an argument to configure allowed ciphers, and use "ALL" in our tests. Or we could add a separate method to configure ciphers. (this begs the question of whether this is suitable post-beta1) What do you think? ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 01:34:16 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Fri, 09 Apr 2010 23:34:16 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270856056.43.0.744627360756.issue8299@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: David, yes messing about with processor affinities is certainly not nice. Especially since the issue is cross-platform. The pthreads api doesn't offer much. There is pthreadd_setschedparam(), and pthreads_setconcurrency(). Unfortunately I don't have a pthreads machine to test that with. On windows, one possibility would be to switch to fibers, in the case of a yielding thread. I don't know if that would change anything, or if the thread-to-fiber and vice versa conversion is lightweight enough to be used dynamically. Antoine: I'm not familiar with ccbench. I?ll look into it. As for my FIFO fix, py3k is trying to do more, namely get rid of the checkinterval. It is most certainly a more complex solution and with it its own set of problems. The only thing that needs fixing is to add "fairness" to the GIL. I know that this is coming a bit late for 2.7 and I'm not pushing it as such for 2.7. But after 2.7 comes 2.8 (and so on ad infinitum) But I'm also pointing out the obvious problem and an obvious simple fix which doesn't involve inventing a whole new system. I would have thought that this should at least spark some enthusiasm. It's unfortunate, maybe, that I only realized so late that the pythread GIL was implemented using a homebrew condition variable mechanism. I always thougth (being a windows guy) that it were simply using the pthread_mutex() and thus the greedy behaviour of the GIL could be ascribed to that. Anyway, I?ll continue giving this patch some love. I wouldn't be surprised if it, and especially the "priority" variant, would be appealing to people doing e.g. webservers with 2.x technology. Another thing that the "priority" patch has done is convince me that I really need to implement this scheduling mode in stackless, since it does appear to help network latency when using FIFO scheduling of threads / tasklets. Cheers! ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 01:48:01 2010 From: report at bugs.python.org (anatoly techtonik) Date: Fri, 09 Apr 2010 23:48:01 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270856881.1.0.072930005911.issue8299@psf.upfronthosting.co.za> anatoly techtonik added the comment: If it really improves multicore performance and none of our test fail (even in memory/resource/time survival tests) then I'd give it a try even after a beta. 2.x is still the best practical version out there. ---------- nosy: +techtonik _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 03:02:08 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 10 Apr 2010 01:02:08 +0000 Subject: [issue7425] [PATCH] Improve the robustness of "pydoc -k" in the face of broken modules In-Reply-To: <1259786972.24.0.35920903506.issue7425@psf.upfronthosting.co.za> Message-ID: <1270861328.33.0.468047430735.issue7425@psf.upfronthosting.co.za> R. David Murray added the comment: It doesn't look like it is the same bug to me. This one is more general. ---------- nosy: +r.david.murray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 04:25:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Apr 2010 02:25:01 +0000 Subject: [issue7301] Add environment variable $PYTHONWARNINGS In-Reply-To: <1257865531.11.0.841786263832.issue7301@psf.upfronthosting.co.za> Message-ID: <1270866301.47.0.0999660636024.issue7301@psf.upfronthosting.co.za> Antoine Pitrou added the comment: The tests don't look good to me. You should use p.communicate() rather than p.stdout.read(). Also, check the error return code and raise an error if it's non-zero. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 04:48:47 2010 From: report at bugs.python.org (Philip Jenvey) Date: Sat, 10 Apr 2010 02:48:47 +0000 Subject: [issue7334] ElementTree: file locking in Jython 2.5 (OSError on Windows) In-Reply-To: <1258386968.95.0.507644857951.issue7334@psf.upfronthosting.co.za> Message-ID: <1270867727.52.0.0740264723846.issue7334@psf.upfronthosting.co.za> Philip Jenvey added the comment: Patch with tests (which can only really test it on Windows) here http://bitbucket.org/pjenvey/et-2009-provolone/changeset/8292a06090a3/ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 04:49:55 2010 From: report at bugs.python.org (Brian Curtin) Date: Sat, 10 Apr 2010 02:49:55 +0000 Subject: [issue7334] ElementTree: file locking in Jython 2.5 (OSError on Windows) In-Reply-To: <1258386968.95.0.507644857951.issue7334@psf.upfronthosting.co.za> Message-ID: <1270867795.2.0.521188353295.issue7334@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- nosy: +brian.curtin _______________________________________ Python tracker _______________________________________ From brian.curtin at gmail.com Fri Apr 9 23:42:32 2010 From: brian.curtin at gmail.com (Brian Curtin) Date: Fri, 9 Apr 2010 16:42:32 -0500 Subject: [issue8355] diff.py produce unified format by default In-Reply-To: <1270848488.68.0.66093595085.issue8355@psf.upfronthosting.co.za> References: <1270803265.38.0.592538535243.issue8355@psf.upfronthosting.co.za> <1270848488.68.0.66093595085.issue8355@psf.upfronthosting.co.za> Message-ID: On 2010-04-09, Eric Smith wrote: > > Eric Smith added the comment: > > I tried -p1 and it failed, but no matter. The contents were clear enough, > and exactly how I would have changed the code. > > $ patch -p1 < 8355.diff-py-unified-by-default.diff > patching file Tools/scripts/diff.py > Hunk #1 FAILED at 13. > Hunk #2 FAILED at 34. > 2 out of 2 hunks FAILED -- saving rejects to file Tools/scripts/diff.py.rej > > The new patch worked for me. > > I'm -0 on this change, for what it's worth. It's probably all irrelevant, > anyway. I can't imagine anyone actually generates their diffs with diff.py. > As a useful demonstration of how difflib works, it does its job as it > currently stands. > > ---------- > > _______________________________________ > Python tracker > > _______________________________________ > _______________________________________________ > Python-bugs-list mailing list > Unsubscribe: > http://mail.python.org/mailman/options/python-bugs-list/brian.curtin%40gmail.com > > From report at bugs.python.org Sat Apr 10 11:32:49 2010 From: report at bugs.python.org (Stefan Krah) Date: Sat, 10 Apr 2010 09:32:49 +0000 Subject: [issue3581] failures in test_uuid In-Reply-To: <1218991997.09.0.347137407735.issue3581@psf.upfronthosting.co.za> Message-ID: <1270891969.34.0.639545927544.issue3581@psf.upfronthosting.co.za> Stefan Krah added the comment: Sorry, the random node id generation in uuid.py is correct. The least significant bit of the first octet (which is set to 1) is the first one transmitted on the network, then the "low 47 random bits" follow. I assumed that the least significant bit of the first octet was part of the low 47 bits. Patch test_uuid3 addresses points 1-5 and is almost the same as test_uuid.patch, so I reset the resolution to 'accepted'. As I said, there isn't much left that check_node() can check. One could possibly check that a MAC address retrieved by ifconfig does not have the multicast bit set, but what if a user has set the hardware MAC to a strange value? Correctly retrieving that value can't be regarded as a failure of uuid.py. Should the patch go into the maintenance branches as well (after the beta is out)? ---------- keywords: +patch -needs review Added file: http://bugs.python.org/file16850/test_uuid3.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 11:32:59 2010 From: report at bugs.python.org (Stefan Krah) Date: Sat, 10 Apr 2010 09:32:59 +0000 Subject: [issue3581] failures in test_uuid In-Reply-To: <1218991997.09.0.347137407735.issue3581@psf.upfronthosting.co.za> Message-ID: <1270891979.54.0.5692076376.issue3581@psf.upfronthosting.co.za> Changes by Stefan Krah : ---------- resolution: -> accepted _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 11:38:00 2010 From: report at bugs.python.org (=?utf-8?b?2LnYqNiv2KfZhNmE2Ycg2LTZhNmKIChBYmRlbGxhaCBDaGVsbGkp?=) Date: Sat, 10 Apr 2010 09:38:00 +0000 Subject: [issue8359] % formating - TypeError: not all arguments converted during string formatting In-Reply-To: <1270892279.77.0.4172116449.issue8359@psf.upfronthosting.co.za> Message-ID: <1270892279.77.0.4172116449.issue8359@psf.upfronthosting.co.za> New submission from ??????? ??? (Abdellah Chelli) : c/printf accepts this: n=1; printf("One hour.", n); in other hand python/print rises an error: n=1 print "One hour." % n Exactly the % formatting operation. (TypeError: not all arguments converted during string formatting) This feature is very important when we come to I18n (translation using gettext). As most translator don't know this work around "%i hour." or "(%i) One hour.". This is not correct for many languages as I know like Arabic where they should write some thing like "One hour." or "An hour.". https://bugs.launchpad.net/python/+bug/341015 Could this fixed to have same behaviour as in c? More robust. ---------- components: Interpreter Core messages: 102764 nosy: sneetsher severity: normal status: open title: % formating - TypeError: not all arguments converted during string formatting type: behavior versions: Python 2.5, Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 12:41:46 2010 From: report at bugs.python.org (anatoly techtonik) Date: Sat, 10 Apr 2010 10:41:46 +0000 Subject: [issue8360] doc: unittest.skipTest method added in 2.7 Message-ID: <1270896106.71.0.804820199929.issue8360@psf.upfronthosting.co.za> Changes by anatoly techtonik : ---------- assignee: georg.brandl components: Documentation files: doc.python-version-for-skiptest.diff keywords: patch nosy: georg.brandl, techtonik severity: normal status: open title: doc: unittest.skipTest method added in 2.7 versions: Python 2.7 Added file: http://bugs.python.org/file16851/doc.python-version-for-skiptest.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 12:45:45 2010 From: report at bugs.python.org (Eric Smith) Date: Sat, 10 Apr 2010 10:45:45 +0000 Subject: [issue8359] % formating - TypeError: not all arguments converted during string formatting In-Reply-To: <1270892279.77.0.4172116449.issue8359@psf.upfronthosting.co.za> Message-ID: <1270896345.19.0.338183738597.issue8359@psf.upfronthosting.co.za> Eric Smith added the comment: Can you use str.format instead? It doesn't have this restriction. It's available in 2.6 and 3.0. ---------- nosy: +eric.smith versions: +Python 2.7, Python 3.2 -Python 2.5, Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 12:47:32 2010 From: report at bugs.python.org (Eric Smith) Date: Sat, 10 Apr 2010 10:47:32 +0000 Subject: [issue8359] % formating - TypeError: not all arguments converted during string formatting In-Reply-To: <1270892279.77.0.4172116449.issue8359@psf.upfronthosting.co.za> Message-ID: <1270896452.3.0.912864600726.issue8359@psf.upfronthosting.co.za> Eric Smith added the comment: Also, if you use the 'mapping' version of %-formatting you also don't have this restriction: >>> 'One hour' % {'n': 3} ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 13:15:43 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Apr 2010 11:15:43 +0000 Subject: [issue8360] doc: unittest.skipTest method added in 2.7 In-Reply-To: <1270898143.06.0.946134736197.issue8360@psf.upfronthosting.co.za> Message-ID: <1270898143.06.0.946134736197.issue8360@psf.upfronthosting.co.za> New submission from Georg Brandl : Thanks, fixed in r79923. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 13:17:08 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Apr 2010 11:17:08 +0000 Subject: [issue8346] Old Version Name in Interactive Mode In-Reply-To: <1270728555.35.0.913114676338.issue8346@psf.upfronthosting.co.za> Message-ID: <1270898228.66.0.702902801237.issue8346@psf.upfronthosting.co.za> Georg Brandl added the comment: Thanks, fixed in r79924. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 13:25:32 2010 From: report at bugs.python.org (Georg Brandl) Date: Sat, 10 Apr 2010 11:25:32 +0000 Subject: [issue8359] % formating - TypeError: not all arguments converted during string formatting In-Reply-To: <1270892279.77.0.4172116449.issue8359@psf.upfronthosting.co.za> Message-ID: <1270898732.48.0.298549299234.issue8359@psf.upfronthosting.co.za> Georg Brandl added the comment: I think we won't add new features to %-formatting, when it is considered old-style anyway. ---------- nosy: +georg.brandl resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 13:41:25 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Apr 2010 11:41:25 +0000 Subject: [issue8361] Remove assert in functools.total_ordering In-Reply-To: <1270899685.49.0.0758628614803.issue8361@psf.upfronthosting.co.za> Message-ID: <1270899685.49.0.0758628614803.issue8361@psf.upfronthosting.co.za> New submission from ?ric Araujo : Hello The correct behavior of functools.total_ordering depends on a check performed with an assert. Attached patch changes it to a test that always runs. Since it?s a kind of protocol error, I went for TypeError but you may disagree. Regards ---------- components: Library (Lib) files: remove-assert-in-total_ordering.diff keywords: patch messages: 102770 nosy: merwok, rhettinger severity: normal status: open title: Remove assert in functools.total_ordering type: behavior versions: Python 2.7, Python 3.2 Added file: http://bugs.python.org/file16852/remove-assert-in-total_ordering.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 13:55:58 2010 From: report at bugs.python.org (=?utf-8?b?2LnYqNiv2KfZhNmE2Ycg2LTZhNmKIChBYmRlbGxhaCBDaGVsbGkp?=) Date: Sat, 10 Apr 2010 11:55:58 +0000 Subject: [issue8359] % formating - TypeError: not all arguments converted during string formatting In-Reply-To: <1270892279.77.0.4172116449.issue8359@psf.upfronthosting.co.za> Message-ID: <1270900558.6.0.623886275404.issue8359@psf.upfronthosting.co.za> ??????? ??? (Abdellah Chelli) added the comment: 'One hour' % {'n': 3} / mapping will not work gettext replaces the string for each language. str.format works well. The problem we couldn't submit a bug to change the code for all packages using it. I think it's better to be fixed here. At lease this problem must be mentioned within the "% formatting" on Documentation. So developers will avoid using it on internationalized tools. I have already written this. So is str.format the new way for formatting? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 14:14:39 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Apr 2010 12:14:39 +0000 Subject: [issue8362] Add Misc/maintainers.rst to 2.x branch In-Reply-To: <1270901679.67.0.500277129776.issue8362@psf.upfronthosting.co.za> Message-ID: <1270901679.67.0.500277129776.issue8362@psf.upfronthosting.co.za> New submission from ?ric Araujo : Hello The maintainers listing is helpful for us outside bug reporters, but only present in the py3k branch. I copied it and reverted module name changes. Attached is the resulting file and the diff against py3k. Regards ---------- assignee: georg.brandl components: Documentation files: maintainers.rst messages: 102772 nosy: georg.brandl, merwok, r.david.murray severity: normal status: open title: Add Misc/maintainers.rst to 2.x branch versions: Python 2.7 Added file: http://bugs.python.org/file16853/maintainers.rst _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 14:15:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Apr 2010 12:15:05 +0000 Subject: [issue8362] Add Misc/maintainers.rst to 2.x branch In-Reply-To: <1270901679.67.0.500277129776.issue8362@psf.upfronthosting.co.za> Message-ID: <1270901705.75.0.683883045834.issue8362@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- keywords: +patch Added file: http://bugs.python.org/file16854/maintainers.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 14:19:02 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Apr 2010 12:19:02 +0000 Subject: [issue5341] A selection of spelling errors and typos throughout source In-Reply-To: <1235244250.3.0.963079671793.issue5341@psf.upfronthosting.co.za> Message-ID: <1270901942.61.0.559101867813.issue5341@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hello spelling and doc people (I hope it?s okay to use this bug as umbrella instead of opening a myriad bugs for typos.) Attached patch fixes small things in functools module and docs: - Typos: ?simplies? does not exist, ?fills-in? needs no hyphen since it?s a verb; - Unnecessary repetition of filename in docstring (doc tools are good enough to introspect it, see e.g. ?pydoc functools?); - Whitespace in keyword arguments; - Use triple-quoted docstrings for consistency?s sake. Regards ---------- Added file: http://bugs.python.org/file16855/functools-typos-pep8.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 14:31:24 2010 From: report at bugs.python.org (Eric Smith) Date: Sat, 10 Apr 2010 12:31:24 +0000 Subject: [issue8359] % formating - TypeError: not all arguments converted during string formatting In-Reply-To: <1270892279.77.0.4172116449.issue8359@psf.upfronthosting.co.za> Message-ID: <1270902684.54.0.0845837811433.issue8359@psf.upfronthosting.co.za> Eric Smith added the comment: I don't understand how this: n=1 print "One hour." % n is different from this: map={'n': 3} print "One hour." % map In any event, if str.format works for you, use that. It's the new style. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 14:48:34 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Apr 2010 12:48:34 +0000 Subject: [issue3581] failures in test_uuid In-Reply-To: <1218991997.09.0.347137407735.issue3581@psf.upfronthosting.co.za> Message-ID: <1270903714.14.0.213796372951.issue3581@psf.upfronthosting.co.za> Antoine Pitrou added the comment: > Should the patch go into the maintenance branches as well (after the > beta is out)? Yes, I think it would be nice (though not mandatory). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 15:04:36 2010 From: report at bugs.python.org (Meador Inge) Date: Sat, 10 Apr 2010 13:04:36 +0000 Subject: [issue7355] Struct incorrectly compiles format strings In-Reply-To: <1258623721.25.0.299543316527.issue7355@psf.upfronthosting.co.za> Message-ID: <1270904676.32.0.259096373053.issue7355@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +minge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 15:13:14 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Sat, 10 Apr 2010 13:13:14 +0000 Subject: [issue8363] Lots of duplicate code between test_classify_oldstyle and test_classify_newstyle in test_inspect.py In-Reply-To: <1270905194.18.0.8131280541.issue8363@psf.upfronthosting.co.za> Message-ID: <1270905194.18.0.8131280541.issue8363@psf.upfronthosting.co.za> New submission from Jean-Paul Calderone : There are two tests for the way inspect.classify_class_attrs handles various sorts of attributes. The tests are identical, except one uses a classic class and one a new-style class. The tests sources have actually begun to diverge, but so far only in whitespace. This code will be easier to maintain (not to mention shorter) if there is just one copy of the actual test parts. ---------- assignee: exarkun components: Library (Lib), Tests keywords: needs review, patch messages: 102776 nosy: exarkun severity: normal status: open title: Lots of duplicate code between test_classify_oldstyle and test_classify_newstyle in test_inspect.py versions: Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 15:14:19 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Sat, 10 Apr 2010 13:14:19 +0000 Subject: [issue8363] Lots of duplicate code between test_classify_oldstyle and test_classify_newstyle in test_inspect.py In-Reply-To: <1270905194.18.0.8131280541.issue8363@psf.upfronthosting.co.za> Message-ID: <1270905259.36.0.488667020569.issue8363@psf.upfronthosting.co.za> Changes by Jean-Paul Calderone : Added file: http://bugs.python.org/file16856/test_inspect.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 15:15:42 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Apr 2010 13:15:42 +0000 Subject: [issue8364] Update site.setquit docstring In-Reply-To: <1270905342.7.0.63449376457.issue8364@psf.upfronthosting.co.za> Message-ID: <1270905342.7.0.63449376457.issue8364@psf.upfronthosting.co.za> New submission from ?ric Araujo : Hello The docstring for site.setquit was not updated when r42948 changed quit and exit from strings to callables. Attached patch fixes it. By the way, is ?Library? the right component for docstring-related bugs or is it ?Documentation?? Regards ---------- components: Library (Lib) messages: 102777 nosy: merwok severity: normal status: open title: Update site.setquit docstring versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 15:26:37 2010 From: report at bugs.python.org (=?utf-8?b?2LnYqNiv2KfZhNmE2Ycg2LTZhNmKIChBYmRlbGxhaCBDaGVsbGkp?=) Date: Sat, 10 Apr 2010 13:26:37 +0000 Subject: [issue8359] % formating - TypeError: not all arguments converted during string formatting In-Reply-To: <1270892279.77.0.4172116449.issue8359@psf.upfronthosting.co.za> Message-ID: <1270905997.55.0.741406429122.issue8359@psf.upfronthosting.co.za> ??????? ??? (Abdellah Chelli) added the comment: The full example: === import gettext gettext.bindtextdomain("pygettext_test","./locale") gettext.textdomain("pygettext_test") _=gettext.gettext n_=gettext.ngettext n1=1 n2=3 print n_("there is %i command","there are %i commands",n1) % n1 print n_("there is %i command","there are %i commands",n2) % n2 === the result of n_("there is %i command","there are %i commands",n2) will be: "there is %i command" or "there are %i commands" or different string from translation file in case of other language then English as in Arabic we have 6 forms, 3 of them don't include %i. "?? ???? ?? ???" "???? ??? ????" "???? ?????" "???? %i ?????" "???? %i ????" "???? %i ???" (You may not see the Arabic well aligned because it's a RTL language). So format string is open to fit all languages. That's why mapping good only for predefined strings. Then these will be our solution: === print n_("there is {0} command","there are {0} commands",n1).format(n1) print n_("there is {0} command","there are {0} commands",n2).format(n2) === ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 16:03:49 2010 From: report at bugs.python.org (R. David Murray) Date: Sat, 10 Apr 2010 14:03:49 +0000 Subject: [issue8362] Add Misc/maintainers.rst to 2.x branch In-Reply-To: <1270901679.67.0.500277129776.issue8362@psf.upfronthosting.co.za> Message-ID: <1270908229.08.0.464803704149.issue8362@psf.upfronthosting.co.za> R. David Murray added the comment: I didn't put maintainers.rst into 2.6 because I didn't want to commit to maintaining the two divergent copies. If you want to commit to maintaining it in the 2.x branch (copying changes backwards from the 3.x branch), then I'd be +0 (or maybe even +0.5) on adding it there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 16:13:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Apr 2010 14:13:06 +0000 Subject: [issue8362] Add Misc/maintainers.rst to 2.x branch In-Reply-To: <1270908229.08.0.464803704149.issue8362@psf.upfronthosting.co.za> Message-ID: <4BC0876E.4010204@netwok.org> ?ric Araujo added the comment: Module names have to be converted only once, so now maintenance is just keeping names updated. I?m willing to commit to maintaining the maintainers file <0.2 meta wink> with one caveat: Core developers can commit and merge immediately, keeping branches in sync, whereas I don?t update my copies of trunk and py3k every day. If some lag up to one week is acceptable, then I?d be happy to maintain the file. Regards ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 16:32:18 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 10 Apr 2010 14:32:18 +0000 Subject: [issue8362] Add Misc/maintainers.rst to 2.x branch In-Reply-To: <1270901679.67.0.500277129776.issue8362@psf.upfronthosting.co.za> Message-ID: <1270909938.65.0.598791044418.issue8362@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti type: -> feature request _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 16:46:08 2010 From: report at bugs.python.org (Oliver Martin) Date: Sat, 10 Apr 2010 14:46:08 +0000 Subject: [issue1079] decode_header does not follow RFC 2047 In-Reply-To: <1188637019.25.0.0476259625696.issue1079@psf.upfronthosting.co.za> Message-ID: <1270910768.58.0.922209662022.issue1079@psf.upfronthosting.co.za> Oliver Martin added the comment: I got bitten by this too. In addition to not decoding encoded words without whitespace after them, it throws an exception if there is a valid encoded word later in the string and the first encoded word is followed by something that isn't a hex number: >>> decode_header('aaa=?iso-8859-1?q?bbb?=xxx asdf =?iso-8859-1?q?jkl?=') Traceback (most recent call last): File "", line 1, in File "/usr/lib/python2.5/email/header.py", line 93, in decode_header dec = email.quoprimime.header_decode(encoded) File "/usr/lib/python2.5/email/quoprimime.py", line 336, in header_decode return re.sub(r'=\w{2}', _unquote_match, s) File "/usr/lib/python2.5/re.py", line 150, in sub return _compile(pattern, 0).sub(repl, string, count) File "/usr/lib/python2.5/email/quoprimime.py", line 324, in _unquote_match return unquote(s) File "/usr/lib/python2.5/email/quoprimime.py", line 106, in unquote return chr(int(s[1:3], 16)) ValueError: invalid literal for int() with base 16: 'xx' I think it should join the encoded words with the surrounding text if there's no whitespace in between. That seems to be consistent with what the non-RFC-compliant MUAs out there mean when they send such things. Reverting the change from Issue 1582282 doesn't seem to be a good idea, since it was introduced in response to problems with mailman (see https://bugs.launchpad.net/mailman/+bug/266370). Instead of leaving "Sm=?ISO-8859-1?B?9g==?=rg=?ISO-8859-1?B?5Q==?=sbord" as it is, my patch converts it to [('Sm\xf6rg\xe5sbord', 'iso-8859-1')]. This shouldn't reintroduce the problem mailman was having while fixing ours. ---------- nosy: +leromarinvit Added file: http://bugs.python.org/file16857/rfc2047_embed.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 16:51:57 2010 From: report at bugs.python.org (Roumen Petrov) Date: Sat, 10 Apr 2010 14:51:57 +0000 Subject: [issue8322] test_ssl failures with OpenSSL 1.0.0 In-Reply-To: <1270852621.17.0.261570113194.issue8322@psf.upfronthosting.co.za> Message-ID: <4BC09088.1070704@roumenpetrov.info> Roumen Petrov added the comment: Antoine Pitrou wrote: > > Antoine Pitrou added the comment: > > After some investigation, the error does occur because of the aforementioned changelog entry (SSLv2 weak ciphers are now disabled by default). To check it I just added the following line to newPySSLObject(): > > SSL_CTX_set_cipher_list(self->ctx, "ALL"); > > Of course this isn't desirable: we shouldn't blindly enable weak ciphers. Instead we could simply add an argument to configure allowed ciphers, and use "ALL" in our tests. Or we could add a separate method to configure ciphers. > > (this begs the question of whether this is suitable post-beta1) > > What do you think? List of ciphers is application dependent and configure script can't limit users(applications) . Roumen ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 16:53:56 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Apr 2010 14:53:56 +0000 Subject: [issue8322] test_ssl failures with OpenSSL 1.0.0 In-Reply-To: <4BC09088.1070704@roumenpetrov.info> Message-ID: <1270911356.3433.0.camel@localhost> Antoine Pitrou added the comment: > List of ciphers is application dependent and configure script can't > limit users(applications) . I was obviously talking about a runtime argument to ssl.wrap_socket(). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 18:07:42 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 10 Apr 2010 16:07:42 +0000 Subject: [issue8363] Lots of duplicate code between test_classify_oldstyle and test_classify_newstyle in test_inspect.py In-Reply-To: <1270905194.18.0.8131280541.issue8363@psf.upfronthosting.co.za> Message-ID: <1270915662.35.0.712994368162.issue8363@psf.upfronthosting.co.za> Benjamin Peterson added the comment: I think the patch is ok except for that docstrings should start on the same line as the triple quote. ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 18:12:55 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Sat, 10 Apr 2010 16:12:55 +0000 Subject: [issue8363] Lots of duplicate code between test_classify_oldstyle and test_classify_newstyle in test_inspect.py In-Reply-To: <1270905194.18.0.8131280541.issue8363@psf.upfronthosting.co.za> Message-ID: <1270915975.79.0.152890979952.issue8363@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Okay. I shouldn't commit until after trunk is unfrozen though, right? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 18:18:31 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 10 Apr 2010 16:18:31 +0000 Subject: [issue8363] Lots of duplicate code between test_classify_oldstyle and test_classify_newstyle in test_inspect.py In-Reply-To: <1270915975.79.0.152890979952.issue8363@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: 2010/4/10 Jean-Paul Calderone : > > Jean-Paul Calderone added the comment: > > Okay. > > I shouldn't commit until after trunk is unfrozen though, right? Correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 18:29:06 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 10 Apr 2010 16:29:06 +0000 Subject: [issue8361] Remove assert in functools.total_ordering In-Reply-To: <1270899685.49.0.0758628614803.issue8361@psf.upfronthosting.co.za> Message-ID: <1270916946.13.0.685261185568.issue8361@psf.upfronthosting.co.za> Changes by Raymond Hettinger : ---------- assignee: -> rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 18:44:40 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 10 Apr 2010 16:44:40 +0000 Subject: [issue8361] Remove assert in functools.total_ordering In-Reply-To: <1270899685.49.0.0758628614803.issue8361@psf.upfronthosting.co.za> Message-ID: <1270917880.56.0.192154563816.issue8361@psf.upfronthosting.co.za> Raymond Hettinger added the comment: The max(roots) line that follows will raise its own ValueError when given an empty input. Will mull over your patch. I may just delete the assert line, leave it as-is, or apply something like your patch (but with a ValueError). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 18:57:08 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Apr 2010 16:57:08 +0000 Subject: [issue8361] Remove assert in functools.total_ordering In-Reply-To: <1270917880.56.0.192154563816.issue8361@psf.upfronthosting.co.za> Message-ID: <4BC0ADE0.8020501@netwok.org> ?ric Araujo added the comment: Ok. It won?t have a user-friendly error message, though. You may be interested in a minor doc patch in #5341. Regards ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 19:01:05 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sat, 10 Apr 2010 17:01:05 +0000 Subject: [issue8361] Remove assert in functools.total_ordering In-Reply-To: <1270899685.49.0.0758628614803.issue8361@psf.upfronthosting.co.za> Message-ID: <1270918865.75.0.961681479388.issue8361@psf.upfronthosting.co.za> Raymond Hettinger added the comment: r79930 and r79931 ---------- resolution: -> fixed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 20:54:40 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sat, 10 Apr 2010 18:54:40 +0000 Subject: [issue8361] Remove assert in functools.total_ordering In-Reply-To: <1270899685.49.0.0758628614803.issue8361@psf.upfronthosting.co.za> Message-ID: <1270925680.55.0.891611798952.issue8361@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 21:05:28 2010 From: report at bugs.python.org (Meador Inge) Date: Sat, 10 Apr 2010 19:05:28 +0000 Subject: [issue7355] Struct incorrectly compiles format strings In-Reply-To: <1258623721.25.0.299543316527.issue7355@psf.upfronthosting.co.za> Message-ID: <1270926328.07.0.630994176901.issue7355@psf.upfronthosting.co.za> Meador Inge added the comment: > I'm half-convinced that struct.pack *should* ideally add trailing > padding in the same situation that C does, for consistency with C. > Then calcsize would match C's sizeof. Maybe... AFAIK, the C language does not mandate structure padding. Section 6.7.2.1 of the C99 standard says that "unnamed padding" may be inserted anywhere inside of a structure object *except* at the beginning. In other words, padding between members and trailing padding is very implementation specific. When and why things are padded usually depends on the compiler, OS, and computer architecture. For example, padding between members is usually just an optimization for architectures like x86, but on architectures like ARM and MIPS you may end up with alignment faults. Moreover, I think trailing padding is typically added to maintain alignment for arrays of structures, which again may be an optimization or correctness issue depending on the architecture. So, I don't think we can match what C does since C leaves it open. Perhaps we could match the C implementation that compiles the 'struct' module, though? Maybe there is a way we can compute the trailing padding in a fashion similar to how alignment is computed for various types in the '*_ALIGN' macros in '_struct.c'? Another thing that came to mind when thinking about structure layout issues was whether it might be useful to provide "packed" structures, e.g. no padding. If the goal is to provide a way to read\write C-compatible structs, then currently there is no easy way to handle structures that have been serialized after being compiled with something like GCC's '-fpack-struct' option. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 21:28:20 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 10 Apr 2010 19:28:20 +0000 Subject: [issue3928] os.mknod missing on Solaris In-Reply-To: <1222076334.46.0.231050042066.issue3928@psf.upfronthosting.co.za> Message-ID: <1270927700.31.0.475865209421.issue3928@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 21:29:55 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sat, 10 Apr 2010 19:29:55 +0000 Subject: [issue7723] sqlite only accept buffer() for BLOB objects (input/output) In-Reply-To: <1263735953.04.0.426363629034.issue7723@psf.upfronthosting.co.za> Message-ID: <1270927795.09.0.843283211784.issue7723@psf.upfronthosting.co.za> Changes by Benjamin Peterson : ---------- priority: deferred blocker -> release blocker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 22:03:52 2010 From: report at bugs.python.org (Jean-Paul Calderone) Date: Sat, 10 Apr 2010 20:03:52 +0000 Subject: [issue8363] Lots of duplicate code between test_classify_oldstyle and test_classify_newstyle in test_inspect.py In-Reply-To: <1270905194.18.0.8131280541.issue8363@psf.upfronthosting.co.za> Message-ID: <1270929832.48.0.683690347617.issue8363@psf.upfronthosting.co.za> Jean-Paul Calderone added the comment: Committed in r79935 ---------- resolution: -> fixed stage: -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 22:26:43 2010 From: report at bugs.python.org (Mark Dickinson) Date: Sat, 10 Apr 2010 20:26:43 +0000 Subject: [issue7355] Struct incorrectly compiles format strings In-Reply-To: <1258623721.25.0.299543316527.issue7355@psf.upfronthosting.co.za> Message-ID: <1270931203.74.0.614232146661.issue7355@psf.upfronthosting.co.za> Mark Dickinson added the comment: > When and why things are padded usually depends on the compiler, OS, > and computer architecture. [...] Sure. The struct module has a rather simplistic set of rules for adding padding, but I believe that it manages to match the platform's C rules (assuming no relevant extra compile flags) in most cases. If we wanted something that's *guaranteed* to match C then I agree that's probably not easy within the struct module itself; it probably belongs in ctypes somewhere instead. For trailing padding, one fairly obvious and simple rule to use (to match the simplicity of the current rules for padding) would be to add enough padding so that the alignment of the struct matches the largest alignment of any member of the struct. So e.g. on a platform where doubles are aligned to 8 bytes and ints to 4 bytes, 'db' would have 7 bytes of trailing padding, while 'iib' would have 3 bytes. 'b' would have no trailing padding at all. I *think* (but would have to check) that this again matches what happens on common platforms. > Another thing that came to mind when thinking about structure layout > issues was whether it might be useful to provide "packed" structures These already exist, provided that you're willing to accept 'standard' rather than 'native' sizes. The struct modes for '<', '>', '=' and '!' never introduce padding (unless it's explicitly asked for with 'x'). --- On the subject of documentation, I think there are two points that need to be made more clearly in the current docs: (1) *By default* (i.e. without a '<', '>', ...), padding *is* used; but is automatically turned off with '<', '>', '=', '!'. Ideally this should be mentioned very early on, since it seems to trip up a lot of people. (2) Padding is only added between successive struct members; there's no trailing padding. But padding can be forced using Eric's trick (though you end up having to choose exactly what alignment you want, e.g. by specifying '0i' rather than '0q' or '0d'). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 23:21:10 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sat, 10 Apr 2010 21:21:10 +0000 Subject: [issue8364] Update site.setquit docstring In-Reply-To: <1270905342.7.0.63449376457.issue8364@psf.upfronthosting.co.za> Message-ID: <1270934470.61.0.869466417502.issue8364@psf.upfronthosting.co.za> Shashwat Anand added the comment: merwok I think you forgot to attach patch ---------- nosy: +l0nwlf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 23:23:39 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Apr 2010 21:23:39 +0000 Subject: [issue8364] Update site.setquit docstring In-Reply-To: <1270905342.7.0.63449376457.issue8364@psf.upfronthosting.co.za> Message-ID: <1270934619.6.0.76606643129.issue8364@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hey, I do that all the time with email attachments! (They made a Thunderbird? extension for that.) Thanks ;) ---------- keywords: +patch Added file: http://bugs.python.org/file16858/quit-doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sat Apr 10 23:35:29 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sat, 10 Apr 2010 21:35:29 +0000 Subject: [issue8364] Update site.setquit docstring In-Reply-To: <1270905342.7.0.63449376457.issue8364@psf.upfronthosting.co.za> Message-ID: <1270935329.94.0.706349349927.issue8364@psf.upfronthosting.co.za> Shashwat Anand added the comment: looks fine to me. However I heard trunk will be/is frozen. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 00:01:40 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sat, 10 Apr 2010 22:01:40 +0000 Subject: [issue8340] bytearray undocumented on trunk In-Reply-To: <1270682579.64.0.491172746908.issue8340@psf.upfronthosting.co.za> Message-ID: <1270936900.12.0.73559169816.issue8340@psf.upfronthosting.co.za> Shashwat Anand added the comment: On a related note, the documentation of 'bytes' is not backported too. ---------- nosy: +l0nwlf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 00:03:52 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Apr 2010 22:03:52 +0000 Subject: [issue5380] pty.read raises IOError when slave pty device is closed In-Reply-To: <1235721814.23.0.522352333065.issue5380@psf.upfronthosting.co.za> Message-ID: <1270937032.47.0.858467085674.issue5380@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It turns out isatty() returns True for fds created by openpty(), which helps quite a bit: we can silence EIO for ttys while keeping it for non-ttys, where a low-level I/O (hardware) error should be raised properly. Here is a patch for trunk. ---------- keywords: +patch stage: needs patch -> patch review versions: +Python 2.7, Python 3.2 Added file: http://bugs.python.org/file16859/io-openpty.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 00:08:24 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sat, 10 Apr 2010 22:08:24 +0000 Subject: [issue8340] bytearray undocumented on trunk In-Reply-To: <1270682579.64.0.491172746908.issue8340@psf.upfronthosting.co.za> Message-ID: <1270937304.12.0.717672732214.issue8340@psf.upfronthosting.co.za> Shashwat Anand added the comment: Attached a patch to backport the 'bytearray' and 'bytes' documentation in trunk. ---------- keywords: +patch Added file: http://bugs.python.org/file16860/functions.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 00:10:25 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 10 Apr 2010 22:10:25 +0000 Subject: [issue2876] Write UserDict fixer for 2to3 In-Reply-To: <1210913348.4.0.543107843307.issue2876@psf.upfronthosting.co.za> Message-ID: <1270937425.03.0.0718068022846.issue2876@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- components: +2to3 (2.x to 3.0 conversion tool) -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 00:10:34 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sat, 10 Apr 2010 22:10:34 +0000 Subject: [issue8340] bytearray undocumented on trunk In-Reply-To: <1270682579.64.0.491172746908.issue8340@psf.upfronthosting.co.za> Message-ID: <1270937434.36.0.140102808152.issue8340@psf.upfronthosting.co.za> ?ric Araujo added the comment: > * If it is a *string*, you must also give the *encoding* (and optionally, > *errors*) parameters; :func:`bytearray` then converts the string to > bytes using :meth:`str.encode`. I think this needs some lines to tell how it behaves with str and unicode. Regards ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 00:12:14 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 10 Apr 2010 22:12:14 +0000 Subject: [issue4662] posix module lacks several DeprecationWarning's In-Reply-To: <1229276083.72.0.194776097767.issue4662@psf.upfronthosting.co.za> Message-ID: <1270937534.39.0.254848314067.issue4662@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- components: +2to3 (2.x to 3.0 conversion tool) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 00:16:06 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sat, 10 Apr 2010 22:16:06 +0000 Subject: [issue6409] 2to3 -j 4 generates malformed diffs In-Reply-To: <1246636426.08.0.872531312657.issue6409@psf.upfronthosting.co.za> Message-ID: <1270937766.79.0.409198013623.issue6409@psf.upfronthosting.co.za> Changes by Martin v. L?wis : ---------- components: +2to3 (2.x to 3.0 conversion tool) -Library (Lib) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 00:17:39 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Apr 2010 22:17:39 +0000 Subject: [issue5380] pty.read raises IOError when slave pty device is closed In-Reply-To: <1235721814.23.0.522352333065.issue5380@psf.upfronthosting.co.za> Message-ID: <1270937859.73.0.322898031592.issue5380@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file16859/io-openpty.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 00:17:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sat, 10 Apr 2010 22:17:47 +0000 Subject: [issue5380] pty.read raises IOError when slave pty device is closed In-Reply-To: <1235721814.23.0.522352333065.issue5380@psf.upfronthosting.co.za> Message-ID: <1270937867.47.0.633187745743.issue5380@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Added file: http://bugs.python.org/file16861/io-openpty.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 00:46:41 2010 From: report at bugs.python.org (=?utf-8?q?Gerhard_H=C3=A4ring?=) Date: Sat, 10 Apr 2010 22:46:41 +0000 Subject: [issue7723] sqlite only accept buffer() for BLOB objects (input/output) In-Reply-To: <1263735953.04.0.426363629034.issue7723@psf.upfronthosting.co.za> Message-ID: <1270939601.06.0.773750179903.issue7723@psf.upfronthosting.co.za> Gerhard H?ring added the comment: I see that the status of this issue keeps changing. Now does anything in the sqlite3 module or the docs need to be changed? Or what's left to close this? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 00:48:19 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Sat, 10 Apr 2010 22:48:19 +0000 Subject: [issue7559] TestLoader.loadTestsFromName swallows import errors In-Reply-To: <1261429637.28.0.131724711132.issue7559@psf.upfronthosting.co.za> Message-ID: <1270939699.19.0.615943659375.issue7559@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Patch update: added unit test to cover replacing __import__, incorporated R. David Murray's suggestion to use test_support.test_cwd(), and overall code clean-up. Also uploaded as Patch 3 to-- http://codereview.appspot.com/810044/show ---------- Added file: http://bugs.python.org/file16862/_patch-7559-6.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 02:03:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 00:03:10 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1266353325.38.0.278549753357.issue7946@psf.upfronthosting.co.za> Message-ID: <1270944190.98.0.0289788373674.issue7946@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 02:44:04 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 00:44:04 +0000 Subject: [issue5380] pty.read raises IOError when slave pty device is closed In-Reply-To: <1270937032.47.0.858467085674.issue5380@psf.upfronthosting.co.za> Message-ID: <1270946764.3433.27.camel@localhost> Antoine Pitrou added the comment: After triggering the buildbots, it seems that reading from the master fd after the slave fd has been closed is rather OS-dependent. The FreeBSDs return an empty string. I wonder whether this use case (reading from the master after the slave is closed) should really be supported. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 02:55:23 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 00:55:23 +0000 Subject: [issue5380] pty.read raises IOError when slave pty device is closed In-Reply-To: <1235721814.23.0.522352333065.issue5380@psf.upfronthosting.co.za> Message-ID: <1270947323.29.0.699191945211.issue5380@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Regardless of the decision, a new patch. ---------- Added file: http://bugs.python.org/file16863/io-openpty.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 02:55:42 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 00:55:42 +0000 Subject: [issue5380] pty.read raises IOError when slave pty device is closed In-Reply-To: <1235721814.23.0.522352333065.issue5380@psf.upfronthosting.co.za> Message-ID: <1270947342.9.0.275593919639.issue5380@psf.upfronthosting.co.za> Changes by Antoine Pitrou : Removed file: http://bugs.python.org/file16861/io-openpty.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 03:15:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 01:15:01 +0000 Subject: [issue5380] pty.read raises IOError when slave pty device is closed In-Reply-To: <1235721814.23.0.522352333065.issue5380@psf.upfronthosting.co.za> Message-ID: <1270948501.43.0.728019274538.issue5380@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Worse, the test timed out (probably froze) on the Solaris buildbot: http://www.python.org/dev/buildbot/trunk/builders/sparc%20solaris10%20gcc%20trunk/builds/649/steps/test/logs/stdio ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 03:41:20 2010 From: report at bugs.python.org (Meador Inge) Date: Sun, 11 Apr 2010 01:41:20 +0000 Subject: [issue7355] Struct incorrectly compiles format strings In-Reply-To: <1258623721.25.0.299543316527.issue7355@psf.upfronthosting.co.za> Message-ID: <1270950080.47.0.774885884166.issue7355@psf.upfronthosting.co.za> Meador Inge added the comment: > would be to add enough padding so that the alignment of the struct > matches the largest alignment of any member of the struct. That might work. I will have to think about it a bit. > On the subject of documentation Attached a doc patch which addresses Mark's two points plus the following: (1) Organized things more clearly into sub-sections. (2) Fixed up the "notes" column from the '__index__' change that was submitted last week. (3) Added some examples. ---------- keywords: +patch Added file: http://bugs.python.org/file16864/issue-7355.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 03:54:42 2010 From: report at bugs.python.org (Ezio Melotti) Date: Sun, 11 Apr 2010 01:54:42 +0000 Subject: [issue7621] Test issue In-Reply-To: <1262450907.6.0.524108589463.issue7621@psf.upfronthosting.co.za> Message-ID: <1270950882.15.0.947084337047.issue7621@psf.upfronthosting.co.za> Ezio Melotti added the comment: Some more testing: [http://psf.upfronthosting.co.za/roundup/meta/issue254] (http://psf.upfronthosting.co.za/roundup/meta/issue254) {http://psf.upfronthosting.co.za/roundup/meta/issue254} http://psf.upfronthosting.co.za/roundup/meta/issue254. http://psf.upfronthosting.co.za/roundup/meta/issue254, http://psf.upfronthosting.co.za/roundup/meta/issue254; ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 04:21:19 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sun, 11 Apr 2010 02:21:19 +0000 Subject: [issue8365] 'readline' module fails to build on OS X - some recent change broke it In-Reply-To: <1270952479.32.0.785527713521.issue8365@psf.upfronthosting.co.za> Message-ID: <1270952479.32.0.785527713521.issue8365@psf.upfronthosting.co.za> New submission from Shashwat Anand : 'readline' module fails to build on OS X in case of trunk and python 3.x. It have no issues with python 2.5 and 2.6 and python 2.7 alpha. Here is the trace after running ./configure; make in trunk Python build finished, but the necessary bits to build these modules were not found: bsddb185 dl gdbm imageop linuxaudiodev ossaudiodev readline spwd sunaudiodev With that the uparrow-downarrow and other features fails which I suppose depends on 'readline' 07:31:51 l0nwlf-MBP:python-svn $ ./python.exe Python 2.7b1+ (trunk:79945M, Apr 11 2010, 07:14:54) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> t = 'test' >>> ^[[A^[[A^[[B^[[B 07:32:53 l0nwlf-MBP:CoreHD $ python3.2 Python 3.2a0 (py3k:79532, Apr 1 2010, 01:48:52) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import readline Traceback (most recent call last): File "", line 1, in ImportError: No module named readline >>> t = 'test' >>> ^[[A^[[A (pressing up-arrow for repeating the previous command fails) However, an interesting observation is, 07:34:00 l0nwlf-MBP:CoreHD $ python2.7 Python 2.7a4+ (trunk:78750, Mar 7 2010, 08:09:00) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import readline >>> t = 'test' >>> t = 'test' No such issue here, 'uparrow' is working, thereby completing the previous command on interpretor. The version is python2.7 alpha as you can see. So I assume some recent changes broke something, it was fine earlier. ---------- components: Build messages: 102807 nosy: l0nwlf, ronaldoussoren severity: normal status: open title: 'readline' module fails to build on OS X - some recent change broke it versions: Python 2.7, Python 3.1, Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 04:57:38 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sun, 11 Apr 2010 02:57:38 +0000 Subject: [issue8365] 'readline' module fails to build on OS X - some recent change broke it In-Reply-To: <1270952479.32.0.785527713521.issue8365@psf.upfronthosting.co.za> Message-ID: <1270954658.56.0.775176896195.issue8365@psf.upfronthosting.co.za> Shashwat Anand added the comment: After I recompiled my older revision the 'readline' module failed to build. So I guess this is not python-related issue, rather something to do with my system. 08:17:47 l0nwlf-MBP:python-svn(rev79372) $ ./python.exe -V Python 2.7a4+ 08:17:53 l0nwlf-MBP:python-svn(rev79372) $ ./python.exe Python 2.7a4+ (trunk:79372, Apr 11 2010, 08:15:12) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> import readline Traceback (most recent call last): File "", line 1, in ImportError: No module named readline I will try looking for the cause behind it. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 06:29:20 2010 From: report at bugs.python.org (Gombiuda Jiang) Date: Sun, 11 Apr 2010 04:29:20 +0000 Subject: [issue8241] py2_test_grammar.py contains invalid syntax for 2.6 In-Reply-To: <1269650940.6.0.32953947115.issue8241@psf.upfronthosting.co.za> Message-ID: <1270960160.43.0.221320718323.issue8241@psf.upfronthosting.co.za> Gombiuda Jiang added the comment: I have upload a patch for this problem by just removing the lines as Gabriel said. Please check it out. Thanks. ---------- keywords: +patch nosy: +gombiuda Added file: http://bugs.python.org/file16865/py2_test_grammar.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 08:46:40 2010 From: report at bugs.python.org (Ned Deily) Date: Sun, 11 Apr 2010 06:46:40 +0000 Subject: [issue8366] OS X universal builds fail on 2.7b1 and py3k with "Don't know machine value for archs" In-Reply-To: <1270968400.64.0.539813943684.issue8366@psf.upfronthosting.co.za> Message-ID: <1270968400.64.0.539813943684.issue8366@psf.upfronthosting.co.za> New submission from Ned Deily : Prior to r79392 (trunk) and r79401 (py3k), the changes introduced for Issue8211, the gcc lines produced for an OS X universal build, say ./configure --enable-universalsdk --with-universal-archs=32-bit ; make might look like this: gcc-4.0 -c -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-common -dynamic -DNDEBUG -g -O3 -I/tmp/_py/libraries/usr/local/include -I. -IInclude -I/private/tmp/_t/Include -isysroot /Developer/SDKs/MacOSX10.4u.sdk -DPy_BUILD_CORE -o Modules/python.o /private/tmp/_t/Modules/python.c With the changes introduced by r79392 and r79401 to save and restore the original value of CFLAGS across the AC_PROG_CC macro call (see trunk configure.in at about line 496), the same gcc call now looks like this: gcc-4.0 -c -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -fno-common -dynamic -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.4u.sdk -DNDEBUG -g -O3 -I/tmp/_py/libraries/usr/local/include -I. -IInclude -I/private/tmp/_t/Include -isysroot /Developer/SDKs/MacOSX10.4u.sdk -DPy_BUILD_CORE -o Modules/python.o /private/tmp/_t/Modules/python.c Note that there are now two sets of -arch and -sysroot flags because the CFLAGS ones were being lost before but are now preserved. While the duplicate flags do not seem to bother gcc and friends, the code in sysconfig.py to determine the machine name for OS X is not prepared to handle them and the build fails when the interpreter starts up: Traceback (most recent call last): File "/private/tmp/_t/Lib/site.py", line 542, in main() File "/private/tmp/_t/Lib/site.py", line 521, in main addbuilddir() File "/private/tmp/_t/Lib/site.py", line 118, in addbuilddir s = "build/lib.%s-%.3s" % (get_platform(), sys.version) File "/private/tmp/_t/Lib/sysconfig.py", line 646, in get_platform "Don't know machine value for archs=%r"%(archs,)) ValueError: Don't know machine value for archs=('i386', 'i386', 'ppc', 'ppc') make: *** [sharedmods] Error 1 ---------- assignee: ronaldoussoren components: Macintosh messages: 102810 nosy: ned.deily, ronaldoussoren severity: normal status: open title: OS X universal builds fail on 2.7b1 and py3k with "Don't know machine value for archs" versions: Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 08:48:28 2010 From: report at bugs.python.org (Ned Deily) Date: Sun, 11 Apr 2010 06:48:28 +0000 Subject: [issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS In-Reply-To: <1269346447.99.0.323336928566.issue8211@psf.upfronthosting.co.za> Message-ID: <1270968508.28.0.603917249959.issue8211@psf.upfronthosting.co.za> Ned Deily added the comment: Note these changes to restore CFLAGS have the side effect of breaking OS X universal builds; see Issue8366. ---------- nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 09:09:37 2010 From: report at bugs.python.org (Ned Deily) Date: Sun, 11 Apr 2010 07:09:37 +0000 Subject: [issue8365] 'readline' module fails to build on OS X - some recent change broke it In-Reply-To: <1270952479.32.0.785527713521.issue8365@psf.upfronthosting.co.za> Message-ID: <1270969777.97.0.820822320185.issue8365@psf.upfronthosting.co.za> Ned Deily added the comment: Issue6877 (and subsequent fixes in Issue8066) allows the Python readline module to be built and linked with the OS X editline (libedit) library rather than with the GNU readline library (which is not included with OS X). However, the libedit included in versions of OS X prior to 10.5 is considered too broken to use here. By default, if you do not specify an --with-universal-archs other than "32-bit" to configure or if you do not explicitly set MACOSX_DEPLOYMENT_TARGET to another value, configure defaults to using "10.4" (or earlier) so the building of the readline module is skipped. You can check this: >>> from distutils.sysconfig import get_config_var >>> get_config_var('MACOSX_DEPLOYMENT_TARGET') '10.4' (Whether this is the best default is another question.) As it stands, to be able to build the readline module, either: (1) supply the GNU readline library as a local library, or (2) ensure you are building with a deployment target of at least 10.5. For example: ./configure MACOSX_DEPLOYMENT_TARGET=10.6 ; make Also note that option (2) is not available for 3.1.x since the changes to support editline/libedit were not ported to it; they are, however, in 2.6.5, 2.7 (trunk), and 3.2 (py3k). ---------- assignee: -> ronaldoussoren components: +Macintosh nosy: +ned.deily _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 09:50:23 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sun, 11 Apr 2010 07:50:23 +0000 Subject: [issue8366] OS X universal builds fail on 2.7b1 and py3k with "Don't know machine value for archs" In-Reply-To: <1270968400.64.0.539813943684.issue8366@psf.upfronthosting.co.za> Message-ID: <1270972223.58.0.43555296726.issue8366@psf.upfronthosting.co.za> Shashwat Anand added the comment: I tried to reproduce it on trunk by trying, ./configure --enable-universalsdk --with-universal-archs=32-bit ; make However It did managed to build successfully. The relevant bits during installation: gcc -c -arch ppc -arch i386 -isysroot / -DNDEBUG -g -fwrapv -O3 -Wall -Wstrict-prototypes -I. -IInclude -I./Include -DPy_BUILD_CORE -o Modules/python.o ./Modules/python.c Python build finished, but the necessary bits to build these modules were not found: bsddb185 gdbm linuxaudiodev ossaudiodev readline spwd sunaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. Failed to build these modules: _bsddb _locale running build_scripts /usr/bin/install -c -m 644 ./Tools/gdb/libpython.py python.exe-gdb.py 12:52:55 l0nwlf-MBP:python-svn $ ./python.exe Python 2.7b1+ (trunk:79945M, Apr 11 2010, 12:46:28) [GCC 4.2.1 (Apple Inc. build 5646) (dot 1)] on darwin Type "help", "copyright", "credits" or "license" for more information. >>> ---------- nosy: +l0nwlf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 10:21:03 2010 From: report at bugs.python.org (Ned Deily) Date: Sun, 11 Apr 2010 08:21:03 +0000 Subject: [issue8366] OS X universal builds fail on 2.7b1 and py3k with "Don't know machine value for archs" In-Reply-To: <1270968400.64.0.539813943684.issue8366@psf.upfronthosting.co.za> Message-ID: <1270974063.35.0.799878286749.issue8366@psf.upfronthosting.co.za> Ned Deily added the comment: Fails for me with py3k, trunk, and with the 2.7.b1 tarball on 10.6.3 (Intel) and 10.5.8 (ppc). Your test output looks suspect; with the given configure values, the use of gcc-4.0 should be forced. Perhaps you used an existing build directory but did not do a make clobber and/or not rm the previous cached configure values? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 10:25:04 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 11 Apr 2010 08:25:04 +0000 Subject: [issue8241] py2_test_grammar.py contains invalid syntax for 2.6 In-Reply-To: <1269650940.6.0.32953947115.issue8241@psf.upfronthosting.co.za> Message-ID: <1270974304.83.0.705286050307.issue8241@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Benjamin, ISTM that the tests in lib2to3/tests/data/py2_test_grammar aren't run at all, as part of regrtest. If so, the entire file could be removed. ---------- components: +Installation -2to3 (2.x to 3.0 conversion tool) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 10:32:55 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sun, 11 Apr 2010 08:32:55 +0000 Subject: [issue8366] OS X universal builds fail on 2.7b1 and py3k with "Don't know machine value for archs" In-Reply-To: <1270968400.64.0.539813943684.issue8366@psf.upfronthosting.co.za> Message-ID: <1270974775.9.0.402251557812.issue8366@psf.upfronthosting.co.za> Shashwat Anand added the comment: I reinstalled with : make distclean; ./configure --enable-universalsdk --with-universal-archs=32-bit; make on 10.6.2 (Intel) Which I guess is correct. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 11:06:26 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sun, 11 Apr 2010 09:06:26 +0000 Subject: [issue8365] 'readline' module fails to build on OS X - some recent change broke it In-Reply-To: <1270952479.32.0.785527713521.issue8365@psf.upfronthosting.co.za> Message-ID: <1270976786.08.0.521505791344.issue8365@psf.upfronthosting.co.za> Shashwat Anand added the comment: ./configure MACOSX_DEPLOYMENT_TARGET=10.6 ; make does the trick. However it should be done by default rather than being defined explicitly. Closing the issue. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 11:06:47 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sun, 11 Apr 2010 09:06:47 +0000 Subject: [issue8365] 'readline' module fails to build on OS X - some recent change broke it In-Reply-To: <1270952479.32.0.785527713521.issue8365@psf.upfronthosting.co.za> Message-ID: <1270976807.45.0.807910270855.issue8365@psf.upfronthosting.co.za> Changes by Shashwat Anand : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 11:16:39 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Apr 2010 09:16:39 +0000 Subject: [issue8093] IDLE processes don't close In-Reply-To: <1268090491.77.0.977887093309.issue8093@psf.upfronthosting.co.za> Message-ID: <1270977399.55.0.848823943112.issue8093@psf.upfronthosting.co.za> Stefan Krah added the comment: For the record: In 2.7-alpha you do not even get to press [Restart Shell], since IDLE is not responding during the calculation. ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 11:18:21 2010 From: report at bugs.python.org (Ned Deily) Date: Sun, 11 Apr 2010 09:18:21 +0000 Subject: [issue8366] OS X universal builds fail on 2.7b1 and py3k with "Don't know machine value for archs" In-Reply-To: <1270968400.64.0.539813943684.issue8366@psf.upfronthosting.co.za> Message-ID: <1270977501.88.0.0761458252675.issue8366@psf.upfronthosting.co.za> Ned Deily added the comment: Chances are you do not have the 10.4u SDK installed; it is not installed by default by the Snow Leopard Xcode mpkg installer. If it is not installed, configure falls back to using / as the sysroot (see configure.in at around line 95). If you are going to build and test Python on OS X 10.5 or 10.6, you really need to have it installed. $ ls /Developer/SDKs/ MacOSX10.4u.sdk/ MacOSX10.5.sdk/ MacOSX10.6.sdk/ Even without 10.4u installed, this should fail: make distclean; ./configure --enable-universalsdk=/Developer/SDKs/MacOSX10.6.sdk --with-universal-archs=32-bit MACOSX_DEPLOYMENT_TARGET=10.6 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 11:49:10 2010 From: report at bugs.python.org (Shashwat Anand) Date: Sun, 11 Apr 2010 09:49:10 +0000 Subject: [issue8366] OS X universal builds fail on 2.7b1 and py3k with "Don't know machine value for archs" In-Reply-To: <1270968400.64.0.539813943684.issue8366@psf.upfronthosting.co.za> Message-ID: <1270979350.04.0.398876823394.issue8366@psf.upfronthosting.co.za> Shashwat Anand added the comment: The error was finally reproduced with : $make distclean; ./configure --enable-universalsdk=/Developer/SDKs/MacOSX10.6.sdk --with-universal-archs=32-bit MACOSX_DEPLOYMENT_TARGET=10.6; make gcc -arch ppc -arch i386 -isysroot /Developer/SDKs/MacOSX10.6.sdk -u _PyMac_Error -o python.exe \ Modules/python.o \ libpython2.7.a -ldl -framework CoreFoundation Traceback (most recent call last): File "/Volumes/CoreHD/python-svn/Lib/site.py", line 544, in main() File "/Volumes/CoreHD/python-svn/Lib/site.py", line 523, in main addbuilddir() File "/Volumes/CoreHD/python-svn/Lib/site.py", line 118, in addbuilddir s = "build/lib.%s-%.3s" % (get_platform(), sys.version) File "/Volumes/CoreHD/python-svn/Lib/sysconfig.py", line 646, in get_platform "Don't know machine value for archs=%r"%(archs,)) ValueError: Don't know machine value for archs=('i386', 'i386', 'ppc', 'ppc') make: *** [sharedmods] Error 1 Also, $ ls /Developer/SDKs/ MacOSX10.5.sdk MacOSX10.6.sdk ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 12:07:50 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Apr 2010 10:07:50 +0000 Subject: [issue8367] test_winsound: failure on systems without soundcard In-Reply-To: <1270980470.8.0.919577975963.issue8367@psf.upfronthosting.co.za> Message-ID: <1270980470.8.0.919577975963.issue8367@psf.upfronthosting.co.za> New submission from Stefan Krah : Got this test failure on Windows/qemu: ====================================================================== FAIL: test_stopasync (__main__.PlaySoundTest) ---------------------------------------------------------------------- Traceback (most recent call last): File "Lib\test\test_winsound.py", line 199, in test_stopasync None, winsound.SND_PURGE AssertionError: RuntimeError not raised The problem is that PlaySound(None, winsound.SND_PURGE) does not raise on systems without a soundcard. The wrapped C function returns success in this case, so I think it's ok to go along with it and disable this assertion. ---------- messages: 102821 nosy: skrah severity: normal status: open title: test_winsound: failure on systems without soundcard _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 12:35:16 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Apr 2010 10:35:16 +0000 Subject: [issue8367] test_winsound: failure on systems without soundcard In-Reply-To: <1270980470.8.0.919577975963.issue8367@psf.upfronthosting.co.za> Message-ID: <1270982116.77.0.0139772240221.issue8367@psf.upfronthosting.co.za> Stefan Krah added the comment: Searching for the failure reveals that sporadically this has appeared on the buildbots, so I plan to apply the patch soon if there aren't any protests. ---------- assignee: -> skrah components: +Tests keywords: +patch priority: -> normal stage: -> patch review type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 Added file: http://bugs.python.org/file16866/test_winsound.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 13:09:06 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 11 Apr 2010 11:09:06 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270984146.83.0.532372545466.issue8299@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: I looked at ccbench. It's a great tool. I've added two features to it (see the attached patch) -y option to turn off the "do_yield" option in throughput, and so measure thread scheduling without assistance, and the throughput option now also computes "balance", which is the standard deviation of the throughput of each thread normalized by the average. I give you three results for throughput, to demonstrate the ROUNDROBIN_GIL implementation: 1) LEGACY_GIL, no forced switching C:\pydev\python\trunk\PCbuild>python.exe ..\Tools\ccbench\ccbench.py -y -t == CPython 2.7a4+.0 (trunk) == == AMD64 Windows on 'Intel64 Family 6 Model 23 Stepping 6, GenuineIntel' == --- Throughput --- Pi calculation (Python) threads= 1: 672 iterations/s. balance threads= 2: 597 ( 88%) 0.4243 threads= 3: 603 ( 89%) 0.2475 threads= 4: 596 ( 88%) 0.4776 regular expression (C) threads= 1: 571 iterations/s. balance threads= 2: 565 ( 98%) 0.6203 threads= 3: 567 ( 99%) 1.6867 threads= 4: 570 ( 99%) 1.1670 SHA1 hashing (C) threads= 1: 1269 iterations/s. balance threads= 2: 1268 ( 99%) 1.1470 threads= 3: 1270 (100%) 0.6024 threads= 4: 1263 ( 99%) 0.7419 LEGACY_GIL, with forced switching C:\pydev\python\trunk\PCbuild>python.exe ..\Tools\ccbench\ccbench.py -t == CPython 2.7a4+.0 (trunk) == == AMD64 Windows on 'Intel64 Family 6 Model 23 Stepping 6, GenuineIntel' == --- Throughput --- Pi calculation (Python) threads= 1: 663 iterations/s. balance threads= 2: 605 ( 91%) 0.0232 threads= 3: 599 ( 90%) 0.1988 threads= 4: 601 ( 90%) 0.4648 regular expression (C) threads= 1: 568 iterations/s. balance threads= 2: 562 ( 99%) 0.1737 threads= 3: 571 (100%) 0.3950 threads= 4: 566 ( 99%) 0.3158 SHA1 hashing (C) threads= 1: 1275 iterations/s. balance threads= 2: 1267 ( 99%) 0.7238 threads= 3: 1271 ( 99%) 0.2405 threads= 4: 1270 ( 99%) 0.1508 Using the forced "do_yield" helps balance things, but not much. We still have a .7 balance in SHA1 hashing for two threads. Now, for ROUNDROBIN_GIL, and no forced switching: C:\pydev\python\trunk\PCbuild>python.exe ..\Tools\ccbench\ccbench.py -t -y == CPython 2.7a4+.0 (trunk) == == AMD64 Windows on 'Intel64 Family 6 Model 23 Stepping 6, GenuineIntel' == --- Throughput --- Pi calculation (Python) threads= 1: 672 iterations/s. balance threads= 2: 485 ( 72%) 0.0289 threads= 3: 448 ( 66%) 0.0737 threads= 4: 476 ( 70%) 0.0408 regular expression (C) threads= 1: 569 iterations/s. balance threads= 2: 551 ( 96%) 0.0505 threads= 3: 551 ( 96%) 0.1637 threads= 4: 551 ( 96%) 0.2020 SHA1 hashing (C) threads= 1: 1271 iterations/s. balance threads= 2: 1262 ( 99%) 0.0111 threads= 3: 1207 ( 94%) 0.0143 threads= 4: 1202 ( 94%) 0.0317 Notice the much better balance value, and this is without the forced sleep. Also note a lower througput when computing pi with threads. This is because yielding every 100 opcodes now actually works, and the aforementioned instruction cache problem kicks in. Increasing the checkinterval to 1000 solves this: C:\pydev\python\trunk\PCbuild>python.exe ..\Tools\ccbench\ccbench.py -t -y -i100 0 == CPython 2.7a4+.0 (trunk) == == AMD64 Windows on 'Intel64 Family 6 Model 23 Stepping 6, GenuineIntel' == --- Throughput --- Pi calculation (Python) threads= 1: 673 iterations/s. balance threads= 2: 628 ( 93%) 0.0000 threads= 3: 603 ( 89%) 0.0284 threads= 4: 606 ( 90%) 0.0328 regular expression (C) threads= 1: 570 iterations/s. balance threads= 2: 569 ( 99%) 0.2729 threads= 3: 562 ( 98%) 0.6595 threads= 4: 560 ( 98%) 1.2440 SHA1 hashing (C) threads= 1: 1265 iterations/s. balance threads= 2: 1256 ( 99%) 0.0000 threads= 3: 1264 ( 99%) 0.0759 threads= 4: 1255 ( 99%) 0.1309 If no one objects, I'd like to submit this changed ccbench.py to the trunk. ---------- Added file: http://bugs.python.org/file16867/ccbench.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 14:10:35 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 12:10:35 +0000 Subject: [issue6860] Inconsistent naming of custom command in setup.py help output In-Reply-To: <1252372114.27.0.565813299947.issue6860@psf.upfronthosting.co.za> Message-ID: <1270987835.25.0.644309393491.issue6860@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hello Distutils being frozen, I?m reassigning to Distutils2. Not sure if I should make versions blank, 3.3 or third-party, so leaving it alone. Regards ---------- components: +Distutils2 -Distutils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 14:15:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 12:15:12 +0000 Subject: [issue6650] sre_parse contains a confusing generic error message In-Reply-To: <1249492479.55.0.250174703511.issue6650@psf.upfronthosting.co.za> Message-ID: <1270988112.1.0.930181161459.issue6650@psf.upfronthosting.co.za> ?ric Araujo added the comment: In the absence of better propositions, the message in the patch seems more helpful to me than the previous, especially because ?lookbehind? is a search term that matches <0.1 wink> on docs.python.org. So I?d apply this patch. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 14:19:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 12:19:40 +0000 Subject: [issue6555] distutils config file should have the same name on both platforms and all scopes In-Reply-To: <1248379635.87.0.00387112145543.issue6555@psf.upfronthosting.co.za> Message-ID: <1270988380.56.0.247124662697.issue6555@psf.upfronthosting.co.za> ?ric Araujo added the comment: Let me add that os.path.expanduser is the Right Way? to get a user?s home directory on POSIX too, since not every setup has a $HOME envvar or a /etc/passwd file. The only interface one should use is the pwd module (or getent in shell scripts), and so does os.path.expanduser. Reassigning to Distutils2. Regards ---------- components: +Distutils2 -Distutils _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 14:21:18 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 11 Apr 2010 12:21:18 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270988478.36.0.584274975502.issue8299@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: Fyi, here is the output using the unmodified Windows GIL, i.e. without my patch being active: C:\pydev\python\trunk\PCbuild>python.exe ..\Tools\ccbench\ccbench.py -t -y == CPython 2.7a4+.0 (trunk) == == AMD64 Windows on 'Intel64 Family 6 Model 23 Stepping 6, GenuineIntel' == --- Throughput --- Pi calculation (Python) threads= 1: 623 iterations/s. balance threads= 2: 489 ( 78%) 0.0289 threads= 3: 461 ( 74%) 0.0369 threads= 4: 460 ( 73%) 0.0426 regular expression (C) threads= 1: 515 iterations/s. balance threads= 2: 548 (106%) 0.0771 threads= 3: 532 (103%) 0.0556 threads= 4: 523 (101%) 0.1132 SHA1 hashing (C) threads= 1: 1188 iterations/s. balance threads= 2: 1212 (102%) 0.0232 threads= 3: 1198 (100%) 0.0250 threads= 4: 1215 (102%) 0.0163 You see results virtually identical to the ROUNDROBIN_GIL implementation. This is just do demonstrate that Windows has had the ROUNDROBIN_GIL behaviour all along. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 14:22:05 2010 From: report at bugs.python.org (David Beazley) Date: Sun, 11 Apr 2010 12:22:05 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270988525.5.0.297197736712.issue8299@psf.upfronthosting.co.za> David Beazley added the comment: I must be missing something, but why, exactly would you want multiple CPU-bound threads to yield every 100 ticks? Frankly, that sounds like a horrible idea that is going to hammer your system with excessive context switching overhead and cache performance problems---an effect that you, yourself have actually observed. The results of ccbench also show worse performance for the round-robin GIL because of this. Although the legacy GIL signals every 100 ticks, threads do not context switch that rapidly. In fact, on single CPU systems, they context switch at about the same rate as the system time-slice (5-10 milliseconds on most systems). The new GIL implemented by Antoine also does not rapidly switch CPU-bound threads. Again, I must be missing something, but I don't see how this round-robin GIL and all of this forced thread switching is anything that you would ever want--especially for CPU-bound threads. It seems to go against just about every design goal that people usually have for schedulers (especially the goal of minimizing context switching overhead). Again, maybe I'm just being dense and missing something. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 14:32:13 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Sun, 11 Apr 2010 12:32:13 +0000 Subject: [issue5315] signal handler never gets called In-Reply-To: <1235051228.14.0.0909837566577.issue5315@psf.upfronthosting.co.za> Message-ID: <1270989133.66.0.0385762948572.issue5315@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: I think two things can trigger this problem, both have to do with how signals are handled by the interpreter. Contrarily to what you may think, when a signal is received, its handler is _not_ called. Instead, it's Modules/signalmodule.c signal_handler() that's called. This handler stores the reception of the signal inside a table, and schedules the execution of the associated handler for later: signal_handler(int sig_num) { [...] Handlers[sig_num].tripped = 1; /* Set is_tripped after setting .tripped, as it gets cleared in PyErr_CheckSignals() before .tripped. */ is_tripped = 1; Py_AddPendingCall(checksignals_witharg, NULL); [...] } checksignal_withargs() calls PyErr_CheckSignals(), which in turn calls the handler. The pending calls are checked periodically from the interpreter main loop, in Python/ceval.c: when _Py_Ticker reaches 0, then we check for pending calls, and if there are any, we run the pending calls, hence checksignals_witharg, and the handler. This is actually a documented behaviour, quoting signal documentation: "Although Python signal handlers are called asynchronously as far as the Python user is concerned, they can only occur between the ?atomic? instructions of the Python interpreter. This means that signals arriving during long calculations implemented purely in C (such as regular expression matches on large bodies of text) may be delayed for an arbitrary amount of time." But there's a race, imagine this happens: - a thread (or a process for that matter) receives a signal - signal_handler schedules the associated handler - before _Py_Ticker reaches 0 and is checked from the interpreter main loop, a blocking call is made - since the process is blocked in the call, the main eval loop doesn't run, and the handler doesn't get called until the process leaves the call and enters the main eval loop again. If the call doesn't return (e.g. select without timeout), then the process remains stuck forever. This problem can also happen even if the signal is sent after select is called: - the main thread calls select - the second thread runs, and sends a signal to the process - the signal is not received by the main thread, but by the second thread - the second thread schedules execution of the handler - since the main thread is blocked in select, the handler never gets called But this case is quite flaky, because the documentation warns you: "Some care must be taken if both signals and threads are used in the same program. The fundamental thing to remember in using signals and threads simultaneously is: always perform signal() operations in the main thread of execution. Any thread can perform an alarm(), getsignal(), pause(), setitimer() or getitimer(); only the main thread can set a new signal handler, and the main thread will be the only one to receive signals (this is enforced by the Python signal module, even if the underlying thread implementation supports sending signals to individual threads). This means that signals can?t be used as a means of inter-thread communication. Use locks instead." Sending signals to a process with multiple threads is risky, you should use locks. Finally, I think that the documentation should be rephrased: "and the main thread will be the only one to receive signals (this is enforced by the Python signal module, even if the underlying thread implementation supports sending signals to individual threads)." It's false. What's guaranteed is that the signal handler will only be executed on behalf of the main thread, but any thread can _receive_ a signal. And comments in Modules/signalmodule.c are misleading: We still have the problem that in some implementations signals generated by the keyboard (e.g. SIGINT) are delivered to all threads (e.g. SGI), while in others (e.g. Solaris) such signals are delivered to one random thread (an intermediate possibility would be to deliver it to the main thread -- POSIX?). For now, we have a working implementation that works in all three cases -- the handler ignores signals if getpid() isn't the same as in the main thread. XXX This is a hack. Sounds strange. If only a thread other than the main thread receives the signal and you ignore it, then it's lost, isn't it ? Furthermore, under Linux 2.6 and NPTL, getpid() returns the main thread PID even from another thread. Peers ? ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 14:33:50 2010 From: report at bugs.python.org (David Beazley) Date: Sun, 11 Apr 2010 12:33:50 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270989230.29.0.642714608629.issue8299@psf.upfronthosting.co.za> David Beazley added the comment: Sorry, but I don't see how you can say that the round-robin GIL and the legacy GIL have the same behavior based solely on the result of a performance benchmark. Do you have any kind of thread scheduling trace that proves they are scheduling threads in exactly the same manner? Maybe they both have lousy performance, but for different reasons. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 14:38:54 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 12:38:54 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270984146.83.0.532372545466.issue8299@psf.upfronthosting.co.za> Message-ID: <1270989655.3494.2.camel@localhost> Antoine Pitrou added the comment: > SHA1 hashing (C) > > threads= 1: 1275 iterations/s. balance > threads= 2: 1267 ( 99%) 0.7238 > threads= 3: 1271 ( 99%) 0.2405 > threads= 4: 1270 ( 99%) 0.1508 > > Using the forced "do_yield" helps balance things, but not much. We > still have a .7 balance in SHA1 hashing for two threads. Which is not unreasonable, since SHA1 releases the GIL. The unbalance would be produced by the Windows scheduler, not by Python. Note: "do_yield" is not meant to "balance" things as much as to make measurements meaningful at all. Without switching at all during say 2 seconds, the numbers become totally worthless. > If no one objects, I'd like to submit this changed ccbench.py to the trunk. Please let me take a look. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 15:32:16 2010 From: report at bugs.python.org (Krauzi) Date: Sun, 11 Apr 2010 13:32:16 +0000 Subject: [issue8368] Memory leak on multi-threaded PyObject_CallObject In-Reply-To: <1270992736.41.0.985730063076.issue8368@psf.upfronthosting.co.za> Message-ID: <1270992736.41.0.985730063076.issue8368@psf.upfronthosting.co.za> New submission from Krauzi : Hi guys, i think this is a bug and Matt from help at python.org suggested me to report it here: I attached a sample project where the memory leak occurs.I created a sample project where the memory leak occurs. It's a visual studio 2008 project and uses windows threads so you have to recompile when using linux (makefile not included). 500 thread calls result in a memory leak of about 1 MB. ---------- files: Python Bug.zip messages: 102832 nosy: Krauzi severity: normal status: open title: Memory leak on multi-threaded PyObject_CallObject versions: Python 2.6 Added file: http://bugs.python.org/file16868/Python Bug.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 16:12:02 2010 From: report at bugs.python.org (Tim Golden) Date: Sun, 11 Apr 2010 14:12:02 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <1270818334.21.0.114788890224.issue7443@psf.upfronthosting.co.za> Message-ID: <4BC1D898.3030509@timgolden.me.uk> Tim Golden added the comment: I put together a trivial patch against the 2.7 trunk (basically: I added a os.rename before the os.remove in test_support.unlink) and reran my test harness with test_zipfile... and it still failed because, of course, test_zipfile calls shutil.rmtree which bypasses the test_support.unlink altogether etc. etc. At this point several things occur to me: 1) There's little point in targetting the 2.x tree since 2.7 is due out any time now and is effectively end-of-line for 2.x and this isn't a release-blocker. Therefore whatever effort is brought to bear should be against the 3.x latest 2) This is a repeatable but relatively minority case: it only applies to Windows boxes and only to those where some behind-the-scenes process is holding this kind of lock on files for long enough to affect the tests. I'd certainly like to nail it but... 3) The amount of work -- and intrusion in the tests -- is quite substantial. Just looking [*] for straight os.unlink instances, without even considering shutil use gives 71 instances; os.remove gives another 90. That's even without the issues of the tests for shutil and os in any case. I'm willing to do the legwork of moving all the tests use, eg, support.unlink, support.rmtree and so on, but quis custodiet? who'll test the tests? grep "os\.unlink" *.py | wc -l grep "os\.remove" *.py | wc -l 4) All that said, the result should be a cleaner, more controllable test environment, at least for temp files. Another solution would be to rework the use of TESTFN on Windows to use a new temporary file every time. But that would be as much work and more than the unlink / rmtree work above. I'd like to hear opinions before I move forward with a non-trivial patch for this. For the sake of completeness, I attach a tiny test case which shows that the rename/remove approach should in fact work for the symptom we're seeing. ---------- Added file: http://bugs.python.org/file16869/test-case.py _______________________________________ Python tracker _______________________________________ -------------- next part -------------- import os, sys import traceback import win32file FILENAME = "test" def rename_and_remove (filename): os.rename (filename, filename + ".deleted") os.remove (filename + ".deleted") def remove_only (filename): os.remove (filename) def test (remove): open (FILENAME, "w").close () hFile = win32file.CreateFile ( FILENAME, win32file.GENERIC_READ, win32file.FILE_SHARE_DELETE, None, win32file.OPEN_EXISTING, 0, 0 ) try: remove (FILENAME) try: open (FILENAME, "w").close () except IOError: print "FAIL" else: print "PASS" finally: hFile.Close () try: open (FILENAME, "w").close () except IOError: print "FAIL" else: print "PASS" if __name__ =='__main__': print print "Should see FAIL-PASS" test (remove_only) print print "Should see PASS-PASS" test (rename_and_remove) From report at bugs.python.org Sun Apr 11 16:17:06 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 14:17:06 +0000 Subject: [issue8369] Add a lint command to distutils In-Reply-To: <1270995426.89.0.712440512698.issue8369@psf.upfronthosting.co.za> Message-ID: <1270995426.89.0.712440512698.issue8369@psf.upfronthosting.co.za> New submission from ?ric Araujo : Add a command to run lint tools such as Python -3, pep8, pyflakes, pychecker, pylint. I think this should not be a subcommand of test. The idea comes from buildutils (http://pypi.python.org/pypi/buildutils/). ---------- assignee: tarek components: Distutils2 messages: 102834 nosy: merwok, tarek severity: normal status: open title: Add a lint command to distutils type: feature request versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 16:18:22 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 14:18:22 +0000 Subject: [issue8369] Add a lint command to distutils In-Reply-To: <1270995426.89.0.712440512698.issue8369@psf.upfronthosting.co.za> Message-ID: <1270995502.59.0.812789104588.issue8369@psf.upfronthosting.co.za> ?ric Araujo added the comment: Also, think about running reindent.py and lib2to3 fixers such as idioms or ws_comma. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 16:20:03 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Sun, 11 Apr 2010 14:20:03 +0000 Subject: [issue8241] py2_test_grammar.py contains invalid syntax for 2.6 In-Reply-To: <1270974304.83.0.705286050307.issue8241@psf.upfronthosting.co.za> Message-ID: Benjamin Peterson added the comment: 2010/4/11 Martin v. L?wis : > > Martin v. L?wis added the comment: > > Benjamin, ISTM that the tests in lib2to3/tests/data/py2_test_grammar aren't run at all, as part of regrtest. If so, the entire file could be removed. True, but then it would become out of sync with the other branches. The tests aren't run in the trunk either, but we keep the file there. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 16:24:52 2010 From: report at bugs.python.org (Jason R. Coombs) Date: Sun, 11 Apr 2010 14:24:52 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <1260026404.41.0.635406889881.issue7443@psf.upfronthosting.co.za> Message-ID: <1270995892.41.0.408226566261.issue7443@psf.upfronthosting.co.za> Jason R. Coombs added the comment: When I was working on a routine to checkout/patch/build/test/cleanup Python (see https://svn.jaraco.com/jaraco/python/jaraco.develop, and particularly scripts/test-windows-symlink-patch.py), I ran into a similar problem during the cleanup step. I tried using shutil.rmtree to clean up the folder that was checked out, but I repeatedly got 'access denied' exceptions. I ended up working around the problem by using subprocess and cmd.exe's "rmdir /s /q". I think this demonstrates three facets to this problem: 1) It doesn't just affect the test suite. It happens to other Python programs that are using shutil.rmtree (and possibly remove/unlink) to remove files that are in use. 2) It doesn't have to be that way. At the very least, there could (should?) be a function in Python that replicates 'rmdir /s /q', which is not subject to the 'access denied' error. 3) We could use subprocess and cmd.exe to perform the unlink and rmtree operations in the test suite to bypass the transient failures until Python supports the behavior natively. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 16:46:27 2010 From: report at bugs.python.org (=?utf-8?q?Kristj=C3=A1n_Valur_J=C3=B3nsson?=) Date: Sun, 11 Apr 2010 14:46:27 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270997187.54.0.0415144685384.issue8299@psf.upfronthosting.co.za> Kristj?n Valur J?nsson added the comment: David, I don't necessarily think it is reasonable to yield every 100 opcodes, but that is the _intent_ of the current code base. Checkinterval is set to 100. If you don't want that, then set it higher. Your statement is like saying: "Why would you want to have your windows fit tightly, it sounds like a horrible thing for the air quality indoors" (I actually got this when living in Germany). The answer is, of course, that a snugly fitting window can still be opened if you want, but more importantly, you _can_ close it properly. And because the condition variable isn't strictly FIFO, it actually doesn't switch every time (an observation. The scheduler may decide o do its own things inside the condition variable / semaphore). What the ROUNDROBIN_GIL ensures, however, is that the condition variable is _entered_ every checkinterval. What I'm trying to demonsrate to you is the brokenness of the legacy GIL (as observed by Antoine long ago) and how it is not broken on windows. It is broken because the currently running thread is biased to reaquire the GIL immediately in an unpredictable fashion that is not being managed by the (OS) thread scheduler. Because it doesn't enter the condition variable wait when others are competing for it, the scheduler has no means of providing "fairness" to the application. So, to summarise this: I'm not proposing that we context switch every 100 opcodes, but I am proposing that we context switch consistently according to whatever checkinterval is put in place. Antoine, in case you misunderstood: I?m saying that the ROUNDROBIN_GIL and the Windows GIL are the same. If you don't believe me, take a look at the NonRecursiveLock implementation for windows. I'm also starting to think that you didn't actually bother to look at the patch. Please compare PyLock_gil_acquire() for LEGACY_GIL and ROUNDROBIN_GIL and see if you can spot the difference. Really, it's just two lines of code. Maybe it needs restating. The bug is this (python pseudocode) with gil.cond: while not gil.locked: #this line is the bug gil.cond.wait() gil.locked = True vs. with gil.cond: if gil.n_waiting or gil.locked: gil.n_waiting += 1 while True: gil.cond.wait() #always wait at least once if not gil.locked: break gil.n_waiting -= 1 gil.locked = True The cond.wait() is where fairness ensues, where the OS can decide to serve threads roughly on a first come, first serve basis. If you are biased towards not entering it at all (when yielding the GIL), then you have taken away the OS' chance of scheduling. Antoine (2): The need to have do_yield is a symptom of the brokenness of the GIL. You have a checkinterval of 100, which elapses some 1000 times per second, and yet you have to put in place special fudge code to ensure that we do get switches every few seconds? The whole point of the checkinterval is for you _not_ to have to dot the code with sleep() calls. Surely you don't expect the average application developer to do that if he wants his two cpu bound threads to compete fairly for the GIL? This is why I added the -y switch: To emulate normal application code. Also, the 0.7 imbalance observed in the SHA1 disappears on windows, (and using ROUNDROBIN_GIL). It is not due to the windows scheduler, it is due to the broken legacy_gil. This last slew of comments has been about the ROUNDROBIN_GIL only. I haven't dazzled you yet with PRIORITY_GIL, but that solves both problems because it is _fair_, and it allows us to increase the checkinterval to 10000, thus elimintating the rapid switching overhead, and yet gives fast response to IO. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 16:52:46 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 14:52:46 +0000 Subject: [issue8368] Memory leak on multi-threaded PyObject_CallObject In-Reply-To: <1270992736.41.0.985730063076.issue8368@psf.upfronthosting.co.za> Message-ID: <1270997566.53.0.691856480546.issue8368@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Why do you think PyObject_CallObject() is the culprit? There could be any number of reasons for a memory leak: - cyclic references needing to be cleared (have you tried calling PyGC_Collect()?) - reference leak(s) in your own internal logic - inefficiencies in the Windows memory allocator which mean "freed" memory is not necessarily reclaimed PyObject_CallObject() itself is called with the GIL held, so the multithreaded nature of the program shouldn't be a factor. I would also suggest running more iterations, to see whether memory consumption reaches a stable state or grows endlessly. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 16:59:05 2010 From: report at bugs.python.org (R. David Murray) Date: Sun, 11 Apr 2010 14:59:05 +0000 Subject: [issue8366] OS X universal builds fail on 2.7b1 and py3k with "Don't know machine value for archs" In-Reply-To: <1270968400.64.0.539813943684.issue8366@psf.upfronthosting.co.za> Message-ID: <1270997945.26.0.636819078166.issue8366@psf.upfronthosting.co.za> Changes by R. David Murray : ---------- nosy: +haypo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 16:59:06 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 14:59:06 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270997187.54.0.0415144685384.issue8299@psf.upfronthosting.co.za> Message-ID: <1270998068.3494.11.camel@localhost> Antoine Pitrou added the comment: > Antoine (2): The need to have do_yield is a symptom of the brokenness > of the GIL. Of course it is. But the point of the benchmark is to give valid results even with the old broken GIL. I could remove do_yield and still have it give valid results, but that would mean running each step for 30 seconds instead of 2. I don't like having to wait several minutes for benchmark numbers :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 17:00:42 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 11 Apr 2010 15:00:42 +0000 Subject: [issue8370] change module "builtins" to "__builtin__" in __import__ documentation In-Reply-To: <1270998042.37.0.434397625456.issue8370@psf.upfronthosting.co.za> Message-ID: <1270998042.37.0.434397625456.issue8370@psf.upfronthosting.co.za> New submission from Chris Jerdonek : The "builtins" module referenced in the Python 2.6 __import__ documentation does not seem to exist in Python 2.6: http://docs.python.org/library/functions.html#__import__ These should probably be changed to __builtin__: http://docs.python.org/library/__builtin__.html ---------- messages: 102841 nosy: cjerdonek severity: normal status: open title: change module "builtins" to "__builtin__" in __import__ documentation type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 17:00:56 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 11 Apr 2010 15:00:56 +0000 Subject: [issue8370] change module "builtins" to "__builtin__" in __import__ documentation In-Reply-To: <1270998042.37.0.434397625456.issue8370@psf.upfronthosting.co.za> Message-ID: <1270998056.54.0.157321536366.issue8370@psf.upfronthosting.co.za> Changes by Chris Jerdonek : ---------- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 17:04:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 15:04:51 +0000 Subject: [issue8370] change module "builtins" to "__builtin__" in __import__ documentation In-Reply-To: <1270998042.37.0.434397625456.issue8370@psf.upfronthosting.co.za> Message-ID: <1270998291.02.0.448477774871.issue8370@psf.upfronthosting.co.za> ?ric Araujo added the comment: You?re right. This module name has been fixed in the 3.x branch (it used a magic name without reason); when importlib was backported from 3.1 to 2.6, this change must have been overlooked. Are you willing to produce a patch? Regards ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 17:06:55 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 11 Apr 2010 15:06:55 +0000 Subject: [issue8370] change module "builtins" to "__builtin__" in __import__ documentation In-Reply-To: <1270998042.37.0.434397625456.issue8370@psf.upfronthosting.co.za> Message-ID: <1270998415.46.0.484523707222.issue8370@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Replaced "builtins" with "__builtin__". Also inserted a missing "the". ---------- keywords: +patch Added file: http://bugs.python.org/file16870/_issue-8370-1.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 17:14:07 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 11 Apr 2010 15:14:07 +0000 Subject: [issue8370] change module "builtins" to "__builtin__" in __import__ documentation In-Reply-To: <1270998042.37.0.434397625456.issue8370@psf.upfronthosting.co.za> Message-ID: <1270998847.28.0.605877388964.issue8370@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Thanks for the info and quick response. Then this should probably also be applied to trunk (Python 2.7). ---------- versions: +Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 17:20:22 2010 From: report at bugs.python.org (David Beazley) Date: Sun, 11 Apr 2010 15:20:22 +0000 Subject: [issue8299] Improve GIL in 2.7 In-Reply-To: <1270290445.01.0.906567593131.issue8299@psf.upfronthosting.co.za> Message-ID: <1270999222.38.0.109338431927.issue8299@psf.upfronthosting.co.za> David Beazley added the comment: I'm sorry, I still don't get the supposed benefits of this round-robin patch over the legacy GIL. Given that using interpreter ticks as a basis for thread scheduling is problematic to begin with (mostly due to the fact that ticks have totally unpredictable execution times), I'd much rather see further GIL work continue to build upon the time-based scheduler that's been implemented in Python 3.2. For instance, I think being able to specify a thread-switching interval in seconds (sys.setswitchinternal) makes much more sense than continuing to fool around with check intervals and all of this tick business. The new GIL implementation is by no means perfect, but people are working on it. I'd much rather know if anything that you've worked out with this patch can be applied to that version of the GIL. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 17:23:56 2010 From: report at bugs.python.org (Krauzi) Date: Sun, 11 Apr 2010 15:23:56 +0000 Subject: [issue8368] Memory leak on multi-threaded PyObject_CallObject In-Reply-To: <1270992736.41.0.985730063076.issue8368@psf.upfronthosting.co.za> Message-ID: <1270999436.16.0.173391149271.issue8368@psf.upfronthosting.co.za> Krauzi added the comment: i think the PyObject_Call* is the problem because when i comment it out, i do not longer get leaks. The arguments are also correctly decremented because i also can use NULL as argument and i get the same mem leaks like before. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 17:32:31 2010 From: report at bugs.python.org (Chris Jerdonek) Date: Sun, 11 Apr 2010 15:32:31 +0000 Subject: [issue8370] change module "builtins" to "__builtin__" in __import__ documentation In-Reply-To: <1270998042.37.0.434397625456.issue8370@psf.upfronthosting.co.za> Message-ID: <1270999951.1.0.317461645081.issue8370@psf.upfronthosting.co.za> Chris Jerdonek added the comment: Would it make sense to put a "New in version 3.1" at the top of this page: http://docs.python.org/py3k/library/builtins.html (perhaps also with a note explaining that the module replaces __builtin__). I actually wasn't able to confirm when "builtins" was introduced by searching Google and What's New, etc. That's why I appreciated Eric's note. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 17:38:59 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 15:38:59 +0000 Subject: [issue8370] change module "builtins" to "__builtin__" in __import__ documentation In-Reply-To: <1270998042.37.0.434397625456.issue8370@psf.upfronthosting.co.za> Message-ID: <1271000339.68.0.290222132239.issue8370@psf.upfronthosting.co.za> ?ric Araujo added the comment: > (perhaps also with a note explaining that the module replaces __builtin__) People used to 2.x will know about the name change; people new to Python with 3.x (the happy ones!) will not this this information, except perhaps to understand outdated docs or snippets. Hm. A short note would be helpful, I agree. > I actually wasn't able to confirm when "builtins" was introduced by > searching Google and What's New, http://docs.python.org/py3k/whatsnew/3.0.html#library-changes Regards ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 17:40:56 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 15:40:56 +0000 Subject: [issue8370] change module "builtins" to "__builtin__" in __import__ documentation In-Reply-To: <1270998042.37.0.434397625456.issue8370@psf.upfronthosting.co.za> Message-ID: <1271000456.4.0.198081982539.issue8370@psf.upfronthosting.co.za> ?ric Araujo added the comment: Your first patch seems good to me; wait for a core developer?s answer before taking time to add notes about renamed modules everywhere. Cheers ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 18:14:03 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 16:14:03 +0000 Subject: [issue5315] signal handler never gets called In-Reply-To: <1235051228.14.0.0909837566577.issue5315@psf.upfronthosting.co.za> Message-ID: <1271002443.27.0.655400479927.issue5315@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks for the detailed analysis, Charles-Fran?ois. > Finally, I think that the documentation should be rephrased: Yes, I think so. > Furthermore, under Linux 2.6 and NPTL, getpid() returns the main thread > PID even from another thread. Yes, those threads belong to the same process. But as mentioned, signals are a rather fragile inter-process communication device; just use a specific file descriptor. And if you still wanna use signals, there's set_wakeup_fd(): http://docs.python.org/library/signal.html#signal.set_wakeup_fd ---------- assignee: -> georg.brandl components: +Documentation nosy: +georg.brandl, pitrou, tim_one priority: -> normal versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 -Python 2.4, Python 2.5 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 18:36:04 2010 From: report at bugs.python.org (Daniel Urban) Date: Sun, 11 Apr 2010 16:36:04 +0000 Subject: [issue6507] Enhance dis.dis to autocompile codestrings In-Reply-To: <1247857575.21.0.389925271165.issue6507@psf.upfronthosting.co.za> Message-ID: <1271003764.74.0.712592083771.issue6507@psf.upfronthosting.co.za> Daniel Urban added the comment: I've made a patch, which adds a disassemble_str function to the dis module. The dis.dis function calls this function if x is a string. Added the following sentence to the documentation: "Strings are first compiled to code objects with the :func:`compile` built-in function." Added two simle unittests. ---------- keywords: +patch nosy: +durban Added file: http://bugs.python.org/file16871/issue6507.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 18:47:43 2010 From: report at bugs.python.org (Darryl Miles) Date: Sun, 11 Apr 2010 16:47:43 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1271004463.7.0.723229007704.issue8108@psf.upfronthosting.co.za> Darryl Miles added the comment: I am unable to get "make test" to run from an unpatched version in SVN (details below of make output). Please find attached an updated patch for your consideration (and testing, as I can't test it due to 'make test' SIGSEGV on CentOS 5.4 i386). Patch Notes: 1) Some thing that concern me, the "unwrap()" philosophy looks to be used to remove SSL from the Python high-level socket handle, so you can go back to plaintext mode. You can ONLY perform an unwrap() AFTER an SSL_shutdown()==1 has been observed (you need to wait for the other end to do something voluntarily). So you must retry the SSL_shutdown() over and over while you sleep-wait for IO, so this is akin to calling the ssl.shutdown(ssl.SSL_SHUTDOWN_MODE_BOTH) and getting back success. Also if it is your intention to properly implement an unwrap() like this you should disable IO read-ahead mode before calling shutdown for the second time, SSL_set_read_ahead(ssl, 0). This stops OpenSSL from eating too many bytes accidentally (probably from the kernel into its own buffers), from the inbound IO stream, which may not be SSL protocol data, it maybe plain text data (behind the last byte of SSL protocol data). 2) Due to the IO waiting it looks also necessary to copy the setup of SSL_set_nbio() from the read/write paths so the check_socket_and_wait_for_timeout() works in sympathy to the callers IO timeout reconfiguration. 3) My patch presumes the allocation of the type "struct PySSLObject" uses calloc() or some other memory zeroing strategy. There is a new member in that struct to track if SSL_shutdown() has previously returned a zero value. 4) The SSL_peek() error path needs checking to see if the error return is consistent with the Python paradigm. 5) Please check I have understand the VARARGS method correctly. I have made the default to SSL_SHUTDOWN_MODE_SENT (despite backward compatibly being SSL_SHUTDOWN_MODE_ONCE), this is because I would guess that most high-level applications did not intend to use it in raw mode; nor be bothered with the issues surrounding correct usage. I would guess high-level applications wanted Python to take the strain here. 6) I suspect you need to address your unwrap() policy a little better, the shutdown operation and the unwrap() are two different matters. The shutdown() should indicate success or not (in respect of the mode being requested, raw mode is a tricky one as the caller would want to the exact error return so it can do the correct thing), unwrap() should itself call ssl.shutdown(ssl.SSL_SHUTDOWN_MODE_BOTH) until it sees success and then remove the socket (and deallocate SSL objects). As things stand SSL_SHUTDOWN_MODE_ONCE does not work in a useful way since the error returns are not propagated to the caller, because "unwrap" is mixed into this. So that would still need fixing. building works ok, testing fails with SIGSEGV. Is this something to do with no having _bsddb built ? I have db-4.3 working. Maybe someone can reply by email on the matter. # make running build running build_ext building dbm using gdbm Python build finished, but the necessary bits to build these modules were not found: bsddb185 sunaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. running build_scripts # make test running build running build_ext building dbm using gdbm Python build finished, but the necessary bits to build these modules were not found: bsddb185 sunaudiodev To find the necessary bits, look in setup.py in detect_modules() for the module's name. running build_scripts find ./Lib -name '*.py[co]' -print | xargs rm -f ./python -Wd -3 -E -tt ./Lib/test/regrtest.py -l == CPython 2.7a4+ (trunk:79902M, Apr 11 2010, 16:38:55) [GCC 4.1.2 20080704 (Red Hat 4.1.2-46)] == Linux-2.6.18-164.15.1.el5-i686-with-redhat-5.4-Final == /root/python-svn/build/test_python_29248 test_grammar test_opcodes test_dict test_builtin test_exceptions test_types test_unittest test_doctest test_doctest2 test_MimeWriter test_SimpleHTTPServer test_StringIO test___all__ /root/python-svn/Lib/test/test___all__.py:10: DeprecationWarning: in 3.x, the bsddb module has been removed; please use the pybsddb project instead import bsddb /root/python-svn/Lib/bsddb/__init__.py:67: PendingDeprecationWarning: The CObject type is marked Pending Deprecation in Python 2.7. Please use capsule objects instead. import _bsddb make: *** [test] Segmentation fault ---------- Added file: http://bugs.python.org/file16872/Modules__ssl.c.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 18:50:31 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 16:50:31 +0000 Subject: [issue8371] Add a command to download distributions In-Reply-To: <1271004631.29.0.0742687502668.issue8371@psf.upfronthosting.co.za> Message-ID: <1271004631.29.0.0742687502668.issue8371@psf.upfronthosting.co.za> New submission from ?ric Araujo : Distutils2 should have a command responsible for downloading distributions. This would factor it out of other code in one clear location and allow users to download for later installation. If setup.cfg files grow options for extras, test-requires, build-requires and such specific kinds of dependencies, matching options would appear on the download (or get) command. Side note: Is it okay to post this as a bug or should I rather mail distutils-sig first? Or mail them now? Regards ---------- assignee: tarek components: Distutils2 messages: 102853 nosy: merwok, tarek severity: normal status: open title: Add a command to download distributions type: feature request versions: Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 19:08:23 2010 From: report at bugs.python.org (Roumen Petrov) Date: Sun, 11 Apr 2010 17:08:23 +0000 Subject: [issue8366] OS X universal builds fail on 2.7b1 and py3k with "Don't know machine value for archs" In-Reply-To: <1270968400.64.0.539813943684.issue8366@psf.upfronthosting.co.za> Message-ID: <1271005703.65.0.390496463731.issue8366@psf.upfronthosting.co.za> Roumen Petrov added the comment: It seems to that improvement for CFLAGS show bug in python build system - quote for configure: .... BASECFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${BASECFLAGS}" tgt=`sw_vers -productVersion | sed 's/\(10\.[[0-9]]*\).*/\1/'` if test "${UNIVERSALSDK}" != "/" -a "${tgt}" '>' '10.4' ; then CFLAGS="${UNIVERSAL_ARCH_FLAGS} -isysroot ${UNIVERSALSDK} ${CFLAGS}" CPPFLAGS="-isysroot ${UNIVERSALSDK}" fi .... No idea why the script set CFLAGS and CPPFLAGS under a specific condition - may be some test cases from configure will fail without those flags set. Assignment to CPPFLAGS will ignore user settings - this is not acceptable. Lets see report from Ned Deily: "might look like this" : the -isysroot is added twice . ---------- nosy: +rpetrov _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 19:17:59 2010 From: report at bugs.python.org (Krauzi) Date: Sun, 11 Apr 2010 17:17:59 +0000 Subject: [issue8368] Memory leak on multi-threaded PyObject_CallObject In-Reply-To: <1270992736.41.0.985730063076.issue8368@psf.upfronthosting.co.za> Message-ID: <1271006279.9.0.176237451492.issue8368@psf.upfronthosting.co.za> Krauzi added the comment: kay updated the code. Please use this: http://paste.pocoo.org/show/200484/ smaller code but problem still the same. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 19:18:13 2010 From: report at bugs.python.org (Krauzi) Date: Sun, 11 Apr 2010 17:18:13 +0000 Subject: [issue8368] Memory leak on multi-threaded PyObject_CallObject In-Reply-To: <1270992736.41.0.985730063076.issue8368@psf.upfronthosting.co.za> Message-ID: <1271006293.33.0.769876406579.issue8368@psf.upfronthosting.co.za> Changes by Krauzi : Removed file: http://bugs.python.org/file16868/Python Bug.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 19:31:58 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 11 Apr 2010 17:31:58 +0000 Subject: [issue8368] Memory leak on multi-threaded PyObject_CallObject In-Reply-To: <1270992736.41.0.985730063076.issue8368@psf.upfronthosting.co.za> Message-ID: <1271007118.33.0.357852151124.issue8368@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I've ported the program to Linux (see attached tar file). I cannot observe any memory leak here - even if I let the program run for a long time (linking with Python 2.6). Memory usage in top goes up and down, but never over some upper limit. The only changes to the source that I made are these: - remove the pause calls - run the thread creation in an infinite loop - join the threads I notice that the Win32 version also doesn't join the threads. Notice that this is a memory leak in itself. ---------- nosy: +loewis Added file: http://bugs.python.org/file16873/issue8368.tgz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 19:45:37 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 17:45:37 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1271004463.7.0.723229007704.issue8108@psf.upfronthosting.co.za> Message-ID: <1271008056.3494.43.camel@localhost> Antoine Pitrou added the comment: To just run the test_ftplib tests, you can use: $ ./python -m test.regrtest -v -uall test_ftplib (Other tests involving SSL sockets are test_ssl, test_smtpnet, test_imaplib and test_poplib) > 1) Some thing that concern me, the "unwrap()" philosophy looks to be > used to remove SSL from the Python high-level socket handle, so you > can go back to plaintext mode. You can ONLY perform an unwrap() AFTER > an SSL_shutdown()==1 has been observed (you need to wait for the other > end to do something voluntarily). When the SSL shutdown fails, an exception is raised, which means the rest of the unwrapping (at the Python "high-level" socket level) doesn't occur. Therefore, it is safe to call unwrap() again from user code because the SSL object is still there. > Also if it is your intention to properly implement an unwrap() like > this you should disable IO read-ahead mode before calling shutdown for > the second time, SSL_set_read_ahead(ssl, 0). This stops OpenSSL from > eating too many bytes accidentally (probably from the kernel into its > own buffers), from the inbound IO stream, which may not be SSL > protocol data, it maybe plain text data (behind the last byte of SSL > protocol data). Do you know how to cook a simple test to exercise this? > 2) Due to the IO waiting it looks also necessary to copy the setup of > SSL_set_nbio() from the read/write paths so the > check_socket_and_wait_for_timeout() works in sympathy to the callers > IO timeout reconfiguration. Thanks for spotting this. > 5) Please check I have understand the VARARGS method correctly. I > have made the default to SSL_SHUTDOWN_MODE_SENT (despite backward > compatibly being SSL_SHUTDOWN_MODE_ONCE), this is because I would > guess that most high-level applications did not intend to use it in > raw mode; nor be bothered with the issues surrounding correct usage. > I would guess high-level applications wanted Python to take the strain > here. Yes, sounds right indeed. I'm not sure we need a choice of shutdown modes at all. > building works ok, testing fails with SIGSEGV. Is this something to > do with no having _bsddb built ? I have db-4.3 working. Maybe > someone can reply by email on the matter. _bsddb seems to be built, it's the old bsddb185 which isn't. The module apparently breaks when importing it, can you open a separate issue for it? I'd like Bill Janssen's opinion on these proposed changes. Bill, can you take a look? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 19:46:34 2010 From: report at bugs.python.org (Ned Deily) Date: Sun, 11 Apr 2010 17:46:34 +0000 Subject: [issue8366] OS X universal builds fail on 2.7b1 and py3k with "Don't know machine value for archs" In-Reply-To: <1270968400.64.0.539813943684.issue8366@psf.upfronthosting.co.za> Message-ID: <1271007994.71.0.537688797452.issue8366@psf.upfronthosting.co.za> Ned Deily added the comment: Setting CPPFLAGS to include the SDK is needed to make sure some of the autoconf tests work correctly by using the SDK's header files rather than those from /. But, you're right, it shouldn't throw away other CPPFLAGS settings. Plus that whole test there is suspect: it probably shouldn't be testing the build system version there. There are various ways to handle this and opportunities to simplify the OS X SDK processing; plus all of the trees (trunk, py3k, 26, 31) should work the same way. Let's see what Ronald prefers. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 19:56:56 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Sun, 11 Apr 2010 17:56:56 +0000 Subject: [issue6507] Enhance dis.dis to autocompile codestrings In-Reply-To: <1247857575.21.0.389925271165.issue6507@psf.upfronthosting.co.za> Message-ID: <1271008616.55.0.257622873643.issue6507@psf.upfronthosting.co.za> Raymond Hettinger added the comment: +1 ---------- nosy: +rhettinger _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 19:57:57 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 11 Apr 2010 17:57:57 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <1260026404.41.0.635406889881.issue7443@psf.upfronthosting.co.za> Message-ID: <1271008677.44.0.578850641014.issue7443@psf.upfronthosting.co.za> Martin v. L?wis added the comment: 1. I agree that we should fix the unlinking problem on Windows. I also think that such a fix should be independent of the test suite - many people run into failed unlink problems. 2. Tim already said it, but I repeat: the common theory is that the culprit for this kind of problem is software like virus checkers, desktop search spiders, Tortoise, ... 3. I'm not convinced that "rmdir/s/q" *really* solves the problem reliably. Because it's a timing issue, it may be that the additional startup cost to invoke rmdir was enough to let the virus scanner win the race, so that rmdir actually had no problems with removing the file. 4. I believe the official party line for removing files on Windows is this: "If DeleteFile fails, move the file to the trash bin (of the disk), and use NtSetInformationFile to set the delete disposition for the file". See cygwin's unlink_nt for an elaborate implementation of unlinking: http://tinyurl.com/y7w6rrj ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:33:05 2010 From: report at bugs.python.org (David Watson) Date: Sun, 11 Apr 2010 18:33:05 +0000 Subject: [issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses In-Reply-To: <1271010785.16.0.286802399648.issue8372@psf.upfronthosting.co.za> Message-ID: <1271010785.16.0.286802399648.issue8372@psf.upfronthosting.co.za> New submission from David Watson : The makesockaddr() function in the socket module assumes that AF_UNIX addresses have a null-terminated sun_path, but Linux actually allows unterminated addresses using all 108 bytes of sun_path (for normal filesystem sockets, that is, not just abstract addresses). When receiving such an address (e.g. in accept() from a connecting peer), makesockaddr() will run past the end and return extraneous bytes from the stack, or fail because they can't be decoded, or perhaps segfault in extreme cases. This can't currently be tested from within Python as Python also refuses to accept address arguments which would fill the whole of sun_path, but the attached linux-pass-unterminated.diff (for 2.x and 3.x) enables them for Linux. With the patch applied: Python 2.7a4+ (trunk, Apr 8 2010, 18:20:28) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> import socket >>> s = socket.socket(socket.AF_UNIX) >>> s.bind("a" * 108) >>> s.getsockname() 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa\xfa\xbf\xa8)\xfa\xbf\xec\x15\n\x08l\xaaY\xb7\xb8CZ\xb7' >>> len(_) 126 Also attached are some unit tests for use with the above patch, a couple of C programs for checking OS behaviour (you can also see the bug by doing accept() in Python and using the bindconn program), and patches aimed at fixing the problem. Firstly, the return-unterminated-* patches make makesockaddr() scan sun_path for the first null byte as before (if it's not a Linux abstract address), but now stop at the end of the structure as indicated by the addrlen argument. However, there's one more catch before this will work on Linux, which is that Linux system calls return the length of the address they *would* have stored in the structure had there been room for it, which in this case is one byte longer than the official size of a sockaddr_un structure, due to the missing null terminator. The addrlen-* patches handle this by always calling makesockaddr() with the actual buffer size if it is less than the returned length. This silently ignores any truncation, but I'm not sure how to do anything sensible about that, and some operating systems (e.g. FreeBSD) just silently truncate the address anyway and don't return the original length (POSIX doesn't make clear which, if either, behaviour is required). Once these patches are applied, the tests pass. There is one other issue: the patches for 3.x retain the assumption that socket paths are in UTF-8, but they should actually be handled according to PEP 383. I've got a patch for that, but I'll open a separate issue for it since the handling of the Linux abstract namespace isn't documented and there's some slightly unobvious behaviour that people might be depending on. ---------- components: Extension Modules files: linux-pass-unterminated.diff keywords: patch messages: 102861 nosy: baikie severity: normal status: open title: socket: Buffer overrun while reading unterminated AF_UNIX addresses type: behavior versions: Python 2.5, Python 2.6, Python 2.7, Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file16874/linux-pass-unterminated.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:35:10 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 11 Apr 2010 18:35:10 +0000 Subject: [issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS In-Reply-To: <1269346447.99.0.323336928566.issue8211@psf.upfronthosting.co.za> Message-ID: <1271010910.8.0.763581834126.issue8211@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Victor, could you please fix the patch or revert it ? Thanks. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:37:40 2010 From: report at bugs.python.org (David Watson) Date: Sun, 11 Apr 2010 18:37:40 +0000 Subject: [issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses In-Reply-To: <1271010785.16.0.286802399648.issue8372@psf.upfronthosting.co.za> Message-ID: <1271011060.25.0.617084591202.issue8372@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file16875/return-unterminated-2.x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:37:56 2010 From: report at bugs.python.org (David Watson) Date: Sun, 11 Apr 2010 18:37:56 +0000 Subject: [issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses In-Reply-To: <1271010785.16.0.286802399648.issue8372@psf.upfronthosting.co.za> Message-ID: <1271011076.26.0.929419411198.issue8372@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file16876/return-unterminated-3.x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:38:08 2010 From: report at bugs.python.org (Tim Golden) Date: Sun, 11 Apr 2010 18:38:08 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <1271008677.44.0.578850641014.issue7443@psf.upfronthosting.co.za> Message-ID: <4BC216E5.7020205@timgolden.me.uk> Tim Golden added the comment: I'm afraid that the problem doesn't lie in the unlink: DeleteFile succeeds. The problem is that the file is only marked for delete until such time as the last SHARE_DELETE handle on it is closed. Until that time, an attempt to (re)create the file for anything other than SHARE_DELETE will fail. As you say, it's a timing issue. Making os.unlink on Windows more robust may be a good idea, but it's not going to help this issue. See my test-case.py on an earlier message for reproduction: http://bugs.python.org/file16869 TJG ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:38:40 2010 From: report at bugs.python.org (Meador Inge) Date: Sun, 11 Apr 2010 18:38:40 +0000 Subject: [issue7433] MemoryView memory_getbuf causes segfaults, double call to tp_releasebuffer In-Reply-To: <1259880029.03.0.2026580728.issue7433@psf.upfronthosting.co.za> Message-ID: <1271011120.32.0.608262211266.issue7433@psf.upfronthosting.co.za> Changes by Meador Inge : ---------- nosy: +minge _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:38:42 2010 From: report at bugs.python.org (David Watson) Date: Sun, 11 Apr 2010 18:38:42 +0000 Subject: [issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses In-Reply-To: <1271010785.16.0.286802399648.issue8372@psf.upfronthosting.co.za> Message-ID: <1271011122.79.0.887075047277.issue8372@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file16877/addrlen-2.x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:38:59 2010 From: report at bugs.python.org (David Watson) Date: Sun, 11 Apr 2010 18:38:59 +0000 Subject: [issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses In-Reply-To: <1271010785.16.0.286802399648.issue8372@psf.upfronthosting.co.za> Message-ID: <1271011139.97.0.417094284211.issue8372@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file16878/addrlen-3.x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:39:08 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 11 Apr 2010 18:39:08 +0000 Subject: [issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS In-Reply-To: <1269346447.99.0.323336928566.issue8211@psf.upfronthosting.co.za> Message-ID: <1271011148.96.0.954758908857.issue8211@psf.upfronthosting.co.za> Marc-Andre Lemburg added the comment: Reopening the ticket: it shouldn't have been closed. I'm also making this a release blocker, since this needs to be fixed before the next release - the CC variable has to be initialized by the build system and breaking this in general for all default builds just to get a debug build without optimizations is not warranted. ---------- priority: -> release blocker status: closed -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:39:37 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Sun, 11 Apr 2010 18:39:37 +0000 Subject: [issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS In-Reply-To: <1269346447.99.0.323336928566.issue8211@psf.upfronthosting.co.za> Message-ID: <1271011177.63.0.0201734442124.issue8211@psf.upfronthosting.co.za> Changes by Marc-Andre Lemburg : ---------- resolution: fixed -> _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:40:12 2010 From: report at bugs.python.org (David Watson) Date: Sun, 11 Apr 2010 18:40:12 +0000 Subject: [issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses In-Reply-To: <1271010785.16.0.286802399648.issue8372@psf.upfronthosting.co.za> Message-ID: <1271011212.67.0.180528192324.issue8372@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file16879/test-2.x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:40:29 2010 From: report at bugs.python.org (David Watson) Date: Sun, 11 Apr 2010 18:40:29 +0000 Subject: [issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses In-Reply-To: <1271010785.16.0.286802399648.issue8372@psf.upfronthosting.co.za> Message-ID: <1271011229.41.0.297347564029.issue8372@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file16880/test-3.x.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:45:29 2010 From: report at bugs.python.org (David Watson) Date: Sun, 11 Apr 2010 18:45:29 +0000 Subject: [issue8373] socket: AF_UNIX socket paths not handled according to PEP 383 In-Reply-To: <1271011528.87.0.0855011916856.issue8373@psf.upfronthosting.co.za> Message-ID: <1271011528.87.0.0855011916856.issue8373@psf.upfronthosting.co.za> New submission from David Watson : In 3.x, the socket module assumes that AF_UNIX addresses use UTF-8 encoding - this means, for example, that accept() will raise UnicodeDecodeError if the peer socket path is not valid UTF-8, which could crash an unwary server. Python 3.1.2 (r312:79147, Mar 23 2010, 19:02:21) [GCC 4.2.4 (Ubuntu 4.2.4-1ubuntu4)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> from socket import * >>> s = socket(AF_UNIX, SOCK_STREAM) >>> s.bind(b"\xff") >>> s.getsockname() Traceback (most recent call last): File "", line 1, in UnicodeDecodeError: 'utf8' codec can't decode byte 0xff in position 0: unexpected code byte I'm attaching a patch to handle socket paths according to PEP 383. Normally this would use PyUnicode_FSConverter, but there are a couple of ways in which the address handling currently differs from normal filename handling. One is that embedded null bytes are passed through to the system instead of being rejected, which is needed for the Linux abstract namespace. These abstract addresses are returned as bytes objects, but they can currently be specified as strings with embedded null characters as well. The patch preserves this behaviour. The current code also accepts read-only buffer objects (it uses the "s#" format), so in order to accept these as well as bytearray filenames (which the posix module accepts), the patch simply accepts any single-segment buffer, read-only or not. This patch applies on top of the patches I submitted for issue #8372 (rather than knowingly running past the end of sun_path). ---------- components: Extension Modules files: af_unix-pep383.diff keywords: patch messages: 102865 nosy: baikie severity: normal status: open title: socket: AF_UNIX socket paths not handled according to PEP 383 type: behavior versions: Python 3.1, Python 3.2, Python 3.3 Added file: http://bugs.python.org/file16881/af_unix-pep383.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:47:34 2010 From: report at bugs.python.org (David Watson) Date: Sun, 11 Apr 2010 18:47:34 +0000 Subject: [issue8373] socket: AF_UNIX socket paths not handled according to PEP 383 In-Reply-To: <1271011528.87.0.0855011916856.issue8373@psf.upfronthosting.co.za> Message-ID: <1271011654.84.0.383083134879.issue8373@psf.upfronthosting.co.za> David Watson added the comment: This patch does the same thing without fixing issue #8372 (not that I'd recommend that, but it may be easier to review). ---------- Added file: http://bugs.python.org/file16882/af_unix-pep383-no-8372-fix.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:48:57 2010 From: report at bugs.python.org (David Watson) Date: Sun, 11 Apr 2010 18:48:57 +0000 Subject: [issue8373] socket: AF_UNIX socket paths not handled according to PEP 383 In-Reply-To: <1271011528.87.0.0855011916856.issue8373@psf.upfronthosting.co.za> Message-ID: <1271011737.84.0.802326259758.issue8373@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file16883/test-existing.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:49:38 2010 From: report at bugs.python.org (David Watson) Date: Sun, 11 Apr 2010 18:49:38 +0000 Subject: [issue8373] socket: AF_UNIX socket paths not handled according to PEP 383 In-Reply-To: <1271011528.87.0.0855011916856.issue8373@psf.upfronthosting.co.za> Message-ID: <1271011778.21.0.873061277218.issue8373@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file16884/test-new.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:50:11 2010 From: report at bugs.python.org (David Watson) Date: Sun, 11 Apr 2010 18:50:11 +0000 Subject: [issue8373] socket: AF_UNIX socket paths not handled according to PEP 383 In-Reply-To: <1271011528.87.0.0855011916856.issue8373@psf.upfronthosting.co.za> Message-ID: <1271011811.14.0.618957149589.issue8373@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file16885/af_unix-pep383-doc.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 20:54:12 2010 From: report at bugs.python.org (Darryl Miles) Date: Sun, 11 Apr 2010 18:54:12 +0000 Subject: [issue8108] test_ftplib fails with OpenSSL 0.9.8m In-Reply-To: <1268228679.44.0.26304365082.issue8108@psf.upfronthosting.co.za> Message-ID: <1271012052.01.0.484848939485.issue8108@psf.upfronthosting.co.za> Darryl Miles added the comment: To explain why you need 2 modes, a client/server would expect to do the following pseudo actions for maximum efficiency: set_socket_timeout(600_SECONDS) # or useful default send_data_over_ssl("QUIT\r\n") shutdown(SSL_SHUTDOWN_MODE_SENT) flush_data_down_to_socket() # maybe automatic/implied (OpenSSL users with custom BIO layers should be aware of this step) shutdown(socket, SHUT_WR) # this is optional, TCP socket level shutdown recv_data_over_ssl() = "250 Bye bye!\r\n" # this will take time to arrive set_socket_io_timeout(5_SECONDS) shutdown(SSL_SHUTDOWN_MODE_BOTH) # this is optional! some clients may choose to skip it entirely close()/unwrap() A server would: recv_data_over_ssl() = "QUIT\r\n" # would be sitting idle waiting for this command send_data_over_ssl("250 Bye bye!\r\n") shutdown(SSL_SHUTDOWN_MODE_SENT) flush_data_down_to_socket() # maybe automatic/implied (OpenSSL users with custom BIO layers should be aware of this step) shutdown(socket, SHUT_WR) # this is optional, TCP socket level shutdown set_socket_io_timeout(30_SECONDS) shutdown(SSL_SHUTDOWN_MODE_BOTH) # a good server would implement this step close()/unwrap() Now if your outbound data is CORKed and flushed, the flush points would cause all the SSL data from both the 'last sent data' and the 'send shutdown notify' to go out in the same TCP segment and arrive at the other end more or less together. Doing any of the above in a different order introduces some kind of inefficiency. shutdown(fd, SHUT_WR) are often used at the socket level to help the manage TIME_WAIT. The client has to wait for the QUIT response message anyway. With the above sequence there is no additional time delay or cost with both parties performing a SSL protocol shutdown at the same time. Despite the IO timeouts existing (to provide a safety net). If the client is talking to a buggy server the worst case scenario is that it receives the quit response but the server never does an SSL shutdown and the server doesn't close the socket connection. In this situation the client will have to wait for IO timeout, some clients in other software use blocking sockets and don't have a timeout so they end up hooked (forever). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 21:00:10 2010 From: report at bugs.python.org (Ned Deily) Date: Sun, 11 Apr 2010 19:00:10 +0000 Subject: [issue8211] configure: ignore AC_PROG_CC hardcoded CFLAGS In-Reply-To: <1269346447.99.0.323336928566.issue8211@psf.upfronthosting.co.za> Message-ID: Ned Deily added the comment: To be totally fair, it is likely that part of the OS X breakage was caused by the original code inadvertently working around the original CFLAGS misbehavior. From an OS X perspective, it may be best to just fix the new issue and move on. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 21:03:21 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 19:03:21 +0000 Subject: [issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses In-Reply-To: <1271010785.16.0.286802399648.issue8372@psf.upfronthosting.co.za> Message-ID: <1271012601.01.0.00934298540892.issue8372@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo, loewis priority: -> high stage: -> patch review versions: -Python 2.5, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 21:04:55 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 19:04:55 +0000 Subject: [issue8373] socket: AF_UNIX socket paths not handled according to PEP 383 In-Reply-To: <1271011528.87.0.0855011916856.issue8373@psf.upfronthosting.co.za> Message-ID: <1271012695.77.0.0743735589183.issue8373@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +haypo, loewis priority: -> normal stage: -> patch review versions: -Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 21:12:25 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 11 Apr 2010 19:12:25 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <4BC216E5.7020205@timgolden.me.uk> Message-ID: <4BC21F16.8050902@v.loewis.de> Martin v. L?wis added the comment: > I'm afraid that the problem doesn't lie in the unlink: DeleteFile > succeeds. The problem is that the file is only marked for delete > until such time as the last SHARE_DELETE handle on it is closed. Then we shouldn't use DeleteFile in the first place to delete the file, but instead CreateFile, with DELETE access (and FILE_SHARE_DELETE sharing). If that fails, we need to move the file to the bin (see unlink_nt for details). > Making os.unlink on Windows more robust may be a good > idea, but it's not going to help this issue. See my test-case.py > on an earlier message for reproduction: It certainly will help this case also. It would detect that the file is still open, and move it into the trash bin. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 21:16:40 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 19:16:40 +0000 Subject: [issue8368] Memory leak on multi-threaded PyObject_CallObject In-Reply-To: <1270992736.41.0.985730063076.issue8368@psf.upfronthosting.co.za> Message-ID: <1271013400.91.0.934750550324.issue8368@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Thanks Martin. I see no leak here either (Linux with Python 2.6 and 2.7). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 21:23:04 2010 From: report at bugs.python.org (Krauzi) Date: Sun, 11 Apr 2010 19:23:04 +0000 Subject: [issue8368] Memory leak on multi-threaded PyObject_CallObject In-Reply-To: <1270992736.41.0.985730063076.issue8368@psf.upfronthosting.co.za> Message-ID: <1271013784.54.0.140643056402.issue8368@psf.upfronthosting.co.za> Krauzi added the comment: oh no then it's a windows bug. Now i understand why many devs use linux instead of windows...... ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 21:24:24 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 19:24:24 +0000 Subject: [issue8253] add a resource+files section in setup.cfg In-Reply-To: <1269786855.85.0.280361789745.issue8253@psf.upfronthosting.co.za> Message-ID: <1271013864.72.0.676586524777.issue8253@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?ve read some distutils-sig threads about this. Do you still want to write a PEP for it before implementation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 21:31:57 2010 From: report at bugs.python.org (Tim Golden) Date: Sun, 11 Apr 2010 19:31:57 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <4BC21F16.8050902@v.loewis.de> Message-ID: <4BC2238A.3080609@timgolden.me.uk> Tim Golden added the comment: > Then we shouldn't use DeleteFile in the first place to delete the file, > but instead CreateFile, with DELETE access (and FILE_SHARE_DELETE > sharing). If that fails, we need to move the file to the bin > (see unlink_nt for details). I see what you're getting at. I'm getting to the end of my day here, but I'll try to put a patch together for posixmodule.c when I can, if no-one else gets there first. Would you agree that py3k is the only target branch worth aiming for? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 21:32:50 2010 From: report at bugs.python.org (Tony Locke) Date: Sun, 11 Apr 2010 19:32:50 +0000 Subject: [issue2987] RFC2732 support for urlparse (e.g. http://[::1]:80/) In-Reply-To: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> Message-ID: <1271014370.81.0.828784821245.issue2987@psf.upfronthosting.co.za> Tony Locke added the comment: I've created a patch for parse.py against the py3k branch, and I've also included ndim's test cases in that patch file. When returning the host name of an IPv6 literal, I don't include the surrounding '[' and ']'. For example, parsing http://[::1]:5432/foo/ gives the host name '::1'. ---------- nosy: +tlocke versions: +Python 3.2 Added file: http://bugs.python.org/file16886/parse.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 21:37:24 2010 From: report at bugs.python.org (Giampaolo Rodola') Date: Sun, 11 Apr 2010 19:37:24 +0000 Subject: [issue2054] add ftp-tls support to ftplib - RFC 4217 In-Reply-To: <1202523366.93.0.605901116561.issue2054@psf.upfronthosting.co.za> Message-ID: <1271014644.92.0.67100417015.issue2054@psf.upfronthosting.co.za> Giampaolo Rodola' added the comment: Thinking back about this, I wonder whether "FTPS" could be a better name to use instead of "FTP_TLS". It's shorter, easier to remember, and also makes more sense since also SSL can be used, not only TLS. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 21:38:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 19:38:40 +0000 Subject: [issue2987] RFC2732 support for urlparse (e.g. http://[::1]:80/) In-Reply-To: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> Message-ID: <1271014720.29.0.0130880503934.issue2987@psf.upfronthosting.co.za> ?ric Araujo added the comment: Seems sensible: Delimiters are not part of components. ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 21:43:56 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 19:43:56 +0000 Subject: [issue2054] add ftp-tls support to ftplib - RFC 4217 In-Reply-To: <1202523366.93.0.605901116561.issue2054@psf.upfronthosting.co.za> Message-ID: <1271015036.58.0.946906137681.issue2054@psf.upfronthosting.co.za> ?ric Araujo added the comment: It doesn?t look like a constant, too. httplib.Client, ftplib.Client, ftplib.SecureClient would be much more descriptive than httplib.HTTP and ftplib.FTP. Any interest about adding aliases? Regards ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 21:45:38 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 19:45:38 +0000 Subject: [issue2054] add ftp-tls support to ftplib - RFC 4217 In-Reply-To: <1271014644.92.0.67100417015.issue2054@psf.upfronthosting.co.za> Message-ID: <1271015260.23110.6.camel@localhost> Antoine Pitrou added the comment: > Thinking back about this, I wonder whether "FTPS" could be a better name to use instead of "FTP_TLS". > It's shorter, easier to remember, and also makes more sense since also SSL can be used, not only TLS. What do you mean by "also SSL can be used"? Wikipedia has an interesting article about the subject: http://en.wikipedia.org/wiki/FTPS Secured FTP with explicit negotiation (what we are doing) is sometimes called "FTPES" (that's how it's named in FileZilla indeed). "FTPS" is more often used to describe secured FTP with implicit negotiation, i.e. the SSL session is established before the FTP protocol even kicks in. I think FTP_TLS is a fine name. Perhaps we can simply make the above distinction clearer in the docs. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 22:02:51 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 11 Apr 2010 20:02:51 +0000 Subject: [issue8368] Memory leak on multi-threaded PyObject_CallObject In-Reply-To: <1270992736.41.0.985730063076.issue8368@psf.upfronthosting.co.za> Message-ID: <1271016171.38.0.808568788309.issue8368@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I can't reproduce the problem on Windows, either. The attached project runs the thread creation in a loop (leaving the 3s sleep in the code). I see (in process viewer) that the Commit Size varies between 13MB and 14MB; there is no indication of a leak. ---------- resolution: -> invalid status: open -> closed Added file: http://bugs.python.org/file16887/Python Bug.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 22:06:57 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 11 Apr 2010 20:06:57 +0000 Subject: [issue7443] test.support.unlink issue on Windows platform In-Reply-To: <4BC2238A.3080609@timgolden.me.uk> Message-ID: <4BC22BD9.8090009@v.loewis.de> Martin v. L?wis added the comment: > Would you agree that py3k is the only target branch worth aiming for? Most certainly, yes. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 22:32:47 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 20:32:47 +0000 Subject: [issue2987] RFC2732 support for urlparse (e.g. http://[::1]:80/) In-Reply-To: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> Message-ID: <1271017967.45.0.880688697781.issue2987@psf.upfronthosting.co.za> Antoine Pitrou added the comment: I think parsing should be a bit more careful. For example, what happens when you give 'http://dead:beef::]/foo/' as input (note the missing opening bracket)? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 22:34:21 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 20:34:21 +0000 Subject: [issue2987] RFC2732 support for urlparse (e.g. http://[::1]:80/) In-Reply-To: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> Message-ID: <1271018061.45.0.839250919837.issue2987@psf.upfronthosting.co.za> Antoine Pitrou added the comment: By the way, updating the RFC list as done in python-urlparse-rfc2732-rfc-list.patch is also a good idea. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 22:38:44 2010 From: report at bugs.python.org (Krauzi) Date: Sun, 11 Apr 2010 20:38:44 +0000 Subject: [issue8368] Memory leak on multi-threaded PyObject_CallObject In-Reply-To: <1270992736.41.0.985730063076.issue8368@psf.upfronthosting.co.za> Message-ID: <1271018324.65.0.840165850394.issue8368@psf.upfronthosting.co.za> Krauzi added the comment: ah no you misunderstood me. Please add a system("pause") and a system("pause") at the beginning of the while(1)-loop and one at the end. Then compare the memory usage of the program at the beginning (lets say it's 2,6 MB) with the usage at the second pause. In may case its 3,9 MB at this point. THIS is what i mean with the leak. On my computer on about 30000-35000 calls i pass the 4 MB "border". ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 22:44:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 20:44:49 +0000 Subject: [issue2987] RFC2732 support for urlparse (e.g. http:// In-Reply-To: <1271017967.45.0.880688697781.issue2987@psf.upfronthosting.co.za> Message-ID: <4BC234BE.70906@netwok.org> ?ric Araujo added the comment: Isn?t ?http://dead:beef::]/foo/? and invalid URI? Regarding doc, see also #5650. ---------- title: RFC2732 support for urlparse (e.g. http://[::1]:80/) -> RFC2732 support for urlparse (e.g. http:// _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 22:45:00 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 20:45:00 +0000 Subject: [issue5650] Obsolete RFCs should be removed from doc of urllib.urlparse In-Reply-To: <1238602458.06.0.807356829134.issue5650@psf.upfronthosting.co.za> Message-ID: <1271018700.2.0.576289862622.issue5650@psf.upfronthosting.co.za> ?ric Araujo added the comment: See also #2987 ---------- title: Obsolete RFC's should be removed from doc of urllib.urlparse -> Obsolete RFCs should be removed from doc of urllib.urlparse _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 22:54:25 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 20:54:25 +0000 Subject: [issue2987] RFC2732 support for urlparse (IPv6 addresses) In-Reply-To: <4BC234BE.70906@netwok.org> Message-ID: <1271019387.23110.8.camel@localhost> Antoine Pitrou added the comment: > Isn?t ?http://dead:beef::]/foo/? and invalid URI? That's the point, it shouldn't parse as a valid one IMO. ---------- title: RFC2732 support for urlparse (e.g. http:// -> RFC2732 support for urlparse (IPv6 addresses) _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 23:00:26 2010 From: report at bugs.python.org (Stefan Krah) Date: Sun, 11 Apr 2010 21:00:26 +0000 Subject: [issue7301] Add environment variable $PYTHONWARNINGS In-Reply-To: <1257865531.11.0.841786263832.issue7301@psf.upfronthosting.co.za> Message-ID: <1271019626.05.0.750010924238.issue7301@psf.upfronthosting.co.za> Stefan Krah added the comment: The changes in main.c in r79881 don't look right: strtok() is used on the string returned by getenv(), which must not be modified. Also (and this admittedly cosmetic), perhaps use a static buffer like wchar_t warning[128] or use a single allocation before the for loop. What is the maximum length for a single warning? ---------- nosy: +skrah _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 23:10:50 2010 From: report at bugs.python.org (Philip Jenvey) Date: Sun, 11 Apr 2010 21:10:50 +0000 Subject: [issue7301] Add environment variable $PYTHONWARNINGS In-Reply-To: <1257865531.11.0.841786263832.issue7301@psf.upfronthosting.co.za> Message-ID: <1271020250.02.0.421808640271.issue7301@psf.upfronthosting.co.za> Philip Jenvey added the comment: The pending patch for py3k fixes the modification of the env value (trunk already has a fix for that). That patch is also doing the conversion to wchar_t via the char2wchar function now, with that reusing a single buffer seems out of the question ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 23:18:06 2010 From: report at bugs.python.org (STINNER Victor) Date: Sun, 11 Apr 2010 21:18:06 +0000 Subject: [issue8070] Infinite loop in PyRun_InteractiveLoopFlags() if PyRun_InteractiveOneFlags() raises an error In-Reply-To: <1267793425.09.0.566406511799.issue8070@psf.upfronthosting.co.za> Message-ID: <1271020686.28.0.521288670466.issue8070@psf.upfronthosting.co.za> STINNER Victor added the comment: I don't have time to write a better patch, please improve mine :-) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 23:19:01 2010 From: report at bugs.python.org (Charles-Francois Natali) Date: Sun, 11 Apr 2010 21:19:01 +0000 Subject: [issue7946] Convoy effect with I/O bound threads and New GIL In-Reply-To: <1266353325.38.0.278549753357.issue7946@psf.upfronthosting.co.za> Message-ID: <1271020741.01.0.979373850491.issue7946@psf.upfronthosting.co.za> Charles-Francois Natali added the comment: A couple remarks on BFS-based patch: - nothing guarantees that you'll get a msec resolution - gettimeofday returns you wall clock time: if a process that modifies time is running, e.g. ntpd, you'll likely to run into trouble. the value returned is _not_ monotonic, but clock_gettime(CLOCK_MONOTONIC) is - inline functions are used, but it's not ANSI - static inline long double get_timestamp(void) { struct timeval tv; GETTIMEOFDAY(&tv); return (long double) tv.tv_sec + tv.tv_usec * 0.000001; } the product is computed as double, and then promoted as (long double). - the code uses a lot of floating point calculation, which is slower than integer Otherwise: "- You know, I almost wonder whether this whole issue could be fixed by just adding a user-callable function to optionally set a thread priority number. For example: sys.setpriority(n) Modify the new GIL code so that it checks the priority of the currently running thread against the priority of the thread that wants the GIL. If the running thread has lower priority, it immediately drops the GIL." The problem with this type of fixed-priority is starvation. And it shouldn't be up to the user to set the priorities. And some threads can mix I/O and CPU intensive tasks. > It's a dual-core Linux x86-64 system. But, looking at the patch again, the reason is obvious: > > #define CHECK_SLICE_DEPLETION(tstate) (bfs_check_depleted || (tstate > >tick_counter % 1000 == 0)) > > `tstate->tick_counter % 1000` is replicating the behaviour of the old GIL, which based its speculative operation on the number of elapsed opcodes (and which also gave bad latency numbers on the regex workload). I find this suspicous too. I haven't looked at the patch in detail, but what does the number of elapsed opcodes offers you over the timesplice expiration approach ? ---------- nosy: +neologix _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 23:20:24 2010 From: report at bugs.python.org (Luke Jennings) Date: Sun, 11 Apr 2010 21:20:24 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271020824.21.0.72658096394.issue8374@psf.upfronthosting.co.za> Message-ID: <1271020824.21.0.72658096394.issue8374@psf.upfronthosting.co.za> New submission from Luke Jennings : In the locale module there are some locales that are not supported these the ones that I am aware of are nl_AW, sr_RS sr_ME. This information was due to a project that captures screenshots in different languages and we have to retrieve the language code. Related to the origin of the bug https://bugs.edge.launchpad.net/quickshot/+bug/554861 . If any more information is required please let me know. ---------- components: Extension Modules messages: 102891 nosy: ubuntujenkins severity: normal status: open title: Some locales are unsupported type: behavior versions: Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 23:38:38 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 21:38:38 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271020824.21.0.72658096394.issue8374@psf.upfronthosting.co.za> Message-ID: <1271021918.21.0.45437032334.issue8374@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hello Not a local expert here, but since this module relies on the underlying libc locale support. Do other programs work correctly with this locale? Apart from that, your program needs to catch and handle exceptions anyway. Martin, I?m making you nosy, since you?re listed as locale area expect in the maintainers file. Hope it?s okay to do so. Regards ---------- components: +Library (Lib) -Extension Modules nosy: +loewis, merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 23:43:12 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 21:43:12 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271020824.21.0.72658096394.issue8374@psf.upfronthosting.co.za> Message-ID: <1271022192.33.0.350032477932.issue8374@psf.upfronthosting.co.za> ?ric Araujo added the comment: Sorry for sending this too fast. The beginning should read: Not a locale expert here, but since this module relies on the underlying libc locale support, the bug is not Python-specific. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 23:47:53 2010 From: report at bugs.python.org (Luke Jennings) Date: Sun, 11 Apr 2010 21:47:53 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271020824.21.0.72658096394.issue8374@psf.upfronthosting.co.za> Message-ID: <1271022473.84.0.29922358725.issue8374@psf.upfronthosting.co.za> Luke Jennings added the comment: Other programs do work with the local. I am working on dealing with exceptions, I am rather new to programing and thought it would also be good to try and get this fixed in the original module. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 23:49:10 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 21:49:10 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271022473.84.0.29922358725.issue8374@psf.upfronthosting.co.za> Message-ID: <4BC243CF.9090908@netwok.org> ?ric Araujo added the comment: What I?m saying is that the original module is not a bug. I?ll let Martin confirm or infirm :) Regards ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 23:52:27 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 21:52:27 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271020824.21.0.72658096394.issue8374@psf.upfronthosting.co.za> Message-ID: <1271022747.52.0.448448347799.issue8374@psf.upfronthosting.co.za> Antoine Pitrou added the comment: This doesn't look like a bug. You must install a locale before it gets available to Python. Furthermore, according to the original traceback ( http://launchpadlibrarian.net/43012745/quickshot-latin.log ), the locale module isn't even involved. ---------- nosy: +pitrou resolution: -> invalid status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 23:58:07 2010 From: report at bugs.python.org (Luke Jennings) Date: Sun, 11 Apr 2010 21:58:07 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271020824.21.0.72658096394.issue8374@psf.upfronthosting.co.za> Message-ID: <1271023087.79.0.73728574651.issue8374@psf.upfronthosting.co.za> Luke Jennings added the comment: Sorry for the confusion but that bug report has two very similar problems to it if you look at https://bugs.edge.launchpad.net/quickshot/+bug/554861/comments/7 and https://bugs.edge.launchpad.net/quickshot/+bug/554861/comments/6 . I think that is calling the locale module. I apologize if i have put this down to the wrong thing I am new to python. ---------- status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Sun Apr 11 23:59:38 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 21:59:38 +0000 Subject: [issue1004696] translate Windows newlines when installing scripts on POSIX Message-ID: <1271023178.59.0.802825358553.issue1004696@psf.upfronthosting.co.za> ?ric Araujo added the comment: I?m shocked to learn this bug is still valid. Reassigning to Distutils2, as Distutils is frozen. This bug is a particular case of #870479 Regards ---------- components: +Distutils2 -Distutils title: translate Windows cr-lf when installing scripts on Linux -> translate Windows newlines when installing scripts on POSIX _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 00:00:38 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 11 Apr 2010 22:00:38 +0000 Subject: [issue8368] Memory leak on multi-threaded PyObject_CallObject In-Reply-To: <1270992736.41.0.985730063076.issue8368@psf.upfronthosting.co.za> Message-ID: <1271023238.03.0.159109708753.issue8368@psf.upfronthosting.co.za> Martin v. L?wis added the comment: Ok, it consumes more memory - why do you think there is a leak? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 00:02:15 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 22:02:15 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271020824.21.0.72658096394.issue8374@psf.upfronthosting.co.za> Message-ID: <1271023335.58.0.479236301553.issue8374@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Actually, my diagnosis was wrong. The locale module contains a list of locale aliases and some of the Serbian ones are missing. A recent locale.alias file from X11 is more complete. ---------- nosy: +lemburg priority: -> normal resolution: invalid -> versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 00:13:08 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 11 Apr 2010 22:13:08 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271020824.21.0.72658096394.issue8374@psf.upfronthosting.co.za> Message-ID: <1271023988.71.0.895984687077.issue8374@psf.upfronthosting.co.za> Martin v. L?wis added the comment: getdefaultlocale is inherently unmaintainable, and shouldn't be used by applications. I wish it was removed from Python (but unfortunately, too many people got tricked into believing that it does something useful). That said, if anybody feels like updating the tables from the various data sources, please go ahead. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 00:15:30 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 22:15:30 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271023988.71.0.895984687077.issue8374@psf.upfronthosting.co.za> Message-ID: <4BC24A00.5070009@netwok.org> ?ric Araujo added the comment: Can we tell about getdefaultlocale?s uselessness in the docs? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 00:23:51 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 11 Apr 2010 22:23:51 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <4BC24A00.5070009@netwok.org> Message-ID: <4BC24BF4.2040307@v.loewis.de> Martin v. L?wis added the comment: > Can we tell about getdefaultlocale?s uselessness in the docs? I haven't quite understood what people want to use that function for. If we knew the typical use cases, we could make recommendations what they should use instead. One use case is to find out the encoding of the locale, in order to encode files. People should use locale.getpreferredencoding instead, or trust that the io module will find out on its own. However, these cases seem to be different. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 00:27:29 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 22:27:29 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <4BC24BF4.2040307@v.loewis.de> Message-ID: <1271024972.23110.11.camel@localhost> Antoine Pitrou added the comment: > However, these cases seem to be different. I think it can be used to find out the current language setting of the user, and trigger a third-party translation system (other than e.g. gettext). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 00:27:58 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 22:27:58 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271020824.21.0.72658096394.issue8374@psf.upfronthosting.co.za> Message-ID: <1271024878.72.0.107820590438.issue8374@psf.upfronthosting.co.za> Antoine Pitrou added the comment: When the table is updated in trunk, can it be backported to 2.6? It does change a couple of mappings (example here is from sr_CS.* to sr_RS.*). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 00:36:05 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 22:36:05 +0000 Subject: [issue7905] Shelf 'keyencoding' keyword argument is undocumented and does not work. In-Reply-To: <1265858045.44.0.437187909795.issue7905@psf.upfronthosting.co.za> Message-ID: <1271025365.43.0.23701725662.issue7905@psf.upfronthosting.co.za> ?ric Araujo added the comment: One remark: In ?The *keyencoding* parameter is the encoding used to encode key values?, what are ?key values?? Don?t we just say ?keys? in such cases? Regards ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 00:44:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Sun, 11 Apr 2010 22:44:17 +0000 Subject: [issue870479] Scripts need platform-dependent handling Message-ID: <1271025857.48.0.991062935467.issue870479@psf.upfronthosting.co.za> ?ric Araujo added the comment: This bug supersedes #1004696. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 00:50:38 2010 From: report at bugs.python.org (Tony Locke) Date: Sun, 11 Apr 2010 22:50:38 +0000 Subject: [issue2987] RFC2732 support for urlparse (IPv6 addresses) In-Reply-To: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> Message-ID: <1271026238.01.0.879350315909.issue2987@psf.upfronthosting.co.za> Changes by Tony Locke : Removed file: http://bugs.python.org/file16886/parse.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 01:03:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 23:03:01 +0000 Subject: [issue8375] test_distutils fails when run with -j In-Reply-To: <1271026981.38.0.880810451818.issue8375@psf.upfronthosting.co.za> Message-ID: <1271026981.38.0.880810451818.issue8375@psf.upfronthosting.co.za> New submission from Antoine Pitrou : test_distutils fails in py3k when run with -j (e.g. "python -m test.regrtest -j1 -v test_distutils") ====================================================================== ERROR: test_build_ext (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/__svn__/Lib/distutils/tests/test_build_ext.py", line 61, in tearDown super(BuildExtTestCase, self).tearDown() File "/home/antoine/py3k/__svn__/Lib/distutils/tests/support.py", line 66, in tearDown shutil.rmtree(d, os.name in ('nt', 'cygwin')) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 243, in rmtree onerror(os.listdir, path, sys.exc_info()) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 241, in rmtree names = os.listdir(path) OSError: [Errno 2] No such file or directory: '/tmp/tmpyn8Vpj' ====================================================================== ERROR: test_check_extensions_list (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/__svn__/Lib/distutils/tests/test_build_ext.py", line 61, in tearDown super(BuildExtTestCase, self).tearDown() File "/home/antoine/py3k/__svn__/Lib/distutils/tests/support.py", line 66, in tearDown shutil.rmtree(d, os.name in ('nt', 'cygwin')) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 243, in rmtree onerror(os.listdir, path, sys.exc_info()) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 241, in rmtree names = os.listdir(path) OSError: [Errno 2] No such file or directory: '/tmp/tmp4r36LO' ====================================================================== ERROR: test_compiler_deprecation_warning (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/__svn__/Lib/distutils/tests/test_build_ext.py", line 61, in tearDown super(BuildExtTestCase, self).tearDown() File "/home/antoine/py3k/__svn__/Lib/distutils/tests/support.py", line 66, in tearDown shutil.rmtree(d, os.name in ('nt', 'cygwin')) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 243, in rmtree onerror(os.listdir, path, sys.exc_info()) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 241, in rmtree names = os.listdir(path) OSError: [Errno 2] No such file or directory: '/tmp/tmpGz62QC' ====================================================================== ERROR: test_compiler_option (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/__svn__/Lib/distutils/tests/test_build_ext.py", line 61, in tearDown super(BuildExtTestCase, self).tearDown() File "/home/antoine/py3k/__svn__/Lib/distutils/tests/support.py", line 66, in tearDown shutil.rmtree(d, os.name in ('nt', 'cygwin')) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 243, in rmtree onerror(os.listdir, path, sys.exc_info()) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 241, in rmtree names = os.listdir(path) OSError: [Errno 2] No such file or directory: '/tmp/tmpUoqcH9' ====================================================================== ERROR: test_ext_fullpath (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/__svn__/Lib/distutils/tests/test_build_ext.py", line 61, in tearDown super(BuildExtTestCase, self).tearDown() File "/home/antoine/py3k/__svn__/Lib/distutils/tests/support.py", line 66, in tearDown shutil.rmtree(d, os.name in ('nt', 'cygwin')) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 243, in rmtree onerror(os.listdir, path, sys.exc_info()) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 241, in rmtree names = os.listdir(path) OSError: [Errno 2] No such file or directory: '/tmp/tmpqHPvDG' ====================================================================== ERROR: test_finalize_options (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/__svn__/Lib/distutils/tests/test_build_ext.py", line 61, in tearDown super(BuildExtTestCase, self).tearDown() File "/home/antoine/py3k/__svn__/Lib/distutils/tests/support.py", line 66, in tearDown shutil.rmtree(d, os.name in ('nt', 'cygwin')) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 243, in rmtree onerror(os.listdir, path, sys.exc_info()) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 241, in rmtree names = os.listdir(path) OSError: [Errno 2] No such file or directory: '/tmp/tmp2WXDKn' ====================================================================== ERROR: test_get_outputs (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/__svn__/Lib/distutils/tests/test_build_ext.py", line 61, in tearDown super(BuildExtTestCase, self).tearDown() File "/home/antoine/py3k/__svn__/Lib/distutils/tests/support.py", line 66, in tearDown shutil.rmtree(d, os.name in ('nt', 'cygwin')) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 243, in rmtree onerror(os.listdir, path, sys.exc_info()) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 241, in rmtree names = os.listdir(path) OSError: [Errno 2] No such file or directory: '/tmp/tmp_kkj2U' ====================================================================== ERROR: test_get_source_files (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/__svn__/Lib/distutils/tests/test_build_ext.py", line 61, in tearDown super(BuildExtTestCase, self).tearDown() File "/home/antoine/py3k/__svn__/Lib/distutils/tests/support.py", line 66, in tearDown shutil.rmtree(d, os.name in ('nt', 'cygwin')) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 243, in rmtree onerror(os.listdir, path, sys.exc_info()) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 241, in rmtree names = os.listdir(path) OSError: [Errno 2] No such file or directory: '/tmp/tmp13Y9c9' ====================================================================== ERROR: test_optional_extension (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/__svn__/Lib/distutils/tests/test_build_ext.py", line 61, in tearDown super(BuildExtTestCase, self).tearDown() File "/home/antoine/py3k/__svn__/Lib/distutils/tests/support.py", line 66, in tearDown shutil.rmtree(d, os.name in ('nt', 'cygwin')) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 243, in rmtree onerror(os.listdir, path, sys.exc_info()) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 241, in rmtree names = os.listdir(path) OSError: [Errno 2] No such file or directory: '/tmp/tmp6f6ENV' ====================================================================== ERROR: test_solaris_enable_shared (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/__svn__/Lib/distutils/tests/test_build_ext.py", line 61, in tearDown super(BuildExtTestCase, self).tearDown() File "/home/antoine/py3k/__svn__/Lib/distutils/tests/support.py", line 66, in tearDown shutil.rmtree(d, os.name in ('nt', 'cygwin')) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 243, in rmtree onerror(os.listdir, path, sys.exc_info()) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 241, in rmtree names = os.listdir(path) OSError: [Errno 2] No such file or directory: '/tmp/tmpNXs6vs' ====================================================================== ERROR: test_user_site (distutils.tests.test_build_ext.BuildExtTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File "/home/antoine/py3k/__svn__/Lib/distutils/tests/test_build_ext.py", line 61, in tearDown super(BuildExtTestCase, self).tearDown() File "/home/antoine/py3k/__svn__/Lib/distutils/tests/support.py", line 66, in tearDown shutil.rmtree(d, os.name in ('nt', 'cygwin')) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 243, in rmtree onerror(os.listdir, path, sys.exc_info()) File "/home/antoine/py3k/__svn__/Lib/shutil.py", line 241, in rmtree names = os.listdir(path) OSError: [Errno 2] No such file or directory: '/tmp/tmpDcrnD8' ---------------------------------------------------------------------- ---------- assignee: tarek components: Distutils messages: 102908 nosy: pitrou, tarek priority: normal severity: normal stage: needs patch status: open title: test_distutils fails when run with -j type: behavior versions: Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 01:04:24 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Sun, 11 Apr 2010 23:04:24 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271024878.72.0.107820590438.issue8374@psf.upfronthosting.co.za> Message-ID: <4BC25576.3080204@v.loewis.de> Martin v. L?wis added the comment: > When the table is updated in trunk, can it be backported to 2.6? With the changes to the encodings for some of the locales (e.g. 'ru'), I would advise against such a backport. This also demonstrates one fundamental flaw of the approach: even if X11 decides that 'ru' should be using "UTF-8", some local installations will certainly differ. Likewise when they decided that "ru" uses iso-8859-5. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 01:08:37 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 23:08:37 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271020824.21.0.72658096394.issue8374@psf.upfronthosting.co.za> Message-ID: <1271027317.58.0.91195508566.issue8374@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Ok, the fix (updated tables) has been committed in trunk (r79977) and py3k (r79978). I suppose Ubuntu can backport the patch if they want their Python to be in sync with their own locales. (even better, distributions should include the regeneration of locale aliases from their own locale.alias in their build scripts) ---------- resolution: -> fixed status: open -> closed versions: -Python 2.6, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 01:09:11 2010 From: report at bugs.python.org (Tony Locke) Date: Sun, 11 Apr 2010 23:09:11 +0000 Subject: [issue2987] RFC2732 support for urlparse (IPv6 addresses) In-Reply-To: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> Message-ID: <1271027351.89.0.628695793244.issue2987@psf.upfronthosting.co.za> Tony Locke added the comment: Regarding the RFC list issue, I've posted a new patch with a new RFC list that combines ndim's list and the comments from #5650. Pitrou argues that http://dead:beef::]/foo/ should fail because it's a malformed URL. My response would be that the parse() function has historically assumed that a URL is well formed, and so this change to accommodate IPv6 should continue to assume the URL is well formed. I'd say that a separate bug should be raised if it's thought that parse() should be changed to check that any URL is well-formed. ---------- Added file: http://bugs.python.org/file16888/parse.py.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 01:15:29 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Sun, 11 Apr 2010 23:15:29 +0000 Subject: [issue2987] RFC2732 support for urlparse (IPv6 addresses) In-Reply-To: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> Message-ID: <1271027729.78.0.76091256024.issue2987@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- nosy: +benjamin.peterson _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 02:23:11 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Apr 2010 00:23:11 +0000 Subject: [issue7905] Shelf 'keyencoding' keyword argument is undocumented and does not work. In-Reply-To: <1265858045.44.0.437187909795.issue7905@psf.upfronthosting.co.za> Message-ID: <1271031791.15.0.802336733339.issue7905@psf.upfronthosting.co.za> R. David Murray added the comment: Yes, that would be clearer wording. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 04:00:32 2010 From: report at bugs.python.org (George Boutsioukis) Date: Mon, 12 Apr 2010 02:00:32 +0000 Subject: [issue6409] 2to3 -j 4 generates malformed diffs In-Reply-To: <1246636426.08.0.872531312657.issue6409@psf.upfronthosting.co.za> Message-ID: <1271037632.92.0.397944711784.issue6409@psf.upfronthosting.co.za> George Boutsioukis added the comment: Flushing stdout is still necessary, though not enough. The processes will still have to use some kind of synchronization, and the performance toll of adding a lock to synchronize output is negligible, given that printing to stdout takes a tiny amount of time compared to the rest of the 2to3 code. This patch seems to fix the issue without affecting performance. ---------- nosy: +gboutsioukis Added file: http://bugs.python.org/file16889/output_lock.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 04:01:48 2010 From: report at bugs.python.org (Shashwat Anand) Date: Mon, 12 Apr 2010 02:01:48 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1271037708.58.0.840994260197.issue7370@psf.upfronthosting.co.za> Shashwat Anand added the comment: Instead of ?email.utils.formatdate(time, usegmt=True)? we can simply use time.strftime() and clean the code in a better way. The duplication is there in date_time_string() as well as log_date_time_string(). Submitting the patch for review. ---------- nosy: +l0nwlf Added file: http://bugs.python.org/file16890/BaseHTTPServer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 06:55:53 2010 From: report at bugs.python.org (Chris Rebert) Date: Mon, 12 Apr 2010 04:55:53 +0000 Subject: [issue5250] Document __instancecheck__ and __subclasscheck__ In-Reply-To: <1234548219.84.0.437841096999.issue5250@psf.upfronthosting.co.za> Message-ID: <1271048153.99.0.297823257081.issue5250@psf.upfronthosting.co.za> Changes by Chris Rebert : ---------- nosy: +cvrebert versions: +Python 2.6, Python 2.7, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 07:11:02 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 12 Apr 2010 05:11:02 +0000 Subject: [issue2987] RFC2732 support for urlparse (IPv6 addresses) In-Reply-To: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> Message-ID: <1271049062.18.0.00751937534362.issue2987@psf.upfronthosting.co.za> Senthil Kumaran added the comment: With respect to msg98314 (http://bugs.python.org/msg98314) referenced in this bug, which I thought is easy to handle, does not appear so. It is bit tricky. The problem is the relative url is given of the format '07.11.2009-9:54:12-1.jpg' and urlparse wrongly assumes that it is VALID url with the scheme as 07.11.2009-9 ( Surprisingly, this falls under valid characters for a URL Scheme, but we know that there no url scheme like that). But when you give ./07.11.2009-9, ./ is identified a relative path and urljoin happens properly. My inclination for this specific msg9814, is the allow the user to give the proper path like ./07.11.2009-9 or use urljoin from different directory, images/07.11.2009-9 and this should handle it. This date-time relative url is not a typical scenario, but for typical scnerios, urlparse behaves as expected. >>> x = 'http://a.b.c' >>> urlparse.urljoin(x,'foo') 'http://a.b.c/foo' >>> urlparse.urljoin(x,'./foo') 'http://a.b.c/foo' >>> I shall provide my comments on the IPv6 parse in next msg. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 07:14:40 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 12 Apr 2010 05:14:40 +0000 Subject: [issue8279] python-gdb PyListTests fail In-Reply-To: <1270108061.33.0.213932386799.issue8279@psf.upfronthosting.co.za> Message-ID: <1271049280.39.0.306078338089.issue8279@psf.upfronthosting.co.za> Martin v. L?wis added the comment: The patch in file16727 was applied as part of issue8316. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 07:23:32 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 12 Apr 2010 05:23:32 +0000 Subject: [issue8330] Failures seen in test_gdb on buildbots In-Reply-To: <1270601126.21.0.71359722213.issue8330@psf.upfronthosting.co.za> Message-ID: <1271049812.5.0.658104622657.issue8330@psf.upfronthosting.co.za> Martin v. L?wis added the comment: I have now applied file16808 as r79986. I'm detaching file16804, as it was superceded by the other patch. I also reenabled all tests in r79987, to see how the buildbots react. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 08:22:44 2010 From: report at bugs.python.org (Ezio Melotti) Date: Mon, 12 Apr 2010 06:22:44 +0000 Subject: [issue8026] strftime bug when timedelta is negative In-Reply-To: <1267206102.75.0.187323607292.issue8026@psf.upfronthosting.co.za> Message-ID: <1271053364.23.0.174536739461.issue8026@psf.upfronthosting.co.za> Changes by Ezio Melotti : ---------- nosy: +ezio.melotti _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 08:35:58 2010 From: report at bugs.python.org (Anders Kaseorg) Date: Mon, 12 Apr 2010 06:35:58 +0000 Subject: =?utf-8?q?=5Bissue8376=5D_Tutorial_offers_dangerous_advice_about_iterator?= =?utf-8?b?czog4oCcX19pdGVyX18oKSBjYW4ganVzdCByZXR1cm4gc2VsZuKAnQ==?= In-Reply-To: <1271054158.9.0.672918640444.issue8376@psf.upfronthosting.co.za> Message-ID: <1271054158.9.0.672918640444.issue8376@psf.upfronthosting.co.za> New submission from Anders Kaseorg : The Python tutorial offers some dangerous advice about adding iterator behavior to a class: http://docs.python.org/tutorial/classes.html#iterators ?By now you have probably noticed that most container objects can be looped over using a for statement: ? Having seen the mechanics behind the iterator protocol, it is easy to add iterator behavior to your classes. Define a __iter__() method which returns an object with a next() method. If the class defines next(), then __iter__() can just return self:? This is reasonable advice for writing an iterator class, but terrible advice for writing a container class, because it encourages you to associate a single iterator with the container, which breaks nested iteration and leads to hard-to-find bugs. (One of those bugs recently made its way into the code handout for a problem set in MIT?s introductory CS course, 6.00.) A container class?s __iter__() should return a generator or an instance of a separate iterator class, not self. The tutorial should make this clearer. ---------- assignee: georg.brandl components: Documentation messages: 102918 nosy: andersk, georg.brandl severity: normal status: open title: Tutorial offers dangerous advice about iterators: ?__iter__() can just return self? _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 08:36:20 2010 From: report at bugs.python.org (Chris Rebert) Date: Mon, 12 Apr 2010 06:36:20 +0000 Subject: [issue5250] Document __instancecheck__ and __subclasscheck__ In-Reply-To: <1234548219.84.0.437841096999.issue5250@psf.upfronthosting.co.za> Message-ID: <1271054180.39.0.309908619545.issue5250@psf.upfronthosting.co.za> Chris Rebert added the comment: Here's a draft of an updated version of the "Data model" docs reflecting the changes in the PEP. ---------- keywords: +patch type: -> feature request Added file: http://bugs.python.org/file16891/datamodel.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 08:42:08 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 12 Apr 2010 06:42:08 +0000 Subject: [issue2987] RFC2732 support for urlparse (IPv6 addresses) In-Reply-To: <1211920837.73.0.839643919886.issue2987@psf.upfronthosting.co.za> Message-ID: <1271054528.86.0.912962444229.issue2987@psf.upfronthosting.co.za> Senthil Kumaran added the comment: After spending a sufficient amount of time looking at patches and the RFC 2732, I tend to agree with the patch provided by tlocke. It does cover the behavior for parsing IPv6 URL with '[' hostname ']'. RFC 2732 is very short and just says that hostname in the IPv6 should not have '[' and ']' characters. The patch does just that, which is fine. If hard pressed on detecting invalid IPv6 , I would add and extra + if "[" in netloc and "]" in netloc: + return netloc.split("]")[0][1:].lower() + elif "[" in netloc or "]" in netloc: + raise ValueError("Invalid IPv6 URL") Which should take care of Invalid IPv6 urls as discussed in this bug. - Any comments on this? Also regarding the urlparse header docs, (it was long pending on me and sorry), here is a patch for current one for review. When we address this bug, I shall include RFC 2732 as well in the list. ---------- resolution: -> accepted Added file: http://bugs.python.org/file16892/urlparse-module-header.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 08:45:22 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 12 Apr 2010 06:45:22 +0000 Subject: [issue7026] test_urllib: unsetting missing 'env' variable In-Reply-To: <1254358150.75.0.46389883722.issue7026@psf.upfronthosting.co.za> Message-ID: <1271054722.17.0.585969466502.issue7026@psf.upfronthosting.co.za> Senthil Kumaran added the comment: I am unable to reproduce this issue in the trunk/py3k. Buildbots have not complained either. I am closing this bug. srid: If you have steps to reproduce, feel free to reopen it. ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 08:52:44 2010 From: report at bugs.python.org (Chris Rebert) Date: Mon, 12 Apr 2010 06:52:44 +0000 Subject: [issue5250] Document __instancecheck__ and __subclasscheck__ In-Reply-To: <1234548219.84.0.437841096999.issue5250@psf.upfronthosting.co.za> Message-ID: <1271055164.75.0.841392372862.issue5250@psf.upfronthosting.co.za> Changes by Chris Rebert : Added file: http://bugs.python.org/file16893/datamodel.rst.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 09:08:10 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 12 Apr 2010 07:08:10 +0000 Subject: [issue8339] urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://' In-Reply-To: <1270676527.4.0.372149513422.issue8339@psf.upfronthosting.co.za> Message-ID: <1271056090.35.0.182075750538.issue8339@psf.upfronthosting.co.za> Senthil Kumaran added the comment: Added additional examples of valid urls in r79988 and branches under the roundtrip test cases. Michael, RDM: If you have any comments on msg102737, let me know. Otherwise we can close this issue as wont-fix. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 10:19:32 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 12 Apr 2010 08:19:32 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271023988.71.0.895984687077.issue8374@psf.upfronthosting.co.za> Message-ID: <4BC2D7AD.4020201@egenix.com> Marc-Andre Lemburg added the comment: Martin v. L?wis wrote: > > Martin v. L?wis added the comment: > > getdefaultlocale is inherently unmaintainable, and shouldn't be used by applications. I wish it was removed from Python (but unfortunately, too many people got tricked into believing that it does something useful). I disagree on that. getdefaultlocale() provides a way to access the default locale (and encoding) on a platform without requiring a call to setlocale(LC_ALL, "") which would affect the currently running application and is not thread-safe (just like most other locale C APIs in the C lib). getpreferredencoding() just provides encoding information. It doesn't provide locale information, so I don't see how that could be used as replacement for getdefaultlocale(). The table needed for normalizing the various locale strings used in the LANG environment variable (and others) needs to be updated every now and then, but that's natural for a resource that changes based on what people use locales for in real life. > That said, if anybody feels like updating the tables from the various data sources, please go ahead. I last updated the table in 2008. Will do that again this week. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 10:25:54 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 12 Apr 2010 08:25:54 +0000 Subject: [issue8375] test_distutils fails when run with -j In-Reply-To: <1271026981.38.0.880810451818.issue8375@psf.upfronthosting.co.za> Message-ID: <1271060754.4.0.364411775628.issue8375@psf.upfronthosting.co.za> Tarek Ziad? added the comment: done in r79992 ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 10:38:57 2010 From: report at bugs.python.org (=?utf-8?b?2LnYqNiv2KfZhNmE2Ycg2LTZhNmKIChBYmRlbGxhaCBDaGVsbGkp?=) Date: Mon, 12 Apr 2010 08:38:57 +0000 Subject: [issue8359] % formating - TypeError: not all arguments converted during string formatting In-Reply-To: <1270892279.77.0.4172116449.issue8359@psf.upfronthosting.co.za> Message-ID: <1271061537.44.0.781107934278.issue8359@psf.upfronthosting.co.za> ??????? ??? (Abdellah Chelli) added the comment: Mapping works too, I don't know how I didn't get it. Thank you Eric. Ex: gettext.ngettext("%(package)d package", "%(package)d packages", countInstall) % { 'package': countInstall} https://bugs.launchpad.net/ubuntu/+source/language-selector/+bug/409785/comments/9 Thank you guys, Eric & Georg. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 10:55:28 2010 From: report at bugs.python.org (Marc-Andre Lemburg) Date: Mon, 12 Apr 2010 08:55:28 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <4BC2D7AD.4020201@egenix.com> Message-ID: <4BC2E01A.6090805@egenix.com> Marc-Andre Lemburg added the comment: M.-A. Lemburg wrote: >> That said, if anybody feels like updating the tables from the various data sources, please go ahead. > > I last updated the table in 2008. Will do that again this week. I saw that Antoine already did this for me: thanks, Antoine ! Could you tell me which X11 version you used ? I've modified the generation script to also output the added aliases and would like to list them as well. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 11:02:33 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 12 Apr 2010 09:02:33 +0000 Subject: =?utf-8?q?=5Bissue8376=5D_Tutorial_offers_dangerous_advice_about_iterator?= =?utf-8?b?czog4oCcX19pdGVyX18oKSBjYW4ganVzdCByZXR1cm4gc2VsZuKAnQ==?= In-Reply-To: <1271054158.9.0.672918640444.issue8376@psf.upfronthosting.co.za> Message-ID: <1271062953.59.0.0227343044648.issue8376@psf.upfronthosting.co.za> Changes by ?ric Araujo : ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 11:11:45 2010 From: report at bugs.python.org (Jatin Sanghvi) Date: Mon, 12 Apr 2010 09:11:45 +0000 Subject: [issue8377] Errata on page:http://docs.python.org/library/stdtypes.html In-Reply-To: <1271063505.25.0.821351537014.issue8377@psf.upfronthosting.co.za> Message-ID: <1271063505.25.0.821351537014.issue8377@psf.upfronthosting.co.za> New submission from Jatin Sanghvi : Open link: http://docs.python.org/library/stdtypes.html The statement: If i or j is negative, the index is relative to the end of the string: len(s) + i or len(s) + j is substituted. is incorrect, should be: If i or j is negative, the index is relative to the end of the string: len(s) - i or len(s) - j is substituted. ---------- assignee: georg.brandl components: Documentation messages: 102927 nosy: georg.brandl, jatin085 severity: normal status: open title: Errata on page:http://docs.python.org/library/stdtypes.html versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 11:17:07 2010 From: report at bugs.python.org (=?utf-8?q?Walter_D=C3=B6rwald?=) Date: Mon, 12 Apr 2010 09:17:07 +0000 Subject: [issue8377] Errata on page:http://docs.python.org/library/stdtypes.html In-Reply-To: <1271063505.25.0.821351537014.issue8377@psf.upfronthosting.co.za> Message-ID: <1271063827.52.0.855982100582.issue8377@psf.upfronthosting.co.za> Walter D?rwald added the comment: This is a common thinko. ;) If i is negative then len(s) - i would be greater that len(s). However len(s) + i is correct. Example: foo[-1] is foo[len(foo) + (-1)] is foo[len(foo)-1] ---------- nosy: +doerwalter resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 11:19:13 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Apr 2010 09:19:13 +0000 Subject: [issue3581] failures in test_uuid In-Reply-To: <1218991997.09.0.347137407735.issue3581@psf.upfronthosting.co.za> Message-ID: <1271063953.81.0.53698498147.issue3581@psf.upfronthosting.co.za> Stefan Krah added the comment: Applied test_uuid3.patch to trunk (r79954), release26-maint (r79959), py3k (r79960) and release31-maint (r79961). No buildbot failures so far, so I'm closing this. ---------- stage: commit review -> committed/rejected status: open -> closed versions: +Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 11:22:38 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Apr 2010 09:22:38 +0000 Subject: [issue7650] test_uuid is invalid In-Reply-To: <1262828995.4.0.365764114727.issue7650@psf.upfronthosting.co.za> Message-ID: <1271064158.44.0.161504696151.issue7650@psf.upfronthosting.co.za> Stefan Krah added the comment: Fixed in issue 3581. Thanks for the report and the comments! ---------- assignee: -> skrah dependencies: +failures in test_uuid keywords: +patch resolution: -> accepted stage: needs patch -> committed/rejected status: open -> closed superseder: -> failures in test_uuid _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 11:25:36 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 12 Apr 2010 09:25:36 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1271064336.25.0.550142254016.issue7370@psf.upfronthosting.co.za> ?ric Araujo added the comment: Nice catch. The patch looks good to me and applies correctly on my trunk copy. There seems to be no test about this in the test suite; do you have a little test script to compare old and new code? On a sidenote, I find all this business with time.time, time.gmtime, time.localtime and time.strftime always confusing. We have datetime objects now, would it be ok to use them in this module? Regards ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 11:28:57 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 12 Apr 2010 09:28:57 +0000 Subject: [issue8339] urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://' In-Reply-To: <1270676527.4.0.372149513422.issue8339@psf.upfronthosting.co.za> Message-ID: <1271064537.01.0.0781133317309.issue8339@psf.upfronthosting.co.za> ?ric Araujo added the comment: By the way, I?ve been meaning to file a bug against the Mercurial schemes extension since I saw how it misused URIs (i.e. ?py://trunk/? should be ?py:trunk/?); I hope it?s not too late now that this extension is shipped with the program. Regards ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 11:32:46 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Apr 2010 09:32:46 +0000 Subject: [issue1481] test_uuid is warning about unreliable functions In-Reply-To: <1195633068.63.0.82173012127.issue1481@psf.upfronthosting.co.za> Message-ID: <1271064766.55.0.0382049085598.issue1481@psf.upfronthosting.co.za> Stefan Krah added the comment: Issue fixed by test_uuid3.patch from issue 3581 in trunk (r79954), release26-maint (r79959), py3k (r79960) and release31-maint (r79961). ---------- assignee: -> skrah keywords: -needs review resolution: -> accepted stage: patch review -> committed/rejected status: open -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 11:44:29 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 12 Apr 2010 09:44:29 +0000 Subject: [issue5341] A selection of spelling errors and typos throughout source In-Reply-To: <1235244250.3.0.963079671793.issue5341@psf.upfronthosting.co.za> Message-ID: <1271065469.13.0.919698043235.issue5341@psf.upfronthosting.co.za> ?ric Araujo added the comment: Hi r79951 fixes ?simplies? and add the typo ?specifyication? . Updated my patch to remove that and add this. Regards ---------- Added file: http://bugs.python.org/file16894/functools-typos-pep8.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 11:53:12 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Apr 2010 09:53:12 +0000 Subject: [issue4639] Build failure on OpenBSD 4.4-current regarding lstat() In-Reply-To: <1229091079.2.0.148699699558.issue4639@psf.upfronthosting.co.za> Message-ID: <1271065992.57.0.769953723899.issue4639@psf.upfronthosting.co.za> Stefan Krah added the comment: This has been fixed in issue 7903. ---------- assignee: -> skrah keywords: +patch resolution: -> duplicate stage: -> committed/rejected status: open -> closed superseder: -> Configure script incorrect for reasonably recent OpenBSD _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 12:57:49 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 12 Apr 2010 10:57:49 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1271069869.81.0.691424486077.issue1818@psf.upfronthosting.co.za> ?ric Araujo added the comment: See also this python-ideas thread: http://mail.python.org/pipermail/python-ideas/2010-April/006991.html ---------- nosy: +merwok _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 13:38:27 2010 From: report at bugs.python.org (George Boutsioukis) Date: Mon, 12 Apr 2010 11:38:27 +0000 Subject: [issue6409] 2to3 -j 4 generates malformed diffs In-Reply-To: <1246636426.08.0.872531312657.issue6409@psf.upfronthosting.co.za> Message-ID: <1271072307.53.0.381785302098.issue6409@psf.upfronthosting.co.za> Changes by George Boutsioukis : Removed file: http://bugs.python.org/file16889/output_lock.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 13:47:46 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 12 Apr 2010 11:47:46 +0000 Subject: [issue8371] Add a command to download distributions In-Reply-To: <1271004631.29.0.0742687502668.issue8371@psf.upfronthosting.co.za> Message-ID: <1271072866.2.0.656716814119.issue8371@psf.upfronthosting.co.za> Tarek Ziad? added the comment: What would this command do precisely ? Are you thinking about a command that scans PyPI ? why this would be a command btw ? downloading a distribution is not a final goal, imho. Wouldn't it be simpler to have a simple function that provides this feature ? > Is it okay to post this as a bug or should I rather mail distutils-sig first? Or mail them now? A feature request on the distutils2 component is fine. Although for topics that needs discussion, a round in the Mailing list is probably better to start. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 13:49:10 2010 From: report at bugs.python.org (George Boutsioukis) Date: Mon, 12 Apr 2010 11:49:10 +0000 Subject: [issue6409] 2to3 -j 4 generates malformed diffs In-Reply-To: <1246636426.08.0.872531312657.issue6409@psf.upfronthosting.co.za> Message-ID: <1271072950.93.0.457144774132.issue6409@psf.upfronthosting.co.za> George Boutsioukis added the comment: I updated the patch to keep the new code as local as possible. ---------- Added file: http://bugs.python.org/file16895/output_lock.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 13:50:57 2010 From: report at bugs.python.org (Michael Glassford) Date: Mon, 12 Apr 2010 11:50:57 +0000 Subject: [issue8339] urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://' In-Reply-To: <1270676527.4.0.372149513422.issue8339@psf.upfronthosting.co.za> Message-ID: <1271073057.05.0.615685762358.issue8339@psf.upfronthosting.co.za> Michael Glassford added the comment: > In those cases, I would assume that 'x://y', x:/y','x:/','/' > as valid URLS, but not the two examples you mentioned. Only 2 comments about this: 1) Although the urlparse documentation does mention the relevant RFCs, on a quick read-through I don't see that it actually requires its input to be a valid URL. 2) Obviously, some code is using it for invalid URLs. > Michael, RDM: If you have any comments on msg102737, > let me know. Otherwise we can close this issue as wont-fix. I don't have a problem with this. I reported the issue to bring attention to the fact that the change affected real code and to see if anyone had suggestions for dealing with the problem in a better way (at the moment, I don't). > By the way, I?ve been meaning to file a bug against the > Mercurial schemes extension... Please do. I don't have anything to do with the Schemes extension except that I found this issue while investigating a unit test failure, but if you file an issue probably I will look into it--or if I don't, then someone else probably will. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 14:25:19 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 12 Apr 2010 12:25:19 +0000 Subject: [issue8339] urlunparse(urlparse('x://')) now returns 'x:' instead of 'x://' In-Reply-To: <1271073057.05.0.615685762358.issue8339@psf.upfronthosting.co.za> Message-ID: <20100412122505.GA29009@remy> Senthil Kumaran added the comment: On Mon, Apr 12, 2010 at 11:50:57AM +0000, Michael Glassford wrote: > 1) Although the urlparse documentation does mention the relevant RFCs, on a quick read-through I don't see that it actually requires its input to be a valid URL. > 2) Obviously, some code is using it for invalid URLs. Which is true, because in some cases like urlparse.urljoin(base, rel), the rel is a relative url it undergoes the same parsing mechanism applicable to any url and thus there is no way a 'rigorous' check for authorized url is happening. Checks are done for valid chars in scheme and other parsing behaviours. > I don't have a problem with this. I reported the issue to bring attention to the fact that the change affected real code and to see if anyone had suggestions for dealing with the problem in a better way (at the moment, I don't). > Yeah, I understand the situation with 'changes which break the existing code', which we try to avoid many times. I shall if this can be addressed without reverting any recent changes and still being complaint. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 14:44:00 2010 From: report at bugs.python.org (Senthil Kumaran) Date: Mon, 12 Apr 2010 12:44:00 +0000 Subject: [issue2054] add ftp-tls support to ftplib - RFC 4217 In-Reply-To: <1271015036.58.0.946906137681.issue2054@psf.upfronthosting.co.za> Message-ID: <20100412124348.GD29009@remy> Senthil Kumaran added the comment: On Sun, Apr 11, 2010 at 07:43:56PM +0000, ?ric Araujo wrote: > httplib.Client, ftplib.Client, ftplib.SecureClient would be much more descriptive than httplib.HTTP and ftplib.FTP. Any interest about adding aliases? Aliases would be a bad idea. -1. It is fine the way the issue is moving forth now, FTP_TLS. ---------- nosy: +orsenthil _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 14:48:37 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Apr 2010 12:48:37 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <4BC2E01A.6090805@egenix.com> Message-ID: <1271076639.3846.2.camel@localhost> Antoine Pitrou added the comment: > Could you tell me which X11 version you used ? I've modified the > generation script to also output the added aliases and would like > to list them as well. It's the file supplied on my Mandriva system, from libx11-1.2.2-2mdv2010.0.src.rpm ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 14:49:11 2010 From: report at bugs.python.org (John Van Praag) Date: Mon, 12 Apr 2010 12:49:11 +0000 Subject: [issue8378] PYTHONSTARTUP broken on Windows In-Reply-To: <1271076551.49.0.597917544476.issue8378@psf.upfronthosting.co.za> Message-ID: <1271076551.49.0.597917544476.issue8378@psf.upfronthosting.co.za> New submission from John Van Praag : The PYTHONSTARTUP environment variable does not work--does not import the indicated startup file--when IDLE is started under Windows. I have tested under Windows XP SP2, and under Windows Vista Ultimate 64 bit. The os.environ variable does list the startup file, but IDLE fails to run it. ---------- messages: 102943 nosy: jvanpraag severity: normal status: open title: PYTHONSTARTUP broken on Windows type: behavior versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From orsenthil at gmail.com Mon Apr 12 14:43:48 2010 From: orsenthil at gmail.com (Senthil Kumaran) Date: Mon, 12 Apr 2010 18:13:48 +0530 Subject: [issue2054] add ftp-tls support to ftplib - RFC 4217 In-Reply-To: <1271015036.58.0.946906137681.issue2054@psf.upfronthosting.co.za> References: <1202523366.93.0.605901116561.issue2054@psf.upfronthosting.co.za> <1271015036.58.0.946906137681.issue2054@psf.upfronthosting.co.za> Message-ID: <20100412124348.GD29009@remy> On Sun, Apr 11, 2010 at 07:43:56PM +0000, ?ric Araujo wrote: > httplib.Client, ftplib.Client, ftplib.SecureClient would be much more descriptive than httplib.HTTP and ftplib.FTP. Any interest about adding aliases? Aliases would be a bad idea. -1. It is fine the way the issue is moving forth now, FTP_TLS. From report at bugs.python.org Mon Apr 12 15:05:29 2010 From: report at bugs.python.org (Jeroen Ruigrok van der Werven) Date: Mon, 12 Apr 2010 13:05:29 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <1271020824.21.0.72658096394.issue8374@psf.upfronthosting.co.za> Message-ID: <1271077529.37.0.670361026348.issue8374@psf.upfronthosting.co.za> Jeroen Ruigrok van der Werven added the comment: That nl_AW is an interesting one. Aruba is part of the Kingdom of the Netherlands, so in essence it should follow nl_NL. From what I can see that locale seems to be limited to (certain) Linux systems. I'll raise the issue with the CLDR guys as well, since I wonder if this warrants its own locale or not (some monetary and number formatting). But I think the outcome will be to add a nl_AW as well in similar vein as to what bo_CN does. ---------- nosy: +asmodai _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 15:25:38 2010 From: report at bugs.python.org (Anand B Pillai) Date: Mon, 12 Apr 2010 13:25:38 +0000 Subject: [issue7150] datetime operations spanning MINYEAR give bad results In-Reply-To: <1255686329.97.0.65785065346.issue7150@psf.upfronthosting.co.za> Message-ID: <1271078738.12.0.402826616591.issue7150@psf.upfronthosting.co.za> Anand B Pillai added the comment: Can someone update this issue ? Is the 2nd patch tested... ? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 15:31:11 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Apr 2010 13:31:11 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1271079071.11.0.912759352819.issue7370@psf.upfronthosting.co.za> R. David Murray added the comment: There are a couple problems with this patch. The first is that fixing date_time_string by using strftime rather than email.utils.formatdate is suboptimal from a code reuse standpoint. The reason is that the date in HTTP message headers is required to conform to the same RFC standard as that generated by formatdate, so it is better to use the same routine to generate it. That way any bug fixes needed to handle RFC compliance are centralized in once place. The second problem with the patch is that strftime generates locale-aware week and month names, but per RFC the header timestamps must use English names (see for example msg53731 in issue 665194; the comment about locale applies to both strftime and strptime). If issue 665194 were implemented formatdate could use it, and then BaseHTTPServer could also use it directly. But absent that it should use email.util.formatdate. (That issue should also answer ?ric's question about whether we can use DateTime here: not yet.) Now, the logging routine is a different story. That timestamp isn't required to follow the RFC, and one could argue that it makes sense for its timestamp to use the locale. (One could also ask whether BaseHTTPServer should use the logging module, but that is a whole separate issue.) We definitely should have a unit test before applying this patch, that makes sure the timestamp gets generated without error. Checking the detailed format of the timestamp can be assumed to be covered by the unit tests for formatdate. (I don't think those tests are completely adequate; for example they don't test that the date remains in English if the locale is different, but again that is a different issue.) ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 15:33:51 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 12 Apr 2010 13:33:51 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting In-Reply-To: <1271079071.11.0.912759352819.issue7370@psf.upfronthosting.co.za> Message-ID: <4BC3213C.10709@netwok.org> ?ric Araujo added the comment: ?One could also ask whether BaseHTTPServer should use the logging module, but that is a whole separate issue.? Indeed: http://www.python.org/dev/peps/pep-0337/ Cheers ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 15:57:42 2010 From: report at bugs.python.org (Anand B Pillai) Date: Mon, 12 Apr 2010 13:57:42 +0000 Subject: [issue8319] HTMLparser does not handle call to handle_data when a tag contains no data. In-Reply-To: <1270490935.7.0.673554223896.issue8319@psf.upfronthosting.co.za> Message-ID: <1271080662.69.0.986238609276.issue8319@psf.upfronthosting.co.za> Changes by Anand B Pillai : ---------- nosy: +pythonhacker _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 16:13:56 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 12 Apr 2010 14:13:56 +0000 Subject: [issue8378] PYTHONSTARTUP broken on Windows In-Reply-To: <1271076551.49.0.597917544476.issue8378@psf.upfronthosting.co.za> Message-ID: <1271081636.41.0.204616951811.issue8378@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- components: +IDLE, Windows nosy: +brian.curtin priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 16:35:34 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 12 Apr 2010 14:35:34 +0000 Subject: [issue8026] strftime bug when timedelta is negative In-Reply-To: <1267206102.75.0.187323607292.issue8026@psf.upfronthosting.co.za> Message-ID: <1271082934.89.0.495719114642.issue8026@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: This is not a bug. The issue boils down to the following: >>> from datetime import * >>> d = datetime(2010, 1, 1) >>> d, d.strftime("%G") (datetime.datetime(2010, 1, 1, 0, 0), '2009') and OP expects '2010' instead. Python behavior is correct as can be verified using GNU date utility: $ date --date=20100101 +%G 2009 The confusion comes from the fact that %G is formatted as the ISO 8601 year. This year is the one that contains the greater part of the week (Monday as the first day of the week). Here is another illustration: >>> d = date(2009,12,31) >>> for i in range(7): ... (d+timedelta(i)).strftime("%F %a %G %V") ... '2009-12-31 Thu 2009 53' '2010-01-01 Fri 2009 53' '2010-01-02 Sat 2009 53' '2010-01-03 Sun 2009 53' '2010-01-04 Mon 2010 01' '2010-01-05 Tue 2010 01' '2010-01-06 Wed 2010 01' Note that week 1 of 2010 started on Monday, 2010-01-04. OP is advised to change %G to %Y in his code. ---------- nosy: +belopolsky _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 16:36:23 2010 From: report at bugs.python.org (Ray.Allen) Date: Mon, 12 Apr 2010 14:36:23 +0000 Subject: =?utf-8?q?=5Bissue8376=5D_Tutorial_offers_dangerous_advice_about_iterator?= =?utf-8?b?czog4oCcX19pdGVyX18oKSBjYW4ganVzdCByZXR1cm4gc2VsZuKAnQ==?= In-Reply-To: <1271054158.9.0.672918640444.issue8376@psf.upfronthosting.co.za> Message-ID: <1271082983.38.0.121491674729.issue8376@psf.upfronthosting.co.za> Changes by Ray.Allen : ---------- nosy: +ysj.ray _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 16:53:34 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Apr 2010 14:53:34 +0000 Subject: [issue7472] email.encoders.encode_7or8bit(): typo "iso-2202". "iso-2022" is correct. In-Reply-To: <1260466982.74.0.0519719914389.issue7472@psf.upfronthosting.co.za> Message-ID: <1271084014.93.0.354855539963.issue7472@psf.upfronthosting.co.za> R. David Murray added the comment: I've applied the fix to trunk in r79994, and py3k in r79996, but I'm leaving this open because I still want a unit test for it. ---------- keywords: +easy -patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 16:54:52 2010 From: report at bugs.python.org (Amaury Forgeot d'Arc) Date: Mon, 12 Apr 2010 14:54:52 +0000 Subject: [issue8026] strftime bug when timedelta is negative In-Reply-To: <1267206102.75.0.187323607292.issue8026@psf.upfronthosting.co.za> Message-ID: <1271084092.3.0.918230853445.issue8026@psf.upfronthosting.co.za> Changes by Amaury Forgeot d'Arc : ---------- resolution: -> invalid status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 17:02:50 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Apr 2010 15:02:50 +0000 Subject: [issue6467] PyOS_Readline: treatment of "1234EOF"; behavior of builtin_raw_input In-Reply-To: <1247399845.7.0.918611986455.issue6467@psf.upfronthosting.co.za> Message-ID: <1271084570.61.0.8582598394.issue6467@psf.upfronthosting.co.za> Stefan Krah added the comment: There are two cases: 1) stdin and stdout go to a tty: my_fgets() from Parser/myreadline.c does not handle the case where fgets() reads some characters followed by an EOF. One way to deal with this is to consider a sequence like 1234EOF an empty line. This is what the patch consider_1234EOF_empty_line.patch does and it fixes problem 1. [Another option would be to consider 1234EOF a line and insert a newline.] 2) stdout is not a tty: In this case, builtin_raw_input() uses PyFile_GetLine() to read from stdin. I'm not sure why this is the case. Perhaps 2) should be a separate issue. ---------- components: +Interpreter Core -IO keywords: +needs review, patch nosy: +skrah priority: -> normal stage: -> patch review title: raw_input() doesn't work as expected when it gets multiple ^D -> PyOS_Readline: treatment of "1234EOF"; behavior of builtin_raw_input type: -> behavior Added file: http://bugs.python.org/file16896/consider_1234EOF_empty_line.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 17:09:28 2010 From: report at bugs.python.org (Ray.Allen) Date: Mon, 12 Apr 2010 15:09:28 +0000 Subject: =?utf-8?q?=5Bissue8376=5D_Tutorial_offers_dangerous_advice_about_iterator?= =?utf-8?b?czog4oCcX19pdGVyX18oKSBjYW4ganVzdCByZXR1cm4gc2VsZuKAnQ==?= In-Reply-To: <1271054158.9.0.672918640444.issue8376@psf.upfronthosting.co.za> Message-ID: <1271084968.84.0.176807120772.issue8376@psf.upfronthosting.co.za> Ray.Allen added the comment: I think there is not much ploblem. Please notice this sentence in the previous paragraph in the toturial : "Behind the scenes, the for statement calls iter() on the container object. The function returns an iterator object that defines the method next() which accesses elements in the container one at a time." I think it's clear enough that the container object is different from the iterator object, what exactly has the iterator behavior is the iterator object, not the container object. And this sentence you mentioned: "If the class defines next(), then __iter__() can just return self:" is to teach you define a iterator, not a container. So by reading it carefully, you won't define something that is both a container and a iterator, will you? If you really define a next() on a class which you want it be a container, and then define a __iter__() on it and return self, then your container is exactly a generator, not a container. And a generator can certainly iterate only once. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 17:15:14 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Apr 2010 15:15:14 +0000 Subject: [issue8378] PYTHONSTARTUP is not run by default when Idle is started In-Reply-To: <1271076551.49.0.597917544476.issue8378@psf.upfronthosting.co.za> Message-ID: <1271085314.01.0.379988470144.issue8378@psf.upfronthosting.co.za> R. David Murray added the comment: Believe it or not, this is the documented behavior of Idle on all platforms. You have to specify -s to have PYTHONSTARTUP run. See the last comment in Issue5594, and also the referenced issue 5233, which has a patch that apparently changes this behavior, although that isn't mentioned in that issue itself. I'm making this a feature request for changing the default behavior, to see what people think. ---------- components: -Windows nosy: +kbk, r.david.murray title: PYTHONSTARTUP broken on Windows -> PYTHONSTARTUP is not run by default when Idle is started type: behavior -> feature request versions: +Python 3.2 -Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 17:30:43 2010 From: report at bugs.python.org (David Coconut) Date: Mon, 12 Apr 2010 15:30:43 +0000 Subject: [issue8326] Cannot import name SemLock on Ubuntu lucid In-Reply-To: <1270549791.67.0.929964356468.issue8326@psf.upfronthosting.co.za> Message-ID: <1271086243.93.0.39527645801.issue8326@psf.upfronthosting.co.za> David Coconut added the comment: Issue 3770 is not relevant because this code works in Python 2.6 on both machines (x86 and x86-64). These machines run plenty of other concurrent processes also, which would imply to me that sem_open() does work. I could be completely wrong as I'm no expert on the inner workings of either Python or Ubuntu, but that's what I've been able to deduce so far. Ubuntu bug in package python3.1 is here: https://bugs.launchpad.net/ubuntu/+source/python3.1/+bug/556477 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 17:37:52 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Apr 2010 15:37:52 +0000 Subject: [issue8367] test_winsound: failure on systems without soundcard In-Reply-To: <1270980470.8.0.919577975963.issue8367@psf.upfronthosting.co.za> Message-ID: <1271086672.69.0.441860931943.issue8367@psf.upfronthosting.co.za> Stefan Krah added the comment: Committed in r80000, r80001, r80002 and r80003. ---------- resolution: -> accepted stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 17:47:21 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Mon, 12 Apr 2010 15:47:21 +0000 Subject: =?utf-8?q?=5Bissue8376=5D_Tutorial_offers_dangerous_advice_about_iterator?= =?utf-8?b?czog4oCcX19pdGVyX18oKSBjYW4ganVzdCByZXR1cm4gc2VsZuKAnQ==?= In-Reply-To: <1271084968.84.0.176807120772.issue8376@psf.upfronthosting.co.za> Message-ID: <4BC34085.7010200@netwok.org> ?ric Araujo added the comment: Hello I thought about two bits in your message: ?I think it's clear enough? and ?So by reading it carefully?. They show that the doc is a bit ambiguous here, and while I agree that people should take the time to read and understand, I think that documentation can always be made clearer. The doc about iterables could tell to return an instance of another class or use a generator, and then a separate paragraph would explain about using next to define iterators, explaining that iterators may or may not be iterable. Does that sound good? Regards ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 18:14:16 2010 From: report at bugs.python.org (Alexander Belopolsky) Date: Mon, 12 Apr 2010 16:14:16 +0000 Subject: [issue2706] datetime: define division timedelta/timedelta In-Reply-To: <1209330247.56.0.71148380164.issue2706@psf.upfronthosting.co.za> Message-ID: <1271088856.36.0.627393478427.issue2706@psf.upfronthosting.co.za> Alexander Belopolsky added the comment: Is there a good reason why this issue is languishing? The requested functionality seems to be well motivated, simple to implement with few objections resolved in the discussion. I wonder if it would be helpful to limit this patch to 3.x series. That way some of the controversies about true vs. floor division would disappear and it will be easier to accept new features. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 18:54:37 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Apr 2010 16:54:37 +0000 Subject: [issue8326] Cannot import name SemLock on Ubuntu lucid In-Reply-To: <1270549791.67.0.929964356468.issue8326@psf.upfronthosting.co.za> Message-ID: <1271091277.41.0.247827561357.issue8326@psf.upfronthosting.co.za> R. David Murray added the comment: I guess I wasn't clear. The error you are seeing is exactly the error that issue 3770 talks about. The *build* process wasn't able to find a functioning sem_open implementation, and therefore you see that error. Now, clearly your platform does have a functioning sem_open implementation, so something must have gone wrong during the build process. Since the build works fine on our Ubuntu buildbots (http://www.python.org/dev/buildbot/builders/i386%20Ubuntu%203.1/builds/475), and since you are working from a prepackaged Lucid binary, I conclude that this is most likely an Ubuntu packaging problem. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 18:59:48 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Apr 2010 16:59:48 +0000 Subject: [issue7585] difflib should separate filename from timestamp with tab In-Reply-To: <1261947458.0.0.959368598145.issue7585@psf.upfronthosting.co.za> Message-ID: <1271091588.47.0.685735683163.issue7585@psf.upfronthosting.co.za> R. David Murray added the comment: Applied to trunk in r8004 and py3k in r8006. ---------- resolution: accepted -> fixed stage: unit test needed -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 19:08:28 2010 From: report at bugs.python.org (Skip Montanaro) Date: Mon, 12 Apr 2010 17:08:28 +0000 Subject: [issue1818] Add named tuple reader to CSV module In-Reply-To: <1200263236.24.0.0303258184569.issue1818@psf.upfronthosting.co.za> Message-ID: <1271092108.69.0.836318693102.issue1818@psf.upfronthosting.co.za> Skip Montanaro added the comment: Type conversion is a whole 'nuther kettle of fish. This particular thread is long and complex enough that it shouldn't be made more complex. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 19:14:29 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 12 Apr 2010 17:14:29 +0000 Subject: [issue8242] Support surrogates in import ; install Python in a non-ASCII directory In-Reply-To: <1269652357.44.0.254995855854.issue8242@psf.upfronthosting.co.za> Message-ID: <1271092469.87.0.574860206819.issue8242@psf.upfronthosting.co.za> STINNER Victor added the comment: New patch fixing more issues about undecodable filenames. Lib/test/test_subprocess.py | 4 - Lib/unittest/runner.py | 4 + Modules/_posixsubprocess.c | 21 ++++++++-- Modules/getpath.c | 90 +++++++++++++++++++++++++++++++++++++++----- Modules/posixmodule.c | 5 +- Modules/python.c | 6 +- Modules/zipimport.c | 11 ++++- Objects/fileobject.c | 6 +- Objects/unicodeobject.c | 22 ++++++++-- Parser/tokenizer.c | 14 ++++-- Python/_warnings.c | 7 +++ Python/ast.c | 10 +++- Python/ceval.c | 2 Python/errors.c | 2 Python/import.c | 37 +++++++++++++----- Python/traceback.c | 38 ++++++++++++++---- 16 files changed, 225 insertions(+), 54 deletions(-) TODO: - Remove assert(PyBytes_Check(opath)); from NullImporter_init() and zipimporter_init() - Fix setup_context() (_warnings.c) - Reencode module filenames if the system default encoding changes - Lib/unittest/runner.py and Lib/test/test_subprocess.py contain hacks to fix tests. It might be rewritten - Fix the 3 "FIXME: use _Py_char2wchar" in getpath.c I restored code setting the system encoding. The patch fixes also _posixsubprocess.fork_exec() to support undecodable current working directory. ---------- Added file: http://bugs.python.org/file16897/surrogates-5.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 19:20:54 2010 From: report at bugs.python.org (STINNER Victor) Date: Mon, 12 Apr 2010 17:20:54 +0000 Subject: [issue8242] Support surrogates in import ; install Python in a non-ASCII directory In-Reply-To: <1269652357.44.0.254995855854.issue8242@psf.upfronthosting.co.za> Message-ID: <1271092854.93.0.236884629772.issue8242@psf.upfronthosting.co.za> Changes by STINNER Victor : Removed file: http://bugs.python.org/file16671/surrogates_bootstrap-4.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 19:24:05 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Apr 2010 17:24:05 +0000 Subject: =?utf-8?q?=5Bissue8376=5D_Tutorial_offers_dangerous_advice_about_iterator?= =?utf-8?b?czog4oCcX19pdGVyX18oKSBjYW4ganVzdCByZXR1cm4gc2VsZuKAnQ==?= In-Reply-To: <1271054158.9.0.672918640444.issue8376@psf.upfronthosting.co.za> Message-ID: <1271093045.27.0.901934425307.issue8376@psf.upfronthosting.co.za> R. David Murray added the comment: It might be worth mentioning in the tutorial the specific problem the OP points out: that if an object returns itself in __iter__, then that object can have only one iteration state. And that therefor only an object that is itself a unique iterator (as opposed to a collection wanting to allow iteration) should return itself as __iter__. Also note that in the example in the tutorial it says "easy to add the behavior", which *in context* is wrong; pedagogically the better thing to do would be to say "it is easy to write a class that implements an iterator". As ?ric said, splitting the text so that returning an iterator from a collection and constructing an iterator class are distinct topics would greatly improve the exposition. I'm an experienced Python coder, and I've made this mistake myself. Often it doesn't break because the code only iterates the object once, but it would be better to have the tutorial encourage doing this correctly by providing good examples and explanations. ---------- nosy: +r.david.murray priority: -> normal type: -> behavior versions: +Python 2.6, Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 19:32:24 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Apr 2010 17:32:24 +0000 Subject: [issue2706] datetime: define division timedelta/timedelta In-Reply-To: <1209330247.56.0.71148380164.issue2706@psf.upfronthosting.co.za> Message-ID: <1271093544.38.0.855769219518.issue2706@psf.upfronthosting.co.za> R. David Murray added the comment: It's too late for 2.7 anyway. ---------- nosy: +r.david.murray priority: -> normal versions: +Python 3.2 -Python 2.7, Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 20:08:00 2010 From: report at bugs.python.org (Raymond Hettinger) Date: Mon, 12 Apr 2010 18:08:00 +0000 Subject: =?utf-8?q?=5Bissue8376=5D_Tutorial_offers_dangerous_advice_about_iterator?= =?utf-8?b?czog4oCcX19pdGVyX18oKSBjYW4ganVzdCByZXR1cm4gc2VsZuKAnQ==?= In-Reply-To: <1271054158.9.0.672918640444.issue8376@psf.upfronthosting.co.za> Message-ID: <1271095680.46.0.103794854952.issue8376@psf.upfronthosting.co.za> Raymond Hettinger added the comment: I think the docs are fine as-is. At that point in the tutorial, we're trying to teach what the iterator protocol is. The considerations of what makes a good design can be discussed elsewhere. It is not a one-liner. For example, files are self iterators but lists are not -- there are good reasons for either choice. Explaining those design choices is not a good way to *introduce* the iterator protocol. Recommend closing this report. ---------- nosy: +rhettinger priority: normal -> low _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 20:08:32 2010 From: report at bugs.python.org (David Watson) Date: Mon, 12 Apr 2010 18:08:32 +0000 Subject: [issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses In-Reply-To: <1271010785.16.0.286802399648.issue8372@psf.upfronthosting.co.za> Message-ID: <1271095712.18.0.624691647332.issue8372@psf.upfronthosting.co.za> David Watson added the comment: Attaching the C test programs I forgot to attach yesterday - sorry about that. I've also tried these programs, and the patches, on FreeBSD 5.3 (an old version from late 2004). I found that it accepted unterminated addresses as well, and unlike Linux it did not normally null-terminate addresses at all - the existing socket code only worked for addresses shorter than sun_path because it zero-filled the structure beforehand. The return-unterminated patches worked with or without the zero-filling. Unlike Linux, FreeBSD also accepted oversized sockaddr_un structures (sun_path longer than its definition), so just allowing unterminated addresses wouldn't make the full range of addresses usable there. That said, I did get a kernel panic shortly after testing with oversized addresses, so perhaps it's not a good idea to actually use them :) ---------- Added file: http://bugs.python.org/file16898/bindconn.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 20:09:32 2010 From: report at bugs.python.org (David Watson) Date: Mon, 12 Apr 2010 18:09:32 +0000 Subject: [issue8372] socket: Buffer overrun while reading unterminated AF_UNIX addresses In-Reply-To: <1271010785.16.0.286802399648.issue8372@psf.upfronthosting.co.za> Message-ID: <1271095773.0.0.908056493223.issue8372@psf.upfronthosting.co.za> Changes by David Watson : Added file: http://bugs.python.org/file16899/accept.c _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 20:11:09 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 12 Apr 2010 18:11:09 +0000 Subject: [issue1220212] os.kill on windows Message-ID: <1271095869.11.0.264921333485.issue1220212@psf.upfronthosting.co.za> Brian Curtin added the comment: Ported to py3k in r80008. FAQ text updated in r80009 and r80010. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 20:44:23 2010 From: report at bugs.python.org (Anders Kaseorg) Date: Mon, 12 Apr 2010 18:44:23 +0000 Subject: =?utf-8?q?=5Bissue8376=5D_Tutorial_offers_dangerous_advice_about_iterator?= =?utf-8?b?czog4oCcX19pdGVyX18oKSBjYW4ganVzdCByZXR1cm4gc2VsZuKAnQ==?= In-Reply-To: <1271054158.9.0.672918640444.issue8376@psf.upfronthosting.co.za> Message-ID: <1271097863.27.0.306228199253.issue8376@psf.upfronthosting.co.za> Anders Kaseorg added the comment: As an experienced Python programmer I am obviously aware that the tutorial is trying to teach how to make an iterator class, not how to make a container class. But the tutorial doesn?t make that *clear*. It should be much more explicit about what it is explaining to avoid confusing those concepts in the minds of beginners. (Or even the staff of the MIT introductory CS course.) One way to fix this confusion would be to explain what one should do for both container classes and iterator classes: """ Having seen the mechanics behind the iterator protocol, it is easy to add iterator behavior to your container classes. Define a :meth:`__iter__` method which returns an object of a separate iterator class. The iterator class should have a :meth:`next` method and an :meth:`__iter__` method (the :meth:`__iter__` method of the iterator class should just return ``self``):: class ReverseList(object): "Container that lets you iterate over the items backwards" def __init__(self, data): self.data = data def __iter__(self): return ReverseIterator(self.data) class ReverseIterator(object): "Iterator for looping over a sequence backwards" def __init__(self, data): self.data = data self.index = len(data) def __iter__(self): return self def next(self): if self.index == 0: raise StopIteration self.index = self.index - 1 return self.data[self.index] >>> for char in ReverseIterator('spam'): ... print char ... m a p s >>> for char in ReverseList([1,2,3]): ... print char ... 3 2 1 """ ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 21:06:52 2010 From: report at bugs.python.org (Shashwat Anand) Date: Mon, 12 Apr 2010 19:06:52 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1271099212.7.0.895999575207.issue7370@psf.upfronthosting.co.za> Shashwat Anand added the comment: Quoting from the docstring of trunk/Lib/email/utils.py -> formatdate() "We cannot use strftime() because that honors the locale and RFC 2822 requires that day and month names be the English abbreviations." So yes, I do agree that email.utils.formatdate() should be used instead of time.strftime() to remove duplicate codes and be compliant with RFC. Removing previous patch and submitting another. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 21:07:12 2010 From: report at bugs.python.org (Shashwat Anand) Date: Mon, 12 Apr 2010 19:07:12 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1271099232.31.0.423156414562.issue7370@psf.upfronthosting.co.za> Changes by Shashwat Anand : Removed file: http://bugs.python.org/file16890/BaseHTTPServer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 22:00:59 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Apr 2010 20:00:59 +0000 Subject: [issue7947] Documentation of math.pow, math.hypot, and complex.__abs__ In-Reply-To: <1266360101.13.0.863363643677.issue7947@psf.upfronthosting.co.za> Message-ID: <1271102459.85.0.695989183788.issue7947@psf.upfronthosting.co.za> Changes by Mark Dickinson : ---------- status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 22:02:16 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Apr 2010 20:02:16 +0000 Subject: [issue7355] Struct incorrectly compiles format strings In-Reply-To: <1258623721.25.0.299543316527.issue7355@psf.upfronthosting.co.za> Message-ID: <1271102536.32.0.884874945465.issue7355@psf.upfronthosting.co.za> Mark Dickinson added the comment: Many thanks for the patch. Applied (minus trailing whitespace :) in r80013. Leaving open to remind me to merge to other branches. ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 22:09:27 2010 From: report at bugs.python.org (=?utf-8?q?Martin_v=2E_L=C3=B6wis?=) Date: Mon, 12 Apr 2010 20:09:27 +0000 Subject: [issue8374] Some locales are unsupported In-Reply-To: <4BC2D7AD.4020201@egenix.com> Message-ID: <4BC37DF2.8060702@v.loewis.de> Martin v. L?wis added the comment: > getdefaultlocale() provides a way to access the default locale > (and encoding) on a platform without requiring a call to > setlocale(LC_ALL, "") That's what it's meant to do, but this is not what it actually does. In fact, there is no way of determining the locale's encoding without the help o fthe C library. As for "default locale": this is a flawed notion in itself. If I use one locale for messages, and the other for date representation - which one should be the "default" locale? Also, "default" in what respect? > getpreferredencoding() just provides encoding information. It doesn't > provide locale information, so I don't see how that could be used > as replacement for getdefaultlocale(). Many applications use getdefaultlocale()[1], i.e. ignore the locale part of the result. They can easily be rewritten to use getpreferredencoding. > The table needed for normalizing the various locale strings used in > the LANG environment variable (and others) needs to be updated every > now and then, but that's natural for a resource that changes based > on what people use locales for in real life. However, it also changes based on local administrator preferences - something that the implementation does not take into account at all. It may also depend on OS vendor preferences, which is also not considered in the implementation. IOW, it returns bogus results. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 22:36:03 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Apr 2010 20:36:03 +0000 Subject: [issue7355] Struct incorrectly compiles format strings In-Reply-To: <1258623721.25.0.299543316527.issue7355@psf.upfronthosting.co.za> Message-ID: <1271104563.29.0.0543536834815.issue7355@psf.upfronthosting.co.za> Mark Dickinson added the comment: Hmm. I note that the examples are for a big-endian machine. I wonder whether they should be converted to little-endian, given that most users are on x86 or x86_64 hardware these days. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 22:39:39 2010 From: report at bugs.python.org (Meador Inge) Date: Mon, 12 Apr 2010 20:39:39 +0000 Subject: [issue7355] Struct incorrectly compiles format strings In-Reply-To: <1258623721.25.0.299543316527.issue7355@psf.upfronthosting.co.za> Message-ID: <1271104779.75.0.259704400092.issue7355@psf.upfronthosting.co.za> Meador Inge added the comment: > wonder whether they should be converted to little-endian I thought about that as well. It sure would make creating new examples easier :) I had to construct the new examples "by hand". I can regenerate the examples for little-endian if you would like? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 22:51:55 2010 From: report at bugs.python.org (Forest Wilkinson) Date: Mon, 12 Apr 2010 20:51:55 +0000 Subject: [issue3143] Make the left sidebar in the doc collapsible In-Reply-To: <1213894130.5.0.901866798504.issue3143@psf.upfronthosting.co.za> Message-ID: <1271105515.74.0.480213094477.issue3143@psf.upfronthosting.co.za> Forest Wilkinson added the comment: I just noticed Ezio's change to the title of this bug. Does the proposed fix address the original bug title ("docs waste a lot of horizontal space on left nav bar") for third-party packages that use docutils to generate their docs? Or, does it only avoid the problem in the official python documentation? ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 22:59:54 2010 From: report at bugs.python.org (lasizoillo) Date: Mon, 12 Apr 2010 20:59:54 +0000 Subject: [issue6692] asyncore kqueue support In-Reply-To: <1250127249.77.0.440620100529.issue6692@psf.upfronthosting.co.za> Message-ID: <1271105994.53.0.0416366305599.issue6692@psf.upfronthosting.co.za> Changes by lasizoillo : ---------- nosy: +lasizoillo _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 23:01:56 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 12 Apr 2010 21:01:56 +0000 Subject: [issue6692] asyncore kqueue support In-Reply-To: <1250127249.77.0.440620100529.issue6692@psf.upfronthosting.co.za> Message-ID: <1271106116.42.0.968575338003.issue6692@psf.upfronthosting.co.za> Changes by Brian Curtin : ---------- versions: -Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 23:08:14 2010 From: report at bugs.python.org (Shashwat Anand) Date: Mon, 12 Apr 2010 21:08:14 +0000 Subject: [issue7370] patch: BaseHTTPServer reinventing rfc822 date formatting In-Reply-To: <1258734165.92.0.303692639409.issue7370@psf.upfronthosting.co.za> Message-ID: <1271106494.68.0.857312740065.issue7370@psf.upfronthosting.co.za> Changes by Shashwat Anand : Added file: http://bugs.python.org/file16900/BaseHTTPServer.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 23:09:04 2010 From: report at bugs.python.org (Mark Dickinson) Date: Mon, 12 Apr 2010 21:09:04 +0000 Subject: [issue7355] Struct incorrectly compiles format strings In-Reply-To: <1258623721.25.0.299543316527.issue7355@psf.upfronthosting.co.za> Message-ID: <1271106544.82.0.688929691223.issue7355@psf.upfronthosting.co.za> Mark Dickinson added the comment: Sure, if you want to. [Then I won't be able to reproduce what's in the docs on either of my machines. :) One's 32-bit big-endian; the other's 64-bit little-endian.] Merged your changes and subsequent tweaks to py3k in r80016. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 23:12:29 2010 From: report at bugs.python.org (Benjamin Peterson) Date: Mon, 12 Apr 2010 21:12:29 +0000 Subject: [issue6409] 2to3 -j 4 generates malformed diffs In-Reply-To: <1246636426.08.0.872531312657.issue6409@psf.upfronthosting.co.za> Message-ID: <1271106749.22.0.519862213579.issue6409@psf.upfronthosting.co.za> Benjamin Peterson added the comment: Fixed in r80018. Thanks for the patch. ---------- resolution: -> fixed status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 23:34:07 2010 From: report at bugs.python.org (Andy Friesen) Date: Mon, 12 Apr 2010 21:34:07 +0000 Subject: [issue8379] if __debug__: has nonobvious behaviour when evaluating .pyo without -O In-Reply-To: <1271108047.08.0.236449263776.issue8379@psf.upfronthosting.co.za> Message-ID: <1271108047.08.0.236449263776.issue8379@psf.upfronthosting.co.za> New submission from Andy Friesen : In certain circumstances, "if __debug__" seems to be evaluating its "else" clause even when -O is not specified. This can cause very surprising behavior. a.zip contains a single file named a/__init__.pyo. It is the compiled form of the following code: if __debug__: print 'DEBUG' else: print 'RELEASE' if __debug__ == True: raise Exception("this is impossible") pythonbug.py evaluates this script with the following: import sys sys.path = ['a.zip'] import a When using Windows Python 2.6.2 and 2.6.5, running pythonbug.py produces this output: RELEASE Traceback (most recent call last): File "pythonbug.py", line 3, in import a File "__init__.py", line 8, in raise Exception("this is impossible") Exception: this is impossible When -O is passed, the exception is not raised. My best guess is that the Python bytecode is optimizing the "if __debug__" test away in the produced .pyo, but does not actually affect the value of __debug__ or check more complex expressions involving __debug__. ---------- files: pythonbug.zip messages: 102975 nosy: afriesen severity: normal status: open title: if __debug__: has nonobvious behaviour when evaluating .pyo without -O type: behavior versions: Python 2.6 Added file: http://bugs.python.org/file16901/pythonbug.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 23:48:45 2010 From: report at bugs.python.org (Shashwat Anand) Date: Mon, 12 Apr 2010 21:48:45 +0000 Subject: [issue5277] email message.get_params() and related methods sometimes fail. In-Reply-To: <1234758915.75.0.150242965655.issue5277@psf.upfronthosting.co.za> Message-ID: <1271108925.92.0.573095808926.issue5277@psf.upfronthosting.co.za> Shashwat Anand added the comment: According to RFC2231 the named disposition (content disposition field) is provided by the MIME mechanism. The encoded parameter like the following: Content-Disposition: inline; filename*0="Re: [Mailman-Users] Messages shunted with \"TypeError: "; filename*1="decodingUnicode is not supported\".eml" is not behaving the way it should be. The patch by rcoyner seems fine to me as it rectifies the wrong behaviour of _parseparam i.e. the counting issue of nested 'double quotes' and clears the unit tests. ---------- nosy: +l0nwlf _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 23:52:38 2010 From: report at bugs.python.org (R. David Murray) Date: Mon, 12 Apr 2010 21:52:38 +0000 Subject: [issue3143] Make the left sidebar in the doc collapsible In-Reply-To: <1213894130.5.0.901866798504.issue3143@psf.upfronthosting.co.za> Message-ID: <1271109158.87.0.203043434302.issue3143@psf.upfronthosting.co.za> R. David Murray added the comment: I'm pretty sure it only applies to the python docs, since this is the Python tracker, not the Sphinx or docutils tracker. (I'm not sure how the 'Documentation tools (Sphinx)' component gets in there...as far as I know Sphinx bugs go the Sphinx bug tracker.) ---------- nosy: +r.david.murray versions: +Python 3.2 -Python 3.0 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Mon Apr 12 23:55:18 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Apr 2010 21:55:18 +0000 Subject: [issue8379] if __debug__: has nonobvious behaviour when evaluating .pyo without -O In-Reply-To: <1271108047.08.0.236449263776.issue8379@psf.upfronthosting.co.za> Message-ID: <1271109318.67.0.163445964945.issue8379@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It's probably caused by optimizations in the peepholer indeed. ---------- nosy: +pitrou, rhettinger priority: -> low versions: +Python 2.7, Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 00:00:06 2010 From: report at bugs.python.org (Brett Cannon) Date: Mon, 12 Apr 2010 22:00:06 +0000 Subject: [issue8379] if __debug__: has nonobvious behaviour when evaluating .pyo without -O In-Reply-To: <1271108047.08.0.236449263776.issue8379@psf.upfronthosting.co.za> Message-ID: <1271109606.03.0.171426800641.issue8379@psf.upfronthosting.co.za> Brett Cannon added the comment: Your assessment of what is going on, Andy, is correct; the peephole optimizer for bytecode optimizes away the `if __debug__` section of the `if` statement for .pyo files. But that is actually a reasonable thing for the compiler to do as you are not supposed to run optimized bytecode with the interpreter not running under -O. Running a .pyo file under an interpreter run w/o -O is like compiling for 64-bit but then running on a 32-bit system; you are not following assumptions you told the compiler could be made about the runtime. So I am closing this as 'wont fix'. Best solution is to simply not run bytecode directly and instead execute the source as bytecode should be treated more as an optimization than some directly executable file format. But if you must execute the bytecode directly, simply make sure you don't mix .pyo/.pyc with an improper setting of -O. ---------- nosy: +brett.cannon resolution: -> wont fix status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 00:09:33 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 12 Apr 2010 22:09:33 +0000 Subject: [issue8380] Port of the gdb7 debugging hooks to the "py3k" branch In-Reply-To: <1271110173.15.0.608430881051.issue8380@psf.upfronthosting.co.za> Message-ID: <1271110173.15.0.608430881051.issue8380@psf.upfronthosting.co.za> New submission from Dave Malcolm : I'm attaching a patch for the py3k branch to port the gdb hooks to Python 3. The libpython.py code installed to python-gdb.py "knows" about the internal details of the Python within the tree. This patch makes the necessary changes to that code for the internals of Python 3, rather than Python 2. Note that libpython.py is intended to run inside a gdb linked against libpython2, and so libpython.py is still Python 2 code; however I've updated it to expect the so-called "inferior process" to be Python 3: * Py_TPFLAGS_STRING_SUBCLASS becomes Py_TPFLAGS_BYTES_SUBCLASS * PyStringObjectPtr becomes PyBytesObjectPtr * change PyObjectPtr to correctly locate "ob_size": with Python 2 variable-sized subclasses we could simply look it up as a field of the subclass struct, but for Python 3 the field may be in an ob_base member, or in an ob_base.ob_base member. We have to cast to a PyVarObject* to find it * PyIntObject went away; PyBoolObject is now a subclass of PyLongObject * writing out frames needed a slight rewrite with the change from co_filename and co_name from PyStringObject* to PyUnicodeObject* This makes the "proxy values" concept a bit awkward; for example a "str" in the inferior Python 3 process looks like a "unicode" to the gdb Python 2 process. This and the int->long change required a lot of minor updating to expected values in the selftests. The test_gdb.py and gdb_sample.py code _are_ for Python 3. I've assumed that all output is in UTF-8 for now. For Python 2, I was testing the code by putting a breakpoint on PyObject_Print, and printing objects, as a convenient hook for scraping gdb's stdout. PyObject_Print still exists in Python 3, but isn't used by the "print" implementation, so I needed a handy function that I could put a breakpoint on, and invoke from the Python side: I looked for something with METH_O that isn't called by site.py and doesn't require an import. I chose the "id" builtin, which corresponds to Python/ceval.c:builtin_id () Some minor 2to3-style fixes were also needed in the test code All of the selftests are currently commented out to keep the buildbot clean (apparently from a merge from trunk), and I've kept them commented out. They all pass on my machine with: make -j4 ; ./python -Wd ./Lib/test/regrtest.py -v test_gdb This also contains a port of the (partial?) fix for issue 8330 from trunk's r79986 that doesn't seem to have been merged to py3k (it needed a fair amount of rewriting). ---------- assignee: loewis components: Demos and Tools files: port-gdb7-hooks-to-py3k.patch keywords: patch messages: 102980 nosy: dmalcolm, loewis severity: normal stage: patch review status: open title: Port of the gdb7 debugging hooks to the "py3k" branch versions: Python 3.2, Python 3.3 Added file: http://bugs.python.org/file16902/port-gdb7-hooks-to-py3k.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 00:11:19 2010 From: report at bugs.python.org (Meador Inge) Date: Mon, 12 Apr 2010 22:11:19 +0000 Subject: [issue7355] Struct incorrectly compiles format strings In-Reply-To: <1271106544.82.0.688929691223.issue7355@psf.upfronthosting.co.za> Message-ID: Meador Inge added the comment: > Sure, if you want to. [Then I won't be able to reproduce what's in the > docs on either of my machines. :) One's 32-bit big-endian; the other's > 64-bit little-endian.] > I guess it's painful either way. I think the only fair thing to do is provide examples for multiple scenarios, e.g. 32-bit little-endian, 64-bit big-endian, etc... Share the pain :) Cool, thanks! Your padding note tweak is a definite improvement over what I originally had. ---------- Added file: http://bugs.python.org/file16903/unnamed _______________________________________ Python tracker _______________________________________ -------------- next part --------------
Sure, if you want to. ??[Then I won't be able to reproduce what's in the docs on either of my machines. :) ??One's 32-bit big-endian; ??the other's 64-bit little-endian.]

I guess it's painful either way. ??I think the only fair thing to do is provide examples for multiple scenarios, e.g. 32-bit little-endian, 64-bit big-endian, etc... ??Share the pain :)

Merged your changes and subsequent tweaks to py3k in r80016.


Cool, thanks! ??Your padding note tweak is a definite improvement over what I originally had.

From report at bugs.python.org Tue Apr 13 00:15:01 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Apr 2010 22:15:01 +0000 Subject: [issue8380] Port of the gdb7 debugging hooks to the "py3k" branch In-Reply-To: <1271110173.15.0.608430881051.issue8380@psf.upfronthosting.co.za> Message-ID: <1271110501.02.0.29132842946.issue8380@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Should we call it libpython3.py, in order to distinguish it from the 2.x version? ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 00:19:30 2010 From: report at bugs.python.org (Meador Inge) Date: Mon, 12 Apr 2010 22:19:30 +0000 Subject: [issue7355] Struct incorrectly compiles format strings In-Reply-To: <1258623721.25.0.299543316527.issue7355@psf.upfronthosting.co.za> Message-ID: <1271110770.11.0.459327203533.issue7355@psf.upfronthosting.co.za> Meador Inge added the comment: Those last two sentences where meant to be in response to your "Merged your changes and subsequent tweaks to py3k in r80016." comment. I tried to reply to the tracker from my mail client and things got reformatted :( ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 00:21:16 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Apr 2010 22:21:16 +0000 Subject: [issue8314] test_ctypes fails in test_ulonglong on sparc buildbots In-Reply-To: <1270469885.55.0.752027246289.issue8314@psf.upfronthosting.co.za> Message-ID: <1271110876.76.0.674158437651.issue8314@psf.upfronthosting.co.za> Antoine Pitrou added the comment: It should be ported to py3k, the sparc buildbots still fail there. ---------- nosy: +pitrou _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 00:21:31 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Mon, 12 Apr 2010 22:21:31 +0000 Subject: [issue8314] test_ctypes fails in test_ulonglong on sparc buildbots In-Reply-To: <1270469885.55.0.752027246289.issue8314@psf.upfronthosting.co.za> Message-ID: <1271110891.01.0.687469913404.issue8314@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- status: closed -> pending _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 00:40:25 2010 From: report at bugs.python.org (Stefan Krah) Date: Mon, 12 Apr 2010 22:40:25 +0000 Subject: [issue4970] test_os causes delayed failure on x86 gentoo buildbot: Unknown signal 32 In-Reply-To: <1232190585.86.0.270883273991.issue4970@psf.upfronthosting.co.za> Message-ID: <1271112025.43.0.155290974029.issue4970@psf.upfronthosting.co.za> Stefan Krah added the comment: This type of failure appears again in current builds: http://www.python.org/dev/buildbot/builders/x86 gentoo 3.x/builds/2160/steps/test/logs/stdio ---------- nosy: +skrah versions: +Python 3.2, Python 3.3 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 00:44:20 2010 From: report at bugs.python.org (Dave Malcolm) Date: Mon, 12 Apr 2010 22:44:20 +0000 Subject: [issue8380] Port of the gdb7 debugging hooks to the "py3k" branch In-Reply-To: <1271110173.15.0.608430881051.issue8380@psf.upfronthosting.co.za> Message-ID: <1271112260.26.0.899614299059.issue8380@psf.upfronthosting.co.za> Dave Malcolm added the comment: > Should we call it libpython3.py, in order to distinguish it from the 2.x > version? We could; it gets copied to python-gdb.py by the Makefile though. The code is intended to track the low-level implementation details of the tree that its in, so I'd expect the python 2 and python 3 versions to drift apart over time, FWIW ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 00:48:49 2010 From: report at bugs.python.org (Aaron) Date: Mon, 12 Apr 2010 22:48:49 +0000 Subject: [issue8381] New Window Error In-Reply-To: <1271112528.95.0.966124391171.issue8381@psf.upfronthosting.co.za> Message-ID: <1271112528.95.0.966124391171.issue8381@psf.upfronthosting.co.za> New submission from Aaron : When ever I try to open a new window or open a saved file in the IDLE (on a mac) it freezes. I am running snow leppord on a very new mac. ---------- components: IDLE messages: 102987 nosy: aaron.the.cow severity: normal status: open title: New Window Error type: crash _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 01:34:58 2010 From: report at bugs.python.org (Brian Curtin) Date: Mon, 12 Apr 2010 23:34:58 +0000 Subject: [issue8364] Update site.setquit docstring In-Reply-To: <1270905342.7.0.63449376457.issue8364@psf.upfronthosting.co.za> Message-ID: <1271115298.51.0.469003264611.issue8364@psf.upfronthosting.co.za> Brian Curtin added the comment: Committed in r80022 and r80023. Thanks. ---------- assignee: -> brian.curtin nosy: +brian.curtin priority: -> normal resolution: -> fixed stage: -> committed/rejected status: open -> closed type: -> behavior _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 01:38:58 2010 From: report at bugs.python.org (Ned Deily) Date: Mon, 12 Apr 2010 23:38:58 +0000 Subject: [issue8381] IDLE 2.6 freezes on OS X 10.6 In-Reply-To: <1271112528.95.0.966124391171.issue8381@psf.upfronthosting.co.za> Message-ID: <1271115538.14.0.244540139223.issue8381@psf.upfronthosting.co.za> Ned Deily added the comment: This is a duplicate of Issue6864. The problem is seen with the Apple-supplied IDLE in OS X 10.6 and appears to be an interaction with IDLE 2.6 and the Apple-supplied Cocoa Tk 8.5. One workaround is to install Python 2.6.5 using the python.org OS X installer and use its IDLE which does not exhibit this problem because it is linked with Tk 8.4. Or, if you can use Python 2.5 instead, you may be OK with Apple's built-in /usr/bin/idle2.5 . ---------- assignee: -> ronaldoussoren components: +Macintosh nosy: +ned.deily, ronaldoussoren title: New Window Error -> IDLE 2.6 freezes on OS X 10.6 versions: +Python 2.6 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 01:52:46 2010 From: report at bugs.python.org (Timothy Fitz) Date: Mon, 12 Apr 2010 23:52:46 +0000 Subject: [issue8379] if __debug__: has nonobvious behaviour when evaluating .pyo without -O In-Reply-To: <1271108047.08.0.236449263776.issue8379@psf.upfronthosting.co.za> Message-ID: <1271116366.04.0.210785650032.issue8379@psf.upfronthosting.co.za> Timothy Fitz added the comment: In this case bytecode isn't an optimization, it's a distribution choice (this bug reared it's ugly head in our closed-source downloadable client). I think that implausible execution paths are still a bug. Running a .pyo without -O should be explicitly an error. For instance can we change python to reliably blow up at import time? Or implicitly run as if you added -O? ---------- nosy: +Timothy.Fitz _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 01:56:53 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 12 Apr 2010 23:56:53 +0000 Subject: [issue8382] cStringIO and StringIO doesn't behave the same way In-Reply-To: <1271116613.01.0.381000084861.issue8382@psf.upfronthosting.co.za> Message-ID: <1271116613.01.0.381000084861.issue8382@psf.upfronthosting.co.za> New submission from Tarek Ziad? : Looks like the python version of StringIO can write tuples, but not the C version. I am not sure this is intended: >>> from cStringIO import StringIO as cStringIO >>> from StringIO import StringIO as StringIO >>> string = StringIO() >>> string.write(('my', 'tuple')) >>> cstring = cStringIO() >>> cstring.write(('my', 'tuple')) Traceback (most recent call last): File "", line 1, in TypeError: write() argument 1 must be string or read-only character buffer, not tuple ---------- components: Library (Lib) messages: 102991 nosy: tarek severity: normal status: open title: cStringIO and StringIO doesn't behave the same way type: behavior versions: Python 2.6, Python 2.7 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 01:56:59 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Mon, 12 Apr 2010 23:56:59 +0000 Subject: [issue8382] cStringIO and StringIO don't behave the same way In-Reply-To: <1271116613.01.0.381000084861.issue8382@psf.upfronthosting.co.za> Message-ID: <1271116619.47.0.361606315039.issue8382@psf.upfronthosting.co.za> Changes by Tarek Ziad? : ---------- title: cStringIO and StringIO doesn't behave the same way -> cStringIO and StringIO don't behave the same way _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 02:02:40 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 13 Apr 2010 00:02:40 +0000 Subject: [issue8364] Update site.setquit docstring In-Reply-To: <1270905342.7.0.63449376457.issue8364@psf.upfronthosting.co.za> Message-ID: <1271116960.68.0.539782219323.issue8364@psf.upfronthosting.co.za> ?ric Araujo added the comment: Answer to myself by Brian Curtin on the chatroom: Him: it?s in the code so i would file it like code. "Library" for py modules, "Extension Modules" if its a C extension Me: Your answer implies that components are mapped to directories, not areas (i.e. Library == Lib, documentation == Doc, not the general concept of documentation). ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 02:05:15 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Apr 2010 00:05:15 +0000 Subject: [issue8382] cStringIO and StringIO don't behave the same way In-Reply-To: <1271116613.01.0.381000084861.issue8382@psf.upfronthosting.co.za> Message-ID: <1271117115.76.0.683104565485.issue8382@psf.upfronthosting.co.za> Antoine Pitrou added the comment: Probably not. I guess an implicit str() is done on the argument given to write(): >>> s = StringIO() >>> s.write((1,2)) >>> s.write(3) >>> s.getvalue() '(1, 2)3' ---------- nosy: +pitrou priority: -> normal _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 02:07:49 2010 From: report at bugs.python.org (Antoine Pitrou) Date: Tue, 13 Apr 2010 00:07:49 +0000 Subject: [issue8382] StringIO.write() takes any argument and converts it to a string In-Reply-To: <1271116613.01.0.381000084861.issue8382@psf.upfronthosting.co.za> Message-ID: <1271117269.84.0.199837005305.issue8382@psf.upfronthosting.co.za> Changes by Antoine Pitrou : ---------- title: cStringIO and StringIO don't behave the same way -> StringIO.write() takes any argument and converts it to a string _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 02:10:20 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Tue, 13 Apr 2010 00:10:20 +0000 Subject: [issue8382] StringIO.write() takes any argument and converts it to a string In-Reply-To: <1271116613.01.0.381000084861.issue8382@psf.upfronthosting.co.za> Message-ID: <1271117420.71.0.111179063946.issue8382@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Yes, I am not sure what would be the best fix though. We cannot raise an error on StringIO now because this will break lots of code out there. In the meantime, I think it's cleaner to avoid doing implicit str() conversions, so I think cStringIO has a better approach. I would be in favor of a status quo for 2.x ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 02:22:16 2010 From: report at bugs.python.org (Kyle VanderBeek) Date: Tue, 13 Apr 2010 00:22:16 +0000 Subject: [issue1692335] Fix exception pickling: Move initial args assignment to BaseException.__new__ Message-ID: <1271118136.32.0.465521783503.issue1692335@psf.upfronthosting.co.za> Kyle VanderBeek added the comment: Ping? Is anyone working on this? Have Eric's concerns been addressed and can we pickle/unpickle all exceptions yet? ---------- nosy: +kylev _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 02:39:57 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 13 Apr 2010 00:39:57 +0000 Subject: [issue8383] pickle is unable to encode unicode surrogates In-Reply-To: <1271119197.6.0.824303125234.issue8383@psf.upfronthosting.co.za> Message-ID: <1271119197.6.0.824303125234.issue8383@psf.upfronthosting.co.za> New submission from STINNER Victor : Python3 uses unicode surrogates to store undecodable filenames. Eg. the filename b"abc\xff.py" is encoded as "abc\xdcff.py" if the file system encoding is ASCII. Pickle is unable to store them: ./python -c 'import pickle; pickle.dumps("abc\udcff")' (...) UnicodeEncodeError: 'utf-8' codec can't encode character '\udcff' in position 20: surrogates not allowed This is a limitation of pickle (in the binary mode): Python accepts to store any unicode character, but pickle doesn't. Using "surrogatepass" error handler should be enough to fix this issue. Related issue: #3672 (Reject surrogates in utf-8 codec) -> r72208 creates "surrogatepass" error handler. ---------- components: Library (Lib) messages: 102996 nosy: haypo, lemburg, loewis severity: normal status: open title: pickle is unable to encode unicode surrogates versions: Python 3.1, Python 3.2 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 02:44:40 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 13 Apr 2010 00:44:40 +0000 Subject: [issue8383] pickle is unable to encode unicode surrogates In-Reply-To: <1271119197.6.0.824303125234.issue8383@psf.upfronthosting.co.za> Message-ID: <1271119480.84.0.31965663177.issue8383@psf.upfronthosting.co.za> Changes by STINNER Victor : ---------- keywords: +patch Added file: http://bugs.python.org/file16904/pickle_surrogates.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 02:51:34 2010 From: report at bugs.python.org (STINNER Victor) Date: Tue, 13 Apr 2010 00:51:34 +0000 Subject: [issue8383] pickle is unable to encode unicode surrogates In-Reply-To: <1271119197.6.0.824303125234.issue8383@psf.upfronthosting.co.za> Message-ID: <1271119894.84.0.188816920199.issue8383@psf.upfronthosting.co.za> STINNER Victor added the comment: I found this bug indirectly: test_logging failed on a SocketHandler if LogRecord.pathname contains a surrogate character. SocketHandler uses pickle to serialize the record. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 03:00:58 2010 From: report at bugs.python.org (Craig McQueen) Date: Tue, 13 Apr 2010 01:00:58 +0000 Subject: [issue2698] Extension module build fails for MinGW: missing vcvarsall.bat In-Reply-To: <1209230424.66.0.154562223128.issue2698@psf.upfronthosting.co.za> Message-ID: <1271120458.58.0.893691688495.issue2698@psf.upfronthosting.co.za> Craig McQueen added the comment: I tried it in Python 3.1.2. \Python31\python.exe setup.py build --compiler=mingw32 I got a stack-trace: ... File "C:\Python31\lib\distutils\cygwinccompiler.py", line 280, in __init__ CygwinCCompiler.__init__ (self, verbose, dry_run, force) File "C:\Python31\lib\distutils\cygwinccompiler.py", line 124, in __init__ if self.ld_version >= "2.10.90": TypeError: unorderable types: NoneType() >= str() ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 03:04:31 2010 From: report at bugs.python.org (=?utf-8?q?Tarek_Ziad=C3=A9?=) Date: Tue, 13 Apr 2010 01:04:31 +0000 Subject: [issue2698] Extension module build fails for MinGW: missing vcvarsall.bat In-Reply-To: <1209230424.66.0.154562223128.issue2698@psf.upfronthosting.co.za> Message-ID: <1271120671.91.0.203356765996.issue2698@psf.upfronthosting.co.za> Tarek Ziad? added the comment: Craig, that's another bug, can you open another issue for that? The missing vcvarsall.bat bug is cleared and I will close this issue once I've reverted distutils state in the 3.x branch ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 03:15:38 2010 From: report at bugs.python.org (Craig McQueen) Date: Tue, 13 Apr 2010 01:15:38 +0000 Subject: [issue8384] Distutils C extension build with MinGW on Windows fails In-Reply-To: <1271121338.06.0.379239271673.issue8384@psf.upfronthosting.co.za> Message-ID: <1271121338.06.0.379239271673.issue8384@psf.upfronthosting.co.za> New submission from Craig McQueen : I tried to build a C extension in Python 3.1.2. \Python31\python.exe setup.py build --compiler=mingw32 I got a stack-trace: ... File "C:\Python31\lib\distutils\cygwinccompiler.py", line 280, in __init__ CygwinCCompiler.__init__ (self, verbose, dry_run, force) File "C:\Python31\lib\distutils\cygwinccompiler.py", line 124, in __init__ if self.ld_version >= "2.10.90": TypeError: unorderable types: NoneType() >= str() This is Windows 2000 SP4, with MinGW 5.1.6. ---------- assignee: tarek components: Distutils messages: 103000 nosy: cmcqueen1975, tarek severity: normal status: open title: Distutils C extension build with MinGW on Windows fails type: crash versions: Python 3.1 _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 03:17:23 2010 From: report at bugs.python.org (Craig McQueen) Date: Tue, 13 Apr 2010 01:17:23 +0000 Subject: [issue2698] Extension module build fails for MinGW: missing vcvarsall.bat In-Reply-To: <1209230424.66.0.154562223128.issue2698@psf.upfronthosting.co.za> Message-ID: <1271121443.83.0.42319470719.issue2698@psf.upfronthosting.co.za> Craig McQueen added the comment: Sure can--done. Issue #8384. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 03:41:17 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 13 Apr 2010 01:41:17 +0000 Subject: [issue5341] A selection of spelling errors and typos throughout source In-Reply-To: <1235244250.3.0.963079671793.issue5341@psf.upfronthosting.co.za> Message-ID: <1271122877.55.0.628522009933.issue5341@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file16855/functools-typos-pep8.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 03:41:22 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 13 Apr 2010 01:41:22 +0000 Subject: [issue5341] A selection of spelling errors and typos throughout source In-Reply-To: <1235244250.3.0.963079671793.issue5341@psf.upfronthosting.co.za> Message-ID: <1271122882.4.0.543503325512.issue5341@psf.upfronthosting.co.za> Changes by ?ric Araujo : Removed file: http://bugs.python.org/file16894/functools-typos-pep8.diff _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 04:17:20 2010 From: report at bugs.python.org (=?utf-8?q?=C3=89ric_Araujo?=) Date: Tue, 13 Apr 2010 02:17:20 +0000 Subject: [issue5341] A selection of spelling errors and typos throughout source In-Reply-To: <1235244250.3.0.963079671793.issue5341@psf.upfronthosting.co.za> Message-ID: <1271125040.38.0.784540167692.issue5341@psf.upfronthosting.co.za> ?ric Araujo added the comment: I saw the author of functools on the chatroom and asked for feedback. Summary: * Rewrapping, whitespace changes, quote changes and other minor PEP?8 stuff is not worth the trouble it creates (eats time without improving Python?s quality, and also disturbing use of $vcs blame); * Doc changes have to apply to all four branches, not just trunk and py3k. This leaves the two typos. I?ll port the ?built{-,}in? fixes to 2.6 and 3.1 later. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 04:21:52 2010 From: report at bugs.python.org (Matthew Barnett) Date: Tue, 13 Apr 2010 02:21:52 +0000 Subject: [issue2636] Regexp 2.7 (modifications to current re 2.2.2) In-Reply-To: <1208260672.14.0.711874677361.issue2636@psf.upfronthosting.co.za> Message-ID: <1271125312.0.0.396708397334.issue2636@psf.upfronthosting.co.za> Matthew Barnett added the comment: issue2636-20100413.zip is a new version of the regex module. It includes additional speed-ups. ---------- Added file: http://bugs.python.org/file16905/issue2636-20100413.zip _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 04:40:51 2010 From: report at bugs.python.org (Brian Curtin) Date: Tue, 13 Apr 2010 02:40:51 +0000 Subject: [issue7306] Patch - skip winsound tests if no default sound is configured In-Reply-To: <1257953885.18.0.603136766884.issue7306@psf.upfronthosting.co.za> Message-ID: <1271126451.84.0.178165494807.issue7306@psf.upfronthosting.co.za> Brian Curtin added the comment: Committed in r80026-r80029. ---------- assignee: -> brian.curtin resolution: -> fixed stage: patch review -> committed/rejected status: open -> closed _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 05:01:07 2010 From: report at bugs.python.org (Skip Montanaro) Date: Tue, 13 Apr 2010 03:01:07 +0000 Subject: [issue8382] StringIO.write() takes any argument and converts it to a string In-Reply-To: <1271116613.01.0.381000084861.issue8382@psf.upfronthosting.co.za> Message-ID: <1271127667.65.0.569676479176.issue8382@psf.upfronthosting.co.za> Skip Montanaro added the comment: It's clear you can't change it for 2.6 or 2.7, almost certainly not 3.1. Maybe you could change it for 3.2. ---------- nosy: +skip.montanaro _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 05:04:52 2010 From: report at bugs.python.org (Skip Montanaro) Date: Tue, 13 Apr 2010 03:04:52 +0000 Subject: [issue8382] StringIO.write() takes any argument and converts it to a string In-Reply-To: <1271116613.01.0.381000084861.issue8382@psf.upfronthosting.co.za> Message-ID: <1271127892.45.0.63331384621.issue8382@psf.upfronthosting.co.za> Skip Montanaro added the comment: Whoops. No stringio.py in 3.x. This should be closed as won't fix since it's not a problem in py3k and can't be changed in 2.x. ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 05:33:44 2010 From: report at bugs.python.org (Shashwat Anand) Date: Tue, 13 Apr 2010 03:33:44 +0000 Subject: [issue4487] Add utf8 alias for email charsets In-Reply-To: <1228223832.43.0.0399583143577.issue4487@psf.upfronthosting.co.za> Message-ID: <1271129624.41.0.912022624589.issue4487@psf.upfronthosting.co.za> Shashwat Anand added the comment: MIMEText doesn't support unicode input. This was the reason OP Test case failed. For reference : http://bugs.python.org/issue1368247 ---------- _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 05:33:47 2010 From: report at bugs.python.org (Shashwat Anand) Date: Tue, 13 Apr 2010 03:33:47 +0000 Subject: [issue1368247] unicode in email.MIMEText and email/Charset.py Message-ID: <1271129627.91.0.197884678794.issue1368247@psf.upfronthosting.co.za> Shashwat Anand added the comment: After applying maxua's patch we do not get the unicode error but as david stated the support is not there. Here is the test. >>> import email >>> msg = email.MIMEText.MIMEText(u'\u043a\u0438\u0440\u0438\u043b\u0438\u0446\u0430') >>> msg.set_charset('utf8') >>> msg.as_string() 'MIME-Version: 1.0\nContent-Transfer-Encoding: 8bit\nContent-Type: text/plain; charset="utf8"\n\n\xd0\xba\xd0\xb8\xd1\x80\xd0\xb8\xd0\xbb\xd0\xb8\xd1\x86\xd0\xb0' This does not seems a viable general solution to the problem. I guess, this issue should be closed and emphasis should be now on development of 'email 6.0'. By the way I mailed Marius, the author of the blog-post http://mg.pov.lt/blog/unicode-emails-in-python , if I can borrow his example for the doc-patch. ---------- nosy: +l0nwlf status: pending -> open _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 06:12:21 2010 From: report at bugs.python.org (Shashwat Anand) Date: Tue, 13 Apr 2010 04:12:21 +0000 Subject: [issue6521] Contradictory documentation for email.mime.text.MIMEText In-Reply-To: <1248009581.26.0.315231370095.issue6521@psf.upfronthosting.co.za> Message-ID: <1271131941.24.0.338646863898.issue6521@psf.upfronthosting.co.za> Shashwat Anand added the comment: UnicodeEncodeError: 'ascii' codec can't encode characters in position 0-7: ordinal not in range(128) The lack of unicode encoding support should be mentioned explicitly. Attaching a doc patch. ---------- keywords: +patch nosy: +l0nwlf, r.david.murray Added file: http://bugs.python.org/file16906/email.mime.rst.patch _______________________________________ Python tracker _______________________________________ From report at bugs.python.org Tue Apr 13 06:14:29 2010 From: report at bugs.python.org (Ezio Melotti) Date: Tue, 13 Apr 2010 04:14:29 +0000 Subject: [issue3143] Make the left sidebar in the doc collapsible In-Reply-To: <1213894130.5.0.901866798504.issue3143@psf.upfronthosting.co.za> Message-ID: <1271132069.95.0.0175869262258.issue3143@psf.upfronthosting.co.za> Ezio Melotti added the comment: Even if I tested it only with Python documentation, the script should work for other docs generated by Sphinx (at least with the default theme). Last time I tried the script it wasn't working on Chrome, so there's still some work to do. If you want to try it and see if it works with your doc, it should be enough to copy the .js file and include it in the HTML page using a